Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view
diff options
context:
space:
mode:
authorDan Williams <dcbw@localhost.localdomain>2007-01-07 00:31:19 (GMT)
committer Dan Williams <dcbw@localhost.localdomain>2007-01-07 00:31:19 (GMT)
commit8cea4c5fc6de37dd47843af014c4730f04f4dc1d (patch)
tree5fd070b6f6ff5050dffb4c66e80385f21dd8f1b9 /shell/view
parentb27257fadb7f198c3072a2480c3711b7b57cd43f (diff)
Track activities while they launch
HomeModel now uses the activity ID to track activities, and creates the HomeActivity object when the activity is launched, not when its window appears.
Diffstat (limited to 'shell/view')
-rw-r--r--shell/view/Shell.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index 169ee35..9e81cab 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -205,13 +205,16 @@ class Shell(gobject.GObject):
breg = self._model.get_bundle_registry()
bundle = breg.find_by_default_type(bundle_id)
if bundle:
- serv_name = bundle.get_service_name()
+ act_type = bundle.get_service_name()
+ home_model = self._model.get_home()
+ home_model.notify_activity_launch(activity_id, act_type)
try:
- activity = ActivityFactory.create(serv_name)
+ activity = ActivityFactory.create(act_type)
except DBusException, e:
- logging.error("Couldn't launch activity %s:\n%s" % (serv_name, e))
+ logging.error("Couldn't launch activity %s:\n%s" % (act_type, e))
+ home_mode.notify_activity_launch_failed(activity_id)
else:
- logging.debug("Joining activity type %s id %s" % (serv_name, activity_id))
+ logging.debug("Joining activity type %s id %s" % (act_type, activity_id))
activity.join(activity_ps.object_path())
else:
logging.error("Couldn't find activity for type %s" % bundle_id)
@@ -255,11 +258,15 @@ class Shell(gobject.GObject):
logging.error("Couldn't find available activity ID.")
return None
+ home_model = self._model.get_home()
+ home_model.notify_activity_launch(act_id, activity_type)
+
try:
logging.debug("Shell.start_activity will start %s:%s" % (activity_type, act_id))
activity = ActivityFactory.create(activity_type)
except dbus.DBusException, e:
logging.debug("Couldn't start activity '%s':\n %s" % (activity_type, e))
+ home_mode.notify_activity_launch_failed(act_id)
return None
activity.start(act_id)