/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/checkout.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:
31
31
 
32
32
class OliveCheckout:
33
33
    """ Display checkout dialog and perform the needed operations. """
34
 
    def __init__(self, gladefile, comm, dialog):
 
34
    def __init__(self, gladefile, comm):
35
35
        """ Initialize the Checkout dialog. """
36
36
        self.gladefile = gladefile
37
37
        self.glade = gtk.glade.XML(self.gladefile, 'window_checkout', 'olive-gtk')
38
38
        
39
39
        # Communication object
40
40
        self.comm = comm
41
 
        # Dialog object
42
 
        self.dialog = dialog
43
41
        
44
42
        self.window = self.glade.get_widget('window_checkout')
45
43
        
62
60
        entry_location = self.glade.get_widget('entry_checkout_location')
63
61
        location = entry_location.get_text()
64
62
        if location is '':
65
 
            self.dialog.error_dialog(_('Missing branch location'),
 
63
            error_dialog(_('Missing branch location'),
66
64
                                     _('You must specify a branch location.'))
67
65
            return
68
66
        
114
112
            finally:
115
113
                bzrlib.bzrdir.BzrDirFormat.set_default_format(old_format)
116
114
        except errors.NotBranchError, errmsg:
117
 
            self.dialog.error_dialog(_('Location is not a branch'),
 
115
            error_dialog(_('Location is not a branch'),
118
116
                                     _('The specified location has to be a branch.'))
119
117
            self.comm.set_busy(self.window, False)
120
118
            return
121
119
        except errors.TargetAlreadyExists, errmsg:
122
 
            self.dialog.error_dialog(_('Target already exists'),
 
120
            error_dialog(_('Target already exists'),
123
121
                                     _('Target directory (%s)\nalready exists. Please select another target.') % errmsg)
124
122
            self.comm.set_busy(self.window, False)
125
123
            return
126
124
        except errors.NonExistingParent, errmsg:
127
 
            self.dialog.error_dialog(_('Non existing parent directory'),
 
125
            error_dialog(_('Non existing parent directory'),
128
126
                                     _("The parent directory (%s)\ndoesn't exist.") % errmsg)
129
127
            self.comm.set_busy(self.window, False)
130
128
            return