diff --git a/sugar/browser/BrowserShell.py b/sugar/browser/BrowserShell.py index d49a7cc5..c801e5ce 100644 --- a/sugar/browser/BrowserShell.py +++ b/sugar/browser/BrowserShell.py @@ -3,6 +3,7 @@ import geckoembed import pygtk pygtk.require('2.0') import gtk +import gobject import sugar.env @@ -29,11 +30,14 @@ class BrowserShell(dbus.service.Object): links.append(link) return links + def _start_browser_cb(self, browser): + browser.connect_to_shell() + @dbus.service.method('com.redhat.Sugar.BrowserShell') def open_browser(self, uri): browser = BrowserActivity(uri) self.__browsers.append(browser) - browser.connect_to_shell() + gobject.idle_add(self._start_browser_cb, browser) @dbus.service.method('com.redhat.Sugar.BrowserShell') def open_browser_with_id(self, uri, activity_id): diff --git a/sugar/shell/StartPage.py b/sugar/shell/StartPage.py index 6d548b43..18fc2b4d 100644 --- a/sugar/shell/StartPage.py +++ b/sugar/shell/StartPage.py @@ -65,9 +65,9 @@ class ActivitiesView(gtk.TreeView): print 'Activated row %s %s' % (address, activity_id) if activity_id is None: - browser_shell.open_browser(address, ignore_reply=True) + browser_shell.open_browser(address) else: - browser_shell.open_browser_with_id(address, activity_id, ignore_reply=True) + browser_shell.open_browser_with_id(address, activity_id) class StartPage(gtk.HBox): def __init__(self):