[polari/gnotification] Use new GNotification API
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/gnotification] Use new GNotification API
- Date: Tue, 15 Oct 2013 23:33:27 +0000 (UTC)
commit afba7fa9e6a1c219e7b9035cf4a9152deb5d29e9
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Oct 16 00:58:53 2013 +0200
Use new GNotification API
src/Makefile.am | 1 -
src/chatView.js | 9 ++---
src/notify.js | 86 -------------------------------------------------------
3 files changed, 4 insertions(+), 92 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index ec8845e..e22c6ea 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -37,7 +37,6 @@ dist_js_DATA = \
joinDialog.js \
main.js \
mainWindow.js \
- notify.js \
pasteManager.js \
roomList.js \
tabCompletion.js \
diff --git a/src/chatView.js b/src/chatView.js
index 34bfe22..32f0a58 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -5,7 +5,6 @@ const Pango = imports.gi.Pango;
const Tp = imports.gi.TelepathyGLib;
const Lang = imports.lang;
-const Notify = imports.notify;
const Utils = imports.utils;
const MAX_NICK_CHARS = 8;
@@ -42,8 +41,8 @@ const ChatView = new Lang.Class({
let adj = this.widget.vadjustment;
this._scrollBottom = adj.upper - adj.page_size;
- let app = Gio.Application.get_default();
- app.pasteManager.addWidget(this._view);
+ this._app = Gio.Application.get_default();
+ this._app.pasteManager.addWidget(this._view);
this._linkCursor = Gdk.Cursor.new(Gdk.CursorType.HAND1);
@@ -371,8 +370,8 @@ const ChatView = new Lang.Class({
if (!this._toplevelFocus) {
let summary = this._lastNick ? '%s: %s'.format(nick, text)
: text;
- let notification = new Notify.Notification(summary, '');
- notification.show();
+ let notification = new Gio.Notification({ title: summary });
+ this._app.send_notification(null, notification);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]