From af73ecd8e496a34af78f7061f8f54738c823e788 Mon Sep 17 00:00:00 2001 From: Gonzalo Odiard Date: Tue, 19 Oct 2010 13:18:28 +0000 Subject: 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. --- (limited to 'webactivity.py') 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: -- cgit v0.9.1