feat: add default handler for SIGINT

This prevents having a callstack when hitting Ctrl+C in the terminal.
This commit is contained in:
Romain Failliot 2023-04-08 14:09:53 -04:00
parent e23cdceb80
commit d4f2032972
2 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Some signals weren't properly renamed from the previous GTK3 migration (@MightyCreak)
- The syntax menu wasn't working anymore (@MightyCreak)
- Properly handles SIGINT (i.e. Ctrl+C) now (@MightyCreak)
## 0.8.1 - 2023-04-07

View File

@ -22,6 +22,7 @@
import os
import sys
import gettext
import signal
from gi.repository import Gio
@ -32,6 +33,10 @@ SYSCONFIGDIR = '@SYSCONFIGDIR@'
sys.path.insert(1, PKGDATADIR)
# Quietly handle SIGINT (i.e. Ctrl+C)
signal.signal(signal.SIGINT, signal.SIG_DFL)
# Initialize i18n
gettext.bindtextdomain('diffuse', localedir=LOCALEDIR)
gettext.textdomain('diffuse')