Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPootle daemon <pootle@pootle.sugarlabs.org>2011-07-21 16:35:25 (GMT)
committer Pootle daemon <pootle@pootle.sugarlabs.org>2011-07-21 16:35:25 (GMT)
commitedbe87c7aca4c505f4b042f60488eae4fd113215 (patch)
tree23bed97175072e92b87f1d5e3515d6bc891c7a8a
parent11e22d6481cbc3c262d450e4d0b4cdf15cb73895 (diff)
parent17d196adc7a619cdee998bd18f40d75007dc66b0 (diff)
Merge branch 'master' of git.sugarlabs.org:stopwatch/stopwatch
-rw-r--r--NEWS4
-rw-r--r--activity/activity.info4
-rwxr-xr-x[-rw-r--r--]setup.py0
-rw-r--r--stopwatch.py7
4 files changed, 12 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index c5528e4..5e689b6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+9
+
+*Disable idle suspend on opening journal entry with running timer by James Cameron
+
8
*New templates for langs
diff --git a/activity/activity.info b/activity/activity.info
index d5c6c2a..45f1834 100644
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -1,7 +1,7 @@
[Activity]
name = StopWatch
bundle_id = org.laptop.StopWatchActivity
-class = activity.StopWatchActivity
+exec = activity.StopWatchActivity
icon = activity-stopwatch
-activity_version = 8
+activity_version = 9
show_launcher = yes
diff --git a/setup.py b/setup.py
index 530f97c..530f97c 100644..100755
--- a/setup.py
+++ b/setup.py
diff --git a/stopwatch.py b/stopwatch.py
index d24f0e3..ddb4c3c 100644
--- a/stopwatch.py
+++ b/stopwatch.py
@@ -123,7 +123,10 @@ class WatchModel():
timeval = event_time - timeval
return self._set_state((timeval, s))
-
+
+ def is_running(self):
+ return self._state[1] == WatchModel.STATE_RUNNING
+
def _set_state(self, q):
self._logger.debug("_set_state")
if self._state != q:
@@ -442,6 +445,8 @@ class GUIView():
def set_state(self,states):
for i in xrange(GUIView.NUM_WATCHES):
self._watches[i].reset(states[i][0], states[i][1])
+ if self._watches[i].is_running():
+ suspend.inhibit()
def get_marks(self):
return [list(m) for m in self._markers]