summaryrefslogtreecommitdiff
path: root/gtk/gtkiconfactory.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-05-09 05:30:47 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-05-09 05:30:47 +0000
commitb15a6fc689c0ba53c5cecb68439a5b27c11240dc (patch)
tree23a7356d15c6323c1a2651bc02e7c6ed1dc608e2 /gtk/gtkiconfactory.c
parent00d7e53621b5820bd4ab286a92e7e579986712fc (diff)
downloadgtk+-b15a6fc689c0ba53c5cecb68439a5b27c11240dc.tar.gz
Actually count the cached icons. (#135888, Crispin Flowerday)
Sun May 9 01:25:37 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkiconfactory.c (add_to_cache): Actually count the cached icons. (#135888, Crispin Flowerday)
Diffstat (limited to 'gtk/gtkiconfactory.c')
-rw-r--r--gtk/gtkiconfactory.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
index b75db0097f..b1accbc006 100644
--- a/gtk/gtkiconfactory.c
+++ b/gtk/gtkiconfactory.c
@@ -2600,7 +2600,7 @@ add_to_cache (GtkIconSet *icon_set,
CachedIcon *icon;
ensure_cache_up_to_date (icon_set);
-
+
g_object_ref (pixbuf);
/* We have to ref the style, since if the style was finalized
@@ -2610,10 +2610,10 @@ add_to_cache (GtkIconSet *icon_set,
if (style)
g_object_ref (style);
-
icon = g_new (CachedIcon, 1);
icon_set->cache = g_slist_prepend (icon_set->cache, icon);
+ icon_set->cache_size++;
icon->style = style;
icon->direction = direction;
@@ -2627,7 +2627,6 @@ add_to_cache (GtkIconSet *icon_set,
if (icon_set->cache_size >= NUM_CACHED_ICONS)
{
/* Remove oldest item in the cache */
-
GSList *tmp_list;
tmp_list = icon_set->cache;