[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] KDE3.5: Investigating a KMail folder by DCOP
From:       Ingo =?iso-8859-1?q?Kl=F6cker?= <kloecker () kde ! org>
Date:       2006-07-22 20:50:50
Message-ID: 200607222251.00670 () erwin ! ingo-kloecker ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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 
otherwise too many DCOP signals would be emitted. And it was/is good 
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. 
So you'll have to find someone else. :-)

Regards,
Ingo

[Attachment #5 (application/pgp-signature)]

_______________________________________________
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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic