summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extensions/blacklist.vala14
-rw-r--r--extensions/ds-registry.vala16
-rw-r--r--extensions/storage-monitor.vala14
3 files changed, 32 insertions, 12 deletions
diff --git a/extensions/blacklist.vala b/extensions/blacklist.vala
index e842cacb..ec69969d 100644
--- a/extensions/blacklist.vala
+++ b/extensions/blacklist.vala
@@ -99,14 +99,20 @@ namespace Zeitgeist
// Restore previous blacklist from database, or create an empty one
Variant? templates = retrieve_config ("blacklist",
BlacklistTemplates.SIG_BLACKLIST);
- if (templates != null) {
- try {
+ if (templates != null)
+ {
+ try
+ {
blacklist = BlacklistTemplates.from_variant (templates);
- } catch (EngineError e) {
+ }
+ catch (EngineError e)
+ {
warning ("Could not load blacklist from variant: %s", e.message);
blacklist = new HashTable<string, Event> (str_hash, str_equal);
}
- } else {
+ }
+ else
+ {
blacklist = new HashTable<string, Event> (str_hash, str_equal);
}
diff --git a/extensions/ds-registry.vala b/extensions/ds-registry.vala
index 359d1b2d..044293a3 100644
--- a/extensions/ds-registry.vala
+++ b/extensions/ds-registry.vala
@@ -185,13 +185,21 @@ namespace Zeitgeist
Variant? registry = retrieve_config ("registry",
DataSources.SIG_DATASOURCES);
- if (registry != null) {
- try {
+ if (registry != null)
+ {
+ try
+ {
sources = DataSources.from_variant (registry, true);
- } catch (EngineError e) {
+ }
+ catch (EngineError e)
+ {
warning ("Error while loading datasource registry: %s", e.message);
+ sources = new HashTable<string, DataSource> (
+ str_hash, str_equal);
}
- } else {
+ }
+ else
+ {
sources = new HashTable<string, DataSource> (
str_hash, str_equal);
}
diff --git a/extensions/storage-monitor.vala b/extensions/storage-monitor.vala
index 6577f10c..9a4944c6 100644
--- a/extensions/storage-monitor.vala
+++ b/extensions/storage-monitor.vala
@@ -377,9 +377,12 @@ namespace Zeitgeist
update_storage_medium_stmt.bind_text (3, display_name);
update_storage_medium_stmt.bind_text (4, medium_name);
int rc = update_storage_medium_stmt.step ();
- try {
+ try
+ {
database.assert_query_success (rc, "add_storage_medium", Sqlite.DONE);
- } catch (EngineError e) {
+ }
+ catch (EngineError e)
+ {
warning ("Could not add storage medium: %s", e.message);
}
}
@@ -399,10 +402,13 @@ namespace Zeitgeist
update_medium_state_stmt.bind_int (1, 0);
update_medium_state_stmt.bind_text (2, medium_name);
int rc = update_medium_state_stmt.step ();
- try {
+ try
+ {
database.assert_query_success (rc, "remove_storage_medium",
Sqlite.DONE);
- } catch (EngineError e) {
+ }
+ catch (EngineError e)
+ {
warning ("Could not remove storage medium: %s", e.message);
}
}