[gtk+] gactionmuxer: Fix list_actions
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gactionmuxer: Fix list_actions
- Date: Fri, 30 Mar 2012 19:21:29 +0000 (UTC)
commit 356c3a3b29fd6c819e0ed4c82a430c76c3ec6b20
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 30 14:05:46 2012 -0400
gactionmuxer: Fix list_actions
The code there before was just completely wrong
https://bugzilla.gnome.org/show_bug.cgi?id=673200
gtk/gactionmuxer.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gactionmuxer.c b/gtk/gactionmuxer.c
index 5baed32..22990a4 100644
--- a/gtk/gactionmuxer.c
+++ b/gtk/gactionmuxer.c
@@ -90,8 +90,20 @@ static gchar **
g_action_muxer_list_actions (GActionGroup *action_group)
{
GActionMuxer *muxer = G_ACTION_MUXER (action_group);
+ GHashTableIter iter;
+ gchar *key;
+ gchar **keys;
+ gsize i;
- return (gchar **) muxer->groups;
+ keys = g_new (gchar *, g_hash_table_size (muxer->actions) + 1);
+
+ i = 0;
+ g_hash_table_iter_init (&iter, muxer->actions);
+ while (g_hash_table_iter_next (&iter, (gpointer *) &key, NULL))
+ keys[i++] = g_strdup (key);
+ keys[i] = NULL;
+
+ return keys;
}
static Group *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]