aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib/client.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-10 10:13:58 -0600
committerTed Gould <ted@gould.cx>2011-03-10 10:13:58 -0600
commit4701338925eb99eff5c2dd7ef05815855aae5a87 (patch)
tree177d35753a7ecbb8074360b3809e9296577d9d08 /libdbusmenu-glib/client.c
parenta97646cd0857bc60433490542ec1b98daf9fe7a2 (diff)
downloadlibdbusmenu-4701338925eb99eff5c2dd7ef05815855aae5a87.tar.gz
libdbusmenu-4701338925eb99eff5c2dd7ef05815855aae5a87.tar.bz2
libdbusmenu-4701338925eb99eff5c2dd7ef05815855aae5a87.zip
Also check the status when we get the proxy, not part of this bug, but it'll come along soon enough.
Diffstat (limited to 'libdbusmenu-glib/client.c')
-rw-r--r--libdbusmenu-glib/client.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index 6a62f9e..b9c50ee 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -1061,6 +1061,20 @@ menuproxy_build_cb (GObject * object, GAsyncResult * res, gpointer user_data)
g_variant_unref(textdir);
}
+ /* Check the status if available */
+ GVariant * status = g_dbus_proxy_get_cached_property(priv->menuproxy, "Status");
+ if (textdir != NULL) {
+ GVariant * str = status;
+ if (g_variant_is_of_type(str, G_VARIANT_TYPE_VARIANT)) {
+ str = g_variant_get_variant(str);
+ }
+
+ priv->status = dbusmenu_status_get_value_from_nick(g_variant_get_string(str, NULL));
+ g_object_notify(G_OBJECT(user_data), DBUSMENU_CLIENT_PROP_STATUS);
+
+ g_variant_unref(status);
+ }
+
/* Get the icon theme directories if available */
GVariant * icon_dirs = g_dbus_proxy_get_cached_property(priv->menuproxy, "IconThemePath");
if (icon_dirs != NULL) {