/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/frontend/gtk/handler.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-02 14:27:00 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060902142700-53171c98d497a8db
Implemented Missing revisions functionality.

2006-09-02  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * po/olive-gtk.pot: regenerated
    * olive/backend/errors.py: added ConnectionError exception
    * olive/frontend/gtk/handler.py: implemented Missing revisions menu handler
    * olive.glade: added Branch/Missing revisions menu item
    * olive/backend/update.py: added NotBranchError and ConnectionError
      exceptions to missing()

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
        commit = OliveCommit(self.gladefile, self.comm, self.dialog)
71
71
        commit.display()
72
72
    
 
73
    def on_menuitem_branch_missing_revisions_activate(self, widget):
 
74
        """ Branch/Missing revisions menu handler. """
 
75
        import olive.backend.update as update
 
76
        
 
77
        self.comm.set_busy(self.comm.window_main)
 
78
        
 
79
        try:
 
80
            ret = update.missing(self.comm.get_path())
 
81
        except errors.NotBranchError:
 
82
            self.dialog.error_dialog(_('Directory is not a branch'),
 
83
                                     _('You can perform this action only in a branch.'))
 
84
        except errors.ConnectionError:
 
85
            self.dialog.error_dialog(_('Connection error'),
 
86
                                     _('Cannot connect to remote location.\nPlease try again later.'))
 
87
        except errors.NoLocationKnown:
 
88
            self.dialog.error_dialog(_('Parent location is unknown'),
 
89
                                     _('Cannot determine missing revisions if no parent location is known.'))
 
90
        else:
 
91
            if ret > 0:
 
92
                self.dialog.info_dialog(_('There are missing revisions'),
 
93
                                        _('%d revision(s) missing.') % ret)
 
94
            else:
 
95
                self.dialog.info_dialog(_('Local branch up to date'),
 
96
                                        _('There are no missing revisions.'))
 
97
        
 
98
        self.comm.set_busy(self.comm.window_main, False)
 
99
    
73
100
    def on_menuitem_branch_pull_activate(self, widget):
74
101
        """ Branch/Pull menu handler. """
75
102
        import olive.backend.update as update