[gnome-shell] runDialog.js: really update the enableInternalCommands when the key changes



commit 3ffc510be76eabe0c0c1e39b640302dcb36ffdaa
Author: Siegfried-Angel Gevatter Pujals <rainct ubuntu com>
Date:   Fri Sep 25 20:10:45 2009 +0200

    runDialog.js: really update the enableInternalCommands when the key changes
    
    The run dialog uses the "development_tools" gconf key to determine
    whether funcions like "lg" or "restart" should be enabled, but it
    failed to notice it on the run when said key changed. This commit
    fixes this.

 js/ui/runDialog.js |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index d6d7994..4ffeb0f 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -34,9 +34,8 @@ RunDialog.prototype = {
         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');
+        gconf.connect('changed::development_tools', Lang.bind(this, function () {
+            this._enableInternalCommands = gconf.get_boolean('development_tools');
         }));
         this._enableInternalCommands = gconf.get_boolean('development_tools');
 



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