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>
Date: Wed, 15 Aug 2018 14:26:19 +0200
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"
button into a "Boot Options" button when Alt is pressed.
---
js/ui/endSessionDialog.js | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
js/ui/endSessionDialog.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
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
+++ b/js/ui/endSessionDialog.js
@@ -440,25 +440,27 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
@@ -441,15 +441,17 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
}
_updateButtons() {
@ -33,24 +33,14 @@ index 0b475b6f9..301d8c9bf 100644
for (let i = 0; i < dialogContent.confirmButtons.length; i++) {
let signal = dialogContent.confirmButtons[i].signal;
let label = dialogContent.confirmButtons[i].label;
- buttons.push({ action: () => {
- this.close(true);
- let signalId = this.connect('closed', () => {
- this.disconnect(signalId);
- this._confirm(signal);
- });
- },
- label: label });
- buttons.push({
+ let button = this.addButton({
+ action: () => {
+ this.close(true);
+ let signalId = this.connect('closed', () => {
+ this.disconnect(signalId);
+ this._confirm(signal);
+ });
+ },
+ label
+ });
action: () => {
this.close(true);
let signalId = this.connect('closed', () => {
@@ -460,8 +462,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
label: label,
});
}
-
- this.setButtons(buttons);
@ -58,5 +48,5 @@ index 0b475b6f9..301d8c9bf 100644
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>
Date: Wed, 15 Aug 2018 15:03:56 +0200
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(+)
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
+++ 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._applications = [];
this._sessions = [];
@ -34,7 +34,7 @@ index 301d8c9bf..0dc717241 100644
this.connect('destroy',
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;
}
@ -61,9 +61,9 @@ index 301d8c9bf..0dc717241 100644
_updateButtons() {
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
@ -95,7 +95,7 @@ index 301d8c9bf..0dc717241 100644
}
close(skipSignal) {
@@ -472,6 +521,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
@@ -473,6 +522,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
cancel() {
this._stopTimer();
@ -103,7 +103,7 @@ index 301d8c9bf..0dc717241 100644
this._dbusImpl.emit_signal('Canceled', null);
this.close();
}
@@ -480,6 +530,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
@@ -481,6 +531,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
let callback = () => {
this._fadeOutDialog();
this._stopTimer();
@ -112,5 +112,5 @@ index 301d8c9bf..0dc717241 100644
};
--
2.21.0
2.23.0