[gtk/matthiasc-for-master: 3/11] action muxer: cosmetics



commit 3b565d7f6ecf5ab2bb184476b0ce8f5641862c31
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jun 15 22:04:19 2019 +0000

    action muxer: cosmetics

 gtk/gtkactionmuxer.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c
index d2e58b5dd4..292606250d 100644
--- a/gtk/gtkactionmuxer.c
+++ b/gtk/gtkactionmuxer.c
@@ -102,13 +102,10 @@ typedef struct
 } Group;
 
 static void
-gtk_action_muxer_append_group_actions (gpointer key,
-                                       gpointer value,
-                                       gpointer user_data)
+gtk_action_muxer_append_group_actions (const char *prefix,
+                                       Group      *group,
+                                       GArray     *actions)
 {
-  const gchar *prefix = key;
-  Group *group = value;
-  GArray *actions = user_data;
   gchar **group_actions;
   gchar **action;
 
@@ -134,9 +131,13 @@ gtk_action_muxer_list_actions (GActionGroup *action_group)
 
   for ( ; muxer != NULL; muxer = muxer->parent)
     {
-      g_hash_table_foreach (muxer->groups,
-                            gtk_action_muxer_append_group_actions,
-                            actions);
+      GHashTableIter iter;
+      const char *prefix;
+      Group *group;
+
+      g_hash_table_iter_init (&iter, muxer->groups);
+      while (g_hash_table_iter_next (&iter, (gpointer *)&prefix, (gpointer *)&group))
+        gtk_action_muxer_append_group_actions (prefix, group, actions);
     }
 
   return (gchar **)(void *) g_array_free (actions, FALSE);


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