[hamster-applet] "plan b" and "oldtimer" trophies
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] "plan b" and "oldtimer" trophies
- Date: Wed, 18 Aug 2010 00:53:18 +0000 (UTC)
commit f310a7dd5af47e550127c298d515046f0029c9a6
Author: Toms Bauģis <toms baugis gmail com>
Date: Wed Aug 18 01:47:09 2010 +0100
"plan b" and "oldtimer" trophies
src/hamster/db.py | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/hamster/db.py b/src/hamster/db.py
index 0807997..843f793 100644
--- a/src/hamster/db.py
+++ b/src/hamster/db.py
@@ -73,6 +73,14 @@ class Storage(storage.Storage):
print "DB file has been modified externally. Calling all stations"
self.dispatch_overwrite()
+ try:
+ from gnome_achievements.client import Storage as TrophiesStorage
+ trophies = TrophiesStorage()
+ # plan "b" â?? synchronize the time tracker's database from external source while the tracker is running
+ trophies.unlock_achievement("hamster-applet", "plan_b")
+ except:
+ pass
+
self.__database_file = gio.File(self.db_path)
@@ -1186,6 +1194,15 @@ class Storage(storage.Storage):
self.execute("UPDATE version SET version = %d" % current_version)
print "updated database from version %d to %d" % (version, current_version)
+ try:
+ from gnome_achievements.client import Storage as TrophiesStorage
+ trophies = TrophiesStorage()
+ # oldtimer â?? database version structure had been performed on startup (thus we know that he has been on at least 2 versions)
+ trophies.unlock_achievement("hamster-applet", "oldtimer")
+ except:
+ pass
+
+
"""we start with an empty database and then populate with default
values. This way defaults can be localized!"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]