Exemplo n.º 1
0
 def get_tbbuttons(self):
     tbbuttons = GStatus.get_tbbuttons(self)
     tbbuttons.insert(0, gtk.SeparatorToolItem())
     self.shelve_btn = self.make_toolbutton(gtk.STOCK_FILE, _('Shelve'),
             self.shelve_clicked, tip=_('set aside selected changes'))
     self.unshelve_btn = self.make_toolbutton(gtk.STOCK_EDIT, _('Unshelve'),
             self.unshelve_clicked, tip=_('restore shelved changes'))
     self.abandon_btn = self.make_toolbutton(gtk.STOCK_CANCEL, _('Abandon'),
             self.abandon_clicked, tip=_('abandon shelved changes'))
     tbbuttons.insert(0, self.abandon_btn)
     tbbuttons.insert(0, self.unshelve_btn)
     tbbuttons.insert(0, self.shelve_btn)
     return tbbuttons
Exemplo n.º 2
0
    def get_body(self):
        status_body = GStatus.get_body(self)
        #vbox = gtk.VBox()  # For named shelf collection
        #self.vpaned = gtk.VPaned()
        #self.vpaned.add1(vbox)
        #self.vpaned.add2(status_body)
        #self.vpaned.set_position(self._setting_vpos)
        self.activate_shelve_buttons(True)

        self.patch_text = gtk.TextView()
        self.patch_text.set_wrap_mode(gtk.WRAP_NONE)
        self.patch_text.set_editable(False)
        self.patch_text.modify_font(self.difffont)
        scroller = gtk.ScrolledWindow()
        scroller.set_policy(gtk.POLICY_AUTOMATIC,
                            gtk.POLICY_AUTOMATIC)
        scroller.add(self.patch_text)
        self.diff_notebook.append_page(scroller, gtk.Label(_('Shelf Contents')))
        self.diff_notebook.show_all()
        return status_body
Exemplo n.º 3
0
 def load_settings(self, settings):
     GStatus.load_settings(self, settings)
Exemplo n.º 4
0
 def save_settings(self):
     settings = GStatus.save_settings(self)
     #settings['gshelve'] = self.vpaned.get_position()
     return settings
Exemplo n.º 5
0
 def parse_opts(self):
     GStatus.parse_opts(self)
     if not self.test_opt('rev'):
         self.opts['rev'] = ''
Exemplo n.º 6
0
 def init(self):
     GStatus.init(self)
     self.mode = 'shelve'
     self.ui = ErrBufUI(self.ui)