Update to 3.37.91
This commit is contained in:
parent
2f4e696626
commit
4bcececbe6
@ -1,52 +0,0 @@
|
||||
From c907dbe205257d29ca74d9e30cf2e100d85f277b 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
|
||||
|
||||
Immediately add buttons to the dialog instead of first building an
|
||||
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 | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
|
||||
index ff1aa0ddf..27ddf6804 100644
|
||||
--- a/js/ui/endSessionDialog.js
|
||||
+++ b/js/ui/endSessionDialog.js
|
||||
@@ -369,15 +369,17 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
}
|
||||
|
||||
_updateButtons() {
|
||||
- let dialogContent = DialogContent[this._type];
|
||||
- let buttons = [{ action: this.cancel.bind(this),
|
||||
+ this.clearButtons();
|
||||
+
|
||||
+ this.addButton({ action: this.cancel.bind(this),
|
||||
label: _("Cancel"),
|
||||
- key: Clutter.KEY_Escape }];
|
||||
+ key: Clutter.KEY_Escape });
|
||||
|
||||
+ let dialogContent = DialogContent[this._type];
|
||||
for (let i = 0; i < dialogContent.confirmButtons.length; i++) {
|
||||
let signal = dialogContent.confirmButtons[i].signal;
|
||||
let label = dialogContent.confirmButtons[i].label;
|
||||
- buttons.push({
|
||||
+ let button = this.addButton({
|
||||
action: () => {
|
||||
this.close(true);
|
||||
let signalId = this.connect('closed', () => {
|
||||
@@ -388,8 +390,6 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
label,
|
||||
});
|
||||
}
|
||||
-
|
||||
- this.setButtons(buttons);
|
||||
}
|
||||
|
||||
close(skipSignal) {
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,117 +0,0 @@
|
||||
From f91a2109fb139131a5f4ba5d00fca043df82ba10 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
|
||||
menu aka ("Boot Options")
|
||||
|
||||
This implements the "Alt" behavior for the "Reboot" button as outlined in
|
||||
the design here: https://wiki.gnome.org/Design/OS/BootOptions
|
||||
|
||||
This causes the endSessionDialog to send a ConfirmedRebootToBootOptions signal
|
||||
to gnome-session instead of the normal ConfirmedReboot signal, actually
|
||||
telling the boot-loader that it should show its menu the next boot is left
|
||||
up to gnome-session.
|
||||
|
||||
Note I've tried implemeting this with the AltSwitcher class from
|
||||
js/ui/status/system.js first, but that puts the button in a St.Bin()
|
||||
which causes the button to think it is the only button on the dialog
|
||||
and makes it have rounded corners on both of its bottom corners.
|
||||
---
|
||||
js/ui/endSessionDialog.js | 52 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 52 insertions(+)
|
||||
|
||||
diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js
|
||||
index 27ddf6804..6cebf2a81 100644
|
||||
--- a/js/ui/endSessionDialog.js
|
||||
+++ b/js/ui/endSessionDialog.js
|
||||
@@ -239,6 +239,9 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._totalSecondsToStayOpen = 0;
|
||||
this._applications = [];
|
||||
this._sessions = [];
|
||||
+ this._capturedEventId = 0;
|
||||
+ this._rebootButton = null;
|
||||
+ this._rebootButtonAlt = null;
|
||||
|
||||
this.connect('destroy',
|
||||
this._onDestroy.bind(this));
|
||||
@@ -368,6 +371,26 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
this._sessionSection.visible = hasSessions;
|
||||
}
|
||||
|
||||
+ _onCapturedEvent(actor, event) {
|
||||
+ let altEnabled = false;
|
||||
+
|
||||
+ let type = event.type();
|
||||
+ if (type != Clutter.EventType.KEY_PRESS && type != Clutter.EventType.KEY_RELEASE)
|
||||
+ return Clutter.EVENT_PROPAGATE;
|
||||
+
|
||||
+ let key = event.get_key_symbol();
|
||||
+ if (key != Clutter.KEY_Alt_L && key != Clutter.KEY_Alt_R)
|
||||
+ return Clutter.EVENT_PROPAGATE;
|
||||
+
|
||||
+ if (type == Clutter.EventType.KEY_PRESS)
|
||||
+ altEnabled = true;
|
||||
+
|
||||
+ this._rebootButton.visible = !altEnabled;
|
||||
+ this._rebootButtonAlt.visible = altEnabled;
|
||||
+
|
||||
+ return Clutter.EVENT_PROPAGATE;
|
||||
+ }
|
||||
+
|
||||
_updateButtons() {
|
||||
this.clearButtons();
|
||||
|
||||
@@ -389,7 +412,34 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
},
|
||||
label,
|
||||
});
|
||||
+
|
||||
+ // Add Alt "Boot Options" option to the Reboot button
|
||||
+ if (signal == 'ConfirmedReboot') {
|
||||
+ this._rebootButton = button;
|
||||
+ this._rebootButtonAlt = this.addButton({
|
||||
+ action: () => {
|
||||
+ this.close(true);
|
||||
+ let signalId = this.connect('closed', () => {
|
||||
+ this.disconnect(signalId);
|
||||
+ this._confirm('ConfirmedRebootToBootOptions');
|
||||
+ });
|
||||
+ },
|
||||
+ label: C_("button", "Boot Options")
|
||||
+ });
|
||||
+ this._rebootButtonAlt.visible = false;
|
||||
+ this._capturedEventId = global.stage.connect('captured-event',
|
||||
+ this._onCapturedEvent.bind(this));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ _stopAltCapture() {
|
||||
+ if (this._capturedEventId > 0) {
|
||||
+ global.stage.disconnect(this._capturedEventId);
|
||||
+ this._capturedEventId = 0;
|
||||
}
|
||||
+ this._rebootButton = null;
|
||||
+ this._rebootButtonAlt = null;
|
||||
}
|
||||
|
||||
close(skipSignal) {
|
||||
@@ -401,6 +451,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
|
||||
cancel() {
|
||||
this._stopTimer();
|
||||
+ this._stopAltCapture();
|
||||
this._dbusImpl.emit_signal('Canceled', null);
|
||||
this.close();
|
||||
}
|
||||
@@ -409,6 +460,7 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
|
||||
let callback = () => {
|
||||
this._fadeOutDialog();
|
||||
this._stopTimer();
|
||||
+ this._stopAltCapture();
|
||||
this._dbusImpl.emit_signal(signal, null);
|
||||
};
|
||||
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,173 +0,0 @@
|
||||
From 112b139a9e1277a3f4e13cd8ba9f2da66babc5c7 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 13 Aug 2020 23:35:27 +0200
|
||||
Subject: [PATCH 1/2] cleanup: Remove old compatibility code
|
||||
|
||||
Since gjs moved to mozjs60, return values of int8_t arrays can
|
||||
no longer be treated as strings. We originally made the conversion
|
||||
conditional to keep working with the (then) stable gjs release.
|
||||
|
||||
That was two years ago and we require a more recent gjs nowadays,
|
||||
so there's no good reason for keeping the old code path.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1407
|
||||
---
|
||||
js/ui/components/networkAgent.js | 9 ++-------
|
||||
js/ui/extensionSystem.js | 4 ++--
|
||||
js/ui/keyboard.js | 4 ++--
|
||||
js/ui/padOsd.js | 4 ++--
|
||||
js/ui/sessionMode.js | 4 ++--
|
||||
5 files changed, 10 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
|
||||
index 1033a6de39..32ec1da852 100644
|
||||
--- a/js/ui/components/networkAgent.js
|
||||
+++ b/js/ui/components/networkAgent.js
|
||||
@@ -2,6 +2,7 @@
|
||||
/* exported Component */
|
||||
|
||||
const { Clutter, Gio, GLib, GObject, NM, Pango, Shell, St } = imports.gi;
|
||||
+const ByteArray = imports.byteArray;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Dialog = imports.ui.dialog;
|
||||
@@ -522,13 +523,7 @@ var VPNRequestHandler = class {
|
||||
let contentOverride;
|
||||
|
||||
try {
|
||||
- data = this._dataStdout.peek_buffer();
|
||||
-
|
||||
- if (data instanceof Uint8Array)
|
||||
- data = imports.byteArray.toGBytes(data);
|
||||
- else
|
||||
- data = data.toGBytes();
|
||||
-
|
||||
+ data = ByteArray.toGBytes(this._dataStdout.peek_buffer());
|
||||
keyfile.load_from_bytes(data, GLib.KeyFileFlags.NONE);
|
||||
|
||||
if (keyfile.get_integer(VPN_UI_GROUP, 'Version') != 2)
|
||||
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
|
||||
index f0b8361714..41ef98d70e 100644
|
||||
--- a/js/ui/extensionSystem.js
|
||||
+++ b/js/ui/extensionSystem.js
|
||||
@@ -2,6 +2,7 @@
|
||||
/* exported init connect disconnect */
|
||||
|
||||
const { GLib, Gio, GObject, Shell, St } = imports.gi;
|
||||
+const ByteArray = imports.byteArray;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const ExtensionDownloader = imports.ui.extensionDownloader;
|
||||
@@ -282,8 +283,7 @@ var ExtensionManager = class {
|
||||
let metadataContents, success_;
|
||||
try {
|
||||
[success_, metadataContents] = metadataFile.load_contents(null);
|
||||
- if (metadataContents instanceof Uint8Array)
|
||||
- metadataContents = imports.byteArray.toString(metadataContents);
|
||||
+ metadataContents = ByteArray.toString(metadataContents);
|
||||
} catch (e) {
|
||||
throw new Error('Failed to load metadata.json: %s'.format(e.toString()));
|
||||
}
|
||||
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
|
||||
index 90bd17b86f..a579495ad6 100644
|
||||
--- a/js/ui/keyboard.js
|
||||
+++ b/js/ui/keyboard.js
|
||||
@@ -2,6 +2,7 @@
|
||||
/* exported KeyboardManager */
|
||||
|
||||
const { Clutter, Gio, GLib, GObject, Meta, St } = imports.gi;
|
||||
+const ByteArray = imports.byteArray;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const InputSourceManager = imports.ui.status.keyboard;
|
||||
@@ -532,8 +533,7 @@ var KeyboardModel = class {
|
||||
_loadModel(groupName) {
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/osk-layouts/%s.json'.format(groupName));
|
||||
let [success_, contents] = file.load_contents(null);
|
||||
- if (contents instanceof Uint8Array)
|
||||
- contents = imports.byteArray.toString(contents);
|
||||
+ contents = ByteArray.toString(contents);
|
||||
|
||||
return JSON.parse(contents);
|
||||
}
|
||||
diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js
|
||||
index 115b72be2e..9ab1cbb9df 100644
|
||||
--- a/js/ui/padOsd.js
|
||||
+++ b/js/ui/padOsd.js
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
const { Atk, Clutter, GDesktopEnums, Gio,
|
||||
GLib, GObject, Gtk, Meta, Pango, Rsvg, St } = imports.gi;
|
||||
+const ByteArray = imports.byteArray;
|
||||
const Signals = imports.signals;
|
||||
|
||||
const Main = imports.ui.main;
|
||||
@@ -297,8 +298,7 @@ var PadDiagram = GObject.registerClass({
|
||||
_init(params) {
|
||||
let file = Gio.File.new_for_uri('resource:///org/gnome/shell/theme/pad-osd.css');
|
||||
let [success_, css] = file.load_contents(null);
|
||||
- if (css instanceof Uint8Array)
|
||||
- css = imports.byteArray.toString(css);
|
||||
+ css = ByteArray.toString(css);
|
||||
this._curEdited = null;
|
||||
this._prevEdited = null;
|
||||
this._css = css;
|
||||
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
|
||||
index 454804933e..2136e948f1 100644
|
||||
--- a/js/ui/sessionMode.js
|
||||
+++ b/js/ui/sessionMode.js
|
||||
@@ -1,6 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported SessionMode, listModes */
|
||||
|
||||
+const ByteArray = imports.byteArray;
|
||||
const GLib = imports.gi.GLib;
|
||||
const Signals = imports.signals;
|
||||
|
||||
@@ -105,8 +106,7 @@ function _loadMode(file, info) {
|
||||
let fileContent, success_, newMode;
|
||||
try {
|
||||
[success_, fileContent] = file.load_contents(null);
|
||||
- if (fileContent instanceof Uint8Array)
|
||||
- fileContent = imports.byteArray.toString(fileContent);
|
||||
+ fileContent = ByteArray.toString(fileContent);
|
||||
newMode = JSON.parse(fileContent);
|
||||
} catch (e) {
|
||||
return;
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
||||
From 990c171bed0e052a07145ad03fae89c33d86ac17 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 13 Aug 2020 23:37:31 +0200
|
||||
Subject: [PATCH 2/2] networkAgent: Add missing Uint8Array => string conversion
|
||||
|
||||
When promisifying async operations in commit 764527c8c, the
|
||||
finish function for read_line_async() was sneakily changed from
|
||||
read_line_finish_utf8() to read_line_finish().
|
||||
|
||||
That is, the call returns a Uint8Array now that requires an
|
||||
explicit conversion to string.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1407
|
||||
---
|
||||
js/ui/components/networkAgent.js | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/components/networkAgent.js b/js/ui/components/networkAgent.js
|
||||
index 32ec1da852..29565d214f 100644
|
||||
--- a/js/ui/components/networkAgent.js
|
||||
+++ b/js/ui/components/networkAgent.js
|
||||
@@ -494,7 +494,7 @@ var VPNRequestHandler = class {
|
||||
return;
|
||||
}
|
||||
|
||||
- this._vpnChildProcessLineOldStyle(line);
|
||||
+ this._vpnChildProcessLineOldStyle(ByteArray.toString(line));
|
||||
|
||||
// try to read more!
|
||||
this._readStdoutOldStyle();
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,59 +0,0 @@
|
||||
From 56b6e653175bbf85261712dda96cb99bcd727482 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Thu, 20 Aug 2020 10:08:01 +0200
|
||||
Subject: [PATCH 1/2] data: Only unset environment when the service actually
|
||||
ran
|
||||
|
||||
ExecStopPost= is executed even if ExecCondition= fails. As such, we need
|
||||
to add a guard as we would otherwise clear environment variables on X11
|
||||
sessions (rendering them utterly useless).
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1418
|
||||
---
|
||||
data/org.gnome.Shell@wayland.service.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.Shell@wayland.service.in b/data/org.gnome.Shell@wayland.service.in
|
||||
index 427e3c8072..692d45bb37 100644
|
||||
--- a/data/org.gnome.Shell@wayland.service.in
|
||||
+++ b/data/org.gnome.Shell@wayland.service.in
|
||||
@@ -26,7 +26,7 @@ ExecStart=@bindir@/gnome-shell
|
||||
SuccessExitStatus=1
|
||||
|
||||
# unset some environment variables that were set by the shell and won't work now that the shell is gone
|
||||
-ExecStopPost=-systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY
|
||||
+ExecStopPost=-/bin/sh -c 'test "$SERVICE_RESULT" != "exec-condition" && systemctl --user unset-environment GNOME_SETUP_DISPLAY WAYLAND_DISPLAY DISPLAY XAUTHORITY'
|
||||
|
||||
# On wayland we cannot restart
|
||||
Restart=no
|
||||
--
|
||||
GitLab
|
||||
|
||||
|
||||
From 6ad9c99040cec703cec85c68d1d168d3845ceaaa Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Berg <bberg@redhat.com>
|
||||
Date: Thu, 20 Aug 2020 10:09:00 +0200
|
||||
Subject: [PATCH 2/2] data: Fix description of org.gnome.Shell.target
|
||||
|
||||
The target is generic between X11 and wayland now, so remove the
|
||||
reference to wayland.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1418
|
||||
---
|
||||
data/org.gnome.Shell.target | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/data/org.gnome.Shell.target b/data/org.gnome.Shell.target
|
||||
index 358189f26f..55f9539e98 100644
|
||||
--- a/data/org.gnome.Shell.target
|
||||
+++ b/data/org.gnome.Shell.target
|
||||
@@ -1,5 +1,5 @@
|
||||
[Unit]
|
||||
-Description=GNOME Shell on Wayland
|
||||
+Description=GNOME Shell
|
||||
DefaultDependencies=no
|
||||
|
||||
Requisite=gnome-session-initialized.target
|
||||
--
|
||||
GitLab
|
||||
|
Loading…
Reference in New Issue
Block a user