Skip to content

Gtk4Prep: Replace dialog.run () and filechooser.run ()#1739

Draft
jeremypw wants to merge 23 commits into
masterfrom
jeremypw/gtk4prep/replace-dialog-run
Draft

Gtk4Prep: Replace dialog.run () and filechooser.run ()#1739
jeremypw wants to merge 23 commits into
masterfrom
jeremypw/gtk4prep/replace-dialog-run

Conversation

@jeremypw

@jeremypw jeremypw commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

The run () functions is replaced with show () together with a handler for the "response" signal as will be needed in Gtk4. The dialogs are explicitly created modal. In some cases where there is code that must wait for the response, it is necessary to use async functionality and yield as dialog.show () is not blocking.

In passing

An unused dialog is removed
show_all () is moved into the Preferences dialog class where it would normally be.

@jeremypw jeremypw added this to the 8.3.2 milestone Jun 22, 2026
@danirabbit

Copy link
Copy Markdown
Member

Any reason you're using show instead of present?

@jeremypw

jeremypw commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator Author

Valadoc says Gtk.Window.present should not be used in Gtk3 because of timestamp issues. It will be OK in Gtk4 though.

Using show () does mean modal must explicitly be set to true in order to get a modal dialog. I have now gone through and made all the custom dialogs created modal and shown in the same way.

@danirabbit danirabbit left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Don't forget to update POTFILES since you removed a file

Comment thread src/FolderManager/ProjectFolderItem.vala
@jeremypw jeremypw requested a review from danirabbit June 25, 2026 10:19
@danirabbit

Copy link
Copy Markdown
Member

Since this is a pretty large branch now, can you break out the async function changes into a separate branch? It'd be nice to have its own commit in git history. If it's too much of a pain, don't worry about it :)

@jeremypw

Copy link
Copy Markdown
Collaborator Author

No problem, it has expanded somewhat ...

@jeremypw jeremypw marked this pull request as draft June 27, 2026 15:23
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