Bug 171954 - notification api needs another arg
Summary: notification api needs another arg
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-power-manager
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: John (J5) Palmieri
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: Yellowpad
TreeView+ depends on / blocked
 
Reported: 2005-10-28 04:41 UTC by Matthias Clasen
Modified: 2013-03-13 04:49 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2005-11-08 14:41:58 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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