/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: Curtis Hovey
  • Date: 2011-07-31 15:52:43 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110731155243-ln8istmxbryhb4pz
Mechanical changes made by pygi.convert.sh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
except:
21
21
    pass
22
22
 
23
 
import gtk
 
23
from gi.repository import Gtk
24
24
 
25
25
import os
26
26
 
35
35
from bzrlib.plugins.gtk.i18n import _i18n
36
36
 
37
37
 
38
 
class InitDialog(gtk.Dialog):
 
38
class InitDialog(Gtk.Dialog):
39
39
    """ Initialize dialog. """
40
40
 
41
41
    def __init__(self, path, parent=None):
42
42
        """ Initialize the Initialize dialog. """
43
 
        gtk.Dialog.__init__(self, title="Initialize - Olive",
 
43
        GObject.GObject.__init__(self, title="Initialize - Olive",
44
44
                                  parent=parent,
45
45
                                  flags=0,
46
 
                                  buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
 
46
                                  buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
47
47
        
48
48
        # Get arguments
49
49
        self.path = path
50
50
        
51
51
        # 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:"))
56
 
        self._entry_custom = gtk.Entry()
57
 
        self._hbox_custom = gtk.HBox()
 
52
        self._button_init = Gtk.Button(_i18n("_Initialize"), use_underline=True)
 
53
        self._label_question = Gtk.Label(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:"))
 
56
        self._entry_custom = Gtk.Entry()
 
57
        self._hbox_custom = Gtk.HBox()
58
58
        
59
59
        # Set callbacks
60
60
        self._button_init.connect('clicked', self._on_init_clicked)
69
69
        self._hbox_custom.pack_start(self._radio_custom, False, False)
70
70
        self._hbox_custom.pack_start(self._entry_custom, True, True)
71
71
        
72
 
        self.vbox.pack_start(self._label_question)
73
 
        self.vbox.pack_start(self._radio_current)
74
 
        self.vbox.pack_start(self._hbox_custom)
 
72
        self.vbox.pack_start(self._label_question, True, True, 0)
 
73
        self.vbox.pack_start(self._radio_current, True, True, 0)
 
74
        self.vbox.pack_start(self._hbox_custom, True, True, 0)
75
75
        
76
76
        # Display the dialog
77
77
        self.vbox.show_all()
120
120
                branch = existing_bzrdir.create_branch()
121
121
                existing_bzrdir.create_workingtree()
122
122
        
123
 
        self.response(gtk.RESPONSE_OK)
 
123
        self.response(Gtk.ResponseType.OK)