[polari] chatView: Notify on highlights
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] chatView: Notify on highlights
- Date: Thu, 8 Aug 2013 13:13:59 +0000 (UTC)
commit 3911da02897be854600d7dce1a6a45dfd03c5886
Author: Florian Müllner <fmuellner gnome org>
Date: Tue Jul 30 17:53:21 2013 +0200
chatView: Notify on highlights
src/chatView.js | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 20b5b1e..7ca3182 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -5,6 +5,7 @@ const Pango = imports.gi.Pango;
const Tp = imports.gi.TelepathyGLib;
const Lang = imports.lang;
+const Notify = imports.notify;
const MAX_NICK_CHARS = 8;
@@ -382,9 +383,15 @@ const ChatView = new Lang.Class({
tags.push(this._lookupTag('message'));
}
- if (this._room.should_highlight_message(message))
+ if (this._room.should_highlight_message(message)) {
tags.push(this._lookupTag('highlight'));
+ if (!this._toplevelFocus) {
+ let notification = new Notify.Notification(text, '');
+ notification.show();
+ }
+ }
+
let urls = findUrls(text);
let pos = 0;
for (let i = 0; i < urls.length; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]