Skip to content

Commit

Permalink
python: Init GtkSource (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
theCapypara authored and lw64 committed Dec 18, 2023
1 parent 4287ae7 commit 329e61a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/Library/demos/Menu Button/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ def update_css(_widget, _params):


circular_switch.connect("notify::active", update_css)

4 changes: 2 additions & 2 deletions src/Library/demos/Popovers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import workbench


def onClosed(popover):
def on_closed(popover):
name = popover.get_name()
print(f"{name} closed.")

Expand All @@ -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)
6 changes: 5 additions & 1 deletion src/langs/python/python-previewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
# =================
Expand Down

0 comments on commit 329e61a

Please sign in to comment.