diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-05-16 16:26:37 (GMT) |
---|---|---|
committer | Manuel Kaufmann <humitos@gmail.com> | 2012-05-16 16:26:37 (GMT) |
commit | 2897ffae4f850d9f6f6ed7b8a6513305e192d6bd (patch) | |
tree | a92c38fbc197aad5b8e524c9eb2388d000df476f | |
parent | 1bbcccf7e5f24af88f843cb84b845a79e2298407 (diff) |
Publish icon inside the Activity Toolbar SL #2874
Moved the Publish icon from the main toolbar to Activity Toolbar so it
is easier to name the exported file.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
-rw-r--r-- | activity.py | 4 | ||||
-rw-r--r-- | edit.py | 3 | ||||
-rw-r--r-- | library.py | 5 |
3 files changed, 7 insertions, 5 deletions
diff --git a/activity.py b/activity.py index 469207d..126d4c7 100644 --- a/activity.py +++ b/activity.py @@ -96,7 +96,9 @@ class InfoslicerActivity(SharedActivity): self._toolbar.insert(edit_button, -1) self._toolbar.insert(gtk.SeparatorToolItem(), -1) self.edit_bar = edit.ToolbarBuilder(self.edit, self._toolbar) - self.library_bar = library.ToolbarBuilder(self.library, self._toolbar) + self.library_bar = library.ToolbarBuilder(self.library, + activity_button) + self.library_bar.publish.show() edit_fake = gtk.EventBox() @@ -65,9 +65,6 @@ class ToolbarBuilder(): [self.txt_toggle, self.img_toggle]) toolbar.insert(self.img_toggle, -1) - self.separator = gtk.SeparatorToolItem() - toolbar.insert(self.separator, -1) - for tab in TABS: for i in tab.toolitems: toolbar.insert(i, -1) @@ -223,8 +223,11 @@ class ToolbarBuilder(): self.publish = ToolButton('export-to-journal', tooltip=_('Publish selected articles')) self.publish.connect("clicked", self._publish_clicked_cb) - toolbar.insert(self.publish, -1) + if hasattr(toolbar, 'insert'): # Add button to the main toolbar... + toolbar.insert(self.publish, -1) + else: # ...or a secondary toolbar. + toolbar.props.page.insert(self.publish, -1) def _publish_clicked_cb(self, widget): xol.publish(self.activity) |