[gnome-documents] mainWindow: Handle the back key before everything else
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] mainWindow: Handle the back key before everything else
- Date: Wed, 30 Jul 2014 12:42:08 +0000 (UTC)
commit c8e5b3bc9ecc0ea09262031207f312f4f736fa54
Author: Debarshi Ray <debarshir gnome org>
Date: Tue Jul 15 11:22:34 2014 +0200
mainWindow: Handle the back key before everything else
Determining whether a key press event should be handled as a back key
is straightforward. Let's do it before checking if the event should be
handled by the search entry, which is more involved and depends on the
state of the widgets and who has the current focus. This way we can
guarantee that the back key is never going to be eaten up by the
toolbar or something else.
https://bugzilla.gnome.org/show_bug.cgi?id=726485
src/mainWindow.js | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 2e28b1e..470031e 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -175,12 +175,11 @@ const MainWindow = new Lang.Class({
},
_onKeyPressEvent: function(widget, event) {
- let toolbar = this._embed.getMainToolbar();
-
- if (toolbar.handleEvent(event))
+ if (this._handleBackKey(event))
return true;
- if (this._handleBackKey(event))
+ let toolbar = this._embed.getMainToolbar();
+ if (toolbar.handleEvent(event))
return true;
switch (Application.modeController.getWindowMode()) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]