Skip to content

Commit

Permalink
fix and update scal3/ui_gtk/full.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Dec 23, 2024
1 parent 4b415fb commit 7580a78
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions scal3/ui_gtk/full.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import signal
import sys

from gi.repository.GLib import timeout_add
import gi

gi.require_version("Gtk", "3.0")

from gi.repository import Gtk as gtk
from gi.repository.GLib import idle_add

from scal3 import event_lib, ui
from scal3.ui_gtk import gtk, pixcache, starcal
from scal3.ui_gtk import hijri as hijri_gtk
from scal3.ui_gtk import pixcache, starcal

ui.init()

Expand Down Expand Up @@ -70,10 +75,16 @@ def openAllWindows():
tick()


signal.signal(signal.SIGINT, sys.exit)
def onSigInt(*args):
# args: (status: int, frame)
print(f"SIGINT recieved: {args}")
sys.exit(1)


signal.signal(signal.SIGINT, onSigInt)

mainWin.dayCalWinShow()

timeout_add(500, openAllWindows)
idle_add(openAllWindows)

sys.exit(gtk.main())

0 comments on commit 7580a78

Please sign in to comment.