From kde-pim Sat Jul 22 20:50:50 2006 From: Ingo =?iso-8859-1?q?Kl=F6cker?= Date: Sat, 22 Jul 2006 20:50:50 +0000 To: kde-pim Subject: Re: [Kde-pim] KDE3.5: Investigating a KMail folder by DCOP Message-Id: <200607222251.00670 () erwin ! ingo-kloecker ! de> X-MARC-Message: https://marc.info/?l=kde-pim&m=115360147130301 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============0906233112==" --===============0906233112== Content-Type: multipart/signed; boundary="nextPart1867427.2Q7U12BfHQ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1867427.2Q7U12BfHQ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Saturday 22 July 2006 19:58, Friedrich W. H. Kossebau wrote: > 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 :) Welcome to the wonderful world of KMail. This was added because=20 otherwise too many DCOP signals would be emitted. And it was/is good=20 enough for the summary. > 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. Too bad, but I will most likely not be able to attend aKademy this year.=20 So you'll have to find someone else. :-) Regards, Ingo --nextPart1867427.2Q7U12BfHQ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQBEwo+0GnR+RTDgudgRAvhPAJ4qH7pykRnITB4EeVVSl9dhegijdwCghyZs 2LGJx3Iemk0S7ScE6cYTlGs= =STy2 -----END PGP SIGNATURE----- --nextPart1867427.2Q7U12BfHQ-- --===============0906233112== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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/ --===============0906233112==--