Skip to content

Gtk4 Prep - Use dialog.response.connect () pattern#2568

Merged
danirabbit merged 1 commit intomainfrom
jeremypw/gtk4prep/dialogs
Mar 23, 2025
Merged

Gtk4 Prep - Use dialog.response.connect () pattern#2568
danirabbit merged 1 commit intomainfrom
jeremypw/gtk4prep/dialogs

Conversation

@jeremypw
Copy link
Contributor

@jeremypw jeremypw commented Mar 23, 2025

The dialog response is consistently handled in a closure connected to the response signal.

Where possible dialog.present () is also used but it seems that in Gtk3, this does not block the main loop even if the dialog is flagged as modal. In cases where we need the mainloop to wait for a result from the dialog, dialog.run () is still called. I assume that in Gtk4, this can be changed to dialog.present () and the modal flag will be observed.

@jeremypw jeremypw marked this pull request as ready for review March 23, 2025 17:40
Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

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

I don't think present is main loop blocking in GTK4, so we'll need to do something else still in the future for those cases. But this does get us a bit closer I think so 👍

@danirabbit danirabbit merged commit 83d770f into main Mar 23, 2025
4 checks passed
@danirabbit danirabbit deleted the jeremypw/gtk4prep/dialogs branch March 23, 2025 22:49
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.

2 participants