[libwnck/wip/muktupavels/warnings: 1/3] tasklist: fix cast-function-type warnings



commit 85ff88e47083a19211724aa1a3d807c8734a680a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Sep 9 21:13:50 2018 +0300

    tasklist: fix cast-function-type warnings

 libwnck/tasklist.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index d82509f..463ea50 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -1689,6 +1689,13 @@ wnck_tasklist_size_allocate (GtkWidget      *widget,
                                                                 allocation);
 }
 
+static void
+foreach_tasklist (WnckTasklist *tasklist,
+                  gpointer      user_data)
+{
+  wnck_tasklist_update_lists (tasklist);
+}
+
 static void
 wnck_tasklist_realize (GtkWidget *widget)
 {
@@ -1713,9 +1720,7 @@ wnck_tasklist_realize (GtkWidget *widget)
   (* GTK_WIDGET_CLASS (wnck_tasklist_parent_class)->realize) (widget);
 
   tasklist_instances = g_slist_append (tasklist_instances, tasklist);
-  g_slist_foreach (tasklist_instances,
-                  (GFunc) wnck_tasklist_update_lists,
-                  NULL);
+  g_slist_foreach (tasklist_instances, (GFunc) foreach_tasklist, NULL);
 
   wnck_tasklist_update_lists (tasklist);
 
@@ -1740,9 +1745,7 @@ wnck_tasklist_unrealize (GtkWidget *widget)
   (* GTK_WIDGET_CLASS (wnck_tasklist_parent_class)->unrealize) (widget);
 
   tasklist_instances = g_slist_remove (tasklist_instances, tasklist);
-  g_slist_foreach (tasklist_instances,
-                  (GFunc) wnck_tasklist_update_lists,
-                  NULL);
+  g_slist_foreach (tasklist_instances, (GFunc) foreach_tasklist, NULL);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]