summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2006-02-24 18:49:56 (UTC)
committer zautrix <zautrix>2006-02-24 18:49:56 (UTC)
commitd7738fdfc685192eb2f8317db6ffad3c246001c8 (patch) (unidiff)
treed9aae6ca97851fd1b53c4d9e74740a5ee2b69ea9 /libkdepim
parent987757f168bbae56100f2aff763b865e81ceec18 (diff)
downloadkdepimpi-d7738fdfc685192eb2f8317db6ffad3c246001c8.zip
kdepimpi-d7738fdfc685192eb2f8317db6ffad3c246001c8.tar.gz
kdepimpi-d7738fdfc685192eb2f8317db6ffad3c246001c8.tar.bz2
kapi sync
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
849 parameters = translateMessage(parameters, name, emailadress); 849 parameters = translateMessage(parameters, name, emailadress);
850
851 //KMessageBox::information(0,parameters);
850 proc->addArgument( parameters ); 852 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()
114#ifdef _WIN32_ 114#ifdef _WIN32_
115 externalName = "OutLook(not_implemented)"; 115 externalName = "OutLook";
116#else 116#else
@@ -145,3 +145,3 @@ void KSyncManager::fillSyncMenu()
145#ifdef _WIN32_ 145#ifdef _WIN32_
146 insertText = "OutLook(not_implemented)"; 146 insertText = "OutLook";
147#else 147#else
@@ -936,4 +936,70 @@ void KSyncManager::confSync()
936} 936}
937void KSyncManager::syncOL()
938{
939 mSyncWithDesktop = true;
940 emit save();
941 switch(mTargetApp)
942 {
943 case (KAPI):
944 {
945 syncExternalApplication("ol");
946 }
947 break;
948 case (KOPI):
949 {
950#ifdef DESKTOP_VERSION
951 QString command = "kdecaldump33";
952 QString commandfile = "kdecaldump33";
953 QString commandpath = qApp->applicationDirPath () + "/";
954#else
955 QString command = "kdecaldump33";
956 QString commandfile = "kdecaldump33";
957 QString commandpath = QDir::homeDirPath ()+"/";
958#endif
959 if ( ! QFile::exists ( commandpath+commandfile ) )
960 command = commandfile;
961 else
962 command = commandpath+commandfile;
963
964 QString fileName = QDir::homeDirPath ()+"/.kdecalendardump.ics";
965 int result = system ( command.latin1());
966 qDebug("Cal dump 33 command call result result: %d ", result);
967 if ( result != 0 ) {
968 qDebug("Calling CAL dump version 33 failed. Trying 34... ");
969 commandfile = "kdecaldump34";
970 if ( ! QFile::exists ( commandpath+commandfile ) )
971 command = commandfile;
972 else
973 command = commandpath+commandfile;
974 result = system ( command.latin1());
975 qDebug("Cal dump 34 command call result result: %d ", result);
976 if ( result != 0 ) {
977 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 ));
978 return;
979 }
980 }
981 if ( syncWithFile( fileName,true ) ) {
982 if ( mWriteBackFile ) {
983 command += " --read";
984 system ( command.latin1());
985 }
986 }
987
988 }
989 break;
990 case (PWMPI):
991
992 break;
993 default:
994 qDebug("KSM::slotSyncMenu: invalid apptype selected");
995 break;
996
997 }
998}
937void KSyncManager::syncKDE() 999void KSyncManager::syncKDE()
938{ 1000{
1001#ifdef _WIN32_
1002 syncOL();
1003#else
1004
939 mSyncWithDesktop = true; 1005 mSyncWithDesktop = true;
@@ -1034,2 +1100,3 @@ void KSyncManager::syncKDE()
1034 } 1100 }
1101#endif
1035} 1102}
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
205 void syncKDE(); 205 void syncKDE();
206 void syncOL();
206 bool syncExternalApplication(QString); 207 bool syncExternalApplication(QString);
@@ -243,4 +244,2 @@ class KSyncInterface
243 } 244 }
244
245
246}; 245};
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 = \
60 60
61win32: {
61 62
63#olimport section
64importol {
65debug: {
66LIBS += mfc71ud.lib
67}
68release: {
69LIBS += mfc71u.lib
70}
71DEFINES += _OL_IMPORT_
72HEADERS += ol_access.h
73SOURCES += ol_access.cpp
74#olimport section end
75}
76}