From dc18cc6b2040bfdf629a671bc8718030cb37260e Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 1 Jul 2004 09:40:23 +0000 Subject: No need to show the default icon for bookmarks menu. 2004-07-01 Marco Pesenti Gritti * src/bookmarks/ephy-bookmark-action.c: (ephy_bookmark_action_sync_icon): No need to show the default icon for bookmarks menu. --- ChangeLog | 7 +++++++ src/bookmarks/ephy-bookmark-action.c | 19 +++++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c1f00abe..9c6b676ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-07-01 Marco Pesenti Gritti + + * src/bookmarks/ephy-bookmark-action.c: + (ephy_bookmark_action_sync_icon): + + No need to show the default icon for bookmarks menu. + 2004-07-01 Marco Pesenti Gritti * src/bookmarks/ephy-bookmark-action.c: (create_tool_item), diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c index bea4cd18d..3921d4fcf 100644 --- a/src/bookmarks/ephy-bookmark-action.c +++ b/src/bookmarks/ephy-bookmark-action.c @@ -215,12 +215,6 @@ ephy_bookmark_action_sync_icon (GtkAction *action, GParamSpec *pspec, GtkWidget } } - if (pixbuf == NULL) - { - pixbuf = gtk_widget_render_icon (proxy, GTK_STOCK_JUMP_TO, - GTK_ICON_SIZE_MENU, NULL); - } - if (GTK_IS_TOOL_ITEM (proxy)) { GtkImage *icon; @@ -228,9 +222,15 @@ ephy_bookmark_action_sync_icon (GtkAction *action, GParamSpec *pspec, GtkWidget icon = GTK_IMAGE (g_object_get_data (G_OBJECT (proxy), "icon")); g_return_if_fail (icon != NULL); + if (pixbuf == NULL) + { + pixbuf = gtk_widget_render_icon (proxy, GTK_STOCK_JUMP_TO, + GTK_ICON_SIZE_MENU, NULL); + } + gtk_image_set_from_pixbuf (icon, pixbuf); } - else if (GTK_IS_MENU_ITEM (proxy)) + else if (GTK_IS_MENU_ITEM (proxy) && pixbuf) { GtkWidget *image; @@ -241,7 +241,10 @@ ephy_bookmark_action_sync_icon (GtkAction *action, GParamSpec *pspec, GtkWidget (GTK_IMAGE_MENU_ITEM (proxy), image); } - g_object_unref (pixbuf); + if (pixbuf) + { + g_object_unref (pixbuf); + } } static void -- cgit v1.2.3