summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp44
-rw-r--r--libkdepim/ksyncmanager.h1
2 files changed, 45 insertions, 0 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 5175f94..7ee56e4 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -99,7 +99,15 @@ void KSyncManager::fillSyncMenu()
99 mLocalMachineName = config.readEntry("LocalMachineName","undefined"); 99 mLocalMachineName = config.readEntry("LocalMachineName","undefined");
100 if ( prof.count() < 2 ) { 100 if ( prof.count() < 2 ) {
101 prof.clear(); 101 prof.clear();
102#ifdef DESKTOP_VERSION
103#ifdef _WIN32_
104 prof << i18n("OutLook(not_implemented)");
105#else
106 prof << i18n("KDE_Desktop");
107#endif
108#else
102 prof << i18n("Sharp_DTM"); 109 prof << i18n("Sharp_DTM");
110#endif
103 prof << i18n("Local_file"); 111 prof << i18n("Local_file");
104 prof << i18n("Last_file"); 112 prof << i18n("Last_file");
105 KSyncProfile* temp = new KSyncProfile (); 113 KSyncProfile* temp = new KSyncProfile ();
@@ -128,9 +136,11 @@ void KSyncManager::fillSyncMenu()
128 if ( mTargetApp == PWMPI) { 136 if ( mTargetApp == PWMPI) {
129 mSyncMenu->removeItem( 1000 ); 137 mSyncMenu->removeItem( 1000 );
130 } 138 }
139#ifndef DESKTOP_VERSION
131 else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { 140 else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) {
132 mSyncMenu->removeItem( 1000 ); 141 mSyncMenu->removeItem( 1000 );
133 } 142 }
143#endif
134 mSyncMenu->removeItem( 1002 ); 144 mSyncMenu->removeItem( 1002 );
135} 145}
136 146
@@ -186,7 +196,11 @@ void KSyncManager::slotSyncMenu( int action )
186 mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); 196 mWriteBackInFuture = temp->getWriteBackFutureWeeks( );
187 mShowSyncSummary = temp->getShowSummaryAfterSync(); 197 mShowSyncSummary = temp->getShowSummaryAfterSync();
188 if ( action == 1000 ) { 198 if ( action == 1000 ) {
199#ifdef DESKTOP_VERSION
200 syncKDE();
201#else
189 syncSharp(); 202 syncSharp();
203#endif
190 204
191 } else if ( action == 1001 ) { 205 } else if ( action == 1001 ) {
192 syncLocalFile(); 206 syncLocalFile();
@@ -741,6 +755,36 @@ void KSyncManager::confSync()
741 mLocalMachineName = sp->getLocalMachineName (); 755 mLocalMachineName = sp->getLocalMachineName ();
742 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); 756 QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) );
743} 757}
758void KSyncManager::syncKDE()
759{
760 emit save();
761 switch(mTargetApp)
762 {
763 case (KAPI):
764
765 break;
766 case (KOPI):
767 {
768 QString command ="./kdecaldump";
769 system ( command.latin1());
770 if ( syncWithFile( "/tmp/kdedumpall.ics",true ) ) {
771 if ( mWriteBackFile ) {
772 command += " --read";
773 system ( command.latin1());
774 }
775 }
776
777 }
778 break;
779 case (PWMPI):
780
781 break;
782 default:
783 qDebug("KSyncManager::slotSyncMenu: invalid apptype selected");
784 break;
785
786 }
787}
744 788
745void KSyncManager::syncSharp() 789void KSyncManager::syncSharp()
746{ 790{
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 9094aac..7d5b05e 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -170,6 +170,7 @@ class KSyncManager : public QObject
170 void syncLocalFile(); 170 void syncLocalFile();
171 void syncPhone(); 171 void syncPhone();
172 void syncSharp(); 172 void syncSharp();
173 void syncKDE();
173 bool syncExternalApplication(QString); 174 bool syncExternalApplication(QString);
174 int mCurrentSyncProfile ; 175 int mCurrentSyncProfile ;
175 void syncRemote( KSyncProfile* prof, bool ask = true); 176 void syncRemote( KSyncProfile* prof, bool ask = true);