/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/mkdir.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:
38
38
        self.glade = gtk.glade.XML(self.gladefile, 'window_mkdir', 'olive-gtk')
39
39
        
40
40
        # Dialog object
41
 
        self.dialog = dialog
 
41
        = dialog
42
42
        
43
43
        self.window = self.glade.get_widget('window_mkdir')
44
44
        
61
61
        dirname = entry.get_text()
62
62
        
63
63
        if dirname == "":
64
 
            self.dialog.error_dialog(_('No directory name given'),
 
64
            error_dialog(_('No directory name given'),
65
65
                                     _('Please specify a desired name for the new directory.'))
66
66
            return
67
67
        
75
75
                wt.add([wtpath])
76
76
            except OSError, e:
77
77
                if e.errno == 17:
78
 
                    self.dialog.error_dialog(_('Directory already exists'),
 
78
                    error_dialog(_('Directory already exists'),
79
79
                                             _('Please specify another name to continue.'))
80
80
                else:
81
81
                    raise
82
82
            except errors.NotBranchError:
83
 
                self.dialog.warning_dialog(_('Directory is not in a branch'),
 
83
                warning_dialog(_('Directory is not in a branch'),
84
84
                                           _('You can only create a non-versioned directory.'))
85
85
        else:
86
86
            # Just a simple directory
88
88
                os.mkdir(os.path.join(wt.base, wtpath))
89
89
            except OSError, e:
90
90
                if e.errno == 17:
91
 
                    self.dialog.error_dialog(_('Directory already exists'),
 
91
                    error_dialog(_('Directory already exists'),
92
92
                                             _('Please specify another name to continue.'))
93
93
                    return
94
94