aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/shortcut-bar/e-shortcut-bar.c
diff options
context:
space:
mode:
authorLarry Ewing <lewing@helixcode.com>2000-05-08 13:06:12 +0800
committerLarry Ewing <lewing@src.gnome.org>2000-05-08 13:06:12 +0800
commit68a38d1915a042cf481ba90c2afc208f9976b735 (patch)
tree79e1bdef03e179dee9c8c3d32053b5a5e83f65ad /widgets/shortcut-bar/e-shortcut-bar.c
parentd36891485a6e00ebffd7ea83ecbbfe47bde5c2b5 (diff)
downloadgsoc2013-evolution-68a38d1915a042cf481ba90c2afc208f9976b735.tar.gz
gsoc2013-evolution-68a38d1915a042cf481ba90c2afc208f9976b735.tar.zst
gsoc2013-evolution-68a38d1915a042cf481ba90c2afc208f9976b735.zip
remove the no longer needed flatened_alpha member.
2000-05-07 Larry Ewing <lewing@helixcode.com> * e-icon-bar.h (struct _EIconBarItem): remove the no longer needed flatened_alpha member. * e-icon-bar.c (flatten_alpha): using ~rgb can cause visual artifacts. (e_icon_bar_add_item): fixup refcounting of the flattend pixbuf, the canvas item should hold the reference not us. Stop using item.flattened_alpha since it no longer exists. (e_icon_bar_remove_item): remove the unref since destroying the item will take care of that for us. * e-shortcut-bar.c (e_shortcut_bar_add_item): make sure to unref the image we get back, the icon bar will hold any references it needs. (e_shortcut_bar_get_image_from_url): ref the default image each time we return it so that references are counted correctly. svn path=/trunk/; revision=2902
Diffstat (limited to 'widgets/shortcut-bar/e-shortcut-bar.c')
-rw-r--r--widgets/shortcut-bar/e-shortcut-bar.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/shortcut-bar/e-shortcut-bar.c b/widgets/shortcut-bar/e-shortcut-bar.c
index 89c5ef7468..63b511ed82 100644
--- a/widgets/shortcut-bar/e-shortcut-bar.c
+++ b/widgets/shortcut-bar/e-shortcut-bar.c
@@ -298,6 +298,7 @@ e_shortcut_bar_add_item (EShortcutBar *shortcut_bar, gint group_num,
item_num = e_icon_bar_add_item (E_ICON_BAR (group->icon_bar),
image, item_name, -1);
+ gdk_pixbuf_unref (image);
e_icon_bar_set_item_data_full (E_ICON_BAR (group->icon_bar), item_num,
g_strdup (item_url), g_free);
return item_num;
@@ -561,6 +562,8 @@ e_shortcut_bar_get_image_from_url (EShortcutBar *shortcut_bar,
e_shortcut_bar_default_icon = e_shortcut_bar_load_image (e_shortcut_bar_default_icon_filename);
}
icon = e_shortcut_bar_default_icon;
+ /* ref the default icon each time we return it */
+ gdk_pixbuf_ref (icon);
}
return icon;