From 3a78f2dbc4d903be02f3969cfd8736749c717682 Mon Sep 17 00:00:00 2001 From: Jeremy Whiting Date: Mon, 23 Jul 2012 12:52:18 -0600 Subject: [PATCH] Remove extra calls to set this._prepare_pending to false. --- backends/eds/lib/edsf-persona-store.vala | 1 - backends/key-file/kf-persona-store.vala | 3 --- backends/libsocialweb/lib/swf-persona-store.vala | 3 --- backends/libsocialweb/sw-backend.vala | 4 ++-- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/backends/eds/lib/edsf-persona-store.vala b/backends/eds/lib/edsf-persona-store.vala index cdc583f..9badd05 100644 --- a/backends/eds/lib/edsf-persona-store.vala +++ b/backends/eds/lib/edsf-persona-store.vala @@ -952,7 +952,6 @@ public class Edsf.PersonaStore : Folks.PersonaStore } this._is_prepared = true; - this._prepare_pending = false; this.notify_property ("is-prepared"); /* If the address book isn't going to do an initial query (i.e. diff --git a/backends/key-file/kf-persona-store.vala b/backends/key-file/kf-persona-store.vala index 72aba29..f6d01b9 100644 --- a/backends/key-file/kf-persona-store.vala +++ b/backends/key-file/kf-persona-store.vala @@ -233,7 +233,6 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore _("The relationship key file '%s' could not be loaded: %s"), filename, e1.message); this.removed (); - this._prepare_pending = false; return; } } @@ -256,7 +255,6 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore _("The relationship key file directory '%s' could not be created: %s"), parent_dir.get_path (), e3.message); this.removed (); - this._prepare_pending = false; return; } } @@ -281,7 +279,6 @@ public class Folks.Backends.Kf.PersonaStore : Folks.PersonaStore _("The relationship key file '%s' could not be created: %s"), filename, e2.message); this.removed (); - this._prepare_pending = false; return; } } diff --git a/backends/libsocialweb/lib/swf-persona-store.vala b/backends/libsocialweb/lib/swf-persona-store.vala index 18e25f1..4772237 100644 --- a/backends/libsocialweb/lib/swf-persona-store.vala +++ b/backends/libsocialweb/lib/swf-persona-store.vala @@ -349,7 +349,6 @@ public class Swf.PersonaStore : Folks.PersonaStore { /* Remove the persona store on error */ this.removed (); - this._prepare_pending = false; throw e1; } @@ -361,7 +360,6 @@ public class Swf.PersonaStore : Folks.PersonaStore { /* Remove the persona store on error */ this.removed (); - this._prepare_pending = false; throw new PersonaStoreError.INVALID_ARGUMENT ( /* Translators: the parameter is an error message. */ @@ -383,7 +381,6 @@ public class Swf.PersonaStore : Folks.PersonaStore { /* Remove the persona store on error */ this.removed (); - this._prepare_pending = false; throw new PersonaStoreError.INVALID_ARGUMENT ( /* Translators: the parameter is an error message. */ diff --git a/backends/libsocialweb/sw-backend.vala b/backends/libsocialweb/sw-backend.vala index 6aa80b9..0672cbc 100644 --- a/backends/libsocialweb/sw-backend.vala +++ b/backends/libsocialweb/sw-backend.vala @@ -107,13 +107,13 @@ public class Folks.Backends.Sw.Backend : Folks.Backend * destroyed in the mean time. See: bgo#665039. */ this.ref (); + this._prepare_pending = true; + this._client = new Client (); this._client.get_services((client, services) => { try { - this._prepare_pending = true; - foreach (var service_name in services) this.add_service (service_name); -- 2.7.4