From 400e1dd81c501775aa275a79332486badf82e380 Mon Sep 17 00:00:00 2001 From: emkael Date: Sun, 13 Mar 2022 12:34:48 +0100 Subject: Icons on Linux were problematic, fallback to ignore --- jfr_playoff/gui/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jfr_playoff/gui/__init__.py b/jfr_playoff/gui/__init__.py index af53c25..637e35c 100644 --- a/jfr_playoff/gui/__init__.py +++ b/jfr_playoff/gui/__init__.py @@ -26,11 +26,17 @@ class PlayoffGUI(tk.Tk): ttk.Style().configure('TLabelframe.Label', foreground='black') ttk.Style().configure('TLabelframe', padding=5) self.geometry('920x640') - self.iconbitmap(GuiImage.get_path('icons', 'playoff', 'ico')) + try: + self.iconbitmap(GuiImage.get_path('icons', 'playoff', 'ico')) + except tk.TclError: + pass # sometimes it fails on Linux, just ignore self.tabs = {} self.logWindow = LogWindow(self) self.logWindow.title('Dziennik komunikatów') - self.logWindow.iconbitmap(GuiImage.get_path('icons', 'playoff', 'ico')) + try: + self.logWindow.iconbitmap(GuiImage.get_path('icons', 'playoff', 'ico')) + except tk.TclError: + pass # sometimes it fails on Linux, just ignore self._buildMenu() self.newFileIndex = 0 self._title = tk.StringVar() -- cgit v1.2.3