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

  • Committer: Curtis Hovey
  • Date: 2011-08-12 20:25:28 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110812202528-4xf4a2t23urx50d2
Updated gst to gtk3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from bzrlib.plugins.gtk.history import UrlHistory
24
24
 
25
 
 
26
25
class BranchSelectionBox(Gtk.HBox):
27
26
 
28
27
    def __init__(self, path=None):
29
 
        super(BranchSelectionBox, self).__init__()
30
 
        self._combo = Gtk.ComboBox.new_with_entry()
31
 
        self._combo.get_child().connect(
32
 
            'focus-out-event', self._on_combo_changed)
 
28
        GObject.GObject.__init__(self)
 
29
        self._combo = Gtk.ComboBoxEntry()
 
30
        self._combo.get_child().connect('focus-out-event', self._on_combo_changed)
33
31
 
34
32
        # Build branch history
35
33
        self._history = UrlHistory(GlobalConfig(), 'branch_history')
57
55
            self._combo_model.append([ item ])
58
56
 
59
57
        self._combo.set_model(self._combo_model)
60
 
        self._combo.set_entry_text_column(0)
 
58
        self._combo.set_text_column(0)
61
59
 
62
60
    def _on_combo_changed(self, widget, event):
63
61
        self.emit('branch-changed', widget)
64
62
 
65
 
 
66
63
GObject.signal_new('branch-changed', BranchSelectionBox,
67
64
                   GObject.SignalFlags.RUN_LAST,
68
65
                   None, (GObject.TYPE_OBJECT,))