/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: 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:
22
22
 
23
23
from bzrlib.plugins.gtk.history import UrlHistory
24
24
 
 
25
 
25
26
class BranchSelectionBox(Gtk.HBox):
26
27
 
27
28
    def __init__(self, path=None):
28
 
        Gtk.HBox.__init__(self)
 
29
        super(BranchSelectionBox, self).__init__()
29
30
        self._combo = Gtk.ComboBox.new_with_entry()
30
 
        self._combo.get_child().connect('focus-out-event', self._on_combo_changed)
 
31
        self._combo.get_child().connect(
 
32
            'focus-out-event', self._on_combo_changed)
31
33
 
32
34
        # Build branch history
33
35
        self._history = UrlHistory(GlobalConfig(), 'branch_history')
60
62
    def _on_combo_changed(self, widget, event):
61
63
        self.emit('branch-changed', widget)
62
64
 
 
65
 
63
66
GObject.signal_new('branch-changed', BranchSelectionBox,
64
67
                   GObject.SignalFlags.RUN_LAST,
65
68
                   None, (GObject.TYPE_OBJECT,))