From 8e987c1cf8fa21e7ace1ec2cf88267294e122a3b Mon Sep 17 00:00:00 2001 From: Patrick von Reth Date: Mon, 27 Jan 2014 17:51:45 +0100 Subject: [PATCH] more debug output, and added support for close notification to win8 backend --- share/snoretoast/SnoreToast.exe | Bin 83968 -> 86016 bytes src/core/notification/CMakeLists.txt | 2 +- src/core/notification/notification.cpp | 27 ++++++++++++++++++ src/core/notification/notification.h | 17 +++++++---- src/core/notification/notification_p.h | 5 +++- .../backends/snoretoast/snoretoast.cpp | 23 +++++++++++++-- src/plugins/backends/snoretoast/snoretoast.h | 1 + 7 files changed, 65 insertions(+), 10 deletions(-) diff --git a/share/snoretoast/SnoreToast.exe b/share/snoretoast/SnoreToast.exe index 96d70d2cb0f0622a5c350788c5d249e688fe40bf..eb45738cd50b765189ece9a3f3691d40e0452a6d 100644 GIT binary patch delta 18592 zcmeHudt6mj7XP_d#EYV!f})_HqN1Xn`+h%EP<)`*7h;;Cqjn=kNkP%HOCc#;Zj#&5 z(hSXv%4Sf=$gHl(2$dBT<4~Gek)1m_MGa##IdgyCb?yUXn$Pd?$M5&g@Az3~t-bcz zYp=ET+K;m@7FYBvuIyQzBpI3LzP^A9Jl8m>q>m($_w4bUs*!dEUL&scN%>}7ZGNbK58z;zA*v7dEoAyQ|vMb?3rS_tlj&O-oQo#C;AI%aY zl6#^_aZycnid!Q6d=UF?+&HmrDw`HDY1YBM9QSieyvKI8Xb?Kcaur5SD3mQZ_iw4| zmn`9*JveTsr(p28>(VS=q0FcC#p)iiaV7PUJuZ~Z2wS=0?spdNzR!dqe?cr=7tmK2m*x7g<>9@s3Qsb1cf;e|Z zSXpl$@5+=3L;vmbxzc5>Zz)_3&tMzpD~$H38{w+3;-5ZWNxjU~=!>nR@>@ulT%Rx2 zgt$>;#c{utE|b9QhVYmY8&?pKC1foWJq=iO@uJ2r>VNykQMSbO3%R&ykZXFhtzdW$ zk3DNiX#8&UEAY5!-H|(Y#*h}FN#mzpS&$_vfBM(FE zi!FxnOWdY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p()Wc!!*yd$dqMTgRHe7Z+9VQYml=p #include using namespace Snore; @@ -174,5 +175,31 @@ QDataStream &operator<< ( QDataStream &stream, const Notification ¬i ) return stream; } +QDebug operator <<(QDebug debug, const Snore::Notification::CloseReasons &flags) +{ + static QMetaEnum e = Notification::staticMetaObject.property(Notification::staticMetaObject.indexOfProperty("closeReason")).enumerator(); + debug.nospace() << "CloseReasons("; + bool needSeparator = false; + int key; + for (int i = 0; i < e.keyCount(); ++i) + { + key = e.value(i); + if (flags.testFlag((Notification::CloseReason)key)) + { + if (needSeparator) + { + debug.nospace() << '|'; + } + else + { + needSeparator = true; + } + debug.nospace() << e.valueToKey(key); + + } + } + debug << ')'; + return debug.space(); +} diff --git a/src/core/notification/notification.h b/src/core/notification/notification.h index 6d864be..9d5a01d 100644 --- a/src/core/notification/notification.h +++ b/src/core/notification/notification.h @@ -43,9 +43,13 @@ class NotificationData; class SNORE_EXPORT Notification { + /* + Q_OBJECT + */ + Q_GADGET + Q_PROPERTY(CloseReasons closeReason READ closeReason) friend class NotificationData; public: - /** * The reason why the Notification was closed. */ @@ -54,25 +58,26 @@ public: /** * The default value, the notification was not closed. */ - NONE = 0x0, + NONE = 0, /** * The Notification was closed becaouse it timed out. */ - TIMED_OUT = 0x1, + TIMED_OUT = 1, /** * The Notification was dismissed by the user, close button. */ - DISMISSED = 0x2, + DISMISSED = 2, /** * The Notification was closed after an action was invoked. * @see actionInvoked() */ - CLOSED = 0x4 + CLOSED = 3 }; Q_DECLARE_FLAGS(CloseReasons, CloseReason) + Q_ENUMS(CloseReasons) /** * The Priority for the Notification. @@ -283,6 +288,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(Snore::Notification::Prioritys) QDataStream &operator<< ( QDataStream & stream, const Snore::Notification & noti ); +SNORE_EXPORT QDebug operator<< ( QDebug, const Snore::Notification::CloseReasons &); + inline QDebug operator<< ( QDebug debug, const Snore::Notification ¬i ) { if(noti.isValid()) diff --git a/src/core/notification/notification_p.h b/src/core/notification/notification_p.h index 7c1570f..7168ffe 100644 --- a/src/core/notification/notification_p.h +++ b/src/core/notification/notification_p.h @@ -32,9 +32,11 @@ namespace Snore{ + class SNORE_EXPORT NotificationData : public QSharedData { -friend class Notification; + + friend class Notification; public: NotificationData ( const Application &application,const Alert &alert,const QString &title,const QString &text,const Icon &icon, int timeout,Notification::Prioritys priority ); @@ -53,6 +55,7 @@ public: void setCloseReason(Notification::CloseReasons r); + QTimer *timeoutTimer(); private: diff --git a/src/plugins/backends/snoretoast/snoretoast.cpp b/src/plugins/backends/snoretoast/snoretoast.cpp index dbc88f7..61616a2 100644 --- a/src/plugins/backends/snoretoast/snoretoast.cpp +++ b/src/plugins/backends/snoretoast/snoretoast.cpp @@ -17,7 +17,7 @@ Q_EXPORT_PLUGIN2(libsnore_backend_snoretoast,SnoreToast) SnoreToast::SnoreToast(): - SnoreBackend("Windows 8",false,false) + SnoreBackend("Windows 8", true, false) { } @@ -57,8 +57,9 @@ void SnoreToast::slotNotify(Notification notification) } arguements << "-w" << "-appID" - << appId(notification.application()); - ; + << appId(notification.application()) + << "-id" + << QString::number(notification.id()); if(notification.hints().value("silent",true).toBool()) { arguements << "-silent"; @@ -89,6 +90,22 @@ void SnoreToast::slotRegisterApplication(const Application &application) } } +void SnoreToast::slotCloseNotification(Notification notification) +{ + QProcess *p = new QProcess(this); + p->setReadChannelMode(QProcess::MergedChannels); + + QStringList arguements; + arguements << "-close" + << "-id" + << QString::number(notification.id()); + snoreDebug( SNORE_DEBUG ) << "SnoreToast" << arguements; + p->start("SnoreToast", arguements); + + connect(p,SIGNAL(finished(int,QProcess::ExitStatus)),this,SLOT(slotToastNotificationClosed(int,QProcess::ExitStatus))); + connect(qApp,SIGNAL(aboutToQuit()),p,SLOT(kill())); +} + void SnoreToast::slotToastNotificationClosed(int code, QProcess::ExitStatus) { QProcess *p = qobject_cast(sender()); diff --git a/src/plugins/backends/snoretoast/snoretoast.h b/src/plugins/backends/snoretoast/snoretoast.h index 5a2357a..6cff5a3 100644 --- a/src/plugins/backends/snoretoast/snoretoast.h +++ b/src/plugins/backends/snoretoast/snoretoast.h @@ -17,6 +17,7 @@ public: public slots: void slotNotify(Snore::Notification notification); void slotRegisterApplication(const Snore::Application &application); + void slotCloseNotification ( Snore::Notification notification ); private slots: void slotToastNotificationClosed(int code, QProcess::ExitStatus);