GNOME Bugzilla – Bug 111026
Window-menu applet does not look like a menu
Last modified: 2004-12-22 21:47:04 UTC
Package: gnome-panel Severity: minor Version: GNOME2.3.0 2.3.0 os_details: Gnome.Org Synopsis: Window-menu applet does not look like a menu Bugzilla-Product: gnome-panel Bugzilla-Component: Window Menu Applet Description: Description of Problem: The window menu applet does not look like a menu when you click on it. Steps to reproduce the problem: 1. Click on the window menu applet. Actual Results: The applet (the button itself you just clicked on) does not look like a regular menu item, rather like a button. Expected Results: Once clicked on, the applet should look like a regular menu item, just like the "menu bar" applet does. This would look a lot more consistent, as the name of the applet is "window menu". ------- Bug moved to this database by unknown@bugzilla.gnome.org 2003-04-17 10:49 ------- The original reporter (vnoel@cox.net) of this bug does not have an account here. Reassigning to the exporter, unknown@bugzilla.gnome.org. Reassigning to the default owner of the component, gnome-panel-maint@bugzilla.gnome.org.
Are you talking about the window list? The applet showing the currently running applications - also known as the tasklist? That's called the tasklist, not window menu list. If you're thinking about the panel-menu applet that's not being distributed any longer I think.
I am referring to the applet that looks like a menu with a small icon of the running application in it, and when clicked pops up a list of active windows. Before gnome-panel 2.3 it was part of the foobar panel, on the extreme right (its still like that in XD2). Since gnome-panel 2.3 it is a seperate applet, called "window menu". According to its name, this applet is a menu and behaves like one, but its look is not consistent with other menus (when you click it). I can provide a screenshot if you want...
Vincent: what do you mean by "not consistent" ?
Vincent: could you answer the question? Thanks
By "inconsistent", I mean that when you click the applet, it does not look the same as a regular clicked menu item (not the same color, etc)... For example click on the main menu applet : it looks as any other menu. It just looks strange as both applets behave like menus, so they should look the same. However, now that the applet is a "window selector" and not "window-menu", maybe this is not a problem anymore.
Created attachment 27699 [details] screenshot showing the difference I have attached a screenshot showing the unconsistency between the window-selector applet and other, regular, menus.
What additional info do you need ?
Nice screenshot :-)
I've tried to implement a "normal" menu behavior, by turning the applet button into a gtk_menu_item, but when there is no label in the gtk_menu_item the icon appears weird... Other than that it almost works.
Note that a similar bug exists for the mixer applet (bug 98355).
Vincent, I just fixed the mixer thing and I'll fix this too... If only you can tell me where I find the sources? I can't find the window selector applet sources in gnome-applets CVS.
Ronald: it's in gnome-panel/applets/wncklet/
Ah, thanks. No patch then, yet. But here's a description of a patch. :-p. You need two changes in gnome-panel/applets/wncklet/window-menu.c. in window_menu_menu_hidden(), delete the line gtk_frame_set_shadow_type (GTK_FRAME (window_menu->frame), GTK_SHADOW_NONE); and change it to gtk_widget_set_state (GTK_WIDGET (window_menu->frame), GTK_STATE_NORMAL);, in window_menu_popup_menu(), delete the line gtk_frame_set_shadow_type (GTK_FRAME (window_menu->frame), GTK_SHADOW_IN); and change it to gtk_widget_set_state (GTK_WIDGET (window_menu->frame), GTK_STATE_SELECTED); You can basically remove the whole frame and use window_menu->applet instead, since the only reason that the frame exists is to have a relief-effect when the applet is selected. Since that touches quite a bit of code, I suppose you'll want me to prepare a patch either way. If you need more than just words, I'll download CVS and prepare a patch, that'll take me a few days, though.
Created attachment 33094 [details] [review] patch following Ronald's instructions Following Ronald's instructions (thanks !), here is the relevant patch. It fixes this bug, somehow... ... however (unfortunately) the widget "selected" color is not the same as a regular menu :( It's a different shade. This is also true for the mixer applet.
Created attachment 33095 [details] [review] new patch With the previous patch, a thin 1-pixel line appeared around the window menu applet when selected. This new patch implements the dirty clock-applet trick (sorry, but there's no better way it seems) to remove the focus line. See bug 147999 (which recommends to apply this trick to other applets as well... when it's useful). The applet looks nice with this patch.
Created attachment 33096 [details] screenshot with the patch This screenshot shows how the applet looks with the patch (with industrial theme). Notice the slight color difference between the applet background and the selected item in the window menu... But I'm not sure if that's really important anyway.
Comment on attachment 33095 [details] [review] new patch I suppose you tested it and it works well. Please commit :-)
As for the colour difference: I didn't note it on my computer (menu and select are the same colour here), but I'm sure that we can work that out later on. Maybe we should ask the Gtk+ guys if there's a special state or something else for menu-colour?
Committed. Thanks Ronald :) Now I'd like to see this effect in all applets that open an extra pane ;-)
Vincent: I think it'd be better to open bugs for the other applets and close this one (except if you want to keep it open for the colour problem).
Yeah, of course, that's what I meant. I think we can keep this open for the color thing...
This might be a stupid question... but why aren't we using a menu widget?
We now have a patch to use a menu bar. *** This bug has been marked as a duplicate of 160450 ***