summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestas.kulik@gmail.com>2016-04-04 10:42:28 +0300
committerCarlos Soriano <csoriano@gnome.org>2016-04-14 11:35:15 +0200
commit0b61abdadbc1f6c55f97c7a00d315ea32f8e03b4 (patch)
treee47f88740fda92dd004891ac0c19014be678e5e0
parentedbd7b0e896dbb2c049d6eaefc5980e6d05a9408 (diff)
downloadnautilus-0b61abdadbc1f6c55f97c7a00d315ea32f8e03b4.tar.gz
mime-actions: make unhandled type dialogs modal
The unhandled type message dialog and application chooser dialog for files of unhandled type are not modal, thus allowing the user to inadvertently spawn multiple dialogs. This commit fixes that by making the dialogs modal. https://bugzilla.gnome.org/show_bug.cgi?id=627259
-rw-r--r--src/nautilus-mime-actions.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
index b132544dc..7a1a47097 100644
--- a/src/nautilus-mime-actions.c
+++ b/src/nautilus-mime-actions.c
@@ -1090,7 +1090,8 @@ choose_program (GtkDialog *message_dialog, int response, gpointer callback_data)
gtk_widget_destroy (GTK_WIDGET (message_dialog));
dialog = gtk_app_chooser_dialog_new (parameters->parent_window,
- 0, location);
+ GTK_DIALOG_MODAL,
+ location);
g_object_set_data_full (G_OBJECT (dialog),
"mime-action:file",
nautilus_file_ref (file),
@@ -1116,7 +1117,7 @@ show_unhandled_type_error (ActivateParametersInstall *parameters)
char *error_message = get_application_no_mime_type_handler_message (parameters->file, parameters->uri);
if (g_content_type_is_unknown (mime_type)) {
dialog = gtk_message_dialog_new (parameters->parent_window,
- GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
0,
NULL);
@@ -1129,7 +1130,7 @@ show_unhandled_type_error (ActivateParametersInstall *parameters)
text = g_strdup_printf (_("There is no application installed for ā€œ%sā€ files"), g_content_type_get_description (mime_type));
dialog = gtk_message_dialog_new (parameters->parent_window,
- GTK_DIALOG_DESTROY_WITH_PARENT,
+ GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
GTK_MESSAGE_ERROR,
0,
NULL);