aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-11-11 21:48:35 -0600
committerTed Gould <ted@gould.cx>2010-11-11 21:48:35 -0600
commit2d87c7a295d0eb4681ed65a709c77ef47a421bf7 (patch)
tree10cb52c49f8ddf413150b46021dd24c2ef797d3a /src
parent5c687d9de8dd774742a6a0e06ea443042fe91541 (diff)
downloadlibayatana-appindicator-2d87c7a295d0eb4681ed65a709c77ef47a421bf7.tar.gz
libayatana-appindicator-2d87c7a295d0eb4681ed65a709c77ef47a421bf7.tar.bz2
libayatana-appindicator-2d87c7a295d0eb4681ed65a709c77ef47a421bf7.zip
Setup the menu as a dbusmenu if we build it
Diffstat (limited to 'src')
-rw-r--r--src/app-indicator.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/app-indicator.c b/src/app-indicator.c
index 4643931..ee18cad 100644
--- a/src/app-indicator.c
+++ b/src/app-indicator.c
@@ -2200,6 +2200,18 @@ app_indicator_build_menu_from_desktop (AppIndicator * self, const gchar * deskto
}
/* Swap it if needed */
+ if (priv->menuservice == NULL) {
+ gchar * path = g_strdup_printf(DEFAULT_ITEM_PATH "/%s/Menu", priv->clean_id);
+ priv->menuservice = dbusmenu_server_new (path);
+ g_free(path);
+ }
+
+ dbusmenu_server_set_root (priv->menuservice, root);
+
+ if (priv->menu != NULL) {
+ g_object_unref(G_OBJECT(priv->menu));
+ priv->menu = NULL;
+ }
return;
}