Bug 171954

Summary: notification api needs another arg
Product: [Fedora] Fedora Reporter: Matthias Clasen <mclasen>
Component: gnome-power-managerAssignee: John (J5) Palmieri <johnp>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: caillon, jkeck, richard
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-11-08 14:41:58 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 170756    

Description Matthias Clasen 2005-10-28 04:41:51 UTC
...to make nice warning dialogs with primary and secondary text.

Comment 1 Richard Hughes 2005-10-28 07:19:56 UTC
How do you mean "primary" and "secondary"? Have you got an example please. Also,
is this with libnotify or the gtk fallback? Thanks.

Comment 2 Matthias Clasen 2005-10-28 12:08:08 UTC
sorry, the bug is terse, but caillon knows.

Comment 3 Christopher Aillon 2005-10-28 17:29:42 UTC
GtkMessageDialog has primary and secodary text arguments.  Right now, we only
really use the secondary.  We should also include another argument to set the
primary text.  See http://www.gnome.org/~caillon/gpm-dialog.png for an example
of what the dialog should look like.  The libnotify stuff should also include
this, but I'm not sure what the API will look like for that.  J5?

I looked through gpm-main.c to implement this, and I must say, I'm confused as
to why we are sending notifications of many things.  "Power button pressed"? 
Not sure why any user would care to get notified of that ever.  "Duh, I just
pushed the button."  Is that something that a g_debug () would be better suited for?

Comment 4 John (J5) Palmieri 2005-10-28 17:46:36 UTC
Yes we must go and destroy any bad notifications :-) Actually the only time
notification should be used is for battery low, perhaps battery full and
switching form battery/power.  http://www.galago-project.org/downloads.php for
the current libnotify sources.  I'm working on a replacement and have asked for
an svn account from chris hammond.

Comment 5 Christopher Aillon 2005-10-28 18:46:36 UTC
First cut at a patch is
http://www.gnome.org/~caillon/patches/gpm-notifications.patch

It's untested, other than it compiles for me.

Comment 6 Richard Hughes 2005-10-29 11:39:11 UTC
Patch looks good, and I agree we shouldn't do as many notifications as we are
doing. The Powerbutton pressed stuff was more for debugging and so should be
ripped out.

As for the primary and secodary text arguments, I see what you mean now.
Overall, patch looks good to me.

Thanks, Richard.

Comment 7 Christopher Aillon 2005-10-29 19:08:16 UTC
Hi, I made sure things work fine and just committed this patch with one slight
modification (forgot to use the new parameter with libnotify) to GNOME CVS.

Thanks.

Comment 8 Richard Hughes 2005-10-29 20:41:03 UTC
Brilliant, thanks.

Comment 9 Matthias Clasen 2005-11-08 14:41:22 UTC
Is in upstream cvs now, so I think we can close this bug.