Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: Init GtkSource (+ minor formatting/style fixes) #736

Merged
merged 2 commits into from
Oct 30, 2023

Conversation

theCapypara
Copy link
Contributor

@theCapypara theCapypara commented Oct 30, 2023

I did not realize one needed to call GtkSource.init() from PyGObject. Currently PyGObject automatically inits the core namespaces, so I figured it did the same for GtkSource (this is also what I remembered from other apps I worked on).

Also contains one code style fix and one formatting fix for demos.

Closes #713.

Copy link
Contributor

@sonnyp sonnyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need something similar for WebKitGTK / Soup
can't remember

@sonnyp sonnyp merged commit f9e6a49 into main Oct 30, 2023
1 check passed
@sonnyp sonnyp deleted the capypara/python-fix-gtksource branch October 30, 2023 11:36
Comment on lines +31 to +32
# Load non-GTK widget types
GtkSource.init()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might want to do this in the demo code too

so that the code works when they copy paste it to their app

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. Also the reason why I decided to keep the "gi.requires_version" in there too. We may also want to update the JS demos to specify the versions on import then.

Copy link
Contributor

@sonnyp sonnyp Oct 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may also want to update the JS demos to specify the versions on import then.

I've been having an internal war on this - it's ... tricky.

reminder to talk about this : #738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to run Python demos with SourceView in the ui file
2 participants