summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Tarricone <brian@tarricone.org>2009-07-29 21:43:07 +0000
committerBrian Tarricone <brian@tarricone.org>2009-07-29 21:43:07 +0000
commitc62009f0861f2d5f36498f33eaa504eb74a57913 (patch)
treeb0f8665e8df4c91e48c3d7ec7e75d7c63545c7ac
parent027ec10dedf28ed52476a405494986697d6344db (diff)
downloadxfconf-c62009f0861f2d5f36498f33eaa504eb74a57913.tar.gz
revert async property fetch for bindings
with the new caching in place, this doesn't really speed things up anymore, and was problematic to begin with. (Old svn revision: 30418)
-rw-r--r--NEWS7
-rw-r--r--xfconf/xfconf-binding.c60
2 files changed, 6 insertions, 61 deletions
diff --git a/NEWS b/NEWS
index 6335e8d..3ae5d58 100644
--- a/NEWS
+++ b/NEWS
@@ -6,13 +6,6 @@ Xfce 4.7.0
in other cases.
-Xfce 4.6.2
-==========
-
- * Speed up startup of many apps that use bindings by retrieving the
- initial value of the binding asynchronously.
-
-
Xfce 4.6.1
==========
diff --git a/xfconf/xfconf-binding.c b/xfconf/xfconf-binding.c
index ff9c09a..4186fd9 100644
--- a/xfconf/xfconf-binding.c
+++ b/xfconf/xfconf-binding.c
@@ -31,7 +31,6 @@
#include "xfconf-private.h"
#include "xfconf-alias.h"
#include "xfconf-common-private.h"
-#include "xfconf-dbus-bindings.h"
typedef struct
{
@@ -44,9 +43,6 @@ typedef struct
GObject *object;
gchar *object_property;
GType object_property_type;
-
- /* async call to get initial value */
- DBusGProxyCall *call;
} XfconfGBinding;
typedef struct
@@ -80,9 +76,6 @@ xfconf_g_binding_free(XfconfGBinding *binding)
if(G_UNLIKELY(!binding))
return;
- if(G_UNLIKELY(binding->call))
- dbus_g_proxy_cancel_call(_xfconf_get_dbus_g_proxy(), binding->call);
-
if(binding->object) {
g_signal_handlers_disconnect_by_func(G_OBJECT(binding->object),
G_CALLBACK(xfconf_g_binding_object_property_changed),
@@ -289,33 +282,6 @@ xfconf_g_binding_object_property_changed(GObject *object,
g_value_unset(&dst_val);
}
-static void
-xfconf_g_binding_initial_value_received(DBusGProxy *proxy,
- GValue value,
- GError *error,
- gpointer user_data)
-{
- XfconfGBinding *binding = user_data;
-
- binding->call = NULL;
-
- if(error) {
-#ifdef XFCONF_ENABLE_CHECKS
- g_warning("Initial query for property \"%s\" failed: %s",
- binding->xfconf_property, error->message);
-#endif
- g_error_free(error);
- return;
- }
-
- xfconf_g_binding_channel_property_changed(binding->channel,
- binding->xfconf_property,
- &value,
- binding);
- g_value_unset(&value);
-}
-
-
static XfconfGBinding *
xfconf_g_binding_init(XfconfChannel *channel,
const gchar *xfconf_property,
@@ -325,9 +291,9 @@ xfconf_g_binding_init(XfconfChannel *channel,
GType object_property_type)
{
XfconfGBinding *binding;
- gchar buf[1024], *channel_name = NULL;
- gchar *property_base = NULL, *real_property;
+ gchar buf[1024];
GSList *bindings;
+ GValue value = { 0, };
binding = g_slice_new0(XfconfGBinding);
binding->channel = channel;
@@ -374,24 +340,10 @@ xfconf_g_binding_init(XfconfChannel *channel,
bindings, (GDestroyNotify)g_slist_free);
}
- g_object_get(G_OBJECT(channel),
- "channel-name", &channel_name,
- "property-base", &property_base,
- NULL);
- if(property_base)
- real_property = g_strconcat(property_base, xfconf_property, NULL);
- else
- real_property = (gchar *)xfconf_property;
-
- binding->call = xfconf_client_get_property_async(_xfconf_get_dbus_g_proxy(),
- channel_name,
- real_property,
- xfconf_g_binding_initial_value_received,
- binding);
- g_free(channel_name);
- if(property_base) {
- g_free(property_base);
- g_free(real_property);
+ if(xfconf_channel_get_property(channel, xfconf_property, &value)) {
+ xfconf_g_binding_channel_property_changed(channel, xfconf_property,
+ &value, binding);
+ g_value_unset(&value);
}
binding->id = ++__last_binding_id;