Am Donnerstag, 20. Juli 2006 15:27, schrieb Allen Winter: > On Thursday 20 July 2006 09:20, Friedrich W. H. Kossebau wrote: > > Hi, > > > > is there a way to investigate a folder in KMail by DCOP? E.g. to find out > > if there are any unread messages (and how many?) > > You should be able to borrow code from the Kontact KMail Summary plugin. > See kontact/plugins/kmail/summarywidget.cpp Have it working, except for the fact that... The DCOP signal "unreadCountChanged" is not really supported by KMail :( For one there is the DCOP-Signal void unreadCountChanged( const QString& folderURL, int numUnread ); declared in KMailIface, but never emitted in KMail. Too sad, would have liked it to get all important data by push. "unreadCountChanged()" without arguments gets emitted only in "slotMailChecked(...)". But not e.g. when an unread email gets selected and thus turns to "read". It works for the Kontact summary plugin, because the summary is only shown if no other part like the KMail one is in front. And when one switches back to the summary all the summary plugins are asked to update. There even seems to special support for this with the "timeOfLastMessageCountChange()" DCOP method in KMail. Oh, what a dirty hack :) I have no KMail insight, no 3.5 developing environment setup. And tagging is on monday :( You can own yourself a beer at akademy if you commit kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", QByteArray() ); to all places where the number is affected :) A beer and also a chocolate if you even add the signal void unreadCountChanged( const QString& folderURL, int numUnread ); where needed. Regards Friedrich _______________________________________________ kde-pim mailing list kde-pim@kde.org https://mail.kde.org/mailman/listinfo/kde-pim kde-pim home page at http://pim.kde.org/