Now About Social Code
aboutsummaryrefslogtreecommitdiff
path: root/src/main.py
diff options
context:
space:
mode:
authorLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2025-01-27 22:58:57 +0000
committerLucas Fryzek <lucas.fryzek@fryzekconcepts.com>2025-01-27 22:58:57 +0000
commit29234ead927f64837fd49cab17cbcf261147ccfa (patch)
treeb6fb70749c5a0d26bfd9f8dd612cf63d65c4f0f4 /src/main.py
parent903e32b804eb257ffeb87d76bde373bcb9ac882c (diff)
chat: Fix spell checking, fix theme of GtkSource widgetHEADspellchecking_sourceviewmain
Diffstat (limited to 'src/main.py')
-rw-r--r--src/main.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.py b/src/main.py
index ea387eb..91fed06 100644
--- a/src/main.py
+++ b/src/main.py
@@ -24,8 +24,9 @@ import traceback
gi.require_version('Gtk', '4.0')
gi.require_version('Adw', '1')
+gi.require_version("Spelling", "1")
-from gi.repository import Gtk, Gio, Adw
+from gi.repository import Gtk, Gio, Adw, Spelling, GtkSource
from .window import WeegtkWindow
from weegtk import network
@@ -56,6 +57,11 @@ class WeegtkApplication(Adw.Application):
# https://gitlab.gnome.org/GNOME/gtk/-/issues/5917
self.pages = []
+ # Add custom adwaita source theme so editing widget matches background
+ manager = GtkSource.StyleSchemeManager().get_default()
+ manager.append_search_path(f"{os.environ["WEEGTK_INSTALL_DIR"]}/weegtk")
+ manager.force_rescan()
+
conf = config.read()
if config.str_to_bool(conf["relay"]["autoconnect"]):
self.connect_to_weechat()