[gnome-panel] libpanel-util: remove panel_g_list_resort_item
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] libpanel-util: remove panel_g_list_resort_item
- Date: Sat, 7 Mar 2020 19:28:49 +0000 (UTC)
commit f064e87e5e5fdab7362fa125165a751e5dd974e3
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Mar 7 20:55:06 2020 +0200
libpanel-util: remove panel_g_list_resort_item
gnome-panel/libpanel-util/panel-list.c | 29 -----------------------------
gnome-panel/libpanel-util/panel-list.h | 3 ---
2 files changed, 32 deletions(-)
---
diff --git a/gnome-panel/libpanel-util/panel-list.c b/gnome-panel/libpanel-util/panel-list.c
index 870338aef..5002fe7e0 100644
--- a/gnome-panel/libpanel-util/panel-list.c
+++ b/gnome-panel/libpanel-util/panel-list.c
@@ -148,35 +148,6 @@ panel_g_list_swap_prev (GList *list,
return list;
}
-/*maybe this should be a glib function?
- it resorts a single item in the list*/
-GList *
-panel_g_list_resort_item (GList *list,
- gpointer data,
- GCompareFunc func)
-{
- GList *dl;
-
- g_return_val_if_fail (func != NULL, list);
-
- if (!list)
- return NULL;
-
- dl = g_list_find (list, data);
-
- if (dl != NULL)
- return list;
-
- while (dl->next &&
- (*func)(dl->data, dl->next->data) > 0)
- list = panel_g_list_swap_next (list, dl);
- while (dl->prev &&
- (*func) (dl->data, dl->prev->data) < 0)
- list = panel_g_list_swap_prev (list, dl);
-
- return list;
-}
-
GSList *
panel_g_slist_make_unique (GSList *list,
GCompareFunc compare,
diff --git a/gnome-panel/libpanel-util/panel-list.h b/gnome-panel/libpanel-util/panel-list.h
index 0d1e6141d..061949745 100644
--- a/gnome-panel/libpanel-util/panel-list.h
+++ b/gnome-panel/libpanel-util/panel-list.h
@@ -37,9 +37,6 @@ GList *panel_g_list_swap_next (GList *list,
GList *dl);
GList *panel_g_list_swap_prev (GList *list,
GList *dl);
-GList *panel_g_list_resort_item (GList *list,
- gpointer data,
- GCompareFunc func);
GSList *panel_g_slist_make_unique (GSList *list,
GCompareFunc compare,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]