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