]> spindle.queued.net Git - midori/commitdiff
Append fallback icon instead of checking the theme
authorChristian Dywan <christian@twotoasts.de>
Tue, 15 Feb 2011 20:31:39 +0000 (21:31 +0100)
committerChristian Dywan <christian@twotoasts.de>
Tue, 15 Feb 2011 20:32:08 +0000 (21:32 +0100)
midori/midori-view.c

index 57efc83d55245970e2f6281410e77567b50f58cd..f76bb51e3ce96d74d2b5a276d08894c8b2dac23a 100644 (file)
@@ -2832,7 +2832,6 @@ webkit_web_view_mime_type_decision_cb (GtkWidget*               web_view,
     gchar* description;
     #if GTK_CHECK_VERSION (2, 14, 0)
     GIcon* icon;
-    GtkIconInfo* icon_info;
     GtkWidget* image;
     #endif
     gchar* title;
@@ -2882,14 +2881,8 @@ webkit_web_view_mime_type_decision_cb (GtkWidget*               web_view,
     description = g_content_type_get_description (content_type);
     #if GTK_CHECK_VERSION (2, 14, 0)
     icon = g_content_type_get_icon (content_type);
-    icon_info = gtk_icon_theme_lookup_by_gicon (icon);
-    if (icon_info != NULL)
-    {
-        image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
-        gtk_icon_info_free (icon_info);
-    }
-    else
-        image = gtk_image_new_from_stock (GTK_STOCK_FILE, GTK_ICON_SIZE_DIALOG);
+    g_themed_icon_append_name (G_THEMED_ICON (icon), "document-x-generic");
+    image = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_DIALOG);
     g_object_unref (icon);
     gtk_widget_show (image);
     gtk_message_dialog_set_image (GTK_MESSAGE_DIALOG (dialog), image);