After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 149327 - Make labels in the window selector bold for windows with _NET_WM_STATE_DEMANDS_ATTENTION hint
Make labels in the window selector bold for windows with _NET_WM_STATE_DEMAND...
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: window selector
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-08-04 20:16 UTC by Vincent Noel
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot showing the problem (35.30 KB, image/png)
2004-08-04 20:16 UTC, Vincent Noel
  Details
Patch for the window selector applet (2.35 KB, patch)
2004-08-05 20:50 UTC, Vincent Noel
needs-work Details | Review
patch with "state_changed" signal (3.20 KB, patch)
2004-08-05 21:11 UTC, Vincent Noel
needs-work Details | Review
patch with requested changes (2.63 KB, patch)
2004-08-06 13:25 UTC, Vincent Noel
none Details | Review

Description Vincent Noel 2004-08-04 20:16:03 UTC
Description of Problem:
With a recent version of the
gnome-panel/metacity/libwnck combo, windows that
set the _NET_WM_STATE_DEMANDS_ATTENTION hint
appear in bold in the window list applet.
They should also appear in bold in the Window
Selector applet.
Comment 1 Vincent Noel 2004-08-04 20:16:31 UTC
Created attachment 30215 [details]
screenshot showing the problem
Comment 2 Mark McLoughlin 2004-08-05 08:52:25 UTC
Hrrm, yeah - shouldn't be difficult. Just use wnck_window_demands_attention(),
the "state-changed" signal on WnckWindow and the hack to make a label bold which
they used in the tasklist.
Comment 3 Vincent Noel 2004-08-05 20:50:21 UTC
Created attachment 30250 [details] [review]
Patch for the window selector applet

This patch makes the label bold when the window sets the DEMANDS_ATTENTION
hint. It does not cover the "state-changed" case yet...
Comment 4 Vincent Noel 2004-08-05 21:11:17 UTC
Created attachment 30253 [details] [review]
patch with "state_changed" signal

Here is a patch that tries to follow the "state-changed" signal of the
WnckWindow.  However I don't know how to test it (how do you make a window set
the DEMANDS_ATTENTION hint while you're in the window selector ?)

Also I guess the opposite is required : when a window unsets the
DEMANDS_ATTENTION, un-bold the label... Should I add a eel_gtk_label_unset_bold
???
Comment 5 Mark McLoughlin 2004-08-06 07:01:06 UTC
Actually, there's no need to do the state-changed thing since the menu gets
repopulated every time we popup the menu. Its no problem if it doesn't update
while its popped down.

I'd do it like this:

  item = window_menu_item_new (window_menu,
                               label,
                               wnck_window_demands_attention (window));

and add a "make_bold" argument to window_menu_item_new()

Also, I'd prefer if you renamed eel_gtk_label_make_bold() to
window_menu_make_label_bold().

Anyway, once you've made those changes feel free to go ahead and commit. Thanks
Comment 6 Vincent Noel 2004-08-06 13:25:34 UTC
Created attachment 30276 [details] [review]
patch with requested changes

Here is a patch with the requested changes and no handling of the changed_state
signal. 
I don't have CVS access yet, so I cannot commit. How can I can these rights ?
Comment 7 Mark McLoughlin 2004-08-06 15:32:01 UTC
Thanks much. I've gone ahead and committed:

2004-08-06  Mark McLoughlin  <mark@skynet.ie>

        Patch from Vincent Noel <vnoel@cox.net> in bug #149327.

        * window-menu.c
        (window_menu_make_label_bold): new function.
        (window_menu_item_new): Add an argument to make the label bold.
        (window_menu_add_window): Pass the bold argument when the window
        has the DEMANDS_ATTENTION hint set.


To request a CVS account see here:

http://developer.gnome.org/doc/policies/accounts/requesting.html

Feel free to cc me when you make the request.