/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-12 19:50:45 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110812195045-y86bmaibs3pw5w6d
Updated buffer.getText() calls and ModifierType enums.

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