Check page icons of search engines first, afterwards icon names

This commit is contained in:
Dale Whittaker 2010-01-13 06:55:06 +01:00 committed by Christian Dywan
parent d536d90d33
commit 96178e60b7

View file

@ -413,6 +413,9 @@ midori_search_action_get_icon (KatzeItem* item,
{ {
const gchar* icon; const gchar* icon;
if ((icon = katze_item_get_uri (item)) && (g_strstr_len (icon, 8, "://")))
return katze_load_cached_icon (icon, widget);
if ((icon = katze_item_get_icon (item)) && *icon) if ((icon = katze_item_get_icon (item)) && *icon)
{ {
GdkScreen* screen; GdkScreen* screen;
@ -421,15 +424,12 @@ midori_search_action_get_icon (KatzeItem* item,
screen = gtk_widget_get_screen (widget); screen = gtk_widget_get_screen (widget);
icon_theme = gtk_icon_theme_get_for_screen (screen); icon_theme = gtk_icon_theme_get_for_screen (screen);
if (gtk_icon_theme_has_icon (icon_theme, icon)) if (gtk_icon_theme_has_icon (icon_theme, icon))
{
*icon_name = icon; *icon_name = icon;
else return NULL;
*icon_name = GTK_STOCK_FILE; }
return NULL;
} }
if ((icon = katze_item_get_uri (item)) && (g_strstr_len (icon, 8, "://")))
return katze_load_cached_icon (icon, widget);
*icon_name = GTK_STOCK_FILE; *icon_name = GTK_STOCK_FILE;
return NULL; return NULL;
} }