[gtk/action-muxer-speedup: 2322/2323] Add gtk_action_muxer_list_actions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/action-muxer-speedup: 2322/2323] Add gtk_action_muxer_list_actions
- Date: Sun, 19 Jul 2020 05:58:08 +0000 (UTC)
commit 89da8951cc5243dcd36c2afd8009a56b35490b9f
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Jul 19 01:55:13 2020 -0400
Add gtk_action_muxer_list_actions
This is needed to reinstate the actions support
in the inspector.
gtk/gtkactionmuxer.c | 10 +++-------
gtk/gtkactionmuxerprivate.h | 1 +
2 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkactionmuxer.c b/gtk/gtkactionmuxer.c
index 487315493b..08f02d271d 100644
--- a/gtk/gtkactionmuxer.c
+++ b/gtk/gtkactionmuxer.c
@@ -120,7 +120,6 @@ get_action_position (GtkWidgetAction *action)
return slot;
}
-#if 0
static void
gtk_action_muxer_append_group_actions (const char *prefix,
Group *group,
@@ -139,15 +138,13 @@ gtk_action_muxer_append_group_actions (const char *prefix,
g_strfreev (group_actions);
}
-static gchar **
-gtk_action_muxer_list_actions (GActionGroup *action_group)
+char **
+gtk_action_muxer_list_actions (GtkActionMuxer *muxer)
{
- GtkActionMuxer *muxer = GTK_ACTION_MUXER (action_group);
GHashTable *actions;
char **keys;
- actions = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, NULL);
+ actions = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
for ( ; muxer != NULL; muxer = muxer->parent)
{
@@ -177,7 +174,6 @@ gtk_action_muxer_list_actions (GActionGroup *action_group)
return (char **)keys;
}
-#endif
static Group *
gtk_action_muxer_find_group (GtkActionMuxer *muxer,
diff --git a/gtk/gtkactionmuxerprivate.h b/gtk/gtkactionmuxerprivate.h
index 3d65e8a342..7708d5eb1c 100644
--- a/gtk/gtkactionmuxerprivate.h
+++ b/gtk/gtkactionmuxerprivate.h
@@ -87,6 +87,7 @@ void gtk_action_muxer_change_action_state (GtkActi
GVariant *state);
gboolean gtk_action_muxer_has_action (GtkActionMuxer *muxer,
const char *action_name);
+char ** gtk_action_muxer_list_actions (GtkActionMuxer *muxer);
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]