Bug 171954 - notification api needs another arg
notification api needs another arg
Product: Fedora
Classification: Fedora
Component: gnome-power-manager (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
Depends On:
Blocks: Yellowpad
  Show dependency treegraph
Reported: 2005-10-28 00:41 EDT by Matthias Clasen
Modified: 2013-03-13 00:49 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-11-08 09:41:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Matthias Clasen 2005-10-28 00:41:51 EDT
...to make nice warning dialogs with primary and secondary text.
Comment 1 Richard Hughes 2005-10-28 03:19:56 EDT
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 08:08:08 EDT
sorry, the bug is terse, but caillon knows.
Comment 3 Christopher Aillon 2005-10-28 13:29:42 EDT
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 13:46:36 EDT
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 14:46:36 EDT
First cut at a patch is

It's untested, other than it compiles for me.
Comment 6 Richard Hughes 2005-10-29 07:39:11 EDT
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 15:08:16 EDT
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.

Comment 8 Richard Hughes 2005-10-29 16:41:03 EDT
Brilliant, thanks.
Comment 9 Matthias Clasen 2005-11-08 09:41:22 EST
Is in upstream cvs now, so I think we can close this bug.

Note You need to log in before you can comment on or make changes to this bug.