From 64cfb8daa16a49cd5cd4b2d2344d85db31739c0e Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 15 Mar 2017 18:42:51 +0100 Subject: Start of a notifications framework --- components/mail/contents/ui/Mail.qml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'components') diff --git a/components/mail/contents/ui/Mail.qml b/components/mail/contents/ui/Mail.qml index ff0e8c5c..334e5a96 100644 --- a/components/mail/contents/ui/Mail.qml +++ b/components/mail/contents/ui/Mail.qml @@ -27,6 +27,7 @@ import org.kde.kirigami 1.0 as Kirigami import org.kube.framework.actions 1.0 as KubeAction import org.kube.framework.settings 1.0 as KubeSettings import org.kube.framework.domain 1.0 as KubeFramework +import org.kube.framework.notifications 1.0 as KubeNotifications import org.kube.components 1.0 as KubeComponents import org.kube.components.accounts 1.0 as KubeAccounts @@ -40,6 +41,16 @@ Controls2.ApplicationWindow { visible: true + KubeNotifications.NotificationHandler { + id: notificationHandler + function handler(n) { + console.warn("We got a notification: ", n.message) + if (n.type == KubeNotifications.Notification.Warning) { + console.warn("And it's a warning!", n.type) + } + } + } + //BEGIN Actions KubeAction.Context { id: maillistcontext -- cgit v1.2.3