[gnome-shell] notificationDaemon: Remove rewriteRules
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] notificationDaemon: Remove rewriteRules
- Date: Thu, 26 Aug 2021 11:51:33 +0000 (UTC)
commit c6bcc746495a5807f1043cc40ab1b02b3259cf8b
Author: Ivan Molodetskikh <yalterz gmail com>
Date: Thu Aug 26 11:42:59 2021 +0000
notificationDaemon: Remove rewriteRules
It's not really Shell's business to fix bad app notification contents.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1962>
js/ui/notificationDaemon.js | 20 --------------------
1 file changed, 20 deletions(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index f94edb65c2..69137b1b23 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -25,17 +25,6 @@ var Urgency = {
CRITICAL: 2,
};
-const rewriteRules = {
- 'XChat': [
- { pattern: /^XChat: Private message from: (\S*) \(.*\)$/,
- replacement: '<$1>' },
- { pattern: /^XChat: New public message from: (\S*) \((.*)\)$/,
- replacement: '$2 <$1>' },
- { pattern: /^XChat: Highlighted message from: (\S*) \((.*)\)$/,
- replacement: '$2 <$1>' },
- ],
-};
-
var FdoNotificationDaemon = class FdoNotificationDaemon {
constructor() {
this._dbusImpl = Gio.DBusExportedObject.wrapJSObject(FdoNotificationsIface, this);
@@ -166,15 +155,6 @@ var FdoNotificationDaemon = class FdoNotificationDaemon {
return invocation.return_value(GLib.Variant.new('(u)', [id]));
}
- let rewrites = rewriteRules[appName];
- if (rewrites) {
- for (let i = 0; i < rewrites.length; i++) {
- let rule = rewrites[i];
- if (summary.search(rule.pattern) != -1)
- summary = summary.replace(rule.pattern, rule.replacement);
- }
- }
-
// Be compatible with the various hints for image data and image path
// 'image-data' and 'image-path' are the latest name of these hints, introduced in 1.2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]