runDialog: Remove "Run" button again

While not in the mockups, it was introduced during review of commit
0c807bddaf after discussion on IRC, but the designers disagree;
remove it again.

https://bugzilla.gnome.org/show_bug.cgi?id=687127
This commit is contained in:
Florian Müllner 2012-10-30 15:00:07 +01:00
parent a607174a25
commit 4d51056226

View File

@ -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);