projects
/
theonering
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bumping the deb to 0.8.4
[theonering]
/
src
/
util
/
go_utils.py
diff --git
a/src/util/go_utils.py
b/src/util/go_utils.py
index
47fb16b
..
33ddfb5
100644
(file)
--- a/
src/util/go_utils.py
+++ b/
src/util/go_utils.py
@@
-69,6
+69,9
@@
class Async(object):
else:
self.__idleId = gobject.idle_add(self.__func)
else:
self.__idleId = gobject.idle_add(self.__func)
+ def is_running(self):
+ return self.__idleId is not None
+
def cancel(self):
if self.__idleId is not None:
gobject.source_remove(self.__idleId)
def cancel(self):
if self.__idleId is not None:
gobject.source_remove(self.__idleId)
@@
-101,7
+104,10
@@
class Timeout(object):
if timeoutInSeconds == 0:
self.__timeoutId = gobject.idle_add(self._on_once)
else:
if timeoutInSeconds == 0:
self.__timeoutId = gobject.idle_add(self._on_once)
else:
- timeout_add_seconds(timeoutInSeconds, self._on_once)
+ self.__timeoutId = timeout_add_seconds(timeoutInSeconds, self._on_once)
+
+ def is_running(self):
+ return self.__timeoutId is not None
def cancel(self):
if self.__timeoutId is not None:
def cancel(self):
if self.__timeoutId is not None: