aboutsummaryrefslogtreecommitdiffstats
path: root/modules/cal-config-webcal
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-08-23 00:14:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-08-25 03:08:28 +0800
commit349be463c26c657eaf73037d5fa55740830a7046 (patch)
treec307de565f2c862f8ab3aa8a4af8d1a497145d43 /modules/cal-config-webcal
parentf2c79aa8f48fd04c7ce65d7dfdb6c85948ae448c (diff)
downloadgsoc2013-evolution-349be463c26c657eaf73037d5fa55740830a7046.tar
gsoc2013-evolution-349be463c26c657eaf73037d5fa55740830a7046.tar.gz
gsoc2013-evolution-349be463c26c657eaf73037d5fa55740830a7046.tar.bz2
gsoc2013-evolution-349be463c26c657eaf73037d5fa55740830a7046.tar.lz
gsoc2013-evolution-349be463c26c657eaf73037d5fa55740830a7046.tar.xz
gsoc2013-evolution-349be463c26c657eaf73037d5fa55740830a7046.tar.zst
gsoc2013-evolution-349be463c26c657eaf73037d5fa55740830a7046.zip
cal-config-webcal: Fix error in a tranform function.
When writing a GBindingTransformFunc for a bi-directional binding in the reverse direction, the "source" and "target" properties of the GBinding are flip-flopped wrt the transform function. That always throws me. Just pass the ESource to the tranform function to avoid this confusion.
Diffstat (limited to 'modules/cal-config-webcal')
-rw-r--r--modules/cal-config-webcal/evolution-cal-config-webcal.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/cal-config-webcal/evolution-cal-config-webcal.c b/modules/cal-config-webcal/evolution-cal-config-webcal.c
index 2ca3550f00..70eb06caf5 100644
--- a/modules/cal-config-webcal/evolution-cal-config-webcal.c
+++ b/modules/cal-config-webcal/evolution-cal-config-webcal.c
@@ -78,7 +78,6 @@ cal_config_webcal_text_to_uri (GBinding *binding,
GValue *target_value,
gpointer user_data)
{
- GObject *target;
ESource *source;
SoupURI *soup_uri;
ESourceAuthentication *extension;
@@ -92,9 +91,7 @@ cal_config_webcal_text_to_uri (GBinding *binding,
if (soup_uri == NULL)
return FALSE;
- target = g_binding_get_target (binding);
- source = e_source_extension_get_source (E_SOURCE_EXTENSION (target));
-
+ source = E_SOURCE (user_data);
extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
extension = e_source_get_extension (source, extension_name);
user = e_source_authentication_get_user (extension);
@@ -151,7 +148,8 @@ cal_config_webcal_insert_widgets (ESourceConfigBackend *backend,
G_BINDING_SYNC_CREATE,
cal_config_webcal_uri_to_text,
cal_config_webcal_text_to_uri,
- NULL, (GDestroyNotify) NULL);
+ g_object_ref (scratch_source),
+ (GDestroyNotify) g_object_unref);
}
static gboolean