/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-07-31 15:52:43 UTC
  • mto: This revision was merged to the branch mainline in revision 741.
  • Revision ID: sinzui.is@verizon.net-20110731155243-ln8istmxbryhb4pz
Mechanical changes made by pygi.convert.sh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
except:
21
21
    pass
22
22
 
23
 
import gtk
24
 
import gobject
 
23
from gi.repository import Gtk
 
24
from gi.repository import GObject
25
25
 
26
26
from bzrlib.branch import Branch
27
27
from bzrlib.config import GlobalConfig
28
28
 
29
29
from bzrlib.plugins.gtk.history import UrlHistory
30
30
 
31
 
class BranchSelectionBox(gtk.HBox):
 
31
class BranchSelectionBox(Gtk.HBox):
32
32
 
33
33
    def __init__(self, path=None):
34
 
        gobject.GObject.__init__(self)
35
 
        self._combo = gtk.ComboBoxEntry()
36
 
        self._combo.child.connect('focus-out-event', self._on_combo_changed)
 
34
        GObject.GObject.__init__(self)
 
35
        self._combo = Gtk.ComboBoxEntry()
 
36
        self._combo.get_child().connect('focus-out-event', self._on_combo_changed)
37
37
 
38
38
        # Build branch history
39
39
        self._history = UrlHistory(GlobalConfig(), 'branch_history')
55
55
 
56
56
    def _build_history(self):
57
57
        """ Build up the branch history. """
58
 
        self._combo_model = gtk.ListStore(str)
 
58
        self._combo_model = Gtk.ListStore(str)
59
59
 
60
60
        for item in self._history.get_entries():
61
61
            self._combo_model.append([ item ])
66
66
    def _on_combo_changed(self, widget, event):
67
67
        self.emit('branch-changed', widget)
68
68
 
69
 
gobject.signal_new('branch-changed', BranchSelectionBox,
70
 
                   gobject.SIGNAL_RUN_LAST,
71
 
                   gobject.TYPE_NONE, (gobject.TYPE_OBJECT,))
72
 
gobject.type_register(BranchSelectionBox)
 
69
GObject.signal_new('branch-changed', BranchSelectionBox,
 
70
                   GObject.SignalFlags.RUN_LAST,
 
71
                   None, (GObject.TYPE_OBJECT,))
 
72
GObject.type_register(BranchSelectionBox)