Fix starting browser activity
This commit is contained in:
parent
0363ed5457
commit
e4a8518d02
@ -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):
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user