[chronojump/chronojump-importer] Hides the SIMULATED session when importing sessions.
- From: Carles Pina i Estany <carlespina src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/chronojump-importer] Hides the SIMULATED session when importing sessions.
- Date: Tue, 27 Sep 2016 14:09:55 +0000 (UTC)
commit 74b471888a18977dfbd9b9d421274bb20c293860
Author: Carles Pina i Estany <carles pina cat>
Date: Tue Sep 27 16:09:30 2016 +0200
Hides the SIMULATED session when importing sessions.
src/sqlite/session.cs | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/sqlite/session.cs b/src/sqlite/session.cs
index 567ce70..d004209 100644
--- a/src/sqlite/session.cs
+++ b/src/sqlite/session.cs
@@ -68,7 +68,18 @@ public class SqliteSessionSwitcher
}
SqliteConnection dbcon = sqliteGeneral.connection;
- return SqliteSession.SelectAllSessions (filterName, dbcon);
+ string[] allSessions = SqliteSession.SelectAllSessions (filterName, dbcon);
+
+ // Filtered sessions will contain all sessions but not the "SIMULATED"
+ List<string> filteredSessions = new List<string> ();
+
+ foreach(string session in allSessions) {
+ if (session.Split (':') [1] != "SIMULATED") {
+ filteredSessions.Add (session);
+ }
+ }
+
+ return filteredSessions.ToArray();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]