[evolution] mail_session_add_service(): Make display-name binding one-way.



commit fcca366ecce1ffddaf6a280e248456127def1b4d
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Jul 15 16:08:41 2012 -0400

    mail_session_add_service(): Make display-name binding one-way.
    
    We're leaking CamelService references when we remove a CamelService
    from a CamelSession.  I don't yet know where or how.
    
    If we remove a CamelService without finalizing the corresponding ESource,
    and then add a new CamelService with the same UID, the ESource will have
    a bidirectional "display-name" binding to multiple CamelService instances.
    This creates an endless cascade of "notify" signals as soon as any of the
    bound "display-name" properties change.
    
    Until I can fix the leaking CamelService references, make the binding
    one-way: ESource -> CamelService.  This means the ESource's display name
    is authoritative, and camel_service_set_display_name() MUST NOT be called
    explicitly or else it will become out-of-sync with the ESource.

 libemail-engine/e-mail-session.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
---
diff --git a/libemail-engine/e-mail-session.c b/libemail-engine/e-mail-session.c
index 305bf2d..0b4ab58 100644
--- a/libemail-engine/e-mail-session.c
+++ b/libemail-engine/e-mail-session.c
@@ -1158,7 +1158,6 @@ mail_session_add_service (CamelSession *session,
 		g_object_bind_property (
 			source, "display-name",
 			service, "display-name",
-			G_BINDING_BIDIRECTIONAL |
 			G_BINDING_SYNC_CREATE);
 
 		/* Migrate files for this service from its old



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]