/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: Jasper Groenewegen
  • Date: 2008-07-24 19:33:17 UTC
  • mto: This revision was merged to the branch mainline in revision 570.
  • Revision ID: colbrac@xs4all.nl-20080724193317-lyovp78bus39pvbt
Fix breakage in context menu caused by change OliveRename -> RenameDialog

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
            branch.unlock()
212
212
    
213
213
    @show_bzr_error
214
 
    def remove_file(self, action,delete_on_disk=0):
 
214
    def remove_file(self, action, delete_on_disk=False):
215
215
        """ Right context menu -> Remove """
216
216
        # Remove only the selected file
217
217
        directory = self.path
239
239
        
240
240
    def remove_and_delete_file(self, action):
241
241
        """ Right context menu -> Remove and delete"""
242
 
        self.remove_file(action,delete_on_disk=1)
 
242
        self.remove_file(action, delete_on_disk=True)
243
243
 
244
244
    def rename_file(self, action):
245
245
        """ Right context menu -> Rename """
246
 
        from rename import OliveRename
247
 
        wt = WorkingTree.open_containing(self.path + os.sep + self.selected)[0]
248
 
        rename = OliveRename(wt, wt.relpath(self.path), self.selected)
249
 
        rename.display()
 
246
        from bzrlib.plugins.gtk.olive.rename import RenameDialog
 
247
        wt = WorkingTree.open_containing(os.path.join(self.path, self.selected))[0]
 
248
        rename = RenameDialog(wt, wt.relpath(self.path), self.selected)
 
249
        response = rename.run()
 
250
        rename.destroy()
 
251
        if response == gtk.RESPONSE_OK:
 
252
            self.app.refresh_right()
250
253
    
251
254
    def open_file(self, action):
252
255
        """ Right context menu -> Open """
274
277
                           _i18n('Please have a look at the working tree before continuing.'))
275
278
        else:
276
279
            info_dialog(_i18n('Revert successful'),
277
 
                        _i18n('All files reverted to last revision.'))
 
280
                        _i18n('Selected file reverted to last revision.'))
278
281
        self.app.refresh_right()       
279
282
    
280
283
    def commit(self, action):
361
364
    
362
365
    def diff_all(self, action):
363
366
        """ Diff toolbutton -> All... """
364
 
        from diff import OliveDiff
365
 
        diff = OliveDiff(self.comm)
366
 
        diff.display()
 
367
        wt = WorkingTree.open_containing(self.path)[0]
 
368
        window = DiffWindow(self.app)
 
369
        parent_tree = wt.branch.repository.revision_tree(wt.branch.last_revision())
 
370
        window.set_diff(wt.branch.nick, wt, parent_tree)
 
371
        window.show()
367
372
    
368
373
    def view_remote(self, action):
369
374
        """ Remote context menu -> View contents """