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

  • Committer: Jelmer Vernooij
  • Date: 2011-03-14 20:12:19 UTC
  • Revision ID: jelmer@samba.org-20110314201219-wo692nzwywu6mevh
Fix formatting, imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import os
26
26
 
27
 
from dialog import error_dialog
28
 
from errors import show_bzr_error
29
 
 
30
 
from bzrlib import bzrdir
31
 
from bzrlib import transport
32
 
import bzrlib.errors as errors
 
27
from bzrlib import (
 
28
    bzrdir,
 
29
    errors,
 
30
    transport,
 
31
    )
 
32
 
 
33
from bzrlib.plugins.gtk import _i18n
 
34
from bzrlib.plugins.gtk.dialog import error_dialog
 
35
from bzrlib.plugins.gtk.errors import show_bzr_error
 
36
 
33
37
 
34
38
class InitDialog(gtk.Dialog):
35
39
    """ Initialize dialog. """
 
40
 
36
41
    def __init__(self, path, parent=None):
37
42
        """ Initialize the Initialize dialog. """
38
43
        gtk.Dialog.__init__(self, title="Initialize - Olive",
44
49
        self.path = path
45
50
        
46
51
        # Create the widgets
47
 
        self._button_init = gtk.Button(_("_Initialize"), use_underline=True)
48
 
        self._label_question = gtk.Label(_("Which directory do you want to initialize?"))
49
 
        self._radio_current = gtk.RadioButton(None, _("Current directory"))
50
 
        self._radio_custom = gtk.RadioButton(self._radio_current, _("Create a new directory with the name:"))
 
52
        self._button_init = gtk.Button(_i18n("_Initialize"), use_underline=True)
 
53
        self._label_question = gtk.Label(_i18n("Which directory do you want to initialize?"))
 
54
        self._radio_current = gtk.RadioButton(None, _i18n("Current directory"))
 
55
        self._radio_custom = gtk.RadioButton(self._radio_current, _i18n("Create a new directory with the name:"))
51
56
        self._entry_custom = gtk.Entry()
52
57
        self._hbox_custom = gtk.HBox()
53
58
        
82
87
    @show_bzr_error
83
88
    def _on_init_clicked(self, widget):
84
89
        if self._radio_custom.get_active() and len(self._entry_custom.get_text()) == 0:
85
 
            error_dialog(_("Directory name not specified"),
86
 
                         _("You should specify a new directory name."))
 
90
            error_dialog(_i18n("Directory name not specified"),
 
91
                         _i18n("You should specify a new directory name."))
87
92
            return
88
93
        
89
94
        if self._radio_current.get_active():