/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: Vincent Ladeuil
  • Date: 2009-12-09 13:27:53 UTC
  • mto: (671.1.2 gtk)
  • mto: This revision was merged to the branch mainline in revision 709.
  • Revision ID: v.ladeuil+lp@free.fr-20091209132753-q00e90p46rwi4isg
Ensure compatibility with PyGtk-2.8.

* viz/branchwin.py:
(BranchWindow.__init__): Use a getattr() call to protect
PyGtk-2.10 specific feature access.

* revisionview.py: 
Use a getattr() call to protect PyGtk-2.10 specific feature access.

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
 
        super(BranchSelectionBox, self).__init__()
 
32
        gobject.GObject.__init__(self)
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
 
        gobject.signal_new('branch-changed', BranchSelectionBox, 
43
 
                           gobject.SIGNAL_RUN_LAST,
44
 
                           gobject.TYPE_NONE, (gobject.TYPE_OBJECT,))
45
 
 
46
42
        if path is not None:
47
43
            self.set_url(path)
48
44
 
71
67
 
72
68
    def _on_combo_changed(self, widget, event):
73
69
        self.emit('branch-changed', widget)
74
 
    
 
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)