From 0b61abdadbc1f6c55f97c7a00d315ea32f8e03b4 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Mon, 4 Apr 2016 10:42:28 +0300 Subject: 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 --- src/nautilus-mime-actions.c | 7 ++++--- 1 file 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); -- cgit v1.2.1