From 6872c840672049695904d61c1a3baba22c6d9627 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Sun, 3 Jun 2012 08:33:31 +0200 Subject: Add GActionMuxer This is a new implementation of an action muxer with the same interface as the one in the gtk tree. Its implementation is considerably simpler, mostly because it doesn't need to implement GActionObservable. In addition to muxing different action groups with the . scheme, it has the notion of global, prefix-less actions. Indicator-messages needs those for the status and clear actions. --- src/messages-service.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/messages-service.c') diff --git a/src/messages-service.c b/src/messages-service.c index 28a64a0..c1069b8 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -34,12 +34,14 @@ with this program. If not, see . #include "dbus-data.h" #include "messages-service-dbus.h" #include "status-items.h" +#include "gactionmuxer.h" static IndicatorService * service = NULL; static GHashTable *applications; static GDBusConnection *bus; static GSimpleActionGroup *actions; +static GActionMuxer *action_muxer; static GMenu *menu; static GSettings *settings; static GMainLoop * mainloop = NULL; @@ -296,8 +298,11 @@ main (int argc, char ** argv) actions = g_simple_action_group_new (); g_simple_action_group_add_entries (actions, entries, G_N_ELEMENTS (entries), NULL); + + action_muxer = g_action_muxer_new (); + g_action_muxer_insert (action_muxer, NULL, G_ACTION_GROUP (actions)); g_dbus_connection_export_action_group (bus, INDICATOR_MESSAGES_DBUS_OBJECT, - G_ACTION_GROUP (actions), &error); + G_ACTION_GROUP (action_muxer), &error); if (error) { g_warning ("unable to export action group on dbus: %s", error->message); g_error_free (error); -- cgit v1.2.3