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

  • Committer: Jelmer Vernooij
  • Date: 2006-09-27 17:49:18 UTC
  • mto: (0.12.2 olive)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: jelmer@samba.org-20060927174918-0e5c331b574d16a3
Don't pass along dialog context everywhere.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
class OliveMove:
34
34
    """ Display the Move dialog and perform the needed actions. """
35
 
    def __init__(self, gladefile, comm, dialog):
 
35
    def __init__(self, gladefile, comm):
36
36
        """ Initialize the Move dialog. """
37
37
        self.gladefile = gladefile
38
38
        self.glade = gtk.glade.XML(self.gladefile, 'window_move', 'olive-gtk')
39
39
        
40
40
        # Communication object
41
41
        self.comm = comm
42
 
        # Dialog object
43
 
        self.dialog = dialog
44
42
        
45
43
        self.window = self.glade.get_widget('window_move')
46
44
        
65
63
        filename = self.comm.get_selected_right()
66
64
            
67
65
        if filename is None:
68
 
            self.dialog.error_dialog(_('No file was selected'),
 
66
            error_dialog(_('No file was selected'),
69
67
                                     _('Please select a file from the list to proceed.'))
70
68
            return
71
69
        
76
74
            wt1, path1 = WorkingTree.open_containing(source)
77
75
            wt2, path2 = WorkingTree.open_containing(destination)
78
76
            if wt1.base != wt2.base:
79
 
                self.dialog.error_dialog(_('Not the same branch'),
 
77
                error_dialog(_('Not the same branch'),
80
78
                                         _('The destination is not in the same branch.'))
81
79
                return
82
80
 
83
81
            wt1.move([source], destination)
84
82
        except errors.NotBranchError:
85
 
            self.dialog.error_dialog(_('File is not in a branch'),
 
83
            error_dialog(_('File is not in a branch'),
86
84
                                     _('The selected file is not in a branch.'))
87
85
            return
88
86