-rw-r--r-- | libkdepim/ksyncmanager.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 85a2aeb..db815d6 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -129,26 +129,38 @@ void KSyncManager::fillSyncMenu() | |||
129 | temp->setName( prof[2] ); | 129 | temp->setName( prof[2] ); |
130 | temp->writeConfig(&config); | 130 | temp->writeConfig(&config); |
131 | config.setGroup("General"); | 131 | config.setGroup("General"); |
132 | config.writeEntry("SyncProfileNames",prof); | 132 | config.writeEntry("SyncProfileNames",prof); |
133 | config.writeEntry("ExternSyncProfiles",externalName); | 133 | config.writeEntry("ExternSyncProfiles",externalName); |
134 | config.sync(); | 134 | config.sync(); |
135 | delete temp; | 135 | delete temp; |
136 | } | 136 | } |
137 | mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); | 137 | mExternSyncProfiles = config.readListEntry("ExternSyncProfiles"); |
138 | mSyncProfileNames = prof; | 138 | mSyncProfileNames = prof; |
139 | unsigned int i; | 139 | unsigned int i; |
140 | for ( i = 0; i < prof.count(); ++i ) { | 140 | for ( i = 0; i < prof.count(); ++i ) { |
141 | mSyncMenu->insertItem( prof[i], 1000+i ); | 141 | QString insertText = prof[i]; |
142 | clearMenu->insertItem( prof[i], 1000+i ); | 142 | if ( i == 0 ) { |
143 | #ifdef DESKTOP_VERSION | ||
144 | #ifdef _WIN32_ | ||
145 | insertText = "OutLook(not_implemented)"; | ||
146 | #else | ||
147 | insertText = "KDE_Desktop"; | ||
148 | #endif | ||
149 | #else | ||
150 | insertText = "Sharp_DTM"; | ||
151 | #endif | ||
152 | } | ||
153 | mSyncMenu->insertItem( insertText, 1000+i ); | ||
154 | clearMenu->insertItem( insertText, 1000+i ); | ||
143 | if ( i == 2 ) | 155 | if ( i == 2 ) |
144 | mSyncMenu->insertSeparator(); | 156 | mSyncMenu->insertSeparator(); |
145 | } | 157 | } |
146 | QDir app_dir; | 158 | QDir app_dir; |
147 | //US do not display SharpDTM if app is pwmpi, or no sharpfiles available | 159 | //US do not display SharpDTM if app is pwmpi, or no sharpfiles available |
148 | if ( mTargetApp == PWMPI) { | 160 | if ( mTargetApp == PWMPI) { |
149 | mSyncMenu->removeItem( 1000 ); | 161 | mSyncMenu->removeItem( 1000 ); |
150 | clearMenu->removeItem( 1000 ); | 162 | clearMenu->removeItem( 1000 ); |
151 | } | 163 | } |
152 | #ifndef DESKTOP_VERSION | 164 | #ifndef DESKTOP_VERSION |
153 | else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { | 165 | else if (!app_dir.exists(QDir::homeDirPath()+"/Applications/dtm" ) ) { |
154 | mSyncMenu->removeItem( 1000 ); | 166 | mSyncMenu->removeItem( 1000 ); |