summaryrefslogtreecommitdiffabout
path: root/libkdepim
Side-by-side diff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/externalapphandler.cpp2
-rw-r--r--libkdepim/ksyncmanager.cpp71
-rw-r--r--libkdepim/ksyncmanager.h3
-rw-r--r--libkdepim/libkdepim.pro15
4 files changed, 87 insertions, 4 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp
index 59be506..f376e6c 100644
--- a/libkdepim/externalapphandler.cpp
+++ b/libkdepim/externalapphandler.cpp
@@ -849,2 +849,4 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
parameters = translateMessage(parameters, name, emailadress);
+
+ //KMessageBox::information(0,parameters);
proc->addArgument( parameters );
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index b7929ec..5708dfc 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -114,3 +114,3 @@ void KSyncManager::fillSyncMenu()
#ifdef _WIN32_
- externalName = "OutLook(not_implemented)";
+ externalName = "OutLook";
#else
@@ -145,3 +145,3 @@ void KSyncManager::fillSyncMenu()
#ifdef _WIN32_
- insertText = "OutLook(not_implemented)";
+ insertText = "OutLook";
#else
@@ -936,4 +936,70 @@ void KSyncManager::confSync()
}
+void KSyncManager::syncOL()
+{
+ mSyncWithDesktop = true;
+ emit save();
+ switch(mTargetApp)
+ {
+ case (KAPI):
+ {
+ syncExternalApplication("ol");
+ }
+ break;
+ case (KOPI):
+ {
+#ifdef DESKTOP_VERSION
+ QString command = "kdecaldump33";
+ QString commandfile = "kdecaldump33";
+ QString commandpath = qApp->applicationDirPath () + "/";
+#else
+ QString command = "kdecaldump33";
+ QString commandfile = "kdecaldump33";
+ QString commandpath = QDir::homeDirPath ()+"/";
+#endif
+ if ( ! QFile::exists ( commandpath+commandfile ) )
+ command = commandfile;
+ else
+ command = commandpath+commandfile;
+
+ QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics";
+ int result = system ( command.latin1());
+ qDebug("Cal dump 33 command call result result: %d ", result);
+ if ( result != 0 ) {
+ qDebug("Calling CAL dump version 33 failed. Trying 34... ");
+ commandfile = "kdecaldump34";
+ if ( ! QFile::exists ( commandpath+commandfile ) )
+ command = commandfile;
+ else
+ command = commandpath+commandfile;
+ result = system ( command.latin1());
+ qDebug("Cal dump 34 command call result result: %d ", result);
+ if ( result != 0 ) {
+ KMessageBox::error( 0, i18n("Error accessing KDE calendar data.\nMake sure the file\n%1kdecaldump3x\nexists ( x = 3 or 4 ).\nSupported KDE versions are 3.3 and 3.4.\nUsed version should be auto detected.\n").arg( commandpath ));
+ return;
+ }
+ }
+ if ( syncWithFile( fileName,true ) ) {
+ if ( mWriteBackFile ) {
+ command += " --read";
+ system ( command.latin1());
+ }
+ }
+
+ }
+ break;
+ case (PWMPI):
+
+ break;
+ default:
+ qDebug("KSM::slotSyncMenu: invalid apptype selected");
+ break;
+
+ }
+}
void KSyncManager::syncKDE()
{
+#ifdef _WIN32_
+ syncOL();
+#else
+
mSyncWithDesktop = true;
@@ -1034,2 +1100,3 @@ void KSyncManager::syncKDE()
}
+#endif
}
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 04cdade..71d17e9 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -205,2 +205,3 @@ class KSyncManager : public QObject
void syncKDE();
+ void syncOL();
bool syncExternalApplication(QString);
@@ -243,4 +244,2 @@ class KSyncInterface
}
-
-
};
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index 84af7ad..7160d0e 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -60,2 +60,17 @@ SOURCES = \
+win32: {
+#olimport section
+importol {
+debug: {
+LIBS += mfc71ud.lib
+}
+release: {
+LIBS += mfc71u.lib
+}
+DEFINES += _OL_IMPORT_
+HEADERS += ol_access.h
+SOURCES += ol_access.cpp
+#olimport section end
+}
+}