Stop using blocking dialog functions
In preparation for the GTK 4 port, we should stop using gtk_dialog_run()
, as explained in the porting guide:
GtkDialog, GtkNativeDialog, and GtkPrintOperation removed their blocking API using nested main loops. Nested main loops present re-entrancy issues and other hard to debug issues when coupled with other event sources (IPC, accessibility, network operations) that are not under the toolkit or the application developer’s control. Additionally, “stop-the-world” functions do not fit the event-driven programming model of GTK.
You can replace calls to
gtk_dialog_run
by specifying that the GtkDialog must be modal usinggtk_window_set_modal()
or theGTK_DIALOG_MODAL
flag, and connecting to theGtkDialog::response
signal.
In this project, gtk_dialog_run()
.
-
eel/eel-stock-dialogs.c !746 (merged) -
src/nautilus-autorun-software.c !742 (merged) -
src/nautilus-file-operations.c !746 (merged) -
src/nautilus-files-view.c !739 (closed) -
src/nautilus-mime-actions.c !746 (merged) -
src/nautilus-operations-ui-manager.c !719 (merged) -
src/nautilus-places-view.c !742 (merged) -
src/nautilus-search-popover.c !737 (merged)
Additionally, we have a a few functions which rely on its blocking behavior. So, this may need a little refactoring.