From 1ec2b70ac16b031a4c7cc5398e9fb7a17bef4e4c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Thu, 11 Nov 2010 20:10:54 -0600 Subject: Create a property for the dbusmenu server --- src/app-indicator.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/app-indicator.c b/src/app-indicator.c index 4f7daa8..25599a7 100644 --- a/src/app-indicator.c +++ b/src/app-indicator.c @@ -34,6 +34,7 @@ License version 3 and version 2.1 along with this program. If not, see #include #include +#include #include #include @@ -121,7 +122,8 @@ enum { PROP_X_LABEL, PROP_X_LABEL_GUIDE, PROP_ORDERING_INDEX, - PROP_X_ORDERING_INDEX + PROP_X_ORDERING_INDEX, + PROP_DBUS_MENU_SERVER }; /* The strings so that they can be slowly looked up. */ @@ -139,6 +141,7 @@ enum { #define PROP_X_LABEL_GUIDE_S ("x-ayatana-" PROP_LABEL_GUIDE_S) #define PROP_ORDERING_INDEX_S "ordering-index" #define PROP_X_ORDERING_INDEX_S ("x-ayatana-" PROP_ORDERING_INDEX_S) +#define PROP_DBUS_MENU_SERVER_S "dbus-menu-server" /* Private macro, shhhh! */ #define APP_INDICATOR_GET_PRIVATE(o) \ @@ -406,6 +409,19 @@ app_indicator_class_init (AppIndicatorClass *klass) "A wrapper, please don't use.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + /** + AppIndicator:dbus-menu-server: + + A way to get the internal dbusmenu server if it is available. + This should only be used for testing. + */ + g_object_class_install_property(object_class, + PROP_DBUS_MENU_SERVER, + g_param_spec_object (PROP_DBUS_MENU_SERVER_S, + "The internal DBusmenu Server", + "DBusmenu server which is available for testing the application indicators.", + DBUSMENU_TYPE_MENUITEM, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Signals */ -- cgit v1.2.3