summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2022-01-26 12:15:36 +0100
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2022-02-07 16:41:05 +0000
commit7cad82c9d10a27b93812caba111d4cc5cfa7fd23 (patch)
tree7e4a7925d19b07bc19afc0e2129008a568a45851
parent84913a9df5d4be1cdff72bf3025ba2d078d0c52c (diff)
downloadnautilus-7cad82c9d10a27b93812caba111d4cc5cfa7fd23.tar.gz
general: Make message dialogs modal again
After the GTK 4 port, some dialogs are no more modal. This is regression, which is probably caused by the fact, that this needs to be explicitly specified now. Let's make all the `GtkMessageDialog` dialogs modal again. Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2117
-rw-r--r--eel/eel-stock-dialogs.c6
-rw-r--r--src/nautilus-file-operations.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/eel/eel-stock-dialogs.c b/eel/eel-stock-dialogs.c
index 9844da086..4bfde1b95 100644
--- a/eel/eel-stock-dialogs.c
+++ b/eel/eel-stock-dialogs.c
@@ -202,7 +202,7 @@ timed_wait_callback (gpointer callback_data)
/* Put up the timed wait window. */
button = wait->cancel_callback != NULL ? _("_Cancel") : ("_OK");
dialog = GTK_DIALOG (gtk_message_dialog_new (wait->parent_window,
- 0,
+ GTK_DIALOG_MODAL,
GTK_MESSAGE_INFO,
GTK_BUTTONS_NONE,
NULL));
@@ -343,7 +343,7 @@ eel_show_simple_dialog (GtkWidget *parent,
/* Create the dialog. */
dialog = gtk_message_dialog_new (GTK_WINDOW (chosen_parent),
- 0,
+ GTK_DIALOG_MODAL,
message_type,
GTK_BUTTONS_NONE,
NULL);
@@ -383,7 +383,7 @@ create_message_dialog (const char *primary_text,
GtkWidget *dialog;
dialog = gtk_message_dialog_new (parent,
- 0,
+ GTK_DIALOG_MODAL,
type,
buttons_type,
NULL);
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index a6ab32905..38be3fe3a 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -1347,7 +1347,7 @@ do_run_simple_dialog (gpointer _data)
/* Create the dialog. */
dialog = gtk_message_dialog_new (*data->parent_window,
- 0,
+ GTK_DIALOG_MODAL,
data->message_type,
GTK_BUTTONS_NONE,
NULL);