[nautilus/wip/gaction_] view: use library method to free NautilusMenuItems
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/gaction_] view: use library method to free NautilusMenuItems
- Date: Wed, 21 Jan 2015 04:12:17 +0000 (UTC)
commit 91e06dc99b4c63116aa6e1ac9615845c1c23c9fe
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jan 20 17:24:22 2015 -0800
view: use library method to free NautilusMenuItems
For clarity.
src/nautilus-view.c | 17 ++++-------------
1 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/src/nautilus-view.c b/src/nautilus-view.c
index c1ceee5..1d0061c 100644
--- a/src/nautilus-view.c
+++ b/src/nautilus-view.c
@@ -3864,15 +3864,8 @@ extension_action_callback (GSimpleAction *action,
if (!is_valid)
is_valid = search_in_menu_items (background_items, item_name);
- for (l = selection_items; l != NULL; l = l->next) {
- g_object_unref (l->data);
- }
- for (l = background_items; l != NULL; l = l->next) {
- g_object_unref (l->data);
- }
-
- g_list_free (selection_items);
- g_list_free (background_items);
+ nautilus_menu_item_list_free (selection_items);
+ nautilus_menu_item_list_free (background_items);
g_free (item_name);
@@ -3995,8 +3988,7 @@ update_extensions_menus (NautilusView *view)
view->details->selection_menu,
NULL);
- g_list_foreach (selection_items, (GFunc) g_object_unref, NULL);
- g_list_free (selection_items);
+ nautilus_menu_item_list_free (selection_items);
}
if (background_items != NULL) {
@@ -4005,8 +3997,7 @@ update_extensions_menus (NautilusView *view)
view->details->selection_menu,
NULL);
- g_list_foreach (background_items, (GFunc) g_object_unref, NULL);
- g_list_free (background_items);
+ nautilus_menu_item_list_free (background_items);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]