[gnome-documents] main-window: exit selection mode with Escape from keyboard
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] main-window: exit selection mode with Escape from keyboard
- Date: Wed, 29 Feb 2012 20:59:22 +0000 (UTC)
commit 9fb357629c5c27118e7ffa56860d5e19fd4f2264
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Feb 29 15:58:33 2012 -0500
main-window: exit selection mode with Escape from keyboard
https://bugzilla.gnome.org/show_bug.cgi?id=668724
src/mainWindow.js | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 46be9e3..493b370 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -257,7 +257,16 @@ MainWindow.prototype = {
if (!Global.searchController.getSearchIn()) {
Global.searchController.deliverEvent(event);
- return Global.searchController.getEventHandled();
+ let handled = Global.searchController.getEventHandled();
+
+ if (handled)
+ return true;
+ }
+
+ if (Global.selectionController.getSelectionMode() &&
+ keyval == Gdk.KEY_Escape) {
+ Global.selectionController.setSelectionMode(false);
+ return true;
}
return false;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]