diff --git a/src/Library/demos/Menu Button/main.py b/src/Library/demos/Menu Button/main.py index fa8894d2f..09a07a27d 100644 --- a/src/Library/demos/Menu Button/main.py +++ b/src/Library/demos/Menu Button/main.py @@ -17,4 +17,3 @@ def update_css(_widget, _params): circular_switch.connect("notify::active", update_css) - diff --git a/src/Library/demos/Popovers/main.py b/src/Library/demos/Popovers/main.py index 599accb72..c2f5d1042 100644 --- a/src/Library/demos/Popovers/main.py +++ b/src/Library/demos/Popovers/main.py @@ -5,7 +5,7 @@ import workbench -def onClosed(popover): +def on_closed(popover): name = popover.get_name() print(f"{name} closed.") @@ -14,4 +14,4 @@ def onClosed(popover): for id in popover_ids: popover = workbench.builder.get_object(id) - popover.connect("closed", onClosed) + popover.connect("closed", on_closed) diff --git a/src/langs/python/python-previewer.py b/src/langs/python/python-previewer.py index 70a732de6..ddfc499ce 100644 --- a/src/langs/python/python-previewer.py +++ b/src/langs/python/python-previewer.py @@ -23,10 +23,14 @@ gi.require_version("Adw", "1") gi.require_version("Graphene", "1.0") gi.require_version("Gsk", "4.0") +gi.require_version("GtkSource", "5") -from gi.repository import GLib, Gdk, Gtk, Adw, Graphene, Gio, Gsk +from gi.repository import GLib, Gdk, Gtk, Adw, Graphene, Gio, Gsk, GtkSource from gi.repository.Gio import DBusConnection, DBusConnectionFlags +# Load non-GTK widget types +GtkSource.init() + # Table of Contents # =================