Commit dcc86ce5 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

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
parent d9e1478d
2007-12-07 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (shortcuts_reload_icons): Don't
leak pixbufs. (#502250, Yevgen Muntyan)
2007-12-07 Yevgen Muntyan <muntyan@tamu.edu>
* gtk/gtkprintunixdialog.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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment