[gnome-shell/gbsneto/new-lock-screen-part2: 56/61] unlockDialog: Use just the counter to format notifications
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gbsneto/new-lock-screen-part2: 56/61] unlockDialog: Use just the counter to format notifications
- Date: Mon, 6 Jan 2020 16:56:42 +0000 (UTC)
commit 9d9958e996e0a0c03dbec6be4ce08f480972a662
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Nov 29 16:05:12 2019 -0300
unlockDialog: Use just the counter to format notifications
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/872
js/ui/unlockDialog.js | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 155fcd14b7..4f83fa028e 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -67,11 +67,8 @@ var NotificationsBox = GObject.registerClass({
this.visible = this._notificationBox.visible;
}
- _makeNotificationCountText(count, isChat) {
- if (isChat)
- return ngettext("%d new message", "%d new messages", count).format(count);
- else
- return ngettext("%d new notification", "%d new notifications", count).format(count);
+ _makeNotificationCountText(count) {
+ return "%d".format(count);
}
_makeNotificationSource(source, box) {
@@ -86,8 +83,10 @@ var NotificationsBox = GObject.registerClass({
textBox.add(title);
let count = source.unseenCount;
- let countLabel = new St.Label({ text: this._makeNotificationCountText(count, source.isChat),
- style_class: 'unlock-dialog-notification-count-text' });
+ let countLabel = new St.Label({
+ text: this._makeNotificationCountText(count),
+ style_class: 'unlock-dialog-notification-count-text',
+ });
textBox.add(countLabel);
box.visible = count != 0;
@@ -227,7 +226,7 @@ var NotificationsBox = GObject.registerClass({
this._showSource(source, obj, obj.sourceBox);
} else {
let count = source.unseenCount;
- obj.countLabel.text = this._makeNotificationCountText(count, source.isChat);
+ obj.countLabel.text = this._makeNotificationCountText(count);
}
obj.sourceBox.visible = obj.visible && (source.unseenCount > 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]