[kupfer] ui: Enable both Home and End in text mode
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer] ui: Enable both Home and End in text mode
- Date: Mon, 4 Apr 2011 13:08:15 +0000 (UTC)
commit 26a09e656b3df9c6ab242f03279b9d20d0a9e51d
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Apr 4 15:07:17 2011 +0200
ui: Enable both Home and End in text mode
Let Home and End keys be passed on to the text entry when in text
mode.
Launchpad-bug: https://bugs.launchpad.net/bugs/750240
kupfer/ui/browser.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index 6f0cc63..5b00be9 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1025,7 +1025,7 @@ class Interface (gobject.GObject):
keys = (
"Up", "Down", "Right", "Left",
"Tab", "ISO_Left_Tab", "BackSpace", "Escape", "Delete",
- "space", 'Page_Up', 'Page_Down', 'Home'
+ "space", 'Page_Up', 'Page_Down', 'Home', 'End'
)
self.key_book = dict((k, gtk.gdk.keyval_from_name(k)) for k in keys)
if not text_direction_is_ltr():
@@ -1124,7 +1124,8 @@ class Interface (gobject.GObject):
# swallow if it is the direct key
swallow = (keyv == direct_text_key)
return swallow
- if text_mode and keyv in (key_book["Left"], key_book["Right"]):
+ if text_mode and keyv in (key_book["Left"], key_book["Right"],
+ key_book["Home"], key_book["End"]):
# pass these through in text mode
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]