diff options
-rw-r--r-- | libdbusmenu-glib/client.c | 9 | ||||
-rw-r--r-- | libdbusmenu-glib/client.h | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index d49b8db..f00c185 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -59,12 +59,12 @@ dbusmenu_client_class_init (DbusmenuClientClass *klass) object_class->get_property = get_property; g_object_class_install_property (object_class, PROP_DBUSOBJECT, - g_param_spec_string("dbus-object", "DBus Object we represent", + g_param_spec_string(DBUSMENU_CLIENT_PROP_DBUS_OBJECT, "DBus Object we represent", "The Object on the client that we're getting our data from.", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DBUSNAME, - g_param_spec_string("dbus-name", "DBus Client we connect to", + g_param_spec_string(DBUSMENU_CLIENT_PROP_DBUS_NAME, "DBus Client we connect to", "Name of the DBus client we're connecting to.", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); @@ -345,7 +345,10 @@ update_layout (DbusmenuClient * client) DbusmenuClient * dbusmenu_client_new (const gchar * name, const gchar * object) { - DbusmenuClient * self = g_object_new(DBUSMENU_TYPE_CLIENT, "name", name, "object", object, NULL); + DbusmenuClient * self = g_object_new(DBUSMENU_TYPE_CLIENT, + DBUSMENU_CLIENT_PROP_DBUS_NAME, name, + DBUSMENU_CLIENT_PROP_DBUS_OBJECT, object, + NULL); update_layout(self); return self; diff --git a/libdbusmenu-glib/client.h b/libdbusmenu-glib/client.h index d54b9d7..bc4559a 100644 --- a/libdbusmenu-glib/client.h +++ b/libdbusmenu-glib/client.h @@ -15,6 +15,9 @@ G_BEGIN_DECLS #define DBUSMENU_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_CLIENT)) #define DBUSMENU_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_CLIENT, DbusmenuClientClass)) +#define DBUSMENU_CLIENT_PROP_DBUS_NAME "dbus-name" +#define DBUSMENU_CLIENT_PROP_DBUS_OBJECT "dbus-object" + typedef struct _DbusmenuClient DbusmenuClient; typedef struct _DbusmenuClientClass DbusmenuClientClass; |