Fix opening links from gmail
This commit is contained in:
parent
06f815c713
commit
745d11a79b
@ -33,7 +33,7 @@ from linkscontroller import LinksController
|
||||
_HOMEPAGE = 'http://www.google.com'
|
||||
|
||||
class WebActivity(Activity):
|
||||
def __init__(self):
|
||||
def __init__(self, browser=None):
|
||||
Activity.__init__(self)
|
||||
|
||||
logging.debug('Starting the web activity')
|
||||
@ -42,7 +42,10 @@ class WebActivity(Activity):
|
||||
|
||||
vbox = gtk.VBox()
|
||||
|
||||
self._browser = WebBrowser()
|
||||
if browser:
|
||||
self._browser = browser
|
||||
else:
|
||||
self._browser = WebBrowser()
|
||||
self._browser.connect('notify::title', self._title_changed_cb)
|
||||
|
||||
self._links_model = LinksModel()
|
||||
|
@ -63,8 +63,12 @@ class _PopupCreator(gobject.GObject):
|
||||
logging.debug('Open a new activity for the popup')
|
||||
self._dialog.remove(self._embed)
|
||||
|
||||
activity = BrowserActivity(self._embed)
|
||||
activity.set_type('com.redhat.Sugar.BrowserActivity')
|
||||
# FIXME We need a better way to handle this.
|
||||
# It seem like a pretty special case though, I doubt
|
||||
# other activities will need something similar.
|
||||
from web.webactivity import WebActivity
|
||||
activity = WebActivity(self._embed)
|
||||
activity.set_type('org.laptop.WebActivity')
|
||||
|
||||
self._embed.disconnect(self._size_to_sid)
|
||||
self._embed.disconnect(self._vis_sid)
|
||||
|
Loading…
Reference in New Issue
Block a user