[gnome-shell/wip/cosimoc/notification-refactor: 9/11] notificationDaemon: separate out GtkNotification creation
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/cosimoc/notification-refactor: 9/11] notificationDaemon: separate out GtkNotification creation
- Date: Sat, 10 Nov 2018 10:57:05 +0000 (UTC)
commit 80a75471291c39000e858970f9327b02a0060658
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Wed Oct 10 17:28:43 2018 -0700
notificationDaemon: separate out GtkNotification creation
This way, source subclasses can easily use a notification subclass
if different functionality is required.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/258
js/ui/notificationDaemon.js | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js
index 81d3e3ae3..4d2be44ed 100644
--- a/js/ui/notificationDaemon.js
+++ b/js/ui/notificationDaemon.js
@@ -660,6 +660,10 @@ var GtkNotificationDaemonAppSource = new Lang.Class({
return new FdoApplicationProxy(Gio.DBus.session, this._appId, this._objectPath, callback);
},
+ _createNotification(params) {
+ return new GtkNotificationDaemonNotification(this, params);
+ },
+
activateAction(actionId, target) {
this._createApp((app, error) => {
if (error == null)
@@ -688,7 +692,7 @@ var GtkNotificationDaemonAppSource = new Lang.Class({
if (this._notifications[notificationId])
this._notifications[notificationId].destroy();
- let notification = new GtkNotificationDaemonNotification(this, notificationParams);
+ let notification = this._createNotification(notificationParams);
notification.connect('destroy', () => {
delete this._notifications[notificationId];
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]