/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:25:14 UTC
  • mto: (0.12.2 olive)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: jelmer@samba.org-20060927172514-9d1dfd3902d9a255
Remove communicator use from Commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
class OliveMkdir:
34
34
    """ Display the Make directory dialog and perform the needed actions. """
35
 
    def __init__(self, gladefile, comm, dialog):
 
35
    def __init__(self, gladefile, wt, wtpath, dialog):
36
36
        """ Initialize the Make directory dialog. """
37
37
        self.gladefile = gladefile
38
38
        self.glade = gtk.glade.XML(self.gladefile, 'window_mkdir', 'olive-gtk')
39
39
        
40
 
        # Communication object
41
 
        self.comm = comm
42
40
        # Dialog object
43
41
        self.dialog = dialog
44
42
        
67
65
                                     _('Please specify a desired name for the new directory.'))
68
66
            return
69
67
        
70
 
        newdir = self.comm.get_path() + '/' + dirname
71
 
        
72
68
        if checkbox.get_active():
73
69
            # Want to create a versioned directory
74
70
            try:
75
71
                from bzrlib.workingtree import WorkingTree
76
72
    
77
 
                os.mkdir(newdir)
 
73
                os.mkdir(os.path.join(wt.base, wtpath))
78
74
 
79
 
                wt, dd = WorkingTree.open_containing(newdir)
80
 
                wt.add([dd])
 
75
                wt.add([wtpath])
81
76
            except OSError, e:
82
77
                if e.errno == 17:
83
78
                    self.dialog.error_dialog(_('Directory already exists'),
90
85
        else:
91
86
            # Just a simple directory
92
87
            try:
93
 
                os.mkdir(newdir)
 
88
                os.mkdir(os.path.join(wt.base, wtpath))
94
89
            except OSError, e:
95
90
                if e.errno == 17:
96
91
                    self.dialog.error_dialog(_('Directory already exists'),