diff options
author | Gonzalo Odiard <godiard@sugarlabs.org> | 2010-10-19 13:18:28 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@sugarlabs.org> | 2010-10-22 13:21:08 (GMT) |
commit | af73ecd8e496a34af78f7061f8f54738c823e788 (patch) | |
tree | 1948ca2852290400daf313369827e9a6db8d4f3f /webactivity.py | |
parent | 6631c276ff0965aaacea6bae1d35c0027383a976 (diff) |
implement OLPC #10364 - Home Button in Browse
Add a button in the webtoolbar to go to the home page.
I have added a new signal to the toolbar to notify to the activity.
Diffstat (limited to 'webactivity.py')
-rw-r--r-- | webactivity.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webactivity.py b/webactivity.py index 39bb67e..ec010b0 100644 --- a/webactivity.py +++ b/webactivity.py @@ -220,6 +220,7 @@ class WebActivity(activity.Activity): self._browser.history.connect('session-link-changed', self._session_history_changed_cb) self._web_toolbar.connect('add-link', self._link_add_button_cb) + self._web_toolbar.connect('go-home', self._go_home_button_cb) self._browser.connect("notify::title", self._title_changed_cb) @@ -443,6 +444,9 @@ class WebActivity(activity.Activity): def _link_add_button_cb(self, button): _logger.debug('button: Add link: %s.' % self.current) self._add_link() + + def _go_home_button_cb(self, button): + self._load_homepage() def _key_press_cb(self, widget, event): if event.state & gtk.gdk.CONTROL_MASK: |