diff options
-rw-r--r-- | viewtoolbar.py | 7 | ||||
-rw-r--r-- | webactivity.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/viewtoolbar.py b/viewtoolbar.py index 2008277..f65ae4f 100644 --- a/viewtoolbar.py +++ b/viewtoolbar.py @@ -110,7 +110,12 @@ class ViewToolbar(Gtk.Toolbar): def __tray_toggled_cb(self, button): if button.props.active: self._activity.tray.show() - self.traybutton.set_tooltip(_('Show Tray')) else: self._activity.tray.hide() + self.update_traybutton_tooltip() + + def update_traybutton_tooltip(self): + if not self.traybutton.props.active: + self.traybutton.set_tooltip(_('Show Tray')) + else: self.traybutton.set_tooltip(_('Hide Tray')) diff --git a/webactivity.py b/webactivity.py index 43267e2..cfaa240 100644 --- a/webactivity.py +++ b/webactivity.py @@ -614,6 +614,7 @@ class WebActivity(activity.Activity): item.show() self._view_toolbar.traybutton.props.sensitive = True self._view_toolbar.traybutton.props.active = True + self._view_toolbar.update_traybutton_tooltip() def _link_removed_cb(self, button, hash): ''' remove a link from tray and delete it in the model ''' @@ -622,6 +623,7 @@ class WebActivity(activity.Activity): if len(self._tray.get_children()) == 0: self._view_toolbar.traybutton.props.sensitive = False self._view_toolbar.traybutton.props.active = False + self._view_toolbar.update_traybutton_tooltip() def _link_clicked_cb(self, button, url): ''' an item of the link tray has been clicked ''' |