Ticket #4355: 0001-Hide-autosuggestion-when-adding-a-new-tab-SL-4355.patch

File 0001-Hide-autosuggestion-when-adding-a-new-tab-SL-4355.patch, 1.4 KB (added by humitos, 11 years ago)
  • webtoolbar.py

    From 0e6ffba6b9b3da329326bab5faf039851c06d297 Mon Sep 17 00:00:00 2001
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Mon, 21 Jan 2013 15:49:18 -0300
    Subject: [PATCH Browse] 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 <humitos@gmail.com>
    ---
     webtoolbar.py | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/webtoolbar.py b/webtoolbar.py
    index 0ad06dd..021dee0 100644
    a b class PrimaryToolbar(ToolbarBase): 
    344344            self._connect_to_browser(tabbed_view.props.current_browser)
    345345
    346346        tabbed_view.connect_after('switch-page', self.__switch_page_cb)
     347        tabbed_view.connect_after('page-added', self.__page_added_cb)
    347348
    348349    def __key_press_event_cb(self, entry, event):
    349350        self._tabbed_view.current_browser.loading_uri = entry.props.text
    class PrimaryToolbar(ToolbarBase): 
    352353        if tabbed_view.get_n_pages():
    353354            self._connect_to_browser(tabbed_view.props.current_browser)
    354355
     356    def __page_added_cb(self, notebook, child, pagenum):
     357        self.entry._search_popdown()
     358
    355359    def _connect_to_browser(self, browser):
    356360        if self._browser is not None:
    357361            self._browser.disconnect(self._uri_changed_hid)