Search code examples
tcltk-toolkitgnome-shell

Control the tooltip string for toplevel icons shown in the gnome dash


When running a Tcl/Tk program in gnome-shell, all toplevels created by the application add an icon to the dash. When hovering over these icons, they all pop up a tooltip saying "Toplevel", which is not very helpful.

The wm title and wm iconname commands have no effect on the displayed tooltip. Apparently the tooltip shows the toplevel's database class value. Indeed, providing a -class option to the toplevel command does affect the tooltip.

However, this has some limitations. I believe it is not customary to have white space in a class name. Also it is not possible to modify the -class option after the widget has been created.

Is there a better way to control the string displayed in the dash tooltip?


Solution

  • It appears that the only possibility to influence the dash tooltip is through the -class option to the toplevel command.

    For example:

    toplevel .log -class "Event Log"
    

    The space makes working with class bindings a bit cumbersome, but they do work.