diff options
author | Ted Gould <ted@gould.cx> | 2011-03-10 10:27:52 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-03-10 10:27:52 -0600 |
commit | 37d4bb79ab935208b94954d48292097f7ca2ecdd (patch) | |
tree | a87163d6d0ee68bdf05f3c12979ac2ffb21b6daa /libdbusmenu-glib | |
parent | 065d12b5d53dbd081a4c262da6dd4b7ea2188ae2 (diff) | |
parent | bbadbf77efa2c3f322c4812677438129bbfef2f8 (diff) | |
download | libdbusmenu-37d4bb79ab935208b94954d48292097f7ca2ecdd.tar.gz libdbusmenu-37d4bb79ab935208b94954d48292097f7ca2ecdd.tar.bz2 libdbusmenu-37d4bb79ab935208b94954d48292097f7ca2ecdd.zip |
Having the GTK Client handle theme directories
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r-- | libdbusmenu-glib/client.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 5ca52f4..16e832d 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1056,10 +1056,39 @@ menuproxy_build_cb (GObject * object, GAsyncResult * res, gpointer user_data) } priv->text_direction = dbusmenu_text_direction_get_value_from_nick(g_variant_get_string(str, NULL)); + g_object_notify(G_OBJECT(user_data), DBUSMENU_CLIENT_PROP_TEXT_DIRECTION); 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) { + if (priv->icon_dirs != NULL) { + g_strfreev(priv->icon_dirs); + priv->icon_dirs = NULL; + } + + priv->icon_dirs = g_variant_dup_strv(icon_dirs, NULL); + g_signal_emit(G_OBJECT(client), signals[ICON_THEME_DIRS], 0, priv->icon_dirs, TRUE); + + g_variant_unref(icon_dirs); + } + /* If we get here, we don't need the DBus proxy */ if (priv->dbusproxy != 0) { g_bus_unwatch_name(priv->dbusproxy); |