/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: Daniel Schierbeck
  • Date: 2007-10-14 15:54:57 UTC
  • mto: This revision was merged to the branch mainline in revision 317.
  • Revision ID: daniel.schierbeck@gmail.com-20071014155457-m3ek29p4ima8ev7d
Added the new Window base class.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
import os
26
26
 
27
 
from bzrlib import (
28
 
    bzrdir,
29
 
    errors,
30
 
    transport,
31
 
    )
32
 
 
33
 
from bzrlib.plugins.gtk.dialog import error_dialog
34
 
from bzrlib.plugins.gtk.errors import show_bzr_error
35
 
from bzrlib.plugins.gtk.i18n import _i18n
36
 
 
 
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
37
33
 
38
34
class InitDialog(gtk.Dialog):
39
35
    """ Initialize dialog. """
40
 
 
41
36
    def __init__(self, path, parent=None):
42
37
        """ Initialize the Initialize dialog. """
43
38
        gtk.Dialog.__init__(self, title="Initialize - Olive",
49
44
        self.path = path
50
45
        
51
46
        # Create the widgets
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:"))
 
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:"))
56
51
        self._entry_custom = gtk.Entry()
57
52
        self._hbox_custom = gtk.HBox()
58
53
        
87
82
    @show_bzr_error
88
83
    def _on_init_clicked(self, widget):
89
84
        if self._radio_custom.get_active() and len(self._entry_custom.get_text()) == 0:
90
 
            error_dialog(_i18n("Directory name not specified"),
91
 
                         _i18n("You should specify a new directory name."))
 
85
            error_dialog(_("Directory name not specified"),
 
86
                         _("You should specify a new directory name."))
92
87
            return
93
88
        
94
89
        if self._radio_current.get_active():