From 4c0f8921e1bc35aa652fb16b4c6c11dd4faf6f59 Mon Sep 17 00:00:00 2001
From: Manuel Kaufmann <humitos@gmail.com>
Date: Fri, 12 Oct 2012 09:20:19 -0300
Subject: [PATCH Browse] Keep the typed URL after switching between tabs SL
#3537
This patch allows the user to start typing an URL and
switch to another tag. Then go back to the previous
tab and keep typing the same URL.
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 6350dfb..29c036b 100644
a
|
b
|
class PrimaryToolbar(ToolbarBase): |
239 | 239 | self.entry.connect('activate', self._entry_activate_cb) |
240 | 240 | self.entry.connect('focus-in-event', self.__focus_in_event_cb) |
241 | 241 | self.entry.connect('focus-out-event', self.__focus_out_event_cb) |
| 242 | self.entry.connect('key-press-event', self.__key_press_event_cb) |
242 | 243 | |
243 | 244 | entry_item = Gtk.ToolItem() |
244 | 245 | entry_item.set_expand(True) |
… |
… |
class PrimaryToolbar(ToolbarBase): |
298 | 299 | |
299 | 300 | tabbed_view.connect_after('switch-page', self.__switch_page_cb) |
300 | 301 | |
| 302 | def __key_press_event_cb(self, entry, event): |
| 303 | self._tabbed_view.current_browser.loading_uri = entry.props.text |
| 304 | |
301 | 305 | def __switch_page_cb(self, tabbed_view, page, page_num): |
302 | 306 | if tabbed_view.get_n_pages(): |
303 | 307 | self._connect_to_browser(tabbed_view.props.current_browser) |