[gnome-shell/wip/fmuellner/notification-redux: 51/82] calendar: TMP: Hack in notification support
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux: 51/82] calendar: TMP: Hack in notification support
- Date: Sat, 14 Feb 2015 10:10:39 +0000 (UTC)
commit e42f4ce3d0a5626e8ca5af7227a3c0738f451084
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Feb 13 00:09:58 2015 +0100
calendar: TMP: Hack in notification support
js/ui/calendar.js | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index cc3117c..400439b 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1039,7 +1039,7 @@ const NotificationListEntry = new Lang.Class({
Extends: MessageListEntry,
_init: function(notification) {
- let params = { gicon: notification.icon || notification.getIcon() };
+ let params = { gicon: notification.icon || notification.source.getIcon() };
if (!this._noDate)
params.time = new Date();
@@ -1204,7 +1204,17 @@ const NotificationSection = new Lang.Class({
},
_onNotificationAdded: function(source, notification) {
- let gicon = notification._icon ? notification._icon.gicon : source.getIcon();
+ //let gicon = notification._icon ? notification._icon.gicon : source.getIcon();
+ let gicon = null;
+ if (notification._iconBin.child)
+ gicon = notification._iconBin.child.gicon;
+
+ if (!gicon)
+ try {
+ gicon = source.getIcon();
+ } catch(e) {
+ }
+
let body = '';
if (notification.bannerBodyText) {
body = notification.bannerBodyMarkup ? notification.bannerBodyText
@@ -1259,6 +1269,13 @@ const NotificationSection = new Lang.Class({
this._showBanner();
},
+ showTestBanner: function() {
+ let notification = new Notification(new Source('Test', 'dialog-info-symbolic'),
+ "Test notification",
+ "This is a small test notification with a lengthy body to test
expanding of banners; something's wrong in the tray but seems to work here, no idea what's going on ...");
+ this.addNotification(notification);
+ },
+
_showBanner: function() {
let notification = this._notificationQueue.shift();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]