Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: ui/file_manager/file_manager/foreground/js/file_manager_commands.js

Issue 1725563004: Files: Add a shortcut Alt-E to open gear menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use canExecuteAlways. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/file_manager_commands.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
index d2411441b0cf36fc647a6ee36bebfa80641822d3..bec0700313e5193326a71d93df307f3c7cba7156 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager_commands.js
@@ -1463,6 +1463,27 @@ CommandHandler.COMMANDS_['install-new-extension'] = /** @type {Command} */ ({
});
/**
+ * Opens the gear menu on Alt-E.
+ * @type {Command}
+ */
+CommandHandler.COMMANDS_['open-gear-menu'] = /** @type {Command} */ ({
+ /**
+ * @param {!Event} event Command event.
+ * @param {!FileManager} fileManager FileManager to use.
+ */
+ execute: function(event, fileManager) {
+ fileManager.ui.gearButton.showMenu(true);
+ },
+ /**
+ * @param {!Event} event Command event.
+ * @param {!FileManager} fileManager FileManager to use.
+ */
+ canExecute: function(event, fileManager) {
+ event.canExecute = CommandUtil.canExecuteAlways;
+ }
+});
+
+/**
* Configures the currently selected volume.
*/
CommandHandler.COMMANDS_['configure'] = /** @type {Command} */ ({
« no previous file with comments | « no previous file | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698