Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view/Shell.py
diff options
context:
space:
mode:
authorDan Winship <dwinship@redhat.com>2007-08-08 13:30:45 (GMT)
committer Dan Winship <dwinship@redhat.com>2007-08-08 13:30:45 (GMT)
commitc85c89ce839e952b05b20853b715abbf1b268ca5 (patch)
treed942f00da8725f17079de25a4456e720f71a16df /shell/view/Shell.py
parent6ca80a71461d414695dd83448d1d75d352be0438 (diff)
Make Journal active at startup. #2159
Also distinguish between "active" in the sense of "the user is actually using this activity" and "active" in the sense of "the activity would be active *if* the user switched to Activity view". It's the latter sense, now called "pending" that the Journal is in at startup. Pending is also used for the next-up activity when you quit the current active activity.
Diffstat (limited to 'shell/view/Shell.py')
-rw-r--r--shell/view/Shell.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index 697dc1c..af9036a 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -47,6 +47,7 @@ class Shell(gobject.GObject):
self._hosts = {}
self._screen = wnck.screen_get_default()
self._current_host = None
+ self._pending_host = None
self._screen_rotation = 0
self._key_handler = KeyHandler(self)
@@ -65,6 +66,8 @@ class Shell(gobject.GObject):
home_model.connect('activity-removed', self._activity_removed_cb)
home_model.connect('active-activity-changed',
self._active_activity_changed_cb)
+ home_model.connect('pending-activity-changed',
+ self._pending_activity_changed_cb)
# Unfreeze the display when it's stable
hw_manager = hardwaremanager.get_manager()
@@ -100,6 +103,12 @@ class Shell(gobject.GObject):
self._current_host = host
+ def _pending_activity_changed_cb(self, home_model, home_activity):
+ if home_activity:
+ self._pending_host = self._hosts[home_activity.get_xid()]
+ else:
+ self._pending_host = None
+
def get_model(self):
return self._model
@@ -156,6 +165,8 @@ class Shell(gobject.GObject):
return
if level == ShellModel.ZOOM_ACTIVITY:
+ if self._pending_host is not None:
+ self._pending_host.present()
self._screen.toggle_showing_desktop(False)
else:
self._model.set_zoom_level(level)