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

List:       kmail-devel
Subject:    Re: Patch for IMAP Calendar and Exchange
From:       Marc TAIEB <TAIEBMA () e-i ! com>
Date:       2003-07-16 7:39:57
[Download RAW message or body]

Hello,

You didn't answer me. Are you agree with me ?

By

Marc

On Wednesday 02 July 2003 17:08, Marc TAIEB wrote:
> 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
> > ===================================================================
> > 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 = &kernel->groupware();
> > +  mFolderLanguage = 0;  //  default = 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
> before mFolderLanguage has been initialized. So sometimes it cracsh at the
> begining. But you right, I will use the constructor chain.
>
> > @@ -120,4 +122,11 @@
> >      bool unget = !folder->isMessage(i);
> > -    if( KMGroupware::vPartFoundAndDecoded( folder->getMsg( i ), s ) )
> > -      ilist << s;
> > +    if (folder->folderType() == KMFolderTypeImap) {
> > +	KMFolderImap *imap = static_cast<KMFolderImap*>(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.
> In fact, if you use only Imap account, the getMsg function return the
> header of the "calendar mail". And when you use a cachedimap account getMsg
> return the full message with the VCALENDAR section. And if you don't have
> this section the list of incidences is empty.
>
> > @@ -258,3 +267,3 @@
> >  // For now: 0->English, 1->German
> > -static QMap<KFolderTreeItem::Type,QString> folderNames[2];
> > +static QMap<KFolderTreeItem::Type,QString> folderNames[3];
> >  QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int
> > language ) const @@ -289,2 +298,9 @@
> >      folderNames[1][KFolderTreeItem::Notes] =
> > QString::fromLatin1("Notizen"); +
> > +    // French (TODO: Journals)
> > +    folderNames[2][KFolderTreeItem::Calendar] =
> > QString::fromLatin1("Calendrier"); +
> > folderNames[2][KFolderTreeItem::Tasks] = QString::fromLatin1("Tāches"); +
> >  folderNames[2][KFolderTreeItem::Journals] =
> > QString::fromLatin1("Journal"); +
> > folderNames[2][KFolderTreeItem::Contacts] =
> > QString::fromLatin1("Contacts"); +
> > folderNames[2][KFolderTreeItem::Notes] = QString::fromLatin1("Notes"); }
> > @@ -347,3 +363,3 @@
> >    unsigned int folderLanguage = options.readNumEntry( "Folder Language",
> > 0 ); -  if( folderLanguage > 1 ) folderLanguage = 0;
> > +  if( folderLanguage > 2 ) folderLanguage = 0;
> >    QString parentName = options.readEntry("Folder Parent");
> >
> > This change is fine. We really need it to be a standard localization of
> > the 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
> IMAP. 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

["kmailicalifaceimpl.cpp-patch" (text/x-diff)]

Index: kmailicalifaceimpl.cpp
===================================================================
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	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 ),
-    mUseResourceIMAP( false )
+    mUseResourceIMAP( false ), mFolderLanguage (0)
 {
@@ -258,3 +259,3 @@
 // For now: 0->English, 1->German
-static QMap<KFolderTreeItem::Type,QString> folderNames[2];
+static QMap<KFolderTreeItem::Type,QString> folderNames[3];
 QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const
@@ -289,5 +290,12 @@
     folderNames[1][KFolderTreeItem::Notes] = QString::fromLatin1("Notizen");
+
+    // French (TODO: Journals)
+    folderNames[2][KFolderTreeItem::Calendar] = QString::fromLatin1("Calendrier");
+    folderNames[2][KFolderTreeItem::Tasks] = QString::fromLatin1("Tāches");
+    folderNames[2][KFolderTreeItem::Journals] = QString::fromLatin1("Journal");
+    folderNames[2][KFolderTreeItem::Contacts] = QString::fromLatin1("Contacts");
+    folderNames[2][KFolderTreeItem::Notes] = QString::fromLatin1("Notes");
   }
 
-  if( language == -1 || language > 1 ) return folderNames[mFolderLanguage][type];
+  if( language == -1 || language > 2 ) return folderNames[mFolderLanguage][type];
   else return folderNames[language][type];
@@ -347,3 +355,3 @@
   unsigned int folderLanguage = options.readNumEntry( "Folder Language", 0 );
-  if( folderLanguage > 1 ) folderLanguage = 0;
+  if( folderLanguage > 2 ) folderLanguage = 0;
   QString parentName = options.readEntry("Folder Parent");


_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail


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

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