diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-10-12 12:20:19 (GMT) |
---|---|---|
committer | Manuel QuiƱones <manuq@laptop.org> | 2012-10-12 13:01:04 (GMT) |
commit | 0c503aaa14f6d4c300603ea463eb070f0a7733ed (patch) | |
tree | 12e8716f5c10e3b772f97370eee65810c5fa9db7 | |
parent | a412b7446f695881a7e5f2c912948d380d1e1a6d (diff) |
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>
Acked-by: Manuel QuiƱones <manuq@laptop.org>
-rw-r--r-- | webtoolbar.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webtoolbar.py b/webtoolbar.py index 6350dfb..29c036b 100644 --- a/webtoolbar.py +++ b/webtoolbar.py @@ -239,6 +239,7 @@ class PrimaryToolbar(ToolbarBase): self.entry.connect('activate', self._entry_activate_cb) self.entry.connect('focus-in-event', self.__focus_in_event_cb) self.entry.connect('focus-out-event', self.__focus_out_event_cb) + self.entry.connect('key-press-event', self.__key_press_event_cb) entry_item = Gtk.ToolItem() entry_item.set_expand(True) @@ -298,6 +299,9 @@ class PrimaryToolbar(ToolbarBase): tabbed_view.connect_after('switch-page', self.__switch_page_cb) + def __key_press_event_cb(self, entry, event): + self._tabbed_view.current_browser.loading_uri = entry.props.text + def __switch_page_cb(self, tabbed_view, page, page_num): if tabbed_view.get_n_pages(): self._connect_to_browser(tabbed_view.props.current_browser) |