/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: Curtis Hovey
  • Date: 2011-08-13 01:12:20 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110813011220-qj1u0dvft7jk0x6m
Updated gpush to gtk3.

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