mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-23 20:30:15 +00:00
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
This commit is contained in:
parent
d9e1478d53
commit
dcc86ce57c
@ -1,3 +1,8 @@
|
||||
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));
|
||||
|
Loading…
Reference in New Issue
Block a user