aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Gateau <aurelien.gateau@canonical.com>2011-03-02 12:07:07 +0100
committerAurelien Gateau <aurelien.gateau@canonical.com>2011-03-02 12:07:07 +0100
commit33b4e34124c38f8159ea4af25f2b3622b3cc392e (patch)
tree5f8250b78d8f8f43fb7d33ad9169150b28dffb8b
parent462b9940b0384c913570d6c54c6e464e38bd573a (diff)
downloadlibdbusmenu-33b4e34124c38f8159ea4af25f2b3622b3cc392e.tar.gz
libdbusmenu-33b4e34124c38f8159ea4af25f2b3622b3cc392e.tar.bz2
libdbusmenu-33b4e34124c38f8159ea4af25f2b3622b3cc392e.zip
Rename dbus properties to follow dbus naming conventions
- version => Version - text-direction => TextDirection - status => Status
-rw-r--r--libdbusmenu-glib/client.c10
-rw-r--r--libdbusmenu-glib/dbus-menu.xml6
-rw-r--r--libdbusmenu-glib/server.c10
3 files changed, 13 insertions, 13 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index d368a0e..8424d6f 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1026,7 +1026,7 @@ menuproxy_build_cb (GObject * object, GAsyncResult * res, gpointer user_data)
}
/* Check the text direction if available */
- GVariant * textdir = g_dbus_proxy_get_cached_property(priv->menuproxy, "text-direction");
+ GVariant * textdir = g_dbus_proxy_get_cached_property(priv->menuproxy, "TextDirection");
if (textdir != NULL) {
GVariant * str = textdir;
if (g_variant_is_of_type(str, G_VARIANT_TYPE_VARIANT)) {
@@ -1069,10 +1069,10 @@ menuproxy_prop_changed_cb (GDBusProxy * proxy, GVariant * properties, GStrv inva
gchar * invalid;
gint i = 0;
for (invalid = invalidated[i]; invalid != NULL; invalid = invalidated[++i]) {
- if (g_strcmp0(invalid, "text-direction") == 0) {
+ if (g_strcmp0(invalid, "TextDirection") == 0) {
priv->text_direction = DBUSMENU_TEXT_DIRECTION_NONE;
}
- if (g_strcmp0(invalid, "status") == 0) {
+ if (g_strcmp0(invalid, "Status") == 0) {
priv->status = DBUSMENU_STATUS_NORMAL;
}
}
@@ -1082,7 +1082,7 @@ menuproxy_prop_changed_cb (GDBusProxy * proxy, GVariant * properties, GStrv inva
gchar * key; GVariant * value;
g_variant_iter_init(&iters, properties);
while (g_variant_iter_next(&iters, "{sv}", &key, &value)) {
- if (g_strcmp0(key, "text-direction") == 0) {
+ if (g_strcmp0(key, "TextDirection") == 0) {
GVariant * str = value;
if (g_variant_is_of_type(str, G_VARIANT_TYPE_VARIANT)) {
str = g_variant_get_variant(str);
@@ -1090,7 +1090,7 @@ menuproxy_prop_changed_cb (GDBusProxy * proxy, GVariant * properties, GStrv inva
priv->text_direction = dbusmenu_text_direction_get_value_from_nick(g_variant_get_string(str, NULL));
}
- if (g_strcmp0(key, "status") == 0) {
+ if (g_strcmp0(key, "Status") == 0) {
GVariant * str = value;
if (g_variant_is_of_type(str, G_VARIANT_TYPE_VARIANT)) {
str = g_variant_get_variant(str);
diff --git a/libdbusmenu-glib/dbus-menu.xml b/libdbusmenu-glib/dbus-menu.xml
index 2352712..b61b5ec 100644
--- a/libdbusmenu-glib/dbus-menu.xml
+++ b/libdbusmenu-glib/dbus-menu.xml
@@ -164,14 +164,14 @@ License version 3 and version 2.1 along with this program. If not, see
]]></dox:d>
<!-- Properties -->
- <property name="version" type="u" access="read">
+ <property name="Version" type="u" access="read">
<dox:d>
Provides the version of the DBusmenu API that this API is
implementing.
</dox:d>
</property>
- <property name="text-direction" type="s" access="read">
+ <property name="TextDirection" type="s" access="read">
<dox:d>
Represents the way the text direction of the application. This
allows the server to handle mismatches intelligently. For left-
@@ -179,7 +179,7 @@ License version 3 and version 2.1 along with this program. If not, see
</dox:d>
</property>
- <property name="status" type="s" access="read">
+ <property name="Status" type="s" access="read">
<dox:d>
Tells if the menus are in a normal state or they believe that they
could use some attention. Cases for showing them would be if help
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c
index 7c943b2..ebd9193 100644
--- a/libdbusmenu-glib/server.c
+++ b/libdbusmenu-glib/server.c
@@ -501,7 +501,7 @@ set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec)
GVariantBuilder params;
g_variant_builder_init(&params, G_VARIANT_TYPE_ARRAY);
g_variant_builder_add_value(&params, g_variant_new_string(DBUSMENU_INTERFACE));
- GVariant * dict = g_variant_new_dict_entry(g_variant_new_string("text-direction"), g_variant_new_string(dbusmenu_text_direction_get_nick(priv->text_direction)));
+ GVariant * dict = g_variant_new_dict_entry(g_variant_new_string("TextDirection"), g_variant_new_string(dbusmenu_text_direction_get_nick(priv->text_direction)));
g_variant_builder_add_value(&params, g_variant_new_array(NULL, &dict, 1));
g_variant_builder_add_value(&params, g_variant_new_array(G_VARIANT_TYPE_STRING, NULL, 0));
GVariant * vparams = g_variant_builder_end(&params);
@@ -525,7 +525,7 @@ set_property (GObject * obj, guint id, const GValue * value, GParamSpec * pspec)
GVariantBuilder params;
g_variant_builder_init(&params, G_VARIANT_TYPE_ARRAY);
g_variant_builder_add_value(&params, g_variant_new_string(DBUSMENU_INTERFACE));
- GVariant * dict = g_variant_new_dict_entry(g_variant_new_string("status"), g_variant_new_string(dbusmenu_status_get_nick(instatus)));
+ GVariant * dict = g_variant_new_dict_entry(g_variant_new_string("Status"), g_variant_new_string(dbusmenu_status_get_nick(instatus)));
g_variant_builder_add_value(&params, g_variant_new_array(NULL, &dict, 1));
g_variant_builder_add_value(&params, g_variant_new_array(G_VARIANT_TYPE_STRING, NULL, 0));
GVariant * vparams = g_variant_builder_end(&params);
@@ -740,11 +740,11 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar *
g_return_val_if_fail(g_strcmp0(interface, DBUSMENU_INTERFACE) == 0, NULL);
g_return_val_if_fail(g_strcmp0(path, priv->dbusobject) == 0, NULL);
- if (g_strcmp0(property, "version") == 0) {
+ if (g_strcmp0(property, "Version") == 0) {
return g_variant_new_uint32(DBUSMENU_VERSION_NUMBER);
- } else if (g_strcmp0(property, "text-direction") == 0) {
+ } else if (g_strcmp0(property, "TextDirection") == 0) {
return g_variant_new_string(dbusmenu_text_direction_get_nick(priv->text_direction));
- } else if (g_strcmp0(property, "status") == 0) {
+ } else if (g_strcmp0(property, "Status") == 0) {
return g_variant_new_string(dbusmenu_status_get_nick(priv->status));
} else {
g_warning("Unknown property '%s'", property);