From 2897ffae4f850d9f6f6ed7b8a6513305e192d6bd Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 16 May 2012 16:26:37 +0000 Subject: 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 --- 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() diff --git a/edit.py b/edit.py index 4fea931..d21a989 100644 --- a/edit.py +++ b/edit.py @@ -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) diff --git a/library.py b/library.py index 3a61420..86bde44 100644 --- a/library.py +++ b/library.py @@ -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) -- cgit v0.9.1