Public Access
fix startup: register GtkSourceView GType for GtkBuilder
Removing gobject.type_register(GtkSource.View) broke startup: the
call was load-bearing, it forced registration of the GtkSourceView
GType so GtkBuilder could resolve the type in damaris3.glade
("Invalid object type 'GtkSourceView'"). Restore the registration
by referencing gtksourceview.View at import time, which is the
same effect without the PyGTK compat API.
Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
1 parent
f18bbdf48c
commit
35d040426b
1 file changed
+4
@@ -35,6 +35,10 @@ from gi.repository import Gdk as gdk
|
|||||||
|
|
||||||
from gi.repository import GtkSource as gtksourceview
|
from gi.repository import GtkSource as gtksourceview
|
||||||
|
|
||||||
|
# referencing the class registers the GtkSourceView GType, which GtkBuilder
|
||||||
|
# needs to resolve the type when loading damaris3.glade
|
||||||
|
_ = gtksourceview.View
|
||||||
|
|
||||||
from gi.repository import Pango as pango
|
from gi.repository import Pango as pango
|
||||||
|
|
||||||
# array math
|
# array math
|
||||||
|
|||||||
Reference in new issue
Block a user