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
@@ -842,16 +842,18 @@ bool ExternalAppHandler::mailToOneContact( const QString& name, const QString& e
//KMessageBox::sorry( 0,list[i]);
++i;
}
} else {
proc->addArgument(message );
}
parameters = translateMessage(parameters, name, emailadress);
+
+ //KMessageBox::information(0,parameters);
proc->addArgument( parameters );
proc->launch("");
#endif
return true;
}
/**************************************************************************
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index b7929ec..5708dfc 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -107,17 +107,17 @@ void KSyncManager::fillSyncMenu()
config.setGroup("General");
QStringList prof = config.readListEntry("SyncProfileNames");
mLocalMachineName = config.readEntry("LocalMachineName","undefined");
if ( prof.count() < 2 ) {
prof.clear();
QString externalName;
#ifdef DESKTOP_VERSION
#ifdef _WIN32_
- externalName = "OutLook(not_implemented)";
+ externalName = "OutLook";
#else
externalName = "KDE_Desktop";
#endif
#else
externalName = "Sharp_DTM";
#endif
prof << externalName;
prof << i18n("Local_file");
@@ -138,17 +138,17 @@ void KSyncManager::fillSyncMenu()
mExternSyncProfiles = config.readListEntry("ExternSyncProfiles");
mSyncProfileNames = prof;
unsigned int i;
for ( i = 0; i < prof.count(); ++i ) {
QString insertText = prof[i];
if ( i == 0 ) {
#ifdef DESKTOP_VERSION
#ifdef _WIN32_
- insertText = "OutLook(not_implemented)";
+ insertText = "OutLook";
#else
insertText = "KDE_Desktop";
#endif
#else
insertText = "Sharp_DTM";
#endif
}
mSyncMenu->insertItem( insertText, 1000+i );
@@ -929,18 +929,84 @@ void KSyncManager::confSync()
mLocalMachineName = sp->getLocalMachineName ();
uint ii;
for ( ii = 0; ii < oldSyncProfileNames.count(); ++ii ) {
if ( ! mSyncProfileNames.contains( oldSyncProfileNames[ii] ) )
mImplementation->removeSyncInfo( oldSyncProfileNames[ii] );
}
QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
}
+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;
emit save();
switch(mTargetApp)
{
case (KAPI):
{
#ifdef DESKTOP_VERSION
QString command = "kdeabdump33";
@@ -1027,16 +1093,17 @@ void KSyncManager::syncKDE()
case (PWMPI):
break;
default:
qDebug("KSM::slotSyncMenu: invalid apptype selected");
break;
}
+#endif
}
void KSyncManager::syncSharp()
{
if ( ! syncExternalApplication("sharp") )
qDebug("KSM::ERROR sync sharp ");
}
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 04cdade..71d17e9 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -198,16 +198,17 @@ class KSyncManager : public QObject
QString mCurrentSyncDevice;
QString mCurrentSyncName;
void quickSyncLocalFile();
bool syncWithFile( QString fn , bool quick );
void syncLocalFile();
void syncPhone();
void syncSharp();
void syncKDE();
+ void syncOL();
bool syncExternalApplication(QString);
int mCurrentSyncProfile ;
void syncRemote( KSyncProfile* prof, bool ask = true);
bool edit_sync_options();
bool edit_pisync_options();
int ringSync();
QString getPassword( );
bool mPisyncFinished;
@@ -236,14 +237,12 @@ class KSyncInterface
virtual void removeSyncInfo( QString syncProfile) = 0;
virtual bool sync(KSyncManager* manager, QString filename, int mode, QString resource) = 0;
virtual bool syncExternal(KSyncManager* /*manager*/, QString /*resource*/)
{
// empty implementation, because some syncable applications do not
// have an external(sharpdtm) syncmode, like pwmanager.
return false;
}
-
-
};
#endif
diff --git a/libkdepim/libkdepim.pro b/libkdepim/libkdepim.pro
index 84af7ad..7160d0e 100644
--- a/libkdepim/libkdepim.pro
+++ b/libkdepim/libkdepim.pro
@@ -53,9 +53,24 @@ SOURCES = \
kprefswidget.cpp \
ksyncmanager.cpp \
ksyncprofile.cpp \
ksyncprefsdialog.cpp \
kcmconfigs/kcmkdepimconfig.cpp \
kcmconfigs/kdepimconfigwidget.cpp \
phoneaccess.cpp
+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
+}
+}