diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-06-01 09:03:18 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2007-06-01 09:03:18 (GMT) |
commit | 2f6790105df59090abefff8047aa412d659d5cfb (patch) | |
tree | 8594775b0a891b2b98bb8d70de4ded31e058ad7a /shell/model/homeactivity.py | |
parent | e1f27fcd3498540720e9548946891b4db61be822 (diff) |
Make launching a property of the activity model
Diffstat (limited to 'shell/model/homeactivity.py')
-rw-r--r-- | shell/model/homeactivity.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/shell/model/homeactivity.py b/shell/model/homeactivity.py index 2be6148..4420399 100644 --- a/shell/model/homeactivity.py +++ b/shell/model/homeactivity.py @@ -33,6 +33,13 @@ class HomeActivity(gobject.GObject): accomplish its tasks. """ + __gtype_name__ = 'SugarHomeActivity' + + __gproperties__ = { + 'launching' : (bool, None, None, False, + gobject.PARAM_READWRITE), + } + def __init__(self, bundle, activity_id): """Initialise the HomeActivity @@ -44,13 +51,14 @@ class HomeActivity(gobject.GObject): of the activity type """ gobject.GObject.__init__(self) + self._window = None self._xid = None self._service = None self._activity_id = activity_id self._bundle = bundle - self._launch_time = time.time() + self._launching = False logging.debug("Activity %s (%s) launching..." % (self._activity_id, self.get_type())) @@ -144,3 +152,11 @@ class HomeActivity(gobject.GObject): (seconds since the epoch) """ return self._launch_time + + def do_set_property(self, pspec, value): + if pspec.name == 'launching': + self._launching = value + + def do_get_property(self, pspec): + if pspec.name == 'launching': + return self._launching |