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 125644 - Tooltips should display workspace names
Tooltips should display workspace names
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: pager
2.4.x
Other Linux
: Normal enhancement
: ---
Assigned To: libwnck maintainers
libwnck maintainers
: 115099 115506 319337 367417 (view as bug list)
Depends on:
Blocks: 155906
 
 
Reported: 2003-10-27 23:37 UTC by David Malcolm
Modified: 2007-06-19 11:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to add tooltips with the workspace name (1.22 KB, patch)
2006-01-05 07:26 UTC, Alexandre Muniz
needs-work Details | Review
patch to add a mode toggle button to test-pager (1.66 KB, patch)
2006-01-06 07:06 UTC, Alexandre Muniz
none Details | Review
patch to add a mode toggle button to test-pager, now with event_box (1.78 KB, patch)
2006-01-06 08:41 UTC, Alexandre Muniz
none Details | Review
Revised patch to add workspace name (1.91 KB, patch)
2006-01-06 09:23 UTC, Alexandre Muniz
none Details | Review
patch with gtk+ Bug 156640 fixed (1.59 KB, patch)
2006-01-07 23:18 UTC, Alexandre Muniz
none Details | Review

Description David Malcolm 2003-10-27 23:37:10 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!
Comment 1 Kjartan Maraas 2004-04-18 21:49:33 UTC
I don't see a tooltip at all?
Comment 2 Vincent Untz 2005-01-03 19:03:56 UTC
*** Bug 115506 has been marked as a duplicate of this bug. ***
Comment 3 Vincent Untz 2005-01-03 19:04:55 UTC
*** Bug 115099 has been marked as a duplicate of this bug. ***
Comment 4 Vincent Untz 2005-01-03 19:09:49 UTC
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).
Comment 5 Vincent Noel 2005-01-28 15:12:40 UTC
Moving to right component. Sorry for the spam.
Comment 6 Olav Vitters 2005-10-20 17:29:33 UTC
*** Bug 319337 has been marked as a duplicate of this bug. ***
Comment 7 Stanislav Brabec 2005-10-21 09:20:44 UTC
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).
Comment 8 Alexandre Muniz 2006-01-05 07:26:14 UTC
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.
Comment 9 Vincent Untz 2006-01-05 07:40:04 UTC
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 ;-)
Comment 10 Alexandre Muniz 2006-01-06 07:06:22 UTC
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)
Comment 11 Alexandre Muniz 2006-01-06 08:41:23 UTC
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.
Comment 12 Alexandre Muniz 2006-01-06 09:23:35 UTC
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.
Comment 13 Alexandre Muniz 2006-01-07 23:18:50 UTC
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.
Comment 14 Sebastien Bacher 2006-02-20 17:05:23 UTC
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
Comment 15 Alexandre Muniz 2006-07-07 18:28:04 UTC
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.
Comment 16 Vincent Untz 2007-01-15 11:24:29 UTC
*** Bug 367417 has been marked as a duplicate of this bug. ***
Comment 17 Vincent Untz 2007-06-19 11:19:55 UTC
I fixed this with the new GtkTooltip API. Sébastien: this is different from your updated ubuntu patch.