GNOME Bugzilla – Bug 149327
Make labels in the window selector bold for windows with _NET_WM_STATE_DEMANDS_ATTENTION hint
Last modified: 2004-12-22 21:47:04 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.
Created attachment 30215 [details] screenshot showing the problem
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.
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...
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 ???
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
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 ?
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.