From 2b884b572a4c93c010892980b073ec64bde3e103 Mon Sep 17 00:00:00 2001 From: txe Date: Thu, 2 Jul 2020 18:27:54 +0300 Subject: [PATCH] :tager: disables systray on macos for pygtk (#980) --- modules/config.py | 1 + modules/cons.py | 1 + modules/core.py | 1 + 3 files changed, 3 insertions(+) diff --git a/modules/config.py b/modules/config.py index e66d2756..4f5bed38 100644 --- a/modules/config.py +++ b/modules/config.py @@ -2218,6 +2218,7 @@ def preferences_tab_misc(dad, vbox_misc, pref_dialog): frame_system_tray.add(align_system_tray) checkbutton_systray.set_active(dad.systray) + if cons.DISABLE_SYSTRAY: checkbutton_systray.set_sensitive(False) checkbutton_start_on_systray.set_active(dad.start_on_systray) checkbutton_start_on_systray.set_sensitive(dad.systray) checkbutton_use_appind.set_active(dad.use_appind) diff --git a/modules/cons.py b/modules/cons.py index 90f97252..e1701909 100644 --- a/modules/cons.py +++ b/modules/cons.py @@ -70,6 +70,7 @@ except: HAS_APPINDICATOR = False XDG_CURRENT_DESKTOP = 'XDG_CURRENT_DESKTOP' HAS_SYSTRAY = not (XDG_CURRENT_DESKTOP in os.environ and os.environ[XDG_CURRENT_DESKTOP] == "Unity") +DISABLE_SYSTRAY = IS_MAC_OS AVAILABLE_LANGS = ['default', 'cs', 'de', 'el', 'en', 'es', 'fi', 'fr', 'hy', 'it', 'ja', 'lt', 'nl', 'pl', 'pt_BR', 'ru', 'sl', 'sv', 'tr', 'uk', 'zh_CN'] COLOR_48_LINK_WEBS = "#00008989ffff" diff --git a/modules/core.py b/modules/core.py index 1aea7796..a766b9d2 100644 --- a/modules/core.py +++ b/modules/core.py @@ -255,6 +255,7 @@ def __init__(self, lang_str, open_with_file, node_name, boss, is_startup, is_arg self.file_startup_load(open_with_file, node_name) else: self.file_name = "" if self.tree_is_empty(): self.update_node_name_header() + if cons.DISABLE_SYSTRAY: self.systray = False if self.systray: if not self.boss.systray_active: self.status_icon_enable()