Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-12-24 14:58:53 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-12-24 14:58:53 (GMT)
commita4e1b6b3ffb86e96c4a4f5e7a95e9757fb5e7f91 (patch)
tree43521c6722361708f8d5dd3091ebe2fa90267b3f
parentb3c2368eaccd666066ba57bb496091f2631d64dc (diff)
Fix handling of the no activities case
-rw-r--r--shell/model/homemodel.py5
-rw-r--r--shell/view/Shell.py5
2 files changed, 8 insertions, 2 deletions
diff --git a/shell/model/homemodel.py b/shell/model/homemodel.py
index 5f98571..f4fd3ee 100644
--- a/shell/model/homemodel.py
+++ b/shell/model/homemodel.py
@@ -70,7 +70,10 @@ class HomeModel(gobject.GObject):
def _active_window_changed_cb(self, screen):
window = screen.get_active_window()
- if not window or window.get_window_type() != wnck.WINDOW_NORMAL:
+ if window == None:
+ self.emit('active-activity-changed', None)
+ return
+ if window.get_window_type() != wnck.WINDOW_NORMAL:
return
xid = window.get_xid()
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index c4b4b1e..5bce107 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -142,7 +142,10 @@ class Shell(gobject.GObject):
del self._hosts[xid]
def _active_activity_changed_cb(self, home_model, home_activity):
- host = self._hosts[home_activity.get_xid()]
+ if home_activity:
+ host = self._hosts[home_activity.get_xid()]
+ else:
+ host = None
if self._current_host:
self._current_host.set_active(False)