From fd34b9dc1e6a1b932a139b0826491d5f7a9856d1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 17 Aug 2013 17:23:30 +0530 Subject: [PATCH] Fix breakage on OS X machines with system style --- src/calibre/gui2/init.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/init.py b/src/calibre/gui2/init.py index 59bb7718b2..de0a58d7bb 100644 --- a/src/calibre/gui2/init.py +++ b/src/calibre/gui2/init.py @@ -343,7 +343,15 @@ class VLTabs(QTabBar): # {{{ all_idx = i self.setCurrentIndex(all_idx if current_idx is None else current_idx) self.currentChanged.connect(self.tab_changed) - self.tabButton(all_idx, self.RightSide).setVisible(False) + try: + self.tabButton(all_idx, self.RightSide).setVisible(False) + except AttributeError: + try: + self.tabButton(all_idx, self.LeftSide).setVisible(False) + except AttributeError: + # On some OS X machines (using native style) the tab button is + # on the left + pass def update_current(self): self.rebuild()