Trim heads-up display message read from file
Related: https://issues.redhat.com/browse/RHEL-4096
This commit is contained in:
parent
e31d3f3f9a
commit
1091d0ff3f
@ -38,7 +38,7 @@ index a71b5925..5f72e168 100644
|
||||
if (!heading && !body) {
|
||||
this._dismissMessage();
|
||||
--
|
||||
2.49.0
|
||||
2.46.1
|
||||
|
||||
|
||||
From a121cf4e1a21e78b74de7b2f33f40f3201eaaa50 Mon Sep 17 00:00:00 2001
|
||||
@ -149,7 +149,7 @@ index 5f72e168..3ae6eabb 100644
|
||||
|
||||
_dismissMessage() {
|
||||
--
|
||||
2.49.0
|
||||
2.46.1
|
||||
|
||||
|
||||
From 88bff8c0a592e72f5797c834dfa8519b69c1f15b Mon Sep 17 00:00:00 2001
|
||||
@ -212,10 +212,10 @@ index 1e2119c8..a9552642 100644
|
||||
<default>true</default>
|
||||
<summary>Show on login screen</summary>
|
||||
--
|
||||
2.49.0
|
||||
2.46.1
|
||||
|
||||
|
||||
From 706aa6d5ee89bfb196964b5f1ffd1373ba66d4c4 Mon Sep 17 00:00:00 2001
|
||||
From a1f32f7ce76044c4782dc9e3620e4ba448cfec82 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Fri, 9 May 2025 14:49:15 +0200
|
||||
Subject: [PATCH 4/5] heads-up-display: Support loading message text from file
|
||||
@ -230,7 +230,7 @@ show the same message for both graphical and non-graphical logins.
|
||||
1 file changed, 69 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/extensions/heads-up-display/extension.js b/extensions/heads-up-display/extension.js
|
||||
index 3ae6eabb..5a377415 100644
|
||||
index 3ae6eabb..bc1961b9 100644
|
||||
--- a/extensions/heads-up-display/extension.js
|
||||
+++ b/extensions/heads-up-display/extension.js
|
||||
@@ -2,6 +2,7 @@
|
||||
@ -314,7 +314,7 @@ index 3ae6eabb..5a377415 100644
|
||||
+ if (this._messageFile) {
|
||||
+ try {
|
||||
+ const [contents] = await this._messageFile.load_contents_async(null);
|
||||
+ const message = new TextDecoder().decode(contents);
|
||||
+ const message = new TextDecoder().decode(contents).trim();
|
||||
+
|
||||
+ const sep = '\n\n';
|
||||
+ const paragraphs = message.split(sep);
|
||||
@ -340,10 +340,10 @@ index 3ae6eabb..5a377415 100644
|
||||
return {
|
||||
heading: this._settings.get_string('message-heading'),
|
||||
--
|
||||
2.49.0
|
||||
2.46.1
|
||||
|
||||
|
||||
From 1468fedb6e15225741aae830b30555f63a228ae5 Mon Sep 17 00:00:00 2001
|
||||
From 6bdf47e04f64b41db0350b073f264ca46ed6f9c0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Fri, 9 May 2025 13:27:35 +0200
|
||||
Subject: [PATCH 5/5] heads-up-display: Expose `message-path` and `-source`
|
||||
@ -479,5 +479,5 @@ index 304c8813..1d2bea4c 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.49.0
|
||||
2.46.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user