Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/readtoolbar.py
diff options
context:
space:
mode:
authorGonzalo Odiard <godiard@gmail.com>2012-10-05 20:49:44 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-10-09 13:30:31 (GMT)
commitc411b44e29d2f156ccd2838e5edfbb2655598d97 (patch)
treef79239faf138e2635c843e650a94aa814fa19d57 /readtoolbar.py
parent065e32d5ab0c42fcf51336d933cdc99febd3acca (diff)
Show the bookmarks in a tray like in Browse activity
The preview is saved in another table in the sqlite db. Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'readtoolbar.py')
-rw-r--r--readtoolbar.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/readtoolbar.py b/readtoolbar.py
index 737c55d..6d1e02b 100644
--- a/readtoolbar.py
+++ b/readtoolbar.py
@@ -167,6 +167,8 @@ class ViewToolbar(Gtk.Toolbar):
([])),
'toggle-index-show': (GObject.SignalFlags.RUN_FIRST, GObject.TYPE_NONE,
([bool])),
+ 'toggle-tray-show': (GObject.SignalFlags.RUN_FIRST, GObject.TYPE_NONE,
+ ([bool])),
}
def __init__(self):
@@ -224,6 +226,14 @@ class ViewToolbar(Gtk.Toolbar):
self.insert(self._fullscreen, -1)
self._fullscreen.show()
+ self.traybutton = ToggleToolButton('tray-show')
+ self.traybutton.set_icon_name('tray-favourite')
+ self.traybutton.connect('toggled', self.__tray_toggled_cb)
+ #self.traybutton.props.sensitive = False
+ self.traybutton.props.active = False
+ self.insert(self.traybutton, -1)
+ self.traybutton.show()
+
self._view_notify_zoom_handler = None
def set_view(self, view):
@@ -275,3 +285,10 @@ class ViewToolbar(Gtk.Toolbar):
def _fullscreen_cb(self, button):
self.emit('go-fullscreen')
+
+ def __tray_toggled_cb(self, button):
+ self.emit('toggle-tray-show', button.get_active())
+ if button.props.active:
+ self.traybutton.set_tooltip(_('Show Tray'))
+ else:
+ self.traybutton.set_tooltip(_('Hide Tray'))