[kupfer: 1/10] ui: Switch to action pane when typing with Shift
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [kupfer: 1/10] ui: Switch to action pane when typing with Shift
- Date: Tue, 26 Apr 2011 19:56:24 +0000 (UTC)
commit b4ad2eaef570e9037d20b5a1cf22b859f6c52798
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Mon Apr 25 17:45:50 2011 +0200
ui: Switch to action pane when typing with Shift
Shift+Typing will start typing in the action pane (from the first pane).
Shift+Downarrow will open the action list for the current object
kupfer/ui/browser.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/kupfer/ui/browser.py b/kupfer/ui/browser.py
index b7f324a..d4ef9b1 100644
--- a/kupfer/ui/browser.py
+++ b/kupfer/ui/browser.py
@@ -1151,8 +1151,13 @@ class Interface (gobject.GObject):
self._key_pressed = keyv
+ # exit here if it's not a special key
if keyv not in self.keys_sensible:
- # exit if not handled
+ ## if typing with shift key, switch to action pane
+ if (not text_mode and use_command_keys and shift_mask and
+ self.current == self.search):
+ self.current.hide_table()
+ self.switch_current()
return False
self._reset_to_toplevel = False
@@ -1160,11 +1165,16 @@ class Interface (gobject.GObject):
self._escape_key_press()
return True
+
if keyv == key_book["Up"]:
self.current.go_up()
elif keyv == key_book["Page_Up"]:
self.current.go_page_up()
elif keyv == key_book["Down"]:
+ ## if typing with shift key, switch to action pane
+ if shift_mask and self.current == self.search:
+ self.current.hide_table()
+ self.switch_current()
if (not self.current.get_current() and
self.current.get_match_state() is State.Wait):
self._populate_search()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]