workbenchdev / demos

Demos of GNOME technologies - GTK, libadwaita, CSS, portals, ...
Creative Commons Zero v1.0 Universal
11 stars 15 forks source link

Port 'Dialog' demo to Python #152

Closed BharatAtbrat closed 5 months ago

BharatAtbrat commented 5 months ago

The Python version did not exist for this demo, wanted to give it a go. I do have a few doubts:

Let me know if there are any other issues with the code

theCapypara commented 5 months ago

Are the parameters "_dialog" and "_button" correct for the functions created? Since we are not necessarily accessing them

Yes, the function signatures need all arguments that are passed by the signal.

Do I need to include additional parameters for these functions?

No, but one shorthand is to use the *args for arguments you don't need.

This is totally fine though!

I will test this once Workbench works again for me, but the code LGTM!

BharatAtbrat commented 5 months ago

Are the parameters "_dialog" and "_button" correct for the functions created? Since we are not necessarily accessing them

Yes, the function signatures need all arguments that are passed by the signal.

Do I need to include additional parameters for these functions?

No, but one shorthand is to use the *args for arguments you don't need.

This is totally fine though!

I will test this once Workbench works again for me, but the code LGTM!

Got it, thank you!