From 8746552ff78f79da1ffd90ac11afc9fb640099e3 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 16 Jun 2006 22:50:00 -0400 Subject: [PATCH] Don't block on dbus for open_with_id either --- sugar/browser/BrowserShell.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sugar/browser/BrowserShell.py b/sugar/browser/BrowserShell.py index c801e5ce..42f2ccd4 100644 --- a/sugar/browser/BrowserShell.py +++ b/sugar/browser/BrowserShell.py @@ -30,17 +30,20 @@ class BrowserShell(dbus.service.Object): links.append(link) return links - def _start_browser_cb(self, browser): - browser.connect_to_shell() + def _start_browser_cb(self, browser, activity_id): + if activity_id: + browser.connect_to_shell(activity_id) + else: + browser.connect_to_shell() @dbus.service.method('com.redhat.Sugar.BrowserShell') def open_browser(self, uri): browser = BrowserActivity(uri) self.__browsers.append(browser) - gobject.idle_add(self._start_browser_cb, browser) + gobject.idle_add(self._start_browser_cb, browser, None) @dbus.service.method('com.redhat.Sugar.BrowserShell') def open_browser_with_id(self, uri, activity_id): browser = BrowserActivity(uri) self.__browsers.append(browser) - browser.connect_to_shell(activity_id) + gobject.idle_add(self._start_browser_cb, browser, activity_id)