/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/__init__.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-30 08:48:46 UTC
  • mto: (0.14.3 main)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060930084846-44463cd442ede956
Cleanups: bookmarks and sensitivity.

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
        other_branch = local_branch.get_parent()
224
224
        if other_branch is None:
225
225
            error_dialog(_('Parent location is unknown'),
226
 
                                     _('Cannot determine missing revisions if no parent location is known.'))
 
226
                         _('Cannot determine missing revisions if no parent location is known.'))
227
227
            return
228
228
        
229
229
        remote_branch = Branch.open(other_branch)
235
235
 
236
236
        if ret > 0:
237
237
            info_dialog(_('There are missing revisions'),
238
 
                                    _('%d revision(s) missing.') % ret)
 
238
                        _('%d revision(s) missing.') % ret)
239
239
        else:
240
240
            info_dialog(_('Local branch up to date'),
241
 
                                    _('There are no missing revisions.'))
 
241
                        _('There are no missing revisions.'))
242
242
 
243
243
    def on_menuitem_branch_pull_activate(self, widget):
244
244
        """ Branch/Pull menu handler. """
384
384
            
385
385
            menu.left_context_menu().popup(None, None, None, 0,
386
386
                                           event.time)
387
 
            
388
 
            # Bookmarks might have changed
389
 
            self.pref.read()
390
 
        
 
387
 
391
388
    def on_treeview_left_row_activated(self, treeview, path, view_column):
392
389
        """ Occurs when somebody double-clicks or enters an item in the
393
390
        bookmark list. """
398
395
 
399
396
        self.set_path(newdir)
400
397
        self.refresh_right()
401
 
    
 
398
 
402
399
    def on_treeview_right_button_press_event(self, widget, event):
403
400
        """ Occurs when somebody right-clicks in the file list. """
404
401
        if event.button == 3:
576
573
        tvcolumn_status.pack_start(cell, True)
577
574
        tvcolumn_status.add_attribute(cell, 'text', 2)
578
575
 
 
576
        # Set menu and toolbar sensitivity
579
577
        self.menuitem_branch_init.set_sensitive(self.notbranch)
580
 
        # Check if current directory is a branch
581
578
        self.menuitem_branch_get.set_sensitive(not self.notbranch)
582
579
        self.menuitem_branch_checkout.set_sensitive(not self.notbranch)
583
580
        self.menuitem_branch_pull.set_sensitive(not self.notbranch)
633
630
        treestore = self.treeview_left.get_model()
634
631
        treestore.clear()
635
632
 
 
633
        # Re-read preferences
 
634
        self.pref.read()
 
635
 
636
636
        # Get bookmarks
637
637
        bookmarks = self.pref.get_bookmarks()
638
638
 
740
740
 
741
741
        # Add the ListStore to the TreeView
742
742
        self.treeview_right.set_model(liststore)
 
743
        
 
744
        # Set menu and toolbar sensitivity
 
745
        self.menuitem_branch_init.set_sensitive(self.notbranch)
 
746
        self.menuitem_branch_get.set_sensitive(not self.notbranch)
 
747
        self.menuitem_branch_checkout.set_sensitive(not self.notbranch)
 
748
        self.menuitem_branch_pull.set_sensitive(not self.notbranch)
 
749
        self.menuitem_branch_push.set_sensitive(not self.notbranch)
 
750
        self.menuitem_branch_commit.set_sensitive(not self.notbranch)
 
751
        self.menuitem_branch_status.set_sensitive(not self.notbranch)
 
752
        self.menuitem_branch_missing.set_sensitive(not self.notbranch)
 
753
        self.menuitem_stats.set_sensitive(not self.notbranch)
 
754
        self.menuitem_add_files.set_sensitive(not self.notbranch)
 
755
        self.menuitem_remove_files.set_sensitive(not self.notbranch)
 
756
        self.menuitem_file_make_directory.set_sensitive(not self.notbranch)
 
757
        self.menuitem_file_rename.set_sensitive(not self.notbranch)
 
758
        self.menuitem_file_move.set_sensitive(not self.notbranch)
 
759
        #self.menutoolbutton_diff.set_sensitive(True)
 
760
        self.toolbutton_diff.set_sensitive(not self.notbranch)
 
761
        self.toolbutton_log.set_sensitive(not self.notbranch)
 
762
        self.toolbutton_commit.set_sensitive(not self.notbranch)
 
763
        self.toolbutton_pull.set_sensitive(not self.notbranch)
 
764
        self.toolbutton_push.set_sensitive(not self.notbranch)
743
765
 
744
766
    def _harddisks(self):
745
767
        """ Returns hard drive letters under Win32. """