/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: Daniel Schierbeck
  • Date: 2008-01-13 14:12:49 UTC
  • mto: (423.1.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 429.
  • Revision ID: daniel.schierbeck@gmail.com-20080113141249-gd0i2lknr3yik55r
Moved branch view to its own package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
class BranchSelectionBox(gtk.HBox):
31
31
    def __init__(self, path=None):
32
 
        gobject.GObject.__init__(self)
 
32
        super(BranchSelectionBox, self).__init__()
33
33
        self._combo = gtk.ComboBoxEntry()
34
34
        self._combo.child.connect('focus-out-event', self._on_combo_changed)
35
35
        
39
39
 
40
40
        self.add(self._combo)
41
41
 
42
 
        if path is not None:
43
 
            self.set_url(path)
 
42
        gobject.signal_new('branch-changed', BranchSelectionBox, 
 
43
                           gobject.SIGNAL_RUN_LAST,
 
44
                           gobject.TYPE_NONE, (gobject.TYPE_OBJECT,))
44
45
 
45
46
    def set_url(self, url):
46
47
        self._combo.get_child().set_text(url)
67
68
 
68
69
    def _on_combo_changed(self, widget, event):
69
70
        self.emit('branch-changed', widget)
70
 
 
71
 
gobject.signal_new('branch-changed', BranchSelectionBox, 
72
 
                   gobject.SIGNAL_RUN_LAST,
73
 
                   gobject.TYPE_NONE, (gobject.TYPE_OBJECT,))
74
 
gobject.type_register(BranchSelectionBox)
 
71