guard against gtk/pygtk not letting us call set_orientation() on gtk.Box
This commit is contained in:
parent
630da9b06d
commit
d12223769b
|
@ -405,11 +405,13 @@ class TabLabel(gtk.HBox):
|
||||||
"""Update the angle of a label"""
|
"""Update the angle of a label"""
|
||||||
position = self.notebook.get_tab_pos()
|
position = self.notebook.get_tab_pos()
|
||||||
if position == gtk.POS_LEFT:
|
if position == gtk.POS_LEFT:
|
||||||
|
if hasattr(self, 'set_orientation'):
|
||||||
self.set_orientation(gtk.ORIENTATION_VERTICAL)
|
self.set_orientation(gtk.ORIENTATION_VERTICAL)
|
||||||
self.label.set_angle(90)
|
self.label.set_angle(90)
|
||||||
elif position == gtk.POS_RIGHT:
|
elif position == gtk.POS_RIGHT:
|
||||||
self.label.set_angle(270)
|
self.label.set_angle(270)
|
||||||
else:
|
else:
|
||||||
|
if hasattr(self, 'set_orientation'):
|
||||||
self.set_orientation(gtk.ORIENTATION_HORIZONTAL)
|
self.set_orientation(gtk.ORIENTATION_HORIZONTAL)
|
||||||
self.label.set_angle(0)
|
self.label.set_angle(0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue