From 1a21c582c91dfa1df8bcb8e2f822b2ad025c64f5 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Sun, 3 Jun 2012 13:03:29 +0200 Subject: gactionmuxer: allow passing a NULL action group to insert() --- src/gactionmuxer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/gactionmuxer.c') diff --git a/src/gactionmuxer.c b/src/gactionmuxer.c index cccfeda..e2cee3f 100644 --- a/src/gactionmuxer.c +++ b/src/gactionmuxer.c @@ -360,7 +360,7 @@ g_action_muxer_new (void) * g_action_muxer_insert: * @muxer: a #GActionMuxer * @prefix: (allow-none): the prefix string for the action group, or NULL - * @group: a #GActionGroup + * @group: (allow-none): a #GActionGroup, or NULL * * Adds the actions in @group to the list of actions provided by @muxer. * @prefix is prefixed to each action name, such that for each action @@ -374,6 +374,9 @@ g_action_muxer_new (void) * If @prefix is NULL, the actions in @group will be added * to @muxer without prefix. * + * If @group is NULL, this function has the same effect as + * calling g_action_muxer_remove() with @prefix. + * * There may only be one group per prefix (including the * NULL-prefix). If a group has been added with @prefix in * a previous call to this function, it will be removed. @@ -394,6 +397,9 @@ g_action_muxer_insert (GActionMuxer *muxer, g_action_muxer_remove (muxer, prefix); + if (!group) + return; + if (prefix) { prefix_copy = g_strdup (prefix); -- cgit v1.2.3