summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2007-12-07 18:51:25 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2007-12-07 18:51:25 +0000
commitdcc86ce57cf97d814508b0632a452929655cf604 (patch)
tree937c3352554e75c76a1c62cd3db2e2f488556c4f /gtk
parentd9e1478d5371a44a90c094051659aa73e50043ae (diff)
downloadgtk+-dcc86ce57cf97d814508b0632a452929655cf604.tar.gz
Don't leak pixbufs. (#502250, Yevgen Muntyan)
2007-12-07 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): Don't leak pixbufs. (#502250, Yevgen Muntyan) svn path=/trunk/; revision=19128
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkfilechooserdefault.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index fe958b408a..75a149f0e5 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -1382,13 +1382,6 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
volume = data;
pixbuf = gtk_file_system_volume_render_icon (impl->file_system, volume, GTK_WIDGET (impl),
impl->icon_size, NULL);
-
- gtk_list_store_set (impl->shortcuts_model, &iter,
- SHORTCUTS_COL_PIXBUF, pixbuf,
- -1);
-
- if (pixbuf)
- g_object_unref (pixbuf);
}
else if (shortcut_type == SHORTCUT_TYPE_PATH)
{
@@ -1425,13 +1418,6 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
icon_theme = gtk_icon_theme_get_for_screen (gtk_widget_get_screen (GTK_WIDGET (impl)));
pixbuf = gtk_icon_theme_load_icon (icon_theme, "gnome-fs-share",
impl->icon_size, 0, NULL);
-
- gtk_list_store_set (impl->shortcuts_model, &iter,
- SHORTCUTS_COL_PIXBUF, pixbuf,
- -1);
-
- if (pixbuf)
- g_object_unref (pixbuf);
}
}
else if (shortcut_type == SHORTCUT_TYPE_SEARCH)
@@ -1442,6 +1428,14 @@ shortcuts_reload_icons (GtkFileChooserDefault *impl)
{
pixbuf = render_recent_icon (impl);
}
+
+ gtk_list_store_set (impl->shortcuts_model, &iter,
+ SHORTCUTS_COL_PIXBUF, pixbuf,
+ -1);
+
+ if (pixbuf)
+ g_object_unref (pixbuf);
+
}
}
while (gtk_tree_model_iter_next (GTK_TREE_MODEL (impl->shortcuts_model),&iter));