[polari] chatView: Include nick in notifications



commit d2f03a1174e03c27c0c41b8d8e56233f51c38933
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Oct 1 15:55:14 2013 +0200

    chatView: Include nick in notifications
    
    We display a desktop notification for highlighted messages that arrive
    while the window isn't focused. In case of regular messages however,
    we should include the nick alongside the message.

 src/chatView.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index f7dcf30..a2fd3ac 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -413,7 +413,9 @@ const ChatView = new Lang.Class({
             tags.push(this._lookupTag('highlight'));
 
             if (!this._toplevelFocus) {
-                let notification = new Notify.Notification(text, '');
+                let summary = this._lastNick ? '%s: %s'.format(nick, text)
+                                             : text;
+                let notification = new Notify.Notification(summary, '');
                 notification.show();
             }
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]