Ticket #2874: 0001-Publish-icon-inside-the-Activity-Toolbar-SL-2874.patch

File 0001-Publish-icon-inside-the-Activity-Toolbar-SL-2874.patch, 2.3 KB (added by humitos, 12 years ago)
  • activity.py

    From 2897ffae4f850d9f6f6ed7b8a6513305e192d6bd Mon Sep 17 00:00:00 2001
    Message-Id: <2897ffae4f850d9f6f6ed7b8a6513305e192d6bd.1337185690.git.humitos@gmail.com>
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Wed, 16 May 2012 13:26:37 -0300
    Subject: [PATCH InfoSlicer] 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>
    ---
     activity.py |    4 +++-
     edit.py     |    3 ---
     library.py  |    5 ++++-
     3 files changed, 7 insertions(+), 5 deletions(-)
    
    diff --git a/activity.py b/activity.py
    index 469207d..126d4c7 100644
    a b class InfoslicerActivity(SharedActivity): 
    9696            self._toolbar.insert(edit_button, -1)
    9797            self._toolbar.insert(gtk.SeparatorToolItem(), -1)
    9898            self.edit_bar = edit.ToolbarBuilder(self.edit, self._toolbar)
    99             self.library_bar = library.ToolbarBuilder(self.library, self._toolbar)
     99            self.library_bar = library.ToolbarBuilder(self.library,
     100                                                      activity_button)
     101            self.library_bar.publish.show()
    100102
    101103        edit_fake = gtk.EventBox()
    102104
  • edit.py

    diff --git a/edit.py b/edit.py
    index 4fea931..d21a989 100644
    a b class ToolbarBuilder(): 
    6565            [self.txt_toggle, self.img_toggle])
    6666        toolbar.insert(self.img_toggle, -1)
    6767
    68         self.separator = gtk.SeparatorToolItem()
    69         toolbar.insert(self.separator, -1)
    70 
    7168        for tab in TABS:
    7269            for i in tab.toolitems:
    7370                toolbar.insert(i, -1)
  • library.py

    diff --git a/library.py b/library.py
    index 3a61420..86bde44 100644
    a b class ToolbarBuilder(): 
    223223        self.publish = ToolButton('export-to-journal',
    224224                tooltip=_('Publish selected articles'))
    225225        self.publish.connect("clicked", self._publish_clicked_cb)
    226         toolbar.insert(self.publish, -1)
    227226
     227        if hasattr(toolbar, 'insert'):  # Add button to the main toolbar...
     228            toolbar.insert(self.publish, -1)
     229        else:  # ...or a secondary toolbar.
     230            toolbar.props.page.insert(self.publish, -1)
    228231
    229232    def _publish_clicked_cb(self, widget):
    230233        xol.publish(self.activity)