diff options
Diffstat (limited to 'voctogui/lib/toolbar')
-rw-r--r-- | voctogui/lib/toolbar/composition.py | 3 | ||||
-rw-r--r-- | voctogui/lib/toolbar/misc.py | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/voctogui/lib/toolbar/composition.py b/voctogui/lib/toolbar/composition.py index 2674260..b55254a 100644 --- a/voctogui/lib/toolbar/composition.py +++ b/voctogui/lib/toolbar/composition.py @@ -31,6 +31,9 @@ class CompositionToolbarController(object): ) btn.set_name(name) + tooltip = Gtk.accelerator_get_label(key, mod) + btn.set_tooltip_text(tooltip) + # Thanks to http://stackoverflow.com/a/19739855/1659732 btn.get_child().add_accelerator('clicked', accelerators, key, mod, Gtk.AccelFlags.VISIBLE) diff --git a/voctogui/lib/toolbar/misc.py b/voctogui/lib/toolbar/misc.py index 530bbad..8947368 100644 --- a/voctogui/lib/toolbar/misc.py +++ b/voctogui/lib/toolbar/misc.py @@ -26,6 +26,8 @@ class MiscToolbarController(object): key, mod = Gtk.accelerator_parse('t') cutbtn.add_accelerator('clicked', accelerators, key, mod, Gtk.AccelFlags.VISIBLE) + tooltip = Gtk.accelerator_get_label(key, mod) + cutbtn.set_tooltip_text(tooltip) def on_closebtn_clicked(self, btn): self.log.info('close-button clicked') |