diff --git a/kmkernel.cpp b/kmkernel.cpp index 27a1855c0..76805d748 100644 --- a/kmkernel.cpp +++ b/kmkernel.cpp @@ -194,6 +194,10 @@ KMKernel::KMKernel (QObject *parent, const char *name) : mCollectionModel->setDynamicSortFilter( true ); mCollectionModel->setSortCaseSensitivity( Qt::CaseInsensitive ); + + connect( folderCollectionMonitor(), SIGNAL(collectionChanged(Akonadi::Collection,QSet)), + SLOT(slotCollectionChanged(Akonadi::Collection,QSet)) ); + connect( MailTransport::TransportManager::self(), SIGNAL(transportRemoved(int,QString)), SLOT(transportRemoved(int,QString)) ); @@ -2099,4 +2103,13 @@ void KMKernel::showFolder(const QString &collectionId) } } +void KMKernel::slotCollectionChanged(const Akonadi::Collection &, const QSet &set) +{ + if(set.contains("newmailnotifierattribute")) { + if ( mSystemTray ) { + mSystemTray->updateSystemTray(); + } + } +} + #include "kmkernel.moc" diff --git a/kmkernel.h b/kmkernel.h index aefd5cba8..6d359e172 100644 --- a/kmkernel.h +++ b/kmkernel.h @@ -484,6 +484,7 @@ private slots: void slotDeleteIdentity( uint identity); void slotInstanceRemoved(const Akonadi::AgentInstance&); void slotSystemNetworkStatusChanged( Solid::Networking::Status ); + void slotCollectionChanged(const Akonadi::Collection &, const QSet &set); private: void resourceGoOnLine();