/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/menu.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-09-30 13:04:15 UTC
  • mto: (0.14.3 main)
  • mto: This revision was merged to the branch mainline in revision 86.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060930130415-aba4100709e11f0a
Loads of fixes. Pyflakes cleanup.

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
    
211
211
    def diff(self, action):
212
212
        """ Right context menu -> Diff """
213
 
        from diff import OliveDiff
214
 
        diff = OliveDiff(self.comm)
215
 
        diff.display()
 
213
        from bzrlib.plugins.gtk.viz.diffwin import DiffWindow
 
214
        
 
215
        try:
 
216
            wt = WorkingTree.open_containing(self.path)[0]
 
217
        except errors.NotBranchError:
 
218
            error_dialog(_('File is not in a branch'),
 
219
                         _('The selected file is not in a branch.'))
 
220
            return
 
221
        
 
222
        window = DiffWindow()
 
223
        parent_tree = wt.branch.repository.revision_tree(wt.branch.last_revision())
 
224
        window.set_diff(wt.branch.nick, wt, parent_tree)
 
225
        window.show()
216
226
    
217
227
    def bookmark(self, action):
218
228
        """ Right context menu -> Bookmark """
219
 
        if self.pref.add_bookmark(self.comm.get_path()):
 
229
        if self.pref.add_bookmark(self.path):
220
230
            info_dialog(_('Bookmark successfully added'),
221
231
                        _('The current directory was bookmarked. You can reach\nit by selecting it from the left panel.'))
 
232
            self.pref.write()
222
233
        else:
223
234
            warning_dialog(_('Location already bookmarked'),
224
235
                           _('The current directory is already bookmarked.\nSee the left panel for reference.'))