Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/view
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu@tomeuvizoso.net>2006-12-14 15:45:52 (GMT)
committer Tomeu Vizoso <tomeu@tomeuvizoso.net>2006-12-14 15:45:52 (GMT)
commiteade4bff033bc4c9839711937bb7598c6dce3c60 (patch)
tree7768cdda1acaeef31cc61f8e894884c2136db317 /shell/view
parentcc39ef169fdc26da94e266e2a002eb8bee75f7c7 (diff)
Improve error reporting when a non-activity window is opened.
Diffstat (limited to 'shell/view')
-rw-r--r--shell/view/Shell.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index 9166cef..48b3b09 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -14,9 +14,12 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import logging
+
import gtk
import gobject
import wnck
+import dbus
import view.stylesheet
from sugar.graphics import style
@@ -128,7 +131,14 @@ class Shell(gobject.GObject):
def __window_opened_cb(self, screen, window):
if window.get_window_type() == wnck.WINDOW_NORMAL:
- activity_host = ActivityHost(self.get_model(), window)
+ try:
+ activity_host = ActivityHost(self.get_model(), window)
+ except dbus.DBusException:
+ logging.debug('Shell.__window_opened_cb: opened unknown window ' +
+ window.get_name() + ' with xid ' +
+ str(window.get_xid()))
+ return
+
self._hosts[activity_host.get_xid()] = activity_host
self.emit('activity-opened', activity_host)