summaryrefslogtreecommitdiff
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2014-11-25 18:32:38 +0100
committerMilan Crha <mcrha@redhat.com>2014-11-25 18:32:38 +0100
commit8b2746f07eff35a1472ab6254cc6a355ffd88f7c (patch)
tree82d79c21e80a3f5b4887e5feecccc61f3a544987 /addressbook
parentab8756de433f5292e9396da35324b48283088af3 (diff)
downloadevolution-data-server-8b2746f07eff35a1472ab6254cc6a355ffd88f7c.tar.gz
Bug 721712 - Writeable calendars can report as read-only after open ][
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/libebook/e-book-client.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/addressbook/libebook/e-book-client.c b/addressbook/libebook/e-book-client.c
index df58adef3..ebd1a2cac 100644
--- a/addressbook/libebook/e-book-client.c
+++ b/addressbook/libebook/e-book-client.c
@@ -796,18 +796,12 @@ book_client_process_properties (EBookClient *book_client,
for (ii = 0; properties[ii]; ii++) {
if (!(ii & 1) && properties[ii + 1]) {
GParamSpec *param;
- GVariant *stored = NULL, *expected = NULL;
+ GVariant *expected = NULL;
param = g_object_class_find_property (object_class, properties[ii]);
if (param) {
- GValue value = G_VALUE_INIT;
-
- g_value_init (&value, param->value_type);
- g_object_get_property (dbus_proxy, param->name, &value);
-
#define WORKOUT(gvl, gvr) \
if (g_type_is_a (param->value_type, G_TYPE_ ## gvl)) { \
- stored = g_dbus_gvalue_to_gvariant (&value, G_VARIANT_TYPE_ ## gvr); \
expected = g_variant_parse (G_VARIANT_TYPE_ ## gvr, properties[ii + 1], NULL, NULL, NULL); \
}
@@ -822,11 +816,12 @@ book_client_process_properties (EBookClient *book_client,
WORKOUT (DOUBLE, DOUBLE);
#undef WORKOUT
-
- g_value_unset (&value);
}
- if (stored && expected && !g_variant_equal (stored, expected)) {
+ /* Update the property always, even when the current value on the GDBusProxy
+ matches the expected value, because sometimes the proxy can have up-to-date
+ values, but still not propagated into EClient properties. */
+ if (expected) {
GValue value = G_VALUE_INIT;
g_dbus_gvariant_to_gvalue (expected, &value);
@@ -834,12 +829,8 @@ book_client_process_properties (EBookClient *book_client,
book_client_dbus_proxy_property_changed (E_CLIENT (book_client), param->name, &value, FALSE);
g_value_unset (&value);
- }
-
- if (stored)
- g_variant_unref (stored);
- if (expected)
g_variant_unref (expected);
+ }
}
}
}