fix: defer destroy call

This commit is contained in:
aclist committed 2026-02-25 22:44:49 +09:00
1 parent 79eab93629
commit a763b3b9dc
3 files changed
+14 -6

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GLib # noqa E402
if TYPE_CHECKING:
from GLib import SOURCE_REMOVE
from gi.repository import GLib
from dzgui.controllers.mc import Controller
@@ -107,7 +107,7 @@ class RefreshButton(IconTextButton):
GLib.timeout_add_seconds(1, self.decrement)
self.controller.refresh_tree()
def decrement(self) -> "SOURCE_REMOVE" | Literal[True]:
def decrement(self) -> "GLib.SOURCE_REMOVE" | Literal[True]:
self.time -= 1
if self.time == 0:
self.time = 30