[kupfer] browser: Add keybindings to get Selected File and Selection



commit bb3632bb72b2a4f9e71122ea16db3fbfdf20d716
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Sep 10 02:42:13 2009 +0200

    browser: Add keybindings to get Selected File and Selection

 kupfer/browser.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/browser.py b/kupfer/browser.py
index 2b469e8..c468420 100644
--- a/kupfer/browser.py
+++ b/kupfer/browser.py
@@ -822,6 +822,8 @@ class Interface (gobject.GObject):
 			"<Control>period" : "toggle_text_mode_quick",
 			"<Control>s" : "switch_to_source",
 			"<Control>r" : "reset_all",
+			"<Control>g" : "select_selected_file",
+			"<Control>t" : "select_selected_text",
 		}
 		direct_text_key = gtk.gdk.keyval_from_name("period")
 		init_text_keys = map(gtk.gdk.keyval_from_name, ("slash", "equal"))
@@ -1052,6 +1054,12 @@ class Interface (gobject.GObject):
 		self._show_third_pane(False)
 		self._reset_to_toplevel = True
 
+	def select_selected_file(self):
+		self.data_controller.find_object("qpfer:selectedfile")
+
+	def select_selected_text(self):
+		self.data_controller.find_object("qpfer:selectedtext")
+
 	def _pane_reset(self, controller, pane, item):
 		wid = self._widget_for_pane(pane)
 		if not item:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]