Rebase downstream patches

This commit is contained in:
Florian Müllner 2019-10-09 03:53:25 +02:00
parent 766f7a9a1e
commit 9fb81f491b
2 changed files with 22 additions and 32 deletions

View File

@ -1,4 +1,4 @@
From 5f81215e9771b14be1562d82f54db3fdb92521e3 Mon Sep 17 00:00:00 2001 From bbbe73b2a0293165f9bc9cc63b647b35914a4a05 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com> From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 15 Aug 2018 14:26:19 +0200 Date: Wed, 15 Aug 2018 14:26:19 +0200
Subject: [PATCH 1/2] endSessionDialog: Immediately add buttons to the dialog Subject: [PATCH 1/2] endSessionDialog: Immediately add buttons to the dialog
@ -9,14 +9,14 @@ array of button-info structs.
This is a preparation patch for adding support changing the "Reboot" This is a preparation patch for adding support changing the "Reboot"
button into a "Boot Options" button when Alt is pressed. button into a "Boot Options" button when Alt is pressed.
--- ---
js/ui/endSessionDialog.js | 28 +++++++++++++++------------- js/ui/endSessionDialog.js | 12 ++++++------
1 file changed, 15 insertions(+), 13 deletions(-) 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index 0b475b6f9..301d8c9bf 100644 index e1c6517f4..4ce797527 100644
--- a/js/ui/endSessionDialog.js --- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js
@@ -440,25 +440,27 @@ class EndSessionDialog extends ModalDialog.ModalDialog { @@ -441,15 +441,17 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
} }
_updateButtons() { _updateButtons() {
@ -33,24 +33,14 @@ index 0b475b6f9..301d8c9bf 100644
for (let i = 0; i < dialogContent.confirmButtons.length; i++) { for (let i = 0; i < dialogContent.confirmButtons.length; i++) {
let signal = dialogContent.confirmButtons[i].signal; let signal = dialogContent.confirmButtons[i].signal;
let label = dialogContent.confirmButtons[i].label; let label = dialogContent.confirmButtons[i].label;
- buttons.push({ action: () => { - buttons.push({
- this.close(true);
- let signalId = this.connect('closed', () => {
- this.disconnect(signalId);
- this._confirm(signal);
- });
- },
- label: label });
+ let button = this.addButton({ + let button = this.addButton({
+ action: () => { action: () => {
+ this.close(true); this.close(true);
+ let signalId = this.connect('closed', () => { let signalId = this.connect('closed', () => {
+ this.disconnect(signalId); @@ -460,8 +462,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
+ this._confirm(signal); label: label,
+ }); });
+ },
+ label
+ });
} }
- -
- this.setButtons(buttons); - this.setButtons(buttons);
@ -58,5 +48,5 @@ index 0b475b6f9..301d8c9bf 100644
close(skipSignal) { close(skipSignal) {
-- --
2.21.0 2.23.0

View File

@ -1,4 +1,4 @@
From 6263d5e115a726dcd75a5368afdd2798236fb1de Mon Sep 17 00:00:00 2001 From 27736261bdb626e0c30884edc1b699c9fe5ed256 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com> From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 15 Aug 2018 15:03:56 +0200 Date: Wed, 15 Aug 2018 15:03:56 +0200
Subject: [PATCH 2/2] endSessionDialog: Support rebooting into the bootloader Subject: [PATCH 2/2] endSessionDialog: Support rebooting into the bootloader
@ -21,10 +21,10 @@ and makes it have rounded corners on both of its bottom corners.
1 file changed, 51 insertions(+) 1 file changed, 51 insertions(+)
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
index 301d8c9bf..0dc717241 100644 index 4ce797527..c18a008eb 100644
--- a/js/ui/endSessionDialog.js --- a/js/ui/endSessionDialog.js
+++ b/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js
@@ -256,6 +256,9 @@ class EndSessionDialog extends ModalDialog.ModalDialog { @@ -254,6 +254,9 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
this._totalSecondsToStayOpen = 0; this._totalSecondsToStayOpen = 0;
this._applications = []; this._applications = [];
this._sessions = []; this._sessions = [];
@ -34,7 +34,7 @@ index 301d8c9bf..0dc717241 100644
this.connect('destroy', this.connect('destroy',
this._onDestroy.bind(this)); this._onDestroy.bind(this));
@@ -439,6 +442,26 @@ class EndSessionDialog extends ModalDialog.ModalDialog { @@ -440,6 +443,26 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
this._sessionHeader.visible = hasSessions; this._sessionHeader.visible = hasSessions;
} }
@ -61,9 +61,9 @@ index 301d8c9bf..0dc717241 100644
_updateButtons() { _updateButtons() {
this.clearButtons(); this.clearButtons();
@@ -460,7 +483,33 @@ class EndSessionDialog extends ModalDialog.ModalDialog { @@ -461,7 +484,33 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
}, },
label label: label,
}); });
+ +
+ // Add Alt "Boot Options" option to the Reboot button + // Add Alt "Boot Options" option to the Reboot button
@ -95,7 +95,7 @@ index 301d8c9bf..0dc717241 100644
} }
close(skipSignal) { close(skipSignal) {
@@ -472,6 +521,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { @@ -473,6 +522,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
cancel() { cancel() {
this._stopTimer(); this._stopTimer();
@ -103,7 +103,7 @@ index 301d8c9bf..0dc717241 100644
this._dbusImpl.emit_signal('Canceled', null); this._dbusImpl.emit_signal('Canceled', null);
this.close(); this.close();
} }
@@ -480,6 +530,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog { @@ -481,6 +531,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
let callback = () => { let callback = () => {
this._fadeOutDialog(); this._fadeOutDialog();
this._stopTimer(); this._stopTimer();
@ -112,5 +112,5 @@ index 301d8c9bf..0dc717241 100644
}; };
-- --
2.21.0 2.23.0