From 7a42b9b076d6b831c89bd0b9e996368c1c95aef3 Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Thu, 18 Oct 2012 10:30:31 +0200 Subject: [all] use g_list_free() and g_strcmp0 instead of eel functions Was: general: use g_list_free_full() instead of eel functions http://git.gnome.org/browse/nautilus/commit/?id=5e669515fd7f760382e6b7aa1449734a35a2d7f4 . Instead of g_list_free_full(), we use g_list_foreach and g_list_free() to avoid unnecessary glib dependency bump to 2.28 --- src/caja-bookmark-list.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/caja-bookmark-list.c') diff --git a/src/caja-bookmark-list.c b/src/caja-bookmark-list.c index cde07a1c..db594cf7 100644 --- a/src/caja-bookmark-list.c +++ b/src/caja-bookmark-list.c @@ -31,9 +31,9 @@ #include #include #include -#include -#include + #include +#include #define MAX_BOOKMARK_LENGTH 80 #define LOAD_JOB 1 @@ -167,7 +167,8 @@ static void clear (CajaBookmarkList *bookmarks) { g_list_foreach (bookmarks->list, stop_monitoring_one, bookmarks); - eel_g_object_list_free (bookmarks->list); + g_list_foreach(bookmarks->list, (GFunc) g_object_unref, NULL); + g_list_free(bookmarks->list); bookmarks->list = NULL; } @@ -407,7 +408,7 @@ caja_bookmark_list_delete_items_with_uri (CajaBookmarkList *bookmarks, next = node->next; bookmark_uri = caja_bookmark_get_uri (CAJA_BOOKMARK (node->data)); - if (eel_strcmp (bookmark_uri, uri) == 0) + if (g_strcmp0 (bookmark_uri, uri) == 0) { bookmarks->list = g_list_remove_link (bookmarks->list, node); stop_monitoring_bookmark (bookmarks, CAJA_BOOKMARK (node->data)); -- cgit v1.2.1