From c8a4fa40923d0098d5607ec25ad37fd507463017 Mon Sep 17 00:00:00 2001 From: Gobinath Date: Tue, 16 May 2017 13:32:46 -0400 Subject: [PATCH] Fix time in tray after disable --- safeeyes/TrayIcon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/safeeyes/TrayIcon.py b/safeeyes/TrayIcon.py index c4835ce..4c2ef57 100644 --- a/safeeyes/TrayIcon.py +++ b/safeeyes/TrayIcon.py @@ -186,10 +186,12 @@ class TrayIcon: def __set_next_break_info(self): formatted_time = Utility.format_time(self.dateTime) message = self.language['messages']['next_break_at'].format(formatted_time) + # Update the tray icon label if self.config.get('show_time_in_tray', False): self.indicator.set_label(formatted_time, '') else: - self.indicator.set_label('', '') + self.indicator.set_label('', '') + # Update the menu item label Utility.execute_main_thread(self.item_info.set_label, message) def on_enable_clicked(self, *args): @@ -214,6 +216,7 @@ class TrayIcon: logging.info('Disable Safe Eyes') self.active = False self.indicator.set_icon("safeeyes_disabled") + self.indicator.set_label('', '') self.item_info.set_sensitive(False) self.item_enable.set_sensitive(True) self.item_disable.set_sensitive(False)