Publish a URL property and open it on join.

This commit is contained in:
Marco Pesenti Gritti 2006-10-13 13:57:39 +02:00
parent 1df5b0020d
commit 4ac331200d

View File

@ -32,6 +32,20 @@ class WebActivity(Activity):
self._browser.load_url(_HOMEPAGE) self._browser.load_url(_HOMEPAGE)
def join(self, activity_ps):
Activity.join(self, activity_ps)
url = self._service.get_published_value('URL')
if url:
self._browser.load_url(url)
def share(self):
Activity.share(self)
url = self._browser.get_location()
if url:
self._service.set_published_value('URL', url)
def _title_changed_cb(self, embed, pspec): def _title_changed_cb(self, embed, pspec):
self.set_title(embed.props.title) self.set_title(embed.props.title)