aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-topic-action.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-09 17:24:05 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-09 17:24:05 +0800
commit3a57d18b63e6cde5a2a3bed06834020794c0ebd9 (patch)
tree669a11705ad091fe328fa8abac2c5a4598fd5ef4 /src/bookmarks/ephy-topic-action.c
parentfb06348b0b3b5e19c3407b388945919c01d80870 (diff)
downloadgsoc2013-epiphany-3a57d18b63e6cde5a2a3bed06834020794c0ebd9.tar
gsoc2013-epiphany-3a57d18b63e6cde5a2a3bed06834020794c0ebd9.tar.gz
gsoc2013-epiphany-3a57d18b63e6cde5a2a3bed06834020794c0ebd9.tar.bz2
gsoc2013-epiphany-3a57d18b63e6cde5a2a3bed06834020794c0ebd9.tar.lz
gsoc2013-epiphany-3a57d18b63e6cde5a2a3bed06834020794c0ebd9.tar.xz
gsoc2013-epiphany-3a57d18b63e6cde5a2a3bed06834020794c0ebd9.tar.zst
gsoc2013-epiphany-3a57d18b63e6cde5a2a3bed06834020794c0ebd9.zip
We cant assume the favicon is already in the cache.
2003-04-09 Marco Pesenti Gritti <marco@it.gnome.org> * src/bookmarks/ephy-topic-action.c: (build_topics_menu): We cant assume the favicon is already in the cache.
Diffstat (limited to 'src/bookmarks/ephy-topic-action.c')
-rw-r--r--src/bookmarks/ephy-topic-action.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 0d5d2557b..94e7c5e30 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -145,7 +145,7 @@ build_topics_menu (EphyTopicAction *action, GtkWidget *button)
GPtrArray *children;
int i;
EphyNode *node;
- EphyFaviconCache *cache;
+ EphyFaviconCache *cache;
node = ephy_node_get_from_id (action->priv->topic_id);
@@ -160,28 +160,32 @@ build_topics_menu (EphyTopicAction *action, GtkWidget *button)
for (i = 0; i < children->len; i++)
{
EphyNode *kid;
- const char *icon_location;
+ const char *icon_location;
const char *title;
kid = g_ptr_array_index (children, i);
- icon_location = ephy_node_get_property_string
- (kid, EPHY_NODE_BMK_PROP_ICON);
+ icon_location = ephy_node_get_property_string
+ (kid, EPHY_NODE_BMK_PROP_ICON);
title = ephy_node_get_property_string
(kid, EPHY_NODE_BMK_PROP_TITLE);
- item = gtk_image_menu_item_new_with_label (title);
- if (icon_location) {
- GdkPixbuf *icon;
- GtkWidget *image;
- icon = ephy_favicon_cache_get (cache, icon_location);
- g_assert (icon != NULL);
- image = gtk_image_new_from_pixbuf (icon);
- gtk_widget_show (image);
- gtk_image_menu_item_set_image
- (GTK_IMAGE_MENU_ITEM (item), image);
- g_object_unref (icon);
- }
+ item = gtk_image_menu_item_new_with_label (title);
+ if (icon_location)
+ {
+ GdkPixbuf *icon;
+ GtkWidget *image;
+
+ icon = ephy_favicon_cache_get (cache, icon_location);
+ if (icon != NULL)
+ {
+ image = gtk_image_new_from_pixbuf (icon);
+ gtk_widget_show (image);
+ gtk_image_menu_item_set_image
+ (GTK_IMAGE_MENU_ITEM (item), image);
+ g_object_unref (icon);
+ }
+ }
g_object_set_data (G_OBJECT (item), "node", kid);
g_signal_connect (item, "activate",