diff options
author | Ted Gould <ted@gould.cx> | 2011-02-17 23:28:25 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-02-17 23:28:25 -0600 |
commit | b5f10bb47ad432a6344bca52c352f42eb96290fb (patch) | |
tree | 92b7fe664d2fd14a2c4f6beb84ea64b2c7d8e317 /libdbusmenu-glib | |
parent | 8b29014f8cff75f937f49f07d3dcd6a86591bdc0 (diff) | |
download | libdbusmenu-b5f10bb47ad432a6344bca52c352f42eb96290fb.tar.gz libdbusmenu-b5f10bb47ad432a6344bca52c352f42eb96290fb.tar.bz2 libdbusmenu-b5f10bb47ad432a6344bca52c352f42eb96290fb.zip |
Making it so that the dbus properties can have more than one.
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/server.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 5cc04c6..c89b49e 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -682,9 +682,16 @@ bus_get_prop (GDBusConnection * connection, const gchar * sender, const gchar * /* None of these should happen */ g_return_val_if_fail(g_strcmp0(interface, DBUSMENU_INTERFACE) == 0, NULL); g_return_val_if_fail(g_strcmp0(path, priv->dbusobject) == 0, NULL); - g_return_val_if_fail(g_strcmp0(property, "version") == 0, NULL); - return g_variant_new_uint32(DBUSMENU_VERSION_NUMBER); + if (g_strcmp0(property, "version") == 0) { + return g_variant_new_uint32(DBUSMENU_VERSION_NUMBER); + } else if (g_strcmp0(property, "text-direction") == 0) { + return g_variant_new_string(dbusmenu_text_direction_get_nick(priv->text_direction)); + } else { + g_warning("Unknown property '%s'", property); + } + + return NULL; } /* Handle actually signalling in the idle loop. This way we collect all |