--Boundary-00=_+VvA/S1hbTM4pNe Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 02 July 2003 13:48, Bo Thorsen wrote: > On Monday 30 June 2003 17:19, Marc TAIEB wrote: > > Hello, > > > > I've created 2 patches for kmail. > > With them, you can consult with Korganizer your exchange calendar. > > KMail people: The two patches attached were sent to the kde-pim list. > > The kmgroupware.cpp looks fine to me, but I don't understand mimetypes, so > I can't really say anything for sure. > > I have a couple of problems with the changes to kmailicalifaceimpl.cpp > though. > > Index: kmailicalifaceimpl.cpp > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/taiebma/kde/cvsroot/kdepim/kmail/kmailicalifaceimpl.cpp,v > retrieving revision 1.12 > diff -U1 -r1.12 kmailicalifaceimpl.cpp > --- kmailicalifaceimpl.cpp 11 Jun 2003 11:06:30 -0000 1.12 > +++ kmailicalifaceimpl.cpp 30 Jun 2003 15:12:27 -0000 > @@ -30,2 +30,3 @@ > #include "kmfolderindex.h" > +#include "kmfolderimap.h" > #include "kmmsgdict.h" > @@ -57,2 +58,3 @@ > QObject* gw =3D &kernel->groupware(); > + mFolderLanguage =3D 0; // default =3D english > connect( gw, SIGNAL( signalRefresh( const QString& ) ), > > Doesn't hurt, but it also doesn't do much. If the resource active, it will > be overridden in readConfig. If you do want to have this (valgrind?) then > please make it an initialization like the rest in the constructor chain. When Kmail start with the resource active it call folderName one time befor= e=20 mFolderLanguage has been initialized. So sometimes it cracsh at the beginin= g. But you right, I will use the constructor chain. > > @@ -120,4 +122,11 @@ > bool unget =3D !folder->isMessage(i); > - if( KMGroupware::vPartFoundAndDecoded( folder->getMsg( i ), s ) ) > - ilist << s; > + if (folder->folderType() =3D=3D KMFolderTypeImap) { > + KMFolderImap *imap =3D static_cast(folder); > + if( KMGroupware::vPartFoundAndDecoded( imap->getMsg( i ), s ) ) > + ilist << s; > + } > + else { > + if( KMGroupware::vPartFoundAndDecoded( folder->getMsg( i ), s ) ) > + ilist << s; > + } > if( unget ) folder->unGetMsg(i); > > This doesn't make sense to me at all. What are you trying to do? And why > are you even concerned with KMFolderImap when you say it only works for > KMFolderCachedImap? I am sorry, you right, this code is a rest of my tests.=20 In fact, if you use only Imap account, the getMsg function return the heade= r=20 of the "calendar mail". And when you use a cachedimap account getMsg return= =20 the full message with the VCALENDAR section. And if you don't have this=20 section the list of incidences is empty. > > @@ -258,3 +267,3 @@ > // For now: 0->English, 1->German > -static QMap folderNames[2]; > +static QMap folderNames[3]; > QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int > language ) const @@ -289,2 +298,9 @@ > folderNames[1][KFolderTreeItem::Notes] =3D > QString::fromLatin1("Notizen"); + > + // French (TODO: Journals) > + folderNames[2][KFolderTreeItem::Calendar] =3D > QString::fromLatin1("Calendrier"); + =20 > folderNames[2][KFolderTreeItem::Tasks] =3D QString::fromLatin1("T=E2ches"= ); + =20 > folderNames[2][KFolderTreeItem::Journals] =3D > QString::fromLatin1("Journal"); + =20 > folderNames[2][KFolderTreeItem::Contacts] =3D > QString::fromLatin1("Contacts"); + =20 > folderNames[2][KFolderTreeItem::Notes] =3D QString::fromLatin1("Notes"); } > @@ -347,3 +363,3 @@ > unsigned int folderLanguage =3D options.readNumEntry( "Folder Language= ", 0 > ); - if( folderLanguage > 1 ) folderLanguage =3D 0; > + if( folderLanguage > 2 ) folderLanguage =3D 0; > QString parentName =3D options.readEntry("Folder Parent"); > > This change is fine. We really need it to be a standard localization of t= he > folder name at some point, but your patch looks fine. Except that there is > another if( folderLanguage... ) at line 292 (without your patch). Thank you I'll do this > > > Note that it only works with cachedimap. > > I thought I removed this problem completely? What exactly does not work > without cached imap? It probably doesn't make sense at all to use KMail > as a storage resource unless it's dIMAP, but I still won't allow the thing > not to work with local folders. There is no coding tie to dIMAP, so if > it doesn't work, that would indicate a bug. The problem is that the body of a message is not in local with standard IMA= P. So when getMsg is called, it return only the header of the message. > > Bo. I submit the new patch too. Thank you. Marc TAIEB Regards --Boundary-00=_+VvA/S1hbTM4pNe Content-Type: text/x-diff; charset="iso-8859-1"; name="kmailicalifaceimpl.cpp-patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="kmailicalifaceimpl.cpp-patch" Index: kmailicalifaceimpl.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/taiebma/kde/cvsroot/kdepim/kmail/kmailicalifaceimpl.cpp,v retrieving revision 1.12 diff -U1 -r1.12 kmailicalifaceimpl.cpp =2D-- kmailicalifaceimpl.cpp 11 Jun 2003 11:06:30 -0000 1.12 +++ kmailicalifaceimpl.cpp 2 Jul 2003 15:03:37 -0000 @@ -30,2 +30,3 @@ #include "kmfolderindex.h" +#include "kmfolderimap.h" #include "kmmsgdict.h" @@ -54,3 +55,3 @@ mContacts( 0 ), mCalendar( 0 ), mNotes( 0 ), mTasks( 0 ), mJournals( 0= ), =2D mUseResourceIMAP( false ) + mUseResourceIMAP( false ), mFolderLanguage (0) { @@ -258,3 +259,3 @@ // For now: 0->English, 1->German =2Dstatic QMap folderNames[2]; +static QMap folderNames[3]; QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int la= nguage ) const @@ -289,5 +290,12 @@ folderNames[1][KFolderTreeItem::Notes] =3D QString::fromLatin1("Notize= n"); + + // French (TODO: Journals) + folderNames[2][KFolderTreeItem::Calendar] =3D QString::fromLatin1("Cal= endrier"); + folderNames[2][KFolderTreeItem::Tasks] =3D QString::fromLatin1("T=E2ch= es"); + folderNames[2][KFolderTreeItem::Journals] =3D QString::fromLatin1("Jou= rnal"); + folderNames[2][KFolderTreeItem::Contacts] =3D QString::fromLatin1("Con= tacts"); + folderNames[2][KFolderTreeItem::Notes] =3D QString::fromLatin1("Notes"= ); } =20 =2D if( language =3D=3D -1 || language > 1 ) return folderNames[mFolderLan= guage][type]; + if( language =3D=3D -1 || language > 2 ) return folderNames[mFolderLangu= age][type]; else return folderNames[language][type]; @@ -347,3 +355,3 @@ unsigned int folderLanguage =3D options.readNumEntry( "Folder Language",= 0 ); =2D if( folderLanguage > 1 ) folderLanguage =3D 0; + if( folderLanguage > 2 ) folderLanguage =3D 0; QString parentName =3D options.readEntry("Folder Parent"); --Boundary-00=_+VvA/S1hbTM4pNe Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ KMail Developers mailing list kmail@mail.kde.org http://mail.kde.org/mailman/listinfo/kmail --Boundary-00=_+VvA/S1hbTM4pNe--