Don't block on dbus for open_with_id either
This commit is contained in:
parent
d60a85e83a
commit
8746552ff7
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user