[gnome-shell] runDialog: Remove "Run" button again



commit 4d510562269d070d08e098d6e51c64081a3f66e3
Author: Florian MÃllner <fmuellner gnome org>
Date:   Tue Oct 30 15:00:07 2012 +0100

    runDialog: Remove "Run" button again
    
    While not in the mockups, it was introduced during review of commit
    0c807bddaf4da5 after discussion on IRC, but the designers disagree;
    remove it again.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=687127

 js/ui/runDialog.js |   26 +++++++++-----------------
 1 files changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index 2ec1dea..ac3f090 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -238,14 +238,8 @@ const RunDialog = new Lang.Class({
         this._errorBox.hide();
 
         this.setButtons([{ action: Lang.bind(this, this.close),
-                           label: _("Cancel"),
-                           key: Clutter.Escape },
-                         { action: Lang.bind(this,
-                               function() {
-                                   this._activate(false);
-                               }),
-                           label: _("Run"),
-                           isDefault: true }]);
+                           label: _("Close"),
+                           key: Clutter.Escape }]);
 
         this._pathCompleter = new Gio.FilenameCompleter();
         this._commandCompleter = new CommandCompleter();
@@ -256,7 +250,13 @@ const RunDialog = new Lang.Class({
         this._entryText.connect('key-press-event', Lang.bind(this, function(o, e) {
             let symbol = e.get_key_symbol();
             if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
-                this._activate(e.get_state() & Clutter.ModifierType.CONTROL_MASK);
+                this.popModal();
+                this._run(o.get_text(),
+                          e.get_state() & Clutter.ModifierType.CONTROL_MASK);
+                if (!this._commandError ||
+                    !this.pushModal())
+                    this.close();
+
                 return true;
             }
             if (symbol == Clutter.slash) {
@@ -291,14 +291,6 @@ const RunDialog = new Lang.Class({
         }));
     },
 
-    _activate: function(inTerminal) {
-        this.popModal();
-        this._run(this._entryText.get_text(), inTerminal);
-        if (!this._commandError ||
-            !this.pushModal())
-            this.close();
-    },
-
     _getCompletion : function(text) {
         if (text.indexOf('/') != -1) {
             return this._pathCompleter.get_completion_suffix(text);



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