Skip to content

Commit 1a08010

Browse files
committed
break screen: remove now unneeded idle calls
1 parent 8ee1667 commit 1a08010

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

safeeyes/ui/break_screen.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
gi.require_version("Gtk", "4.0")
3535
from gi.repository import Gdk
36-
from gi.repository import GLib
3736
from gi.repository import Gtk
3837
from gi.repository import GdkX11
3938

@@ -121,7 +120,7 @@ def show_count_down(self, countdown: int, seconds: int) -> None:
121120
self.enable_shortcut = self.shortcut_disable_time <= seconds
122121
mins, secs = divmod(countdown, 60)
123122
timeformat = "{:02d}:{:02d}".format(mins, secs)
124-
GLib.idle_add(lambda: self.__update_count_down(timeformat))
123+
self.__update_count_down(timeformat)
125124

126125
def show_message(
127126
self, break_obj: Break, widget: str, tray_actions: list[TrayAction] = []
@@ -130,9 +129,7 @@ def show_message(
130129
message = break_obj.name
131130
image_path = break_obj.image
132131
self.enable_shortcut = self.shortcut_disable_time <= 0
133-
GLib.idle_add(
134-
lambda: self.__show_break_screen(message, image_path, widget, tray_actions)
135-
)
132+
self.__show_break_screen(message, image_path, widget, tray_actions)
136133

137134
def close(self) -> None:
138135
"""Hide the break screen from active window and destroy all other

0 commit comments

Comments
 (0)