diff options
author | Moritz Neeb <nt4u@kpvn.de> | 2012-03-21 19:03:22 +0100 |
---|---|---|
committer | Moritz Neeb <nt4u@kpvn.de> | 2012-03-21 19:03:22 +0100 |
commit | c9ec238c3c2a4ca18cb07b9d80d93450c9251028 (patch) | |
tree | a8dabedbe8196b291c044d86a5835ee2fb4e1838 | |
parent | 2ead2feccf747bc52a39cee28e50e562b1d256cb (diff) | |
download | zeitgeist-c9ec238c3c2a4ca18cb07b9d80d93450c9251028.tar.gz |
unload extension, if FTS not present
-rw-r--r-- | extensions/fts.vala | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/extensions/fts.vala b/extensions/fts.vala index bbf9ac04..30d8f90e 100644 --- a/extensions/fts.vala +++ b/extensions/fts.vala @@ -110,6 +110,7 @@ namespace Zeitgeist private void proxy_not_present() { notifier.remove_monitor (new BusName (INDEXER_NAME),"/org/gnome/zeitgeist/monitor/special"); + this.unload(); } private void proxy_acquired (Object? obj, AsyncResult res) @@ -153,6 +154,25 @@ namespace Zeitgeist "Not connected to SimpleIndexer"); } } + + public override void unload () + { + try + { + var connection = Bus.get_sync (BusType.SESSION, null); + if (registration_id != 0) + { + connection.unregister_object (registration_id); + registration_id = 0; + } + } + catch (Error err) + { + warning ("%s", err.message); + } + + debug ("%s, this.ref_count = %u", Log.METHOD, this.ref_count); + } public async void search (string query_string, Variant time_range, Variant filter_templates, uint offset, uint count, uint result_type, |