diff options
author | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-06-21 16:14:04 -0700 |
---|---|---|
committer | Travis Reitter <travis.reitter@collabora.co.uk> | 2011-06-23 09:34:20 -0700 |
commit | 09bf32c22843eaa9cf34bd091d864dfa85bf4d63 (patch) | |
tree | 2a6f34dedaf02ad23bfdef7acd75168bd7cbb276 | |
parent | 8b2449f753ee91cabb47895e26293737da640e69 (diff) |
Properly disconnect the logger::invalidated handler.
Helps: bgo#629716 - Migrate Folks to GDBus
-rw-r--r-- | backends/telepathy/lib/tpf-persona-store.vala | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala index ea57b06..4b18ebd 100644 --- a/backends/telepathy/lib/tpf-persona-store.vala +++ b/backends/telepathy/lib/tpf-persona-store.vala @@ -202,6 +202,8 @@ public class Tpf.PersonaStore : Folks.PersonaStore { this._debug.print_status.disconnect (this._debug_print_status); this._debug = null; + if (this._logger != null) + this._logger.invalidated.disconnect (this._logger_invalidated_cb); } private string _format_maybe_bool (MaybeBool input) @@ -535,12 +537,8 @@ public class Tpf.PersonaStore : Folks.PersonaStore { this._logger = new Logger (this.id); yield this._logger.prepare (); - this._logger.invalidated.connect (() => - { - warning ( - _("Lost connection to the telepathy-logger service.")); - this._logger = null; - }); + this._logger.invalidated.connect ( + this._logger_invalidated_cb); this._logger.favourite_contacts_changed.connect ( this._favourite_contacts_changed_cb); } @@ -557,6 +555,14 @@ public class Tpf.PersonaStore : Folks.PersonaStore } } + private void _logger_invalidated_cb () + { + this._logger.invalidated.disconnect (this._logger_invalidated_cb); + + warning (_("Lost connection to the telepathy-logger service.")); + this._logger = null; + } + private async void _initialise_favourite_contacts () { if (this._logger == null) |