From d12223769b71e389566e36a57b194430a09a5239 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 13 May 2010 09:17:30 +0200 Subject: [PATCH] guard against gtk/pygtk not letting us call set_orientation() on gtk.Box --- terminatorlib/notebook.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/terminatorlib/notebook.py b/terminatorlib/notebook.py index 43c2b9b2..a803f3ce 100755 --- a/terminatorlib/notebook.py +++ b/terminatorlib/notebook.py @@ -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):