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

  • Committer: Jelmer Vernooij
  • Date: 2011-11-02 11:11:06 UTC
  • mfrom: (734.1.55 gtk3)
  • Revision ID: jelmer@samba.org-20111102111106-7l0vso8eg24dpf87
Merge gtk3 support from Curtis.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
    def __init__(self, repository, revid, branch=None, parent=None):
38
38
        """Initialize the Push dialog. """
39
 
        GObject.GObject.__init__(self, title="Push",
40
 
                                  parent=parent,
41
 
                                  flags=0,
42
 
                                  buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
 
39
        super(PushDialog, self).__init__(
 
40
            title="Push", parent=parent, flags=0,
 
41
            buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL))
 
42
 
43
43
 
44
44
        # Get arguments
45
45
        self.repository = repository
48
48
 
49
49
        # Create the widgets
50
50
        self._label_location = Gtk.Label(label=_i18n("Location:"))
51
 
        self._combo = Gtk.ComboBoxEntry()
 
51
        self._combo = Gtk.ComboBox.new_with_entry()
52
52
        self._button_push = Gtk.Button(_i18n("_Push"), use_underline=True)
53
53
        self._hbox_location = Gtk.HBox()
54
54
 
58
58
        # Set properties
59
59
        self._label_location.set_alignment(0, 0.5)
60
60
        self._hbox_location.set_spacing(3)
61
 
        self.vbox.set_spacing(3)
 
61
        self.get_content_area().set_spacing(3)
62
62
 
63
63
        # Pack widgets
64
 
        self._hbox_location.pack_start(self._label_location, False, False)
65
 
        self._hbox_location.pack_start(self._combo, True, True)
66
 
        self.vbox.pack_start(self._hbox_location, True, True, 0)
67
 
        self.action_area.pack_end(self._button_push)
 
64
        self._hbox_location.pack_start(
 
65
            self._label_location, False, False, 0)
 
66
        self._hbox_location.pack_start(self._combo, True, True, 0)
 
67
        self.get_content_area().pack_start(self._hbox_location, True, True, 0)
 
68
        # XXX sinzui 2011-08-12: maybe False, False, 0
 
69
        self.get_action_area().pack_end(self._button_push, True, True, 0)
68
70
 
69
71
        # Show the dialog
70
 
        self.vbox.show_all()
 
72
        self.get_content_area().show_all()
71
73
 
72
74
        # Build location history
73
75
        self._history = UrlHistory(self.branch.get_config(), 'push_history')
79
81
        for item in self._history.get_entries():
80
82
            self._combo_model.append([ item ])
81
83
        self._combo.set_model(self._combo_model)
82
 
        self._combo.set_text_column(0)
 
84
        self._combo.set_entry_text_column(0)
83
85
 
84
86
        if self.branch is not None:
85
87
            location = self.branch.get_push_location()