diff options
author | Ted Gould <ted@gould.cx> | 2012-04-03 09:44:33 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-04-03 09:44:33 -0500 |
commit | 134cc4320738fb240d501892cafcf962eadda6ca (patch) | |
tree | 16cf9a869f0ef0f2ea0368e7d7194189afae80e3 | |
parent | 1c810d69f0ac094ebc2b7094500d27d319372034 (diff) | |
download | libdbusmenu-134cc4320738fb240d501892cafcf962eadda6ca.tar.gz libdbusmenu-134cc4320738fb240d501892cafcf962eadda6ca.tar.bz2 libdbusmenu-134cc4320738fb240d501892cafcf962eadda6ca.zip |
Add a property to whether we should group events or not
-rw-r--r-- | libdbusmenu-glib/client.c | 7 | ||||
-rw-r--r-- | libdbusmenu-glib/client.h | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 67beddb..44b2902 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -52,7 +52,8 @@ enum { PROP_DBUSOBJECT, PROP_DBUSNAME, PROP_STATUS, - PROP_TEXT_DIRECTION + PROP_TEXT_DIRECTION, + PROP_GROUP_EVENTS }; /* Signals */ @@ -321,6 +322,10 @@ dbusmenu_client_class_init (DbusmenuClientClass *klass) "Signals which direction the default text direction is for the menus", DBUSMENU_TYPE_TEXT_DIRECTION, DBUSMENU_TEXT_DIRECTION_NONE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_object_class_install_property (object_class, PROP_GROUP_EVENTS, + g_param_spec_boolean(DBUSMENU_CLIENT_PROP_GROUP_EVENTS, "Whether or not multiple events should be grouped", + "Event grouping lowers the number of messages on DBus and will be set automatically based on the version to optimize traffic. It can be disabled for testing or other purposes.", + FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); if (dbusmenu_node_info == NULL) { GError * error = NULL; diff --git a/libdbusmenu-glib/client.h b/libdbusmenu-glib/client.h index d0fca32..ae22863 100644 --- a/libdbusmenu-glib/client.h +++ b/libdbusmenu-glib/client.h @@ -105,6 +105,12 @@ G_BEGIN_DECLS * String to access property #DbusmenuClient:text-direction */ #define DBUSMENU_CLIENT_PROP_TEXT_DIRECTION "text-direction" +/** + * DBUSMENU_CLIENT_PROP_GROUP_EVENTS: + * + * String to access property #DbusmenuClient:group-events + */ +#define DBUSMENU_CLIENT_PROP_GROUP_EVENTS "group-events" /** * DBUSMENU_CLIENT_TYPES_DEFAULT: |