GNOME Bugzilla – Bug 125644
Tooltips should display workspace names
Last modified: 2007-06-19 11:19:55 UTC
Currently (vanilla RedHat 9, workspace switcher 2.2.0.1) the tooltip for the workspace switcher is "Workspace Switcher". I think it should change as you move over the different workspaces to the names of the workspaces. Some kind of prelight state would be nice as well!
I don't see a tooltip at all?
*** Bug 115506 has been marked as a duplicate of this bug. ***
*** Bug 115099 has been marked as a duplicate of this bug. ***
Tooltips were in the workspace switcher applet, but were removed. But I think this enhancement is still valid. When this gets implemented, we should look if bug #107966 still occurs (the bug is closed because there are no more tooltips, but it might be valid again if we re-add tooltips).
Moving to right component. Sorry for the spam.
*** Bug 319337 has been marked as a duplicate of this bug. ***
From my duplicate: Tooltip, which can contain: - Name of workspace and name of window (title+icon) below mouse. - If workspace switcher applet is in small size, tooltip can contain enlarged version of one workspace (with icons).
Created attachment 56801 [details] [review] patch to add tooltips with the workspace name This shows only workspace names, not window names. (It's not clear what the best thing to do with window names would be. Display just the name of the topmost window? The focused window? Whichever window's tiny rectangle the mouse is hovering over?) I've noticed that in test-pager I have to mouse over the pager, then mouse out of the pager and back in before the tooltips will show. But this is better than nothing.
Thanks for the patch Alexandre. > I've noticed that in test-pager I have to mouse over the pager, then mouse out > of the pager and back in before the tooltips will show. But this is better than > nothing. This means you have to initialize the tooltip. Just do gtk_tooltips_set_tip(pager->priv->tips, gtk_widget_get_parent(GTK_WIDGET(pager)), "", NULL); in some event. For example, connect to the expose event for pager and do it there. I think if you can display the name of the cursor pointed by the cursor, it'd be great. Use a format like "Workspace name\nWindow name" Also, your patch is in reverse format ;-)
Created attachment 56841 [details] [review] patch to add a mode toggle button to test-pager In the process of working on this, I have added a toggle button to test-pager.c to toggle between the two display modes. This is not a user visible change, so I haven't bothered to file a seperate bug. As I feared, after I did so, the tooltips stopped working entirely, because GtkVBox is a NO_WINDOW widget. It would seem that I need to either iterate upward through the packing structure until I find a non-NO_WINDOW widget, (is there a convenience function for this?) or fix Bug 56291 (Handle tooltips on NO_WINDOW widgets)
Created attachment 56847 [details] [review] patch to add a mode toggle button to test-pager, now with event_box Ah, I am stupid. Going up the container tree is a bad idea, because tooltips could end up going places they really don't belong. And if fixing Bug 56291 was easy somebody would have done it by now. So I added an event box to put the pager in, and we'll just have to hope that anyone using the pager who wants tooltips doesn't pack it in a NO_WINDOW container widget.
Created attachment 56849 [details] [review] Revised patch to add workspace name This version appears to work almost perfectly. The only bug I can find is that if you change the name of a workspace while the mouse is hovering over it in the pager, the tooltip does not properly display the new name.
Created attachment 56941 [details] [review] patch with gtk+ Bug 156640 fixed I suggest making this bug depend on Bug 156640, as that bug looks like it should not be hard to fix; I made a patch that (I think) is almost right. And I can get more correct behavior with a simpler patch with that bug fixed.
I've tried the "Revised patch to add workspace name", it works fine but open an empty tooltip when having the mouse over the small border between the panel and the applet
Sebastien: Yes, I noticed that too. I believe the patch in comment 13, when used in conjunction with my gtk patch for Bug 156640, does not have the problem. So I'm really not inclined to work more on this until Bug 156640 is fixed.
*** Bug 367417 has been marked as a duplicate of this bug. ***
I fixed this with the new GtkTooltip API. Sébastien: this is different from your updated ubuntu patch.