diff options
author | Siegfried-Angel Gevatter Pujals <siegfried@gevatter.com> | 2012-10-08 16:31:37 +0200 |
---|---|---|
committer | Siegfried-Angel Gevatter Pujals <siegfried@gevatter.com> | 2012-10-08 16:31:37 +0200 |
commit | e59d3fd555b065235f8472f5c90a799a78c2ea47 (patch) | |
tree | b237b0349b05e5ceb3100b42c4d25836bcc0de01 /src | |
parent | 24b1b0c3ea071eb4751da43c586ea2249d7607c7 (diff) | |
download | zeitgeist-e59d3fd555b065235f8472f5c90a799a78c2ea47.tar.gz |
More fixes.
zeitgeist
Diffstat (limited to 'src')
-rw-r--r-- | src/db-reader.vala | 2 | ||||
-rw-r--r-- | src/engine.vala | 10 | ||||
-rw-r--r-- | src/sql.vala | 5 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/db-reader.vala b/src/db-reader.vala index 0cd87d75..54e36c66 100644 --- a/src/db-reader.vala +++ b/src/db-reader.vala @@ -107,7 +107,7 @@ public class DbReader : Object subject.current_uri = stmt.column_text ( EventViewRows.SUBJECT_CURRENT_URI); subject.current_origin = stmt.column_text ( - EventViewRows.SUBJECT_CURRENT_ORIGIN); + EventViewRows.SUBJECT_CURRENT_ORIGIN_URI); subject.interpretation = interpretations_table.get_value ( stmt.column_int (EventViewRows.SUBJECT_INTERPRETATION)); subject.manifestation = manifestations_table.get_value ( diff --git a/src/engine.vala b/src/engine.vala index 38a83eb2..e574c899 100644 --- a/src/engine.vala +++ b/src/engine.vala @@ -139,6 +139,14 @@ public class Engine : DbReader "'MOVE_EVENT' then subject.uri and " + "subject.current_uri have to be the same"); } + if (event.interpretation != ZG.MOVE_EVENT + && subject.origin != subject.current_origin) + { + throw new EngineError.INVALID_ARGUMENT ( + "Illegal event: unless event.interpretation is " + + "'MOVE_EVENT' then subject.origin and " + + "subject.current_origin have to be the same"); + } // If subject manifestation and interpretation are not set, // we try to automatically determine them from the other data. @@ -234,6 +242,8 @@ public class Engine : DbReader uris.add (subject.uri); if (subject.uri != subject.current_uri) uris.add (subject.current_uri); + if (subject.origin != subject.current_origin) + uris.add (subject.current_origin); if (!is_empty_string (subject.origin)) uris.add (subject.origin); diff --git a/src/sql.vala b/src/sql.vala index 81eb4a76..7ee4f903 100644 --- a/src/sql.vala +++ b/src/sql.vala @@ -45,10 +45,13 @@ namespace Zeitgeist.SQLite SUBJECT_TEXT, SUBJECT_STORAGE, SUBJECT_STORAGE_STATE, - ORIGIN, + EVENT_ORIGIN, EVENT_ORIGIN_URI, SUBJECT_CURRENT_URI, SUBJECT_ID_CURRENT, + SUBJECT_TEXT_ID, + SUBJECT_STORAGE_ID, + ACTOR_URI, SUBJECT_CURRENT_ORIGIN, SUBJECT_CURRENT_ORIGIN_URI } |