From 4fb1ed409f2e129c7ce7b09288777bbda72e2123 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 21 Jan 2013 18:49:18 +0000 Subject: Hide autosuggestion when adding a new tab SL #4355 If you start typing an url and the autosuggestion list appears and then you click on plus sign or press Ctrl-T the autosuggestion list is hid. Signed-off-by: Manuel Kaufmann Acked-by: Manuel QuiƱones --- diff --git a/webtoolbar.py b/webtoolbar.py index 21811cc..dd8fc81 100644 --- a/webtoolbar.py +++ b/webtoolbar.py @@ -344,6 +344,7 @@ class PrimaryToolbar(ToolbarBase): self._connect_to_browser(tabbed_view.props.current_browser) tabbed_view.connect_after('switch-page', self.__switch_page_cb) + tabbed_view.connect_after('page-added', self.__page_added_cb) def __key_press_event_cb(self, entry, event): self._tabbed_view.current_browser.loading_uri = entry.props.text @@ -352,6 +353,9 @@ class PrimaryToolbar(ToolbarBase): if tabbed_view.get_n_pages(): self._connect_to_browser(tabbed_view.props.current_browser) + def __page_added_cb(self, notebook, child, pagenum): + self.entry._search_popdown() + def _connect_to_browser(self, browser): if self._browser is not None: self._browser.disconnect(self._uri_changed_hid) -- cgit v0.9.1