-
-
Notifications
You must be signed in to change notification settings - Fork 90
More Python demos #714
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
More Python demos #714
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second popover menu items are disabled - it is the same for Rust, but JavaScript works correctly
CC @Hofer-Julian
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's because it's a separate process with Rust and Python
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The difference seems to be, that in JavaScript the window is associated with a GtkApplication that has the actions added to it (see actions.js). That's not the case in Python (and Rust, I guess). Try:
win = workbench.window
print(win)
app = win.get_application()
print(app)The latter prints None.
The same problems occurs in #705. @theCapypara
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
@UrtsiSantsi in the future please open one PR per demo 🙏 |
Sure, I just didn't want to create too much noise with such simple commit (and it was easier this way 😄) |
I used Black for all the demos and just removed the last empty line, since you also didn't have one in the "Welcome" demo, but auto formatting will be wonderful. As for blocking on #110 - I don't think we should do it:
|
|
I'll check all the demos later. Just a note for now: This does in fact already pass black. |
* Library: Port 'Styling with CSS' to Python * Library: Port 'Breakpoints' to Python * Library: Port 'Overlay' to Python * Library: Port 'Popovers' to Python * Library: Port 'Emoji Chooser' to Python * Library: Port 'Image' to Python * Library: Port 'Separator' to Python * Library: Port 'Menu Button' to Python * Library: Port 'Radio Buttons' to Python * Library: Port 'Link Button' to Python


I ported a few demos to Python, but keep in mind that I know very little Python and even less Gtk :)