runDialog: Use new indentation style
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/960
This commit is contained in:
parent
b674cdbde2
commit
26b78e7d77
@ -23,8 +23,10 @@ var DIALOG_GROW_TIME = 100;
|
|||||||
var RunDialog = GObject.registerClass(
|
var RunDialog = GObject.registerClass(
|
||||||
class RunDialog extends ModalDialog.ModalDialog {
|
class RunDialog extends ModalDialog.ModalDialog {
|
||||||
_init() {
|
_init() {
|
||||||
super._init({ styleClass: 'run-dialog',
|
super._init({
|
||||||
destroyOnClose: false });
|
styleClass: 'run-dialog',
|
||||||
|
destroyOnClose: false,
|
||||||
|
});
|
||||||
|
|
||||||
this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
|
this._lockdownSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
|
||||||
this._terminalSettings = new Gio.Settings({ schema_id: TERMINAL_SCHEMA });
|
this._terminalSettings = new Gio.Settings({ schema_id: TERMINAL_SCHEMA });
|
||||||
@ -54,13 +56,16 @@ class RunDialog extends ModalDialog.ModalDialog {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
let label = new St.Label({ style_class: 'run-dialog-label',
|
let label = new St.Label({
|
||||||
text: _("Enter a Command") });
|
style_class: 'run-dialog-label',
|
||||||
|
text: _("Enter a Command"),
|
||||||
|
});
|
||||||
this.contentLayout.add_child(label);
|
this.contentLayout.add_child(label);
|
||||||
|
|
||||||
let entry = new St.Entry({ style_class: 'run-dialog-entry',
|
let entry = new St.Entry({
|
||||||
can_focus: true });
|
style_class: 'run-dialog-entry',
|
||||||
|
can_focus: true,
|
||||||
|
});
|
||||||
ShellEntry.addContextMenu(entry);
|
ShellEntry.addContextMenu(entry);
|
||||||
|
|
||||||
entry.label_actor = label;
|
entry.label_actor = label;
|
||||||
@ -73,11 +78,12 @@ class RunDialog extends ModalDialog.ModalDialog {
|
|||||||
|
|
||||||
this.contentLayout.add_child(this._errorBox);
|
this.contentLayout.add_child(this._errorBox);
|
||||||
|
|
||||||
let errorIcon = new St.Icon({ icon_name: 'dialog-error-symbolic',
|
let errorIcon = new St.Icon({
|
||||||
|
icon_name: 'dialog-error-symbolic',
|
||||||
icon_size: 24,
|
icon_size: 24,
|
||||||
style_class: 'run-dialog-error-icon',
|
style_class: 'run-dialog-error-icon',
|
||||||
y_align: Clutter.ActorAlign.CENTER });
|
y_align: Clutter.ActorAlign.CENTER,
|
||||||
|
});
|
||||||
this._errorBox.add_child(errorIcon);
|
this._errorBox.add_child(errorIcon);
|
||||||
|
|
||||||
this._commandError = false;
|
this._commandError = false;
|
||||||
@ -100,8 +106,10 @@ class RunDialog extends ModalDialog.ModalDialog {
|
|||||||
|
|
||||||
this._pathCompleter = new Gio.FilenameCompleter();
|
this._pathCompleter = new Gio.FilenameCompleter();
|
||||||
|
|
||||||
this._history = new History.HistoryManager({ gsettingsKey: HISTORY_KEY,
|
this._history = new History.HistoryManager({
|
||||||
entry: this._entryText });
|
gsettingsKey: HISTORY_KEY,
|
||||||
|
entry: this._entryText,
|
||||||
|
});
|
||||||
this._entryText.connect('activate', o => {
|
this._entryText.connect('activate', o => {
|
||||||
this.popModal();
|
this.popModal();
|
||||||
this._run(o.get_text(),
|
this._run(o.get_text(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user