summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp5
-rw-r--r--libkdepim/ksyncprefsdialog.cpp2
2 files changed, 4 insertions, 3 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 6c1f444..f488a07 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -949,106 +949,107 @@ void KSyncManager::syncKDE()
949 949
950 break; 950 break;
951 default: 951 default:
952 qDebug("KSyncManager::slotSyncMenu: invalid apptype selected"); 952 qDebug("KSyncManager::slotSyncMenu: invalid apptype selected");
953 break; 953 break;
954 954
955 } 955 }
956} 956}
957 957
958void KSyncManager::syncSharp() 958void KSyncManager::syncSharp()
959{ 959{
960 960
961 if ( ! syncExternalApplication("sharp") ) 961 if ( ! syncExternalApplication("sharp") )
962 qDebug("ERROR sync sharp "); 962 qDebug("ERROR sync sharp ");
963} 963}
964 964
965bool KSyncManager::syncExternalApplication(QString resource) 965bool KSyncManager::syncExternalApplication(QString resource)
966{ 966{
967 967
968 emit save(); 968 emit save();
969 969
970 if ( mAskForPreferences ) 970 if ( mAskForPreferences )
971 if ( !edit_sync_options()) { 971 if ( !edit_sync_options()) {
972 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 972 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
973 return false; 973 return false;
974 } 974 }
975 975
976 qDebug("Sync extern %s", resource.latin1()); 976 qDebug("Sync extern %s", resource.latin1());
977 977
978 bool syncOK = mImplementation->syncExternal(this, resource); 978 bool syncOK = mImplementation->syncExternal(this, resource);
979 979
980 return syncOK; 980 return syncOK;
981 981
982} 982}
983 983
984void KSyncManager::syncPhone() 984void KSyncManager::syncPhone()
985{ 985{
986 986
987 syncExternalApplication("phone"); 987 syncExternalApplication("phone");
988 988
989} 989}
990 990
991void KSyncManager::showProgressBar(int percentage, QString caption, int total) 991void KSyncManager::showProgressBar(int percentage, QString caption, int total)
992{ 992{
993 if (!bar->isVisible()) 993 if (!bar->isVisible())
994 { 994 {
995 bar->setCaption (caption); 995 bar->setCaption (caption);
996 bar->setTotalSteps ( total ) ; 996 bar->setTotalSteps ( total ) ;
997
998 bar->show(); 997 bar->show();
999 } 998 }
1000 999 bar->raise();
1001 bar->setProgress( percentage ); 1000 bar->setProgress( percentage );
1001 qApp->processEvents();
1002} 1002}
1003 1003
1004void KSyncManager::hideProgressBar() 1004void KSyncManager::hideProgressBar()
1005{ 1005{
1006 bar->hide(); 1006 bar->hide();
1007 qApp->processEvents();
1007} 1008}
1008 1009
1009bool KSyncManager::isProgressBarCanceled() 1010bool KSyncManager::isProgressBarCanceled()
1010{ 1011{
1011 return !bar->isVisible(); 1012 return !bar->isVisible();
1012} 1013}
1013 1014
1014QString KSyncManager::syncFileName() 1015QString KSyncManager::syncFileName()
1015{ 1016{
1016 1017
1017 QString fn = "tempfile"; 1018 QString fn = "tempfile";
1018 switch(mTargetApp) 1019 switch(mTargetApp)
1019 { 1020 {
1020 case (KAPI): 1021 case (KAPI):
1021 fn = "tempsyncab.vcf"; 1022 fn = "tempsyncab.vcf";
1022 break; 1023 break;
1023 case (KOPI): 1024 case (KOPI):
1024 fn = "tempsynccal.ics"; 1025 fn = "tempsynccal.ics";
1025 break; 1026 break;
1026 case (PWMPI): 1027 case (PWMPI):
1027 fn = "tempsyncpw.pwm"; 1028 fn = "tempsyncpw.pwm";
1028 break; 1029 break;
1029 default: 1030 default:
1030 break; 1031 break;
1031 } 1032 }
1032#ifdef _WIN32_ 1033#ifdef _WIN32_
1033 return locateLocal( "tmp", fn ); 1034 return locateLocal( "tmp", fn );
1034#else 1035#else
1035 return (QString( "/tmp/" )+ fn ); 1036 return (QString( "/tmp/" )+ fn );
1036#endif 1037#endif
1037} 1038}
1038 1039
1039void KSyncManager::syncPi() 1040void KSyncManager::syncPi()
1040{ 1041{
1041 mIsKapiFile = true; 1042 mIsKapiFile = true;
1042 mPisyncFinished = false; 1043 mPisyncFinished = false;
1043 qApp->processEvents(); 1044 qApp->processEvents();
1044 if ( mAskForPreferences ) 1045 if ( mAskForPreferences )
1045 if ( !edit_pisync_options()) { 1046 if ( !edit_pisync_options()) {
1046 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); 1047 mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
1047 return; 1048 return;
1048 } 1049 }
1049 bool ok; 1050 bool ok;
1050 Q_UINT16 port = mActiveSyncPort.toUInt(&ok); 1051 Q_UINT16 port = mActiveSyncPort.toUInt(&ok);
1051 if ( ! ok ) { 1052 if ( ! ok ) {
1052 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") ); 1053 mParent->topLevelWidget()->setCaption( i18n("Sorry, no valid port.Syncing cancelled.") );
1053 return; 1054 return;
1054 } 1055 }
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp
index 2101bbb..3db58ec 100644
--- a/libkdepim/ksyncprefsdialog.cpp
+++ b/libkdepim/ksyncprefsdialog.cpp
@@ -140,97 +140,97 @@ void KSyncPrefsDialog::setupSyncAlgTab()
140 140
141 lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame); 141 lab = new QLabel(mProfileBox, i18n("Profile:"), topFrame);
142 topLayout->addWidget(lab ,iii,0); 142 topLayout->addWidget(lab ,iii,0);
143 topLayout->addWidget(mProfileBox, iii,1); 143 topLayout->addWidget(mProfileBox, iii,1);
144 ++iii; 144 ++iii;
145 145
146 146
147 147
148 QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame); 148 QHGroupBox *iims = new QHGroupBox( i18n("Multiple Sync options"), topFrame);
149 new QLabel( i18n("Include in multiple "), iims ); 149 new QLabel( i18n("Include in multiple "), iims );
150 mIncludeInRing = new QCheckBox( i18n("calendar "), iims ); 150 mIncludeInRing = new QCheckBox( i18n("calendar "), iims );
151 mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims ); 151 mIncludeInRingAB = new QCheckBox( i18n("addressbook "), iims );
152 mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims ); 152 mIncludeInRingPWM = new QCheckBox( i18n("pwmanager"), iims );
153 new QLabel( i18n(" sync"), iims ); 153 new QLabel( i18n(" sync"), iims );
154 topLayout->addMultiCellWidget(iims, iii,iii,0,1); 154 topLayout->addMultiCellWidget(iims, iii,iii,0,1);
155 ++iii; 155 ++iii;
156 QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame); 156 QVGroupBox* gb0 = new QVGroupBox( i18n("Sync algo options"), topFrame);
157 topLayout->addMultiCellWidget(gb0, iii,iii,0,1); 157 topLayout->addMultiCellWidget(gb0, iii,iii,0,1);
158 ++iii; 158 ++iii;
159 QButtonGroup* gr; 159 QButtonGroup* gr;
160 { 160 {
161 QVGroupBox* topFrame = gb0; 161 QVGroupBox* topFrame = gb0;
162 162
163 163
164 164
165 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame ); 165 mAskForPreferences = new QCheckBox( i18n("Ask for preferences before sync"), topFrame );
166 //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1); 166 //topLayout->addMultiCellWidget(mAskForPreferences, iii,iii,0,1);
167 //++iii; 167 //++iii;
168 gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame); 168 gr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Sync preferences"), topFrame);
169 //topLayout->addMultiCellWidget(gr, iii,iii,0,1); 169 //topLayout->addMultiCellWidget(gr, iii,iii,0,1);
170 //++iii; 170 //++iii;
171 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr ); 171 loc = new QRadioButton ( i18n("Take local entry on conflict"), gr );
172 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr ); 172 rem = new QRadioButton ( i18n("Take remote entry on conflict"), gr );
173 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr ); 173 newest = new QRadioButton ( i18n("Take newest entry on conflict"), gr );
174 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr ); 174 ask = new QRadioButton ( i18n("Ask for every entry on conflict"), gr );
175 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr ); 175 f_loc= new QRadioButton ( i18n("Force: Take local entry always"), gr );
176 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr ); 176 f_rem = new QRadioButton ( i18n("Force: Take remote entry always"), gr );
177 // both = new QRadioButton ( i18n("Take both on conflict"), gr ); 177 // both = new QRadioButton ( i18n("Take both on conflict"), gr );
178 178
179 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame ); 179 mShowSummaryAfterSync = new QCheckBox( i18n("Show summary after sync"), topFrame );
180 //topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1); 180 //topLayout->addMultiCellWidget(mShowSummaryAfterSync, iii,iii,0,1);
181 //++iii; 181 //++iii;
182 182
183 QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame); 183 QHGroupBox* gb5 = new QHGroupBox( i18n("Apply filter when adding data to local:"), topFrame);
184 QVBox * fibo2 = new QVBox ( gb5 ); 184 QVBox * fibo2 = new QVBox ( gb5 );
185 new QLabel ( i18n("Incoming calendar filter:"), fibo2 ); 185 new QLabel ( i18n("Incoming calendar filter:"), fibo2 );
186 mFilterInCal = new QComboBox( fibo2 ); 186 mFilterInCal = new QComboBox( fibo2 );
187 fibo2 = new QVBox ( gb5 ); 187 fibo2 = new QVBox ( gb5 );
188 new QLabel ( i18n("Incoming adressbook filter:"), fibo2 ); 188 new QLabel ( i18n("Incoming addressbook filter:"), fibo2 );
189 mFilterInAB = new QComboBox( fibo2 ); 189 mFilterInAB = new QComboBox( fibo2 );
190 190
191 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame ); 191 mWriteBackFile = new QCheckBox( i18n("Write back synced data"), topFrame );
192 // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1); 192 // topLayout->addMultiCellWidget(mWriteBackFile, iii,iii,0,1);
193 // ++iii; 193 // ++iii;
194 194
195 QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame); 195 QVGroupBox* gb2 = new QVGroupBox( i18n("Write back options"), topFrame);
196 //topLayout->addMultiCellWidget(gb2, iii,iii,0,1); 196 //topLayout->addMultiCellWidget(gb2, iii,iii,0,1);
197 //++iii; 197 //++iii;
198 { 198 {
199 QVGroupBox*topFrame = gb2; 199 QVGroupBox*topFrame = gb2;
200 mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame ); 200 mWriteBackExisting= new QCheckBox( i18n("Write back (on remote) existing entries only"), topFrame );
201 QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame); 201 QHGroupBox* gb4 = new QHGroupBox( i18n("Apply filter when adding data to remote:"), topFrame);
202 QVBox * fibo = new QVBox ( gb4 ); 202 QVBox * fibo = new QVBox ( gb4 );
203 new QLabel ( i18n("Outgoing calendar filter:"), fibo ); 203 new QLabel ( i18n("Outgoing calendar filter:"), fibo );
204 mFilterOutCal = new QComboBox( fibo ); 204 mFilterOutCal = new QComboBox( fibo );
205 fibo = new QVBox ( gb4 ); 205 fibo = new QVBox ( gb4 );
206 new QLabel ( i18n("Outgoing addressbook filter:"), fibo ); 206 new QLabel ( i18n("Outgoing addressbook filter:"), fibo );
207 mFilterOutAB = new QComboBox( fibo ); 207 mFilterOutAB = new QComboBox( fibo );
208 //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1); 208 //topLayout->addMultiCellWidget(mWriteBackExisting, iii,iii,0,1);
209 //++iii; 209 //++iii;
210 mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame ); 210 mWriteBackFuture= new QCheckBox( i18n("Write back (calendar) entries for time period only"), topFrame );
211 //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1); 211 //topLayout->addMultiCellWidget(mWriteBackFuture, iii,iii,0,1);
212 //++iii; 212 //++iii;
213 QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame); 213 QHGroupBox* gb3 = new QHGroupBox( i18n("Time period"), topFrame);
214 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) ); 214 connect ( mWriteBackFuture, SIGNAL( toggled ( bool ) ), gb3, SLOT ( setEnabled ( bool ) ) );
215 new QLabel( i18n("From ") , gb3 ); 215 new QLabel( i18n("From ") , gb3 );
216 mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3); 216 mWriteBackPastWeeks= new QSpinBox(1,104, 1, gb3);
217 new QLabel( i18n(" weeks in the past to ") , gb3 ); 217 new QLabel( i18n(" weeks in the past to ") , gb3 );
218 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3); 218 mWriteBackFutureWeeks= new QSpinBox(1,104, 1, gb3);
219 new QLabel( i18n(" weeks in the future ") , gb3 ); 219 new QLabel( i18n(" weeks in the future ") , gb3 );
220 //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1); 220 //topLayout->addMultiCellWidget(mWriteBackFutureWeeks, iii,iii,1,1);
221 //++iii; 221 //++iii;
222 gb3->setEnabled( false ); 222 gb3->setEnabled( false );
223 connect ( mWriteBackExisting, SIGNAL( toggled ( bool ) ), gb4, SLOT ( setDisabled ( bool ) ) ); 223 connect ( mWriteBackExisting, SIGNAL( toggled ( bool ) ), gb4, SLOT ( setDisabled ( bool ) ) );
224 } 224 }
225 connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) ); 225 connect ( mWriteBackFile, SIGNAL( toggled ( bool ) ), gb2, SLOT ( setEnabled ( bool ) ) );
226 226
227 } 227 }
228 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame); 228 proGr = new QButtonGroup ( 1, Qt::Horizontal, i18n("Profile kind"), topFrame);
229 gr = proGr; 229 gr = proGr;
230 topLayout->addMultiCellWidget(gr, iii,iii,0,1); 230 topLayout->addMultiCellWidget(gr, iii,iii,0,1);
231 ++iii; 231 ++iii;
232 mIsLocal = new QRadioButton ( i18n("Local file"), gr ); 232 mIsLocal = new QRadioButton ( i18n("Local file"), gr );
233 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr ); 233 mIsPi = new QRadioButton ( i18n("Pi-Sync ( direct Kx/Pi to Kx/Pi sync )"), gr );
234 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 234 connect (mIsPi, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );
235 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr ); 235 mIsNotLocal = new QRadioButton ( i18n("Remote file (w down/upload command)"), gr );
236 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); 236 connect (mIsLocal, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) );