/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: 2008-03-28 19:26:53 UTC
  • mto: (450.1.13 trunk)
  • mto: This revision was merged to the branch mainline in revision 458.
  • Revision ID: jelmer@samba.org-20080328192653-trzptkwahx1tulz9
Add module for preferences code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
import bzrlib.errors as errors
29
29
 
30
 
from olive import gladefile
31
 
from dialog import error_dialog, warning_dialog
 
30
from bzrlib.plugins.gtk.dialog import error_dialog, warning_dialog
 
31
from guifiles import GLADEFILENAME
 
32
 
 
33
from bzrlib.plugins.gtk.errors import show_bzr_error
 
34
 
32
35
 
33
36
class OliveMkdir:
34
37
    """ Display the Make directory dialog and perform the needed actions. """
35
38
    def __init__(self, wt, wtpath):
36
39
        """ Initialize the Make directory dialog. """
37
 
        self.glade = gtk.glade.XML(gladefile, 'window_mkdir', 'olive-gtk')
 
40
        self.glade = gtk.glade.XML(GLADEFILENAME, 'window_mkdir', 'olive-gtk')
38
41
        
39
42
        self.window = self.glade.get_widget('window_mkdir')
40
43
        
52
55
        """ Display the Make directory dialog. """
53
56
        self.window.show_all()
54
57
 
 
58
    @show_bzr_error
55
59
    def mkdir(self, widget):
56
60
        # Get the widgets
57
61
        entry = self.glade.get_widget('entry_mkdir')
76
80
                                 _('Please specify another name to continue.'))
77
81
                else:
78
82
                    raise
79
 
            except errors.NotBranchError:
80
 
                warning_dialog(_('Directory is not in a branch'),
81
 
                               _('You can only create a non-versioned directory.'))
82
83
        else:
83
84
            # Just a simple directory
84
85
            try: