[gnome-shell] Only enable internal commands if developer_tools is true
- From: Colin Walters <walters src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Only enable internal commands if developer_tools is true
- Date: Tue, 15 Sep 2009 20:20:33 +0000 (UTC)
commit 2ddc7cf00f64e937c8c2798b31c46d25734b7967
Author: Colin Walters <walters verbum org>
Date: Mon Sep 14 13:45:49 2009 -0400
Only enable internal commands if developer_tools is true
'r' is a bit too accidentally-hittable for outside of developer usage.
However it will still be enabled when developer_tools is true.
https://bugzilla.gnome.org/show_bug.cgi?id=595116
js/ui/runDialog.js | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index 67d5b8b..9e32092 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -34,6 +34,13 @@ RunDialog.prototype = {
_init : function() {
this._isOpen = false;
+ let gconf = Shell.GConf.get_default();
+ gconf.connect('changed', Lang.bind(this, function (gconf, key) {
+ if (key == 'development_tools')
+ this._enableInternalCommands = gconf.get_bool('development_tools');
+ }));
+ this._enableInternalCommands = gconf.get_boolean('development_tools');
+
this._internalCommands = { 'lg':
Lang.bind(this, function() {
// Run in an idle to avoid recursive key grab problems
@@ -142,7 +149,11 @@ RunDialog.prototype = {
},
_run : function(command) {
- let f = this._internalCommands[command];
+ let f;
+ if (this._enableInternalCommands)
+ f = this._internalCommands[command];
+ else
+ f = null;
if (f) {
f();
} else if (command) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]