[nautilus/wip/oholy/gtk4-modal-dialogs: 1/2] general: Make message dialogs modal again
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/oholy/gtk4-modal-dialogs: 1/2] general: Make message dialogs modal again
- Date: Wed, 26 Jan 2022 11:30:41 +0000 (UTC)
commit eb5b9cc064211e29a0086adc134a1db9199ad319
Author: Ondrej Holy <oholy redhat com>
Date: Wed Jan 26 12:15:36 2022 +0100
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
eel/eel-stock-dialogs.c | 6 +++---
src/nautilus-file-operations.c | 2 +-
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]