diff options
author | Javier Jardón <jjardon@gnome.org> | 2012-01-02 04:20:59 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2012-01-05 04:22:43 +0100 |
commit | d005b013196bc8b69474f718a5817baf9aec99af (patch) | |
tree | 5b6151756a0b1b7743a28ff245d16e0004dc40f6 /gtk/gtkrecentchooserdefault.c | |
parent | 6ad6f719c6b2fc7cf797c86b406f4e61d9fca4d1 (diff) | |
download | gtk+-d005b013196bc8b69474f718a5817baf9aec99af.tar.gz |
gtk/*: Use g_list_free_full() convenience function
Diffstat (limited to 'gtk/gtkrecentchooserdefault.c')
-rw-r--r-- | gtk/gtkrecentchooserdefault.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c index b524a906a1..88b3169ac9 100644 --- a/gtk/gtkrecentchooserdefault.c +++ b/gtk/gtkrecentchooserdefault.c @@ -629,12 +629,8 @@ gtk_recent_chooser_default_dispose (GObject *object) impl->load_id = 0; } - if (impl->recent_items) - { - g_list_foreach (impl->recent_items, (GFunc) gtk_recent_info_unref, NULL); - g_list_free (impl->recent_items); - impl->recent_items = NULL; - } + g_list_free_full (impl->recent_items, (GDestroyNotify) gtk_recent_info_unref); + impl->recent_items = NULL; if (impl->manager && impl->manager_changed_id) { @@ -839,10 +835,7 @@ load_recent_items (gpointer user_data) /* we have finished loading, so we remove the items cache */ impl->load_state = LOAD_LOADING; - g_list_foreach (impl->recent_items, - (GFunc) gtk_recent_info_unref, - NULL); - g_list_free (impl->recent_items); + g_list_free_full (impl->recent_items, (GDestroyNotify) gtk_recent_info_unref); impl->recent_items = NULL; impl->n_recent_items = 0; |