as SnoreToast has been renamed rename it in the default loading

This commit is contained in:
Patrick von Reth 2013-11-20 17:36:22 +01:00
parent 2c65c71309
commit e0e74c1011
3 changed files with 8 additions and 36 deletions

View File

@ -213,9 +213,9 @@ bool SnoreCore::setPrimaryNotificationBackend()
{
QStringList backends = notificationBackends();
#ifdef Q_OS_WIN
if(QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS8 && backends.contains("SnoreToast"))
if(QSysInfo::windowsVersion() == QSysInfo::WV_WINDOWS8 && backends.contains("Windows 8"))
{
if(setPrimaryNotificationBackend("SnoreToast"))
if(setPrimaryNotificationBackend("Windows 8"))
return true;
}
if( backends.contains("Growl"))
@ -246,10 +246,11 @@ bool SnoreCore::setPrimaryNotificationBackend()
return false;
}
const QString &SnoreCore::primaryNotificationBackend(){
if(m_notificationBackend == NULL){
static QString none;
return none;
const QString SnoreCore::primaryNotificationBackend()
{
if(m_notificationBackend == NULL)
{
return QString();
}
return m_notificationBackend->name();
}

View File

@ -61,7 +61,7 @@ public:
bool setPrimaryNotificationBackend( const QString &backend );
bool setPrimaryNotificationBackend();
const QString &primaryNotificationBackend();
const QString primaryNotificationBackend();
QSystemTrayIcon *trayIcon();
Notification getActiveNotificationByID(uint id);

View File

@ -1,29 +0,0 @@
#ifndef TOASTER_H
#define TOASTER_H
#include "core/plugins/snorebackend.h"
class SnoreToast : public Snore::SnoreBackend
{
Q_OBJECT
Q_INTERFACES(Snore::SnoreBackend)
public:
SnoreToast();
~SnoreToast();
bool init(Snore::SnoreCore *snore);
// SnoreBackend interface
public slots:
void registerApplication(Snore::Application *application);
void unregisterApplication(Snore::Application *application);
uint notify(Snore::Notification notification);
void closeNotification(Snore::Notification notification);
private slots:
void slotToastNotificationClosed(int code, QProcess::ExitStatus);
};
#endif // TOASTER_H