From: Christian Dywan Date: Sat, 13 Jun 2009 01:43:49 +0000 (+0200) Subject: Always show Open in Download dialogues, regardless of the file type X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2834db080be81795efc22687f63bb0d7eb62e586;p=midori Always show Open in Download dialogues, regardless of the file type Just too often the reported MIME type is wrong or undetermined, so we give the user the opportunity to know better. --- diff --git a/midori/midori-view.c b/midori/midori-view.c index 93af3d47..335e8dce 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -1467,6 +1467,7 @@ webkit_web_view_mime_type_decision_cb (GtkWidget* web_view, gtk_widget_show (image); gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image); #endif + g_free (content_type); if (g_strrstr (description, mime_type)) gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), _("File Type: '%s'"), mime_type); @@ -1493,11 +1494,8 @@ webkit_web_view_mime_type_decision_cb (GtkWidget* web_view, GTK_STOCK_SAVE, 1, GTK_STOCK_SAVE_AS, 4, GTK_STOCK_CANCEL, 2, + GTK_STOCK_OPEN, 3, NULL); - if (!g_content_type_is_unknown (content_type)) - gtk_dialog_add_buttons (GTK_DIALOG (dialog), - GTK_STOCK_OPEN, 3, NULL); - g_free (content_type); response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); g_object_set_data (G_OBJECT (view), "open-download", (gpointer)0);