[gnome-panel] libpanel-util: remove panel_g_slist_make_unique
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] libpanel-util: remove panel_g_slist_make_unique
- Date: Sat, 7 Mar 2020 19:28:54 +0000 (UTC)
commit 9b4453b8abe28fb3ee084f92be932740cc31c15d
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Mar 7 20:56:57 2020 +0200
libpanel-util: remove panel_g_slist_make_unique
gnome-panel/libpanel-util/panel-list.c | 32 --------------------------------
gnome-panel/libpanel-util/panel-list.h | 4 ----
2 files changed, 36 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-list.c b/gnome-panel/libpanel-util/panel-list.c
index 5002fe7e0..7bb32ab99 100644
--- a/gnome-panel/libpanel-util/panel-list.c
+++ b/gnome-panel/libpanel-util/panel-list.c
@@ -147,35 +147,3 @@ panel_g_list_swap_prev (GList *list,
return list;
}
-
-GSList *
-panel_g_slist_make_unique (GSList *list,
- GCompareFunc compare,
- gboolean free_data)
-{
- GSList *sorted, *l;
-
- g_return_val_if_fail (compare != NULL, list);
-
- if (!list)
- return NULL;
-
- sorted = g_slist_copy (list);
- sorted = g_slist_sort (sorted, compare);
-
- for (l = sorted; l; l = l->next) {
- GSList *next;
-
- next = l->next;
- if (l->data && next && next->data)
- if (!compare (l->data, next->data)) {
- list = g_slist_remove (list, l->data);
- if (free_data)
- g_free (l->data);
- }
- }
-
- g_slist_free (sorted);
-
- return list;
-}
diff --git a/gnome-panel/libpanel-util/panel-list.h b/gnome-panel/libpanel-util/panel-list.h
index 061949745..471742130 100644
--- a/gnome-panel/libpanel-util/panel-list.h
+++ b/gnome-panel/libpanel-util/panel-list.h
@@ -38,10 +38,6 @@ GList *panel_g_list_swap_next (GList *list,
GList *panel_g_list_swap_prev (GList *list,
GList *dl);
-GSList *panel_g_slist_make_unique (GSList *list,
- GCompareFunc compare,
- gboolean free_data);
-
G_END_DECLS
#endif /* PANEL_LIST_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]