summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-03-25 00:08:08 (UTC)
committer zautrix <zautrix>2005-03-25 00:08:08 (UTC)
commit7c2e130ddd194f1c4b5365af6999a27c08232f4b (patch) (unidiff)
tree75665681327ee49d7650f4d840b5c8c772180fb4 /kaddressbook
parent5cf054b82738d65f9b0a34ccb51c993ee4a0189f (diff)
downloadkdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.zip
kdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.tar.gz
kdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.tar.bz2
fixes
Diffstat (limited to 'kaddressbook') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/filtereditdialog.cpp2
-rw-r--r--kaddressbook/kabcore.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/kaddressbook/filtereditdialog.cpp b/kaddressbook/filtereditdialog.cpp
index 1194406..ef9b979 100644
--- a/kaddressbook/filtereditdialog.cpp
+++ b/kaddressbook/filtereditdialog.cpp
@@ -113,99 +113,99 @@ Filter FilterEditDialog::filter()
113 113
114 item = item->nextSibling(); 114 item = item->nextSibling();
115 } 115 }
116 filter.setCategories( categories ); 116 filter.setCategories( categories );
117 117
118 if ( mMatchRuleGroup->find( 0 )->isOn() ) 118 if ( mMatchRuleGroup->find( 0 )->isOn() )
119 filter.setMatchRule( Filter::Matching ); 119 filter.setMatchRule( Filter::Matching );
120 else 120 else
121 filter.setMatchRule( Filter::NotMatching ); 121 filter.setMatchRule( Filter::NotMatching );
122 122
123 int c = 0; 123 int c = 0;
124 if (mPublic->isChecked()) c |= Filter::ShowPublic; 124 if (mPublic->isChecked()) c |= Filter::ShowPublic;
125 if (mPrivate->isChecked()) c |= Filter::ShowPrivate; 125 if (mPrivate->isChecked()) c |= Filter::ShowPrivate;
126 if (mConfidential->isChecked()) c |= Filter::ShowConfidential; 126 if (mConfidential->isChecked()) c |= Filter::ShowConfidential;
127 filter.setCriteria( c ) ; 127 filter.setCriteria( c ) ;
128 128
129 return filter; 129 return filter;
130} 130}
131 131
132void FilterEditDialog::initGUI() 132void FilterEditDialog::initGUI()
133{ 133{
134#ifndef KAB_EMBEDDED 134#ifndef KAB_EMBEDDED
135 resize( 490, 300 ); 135 resize( 490, 300 );
136#else //KAB_EMBEDDED 136#else //KAB_EMBEDDED
137 resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300)); 137 resize( KMIN(KGlobal::getDesktopWidth()-10, 490), KMIN(KGlobal::getDesktopHeight()-50, 300));
138#endif //KAB_EMBEDDED 138#endif //KAB_EMBEDDED
139 139
140 140
141 QWidget *page = plainPage(); 141 QWidget *page = plainPage();
142 QLabel *label; 142 QLabel *label;
143 143
144 QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() ); 144 QGridLayout *topLayout = new QGridLayout( page, 3, 2, 0, spacingHint() );
145 145
146 label = new QLabel( i18n( "Name" ), page ); 146 label = new QLabel( i18n( "Name" ), page );
147 mNameEdit = new KLineEdit( page ); 147 mNameEdit = new KLineEdit( page );
148 mNameEdit->setFocus(); 148 mNameEdit->setFocus();
149 topLayout->addWidget( label, 0, 0 ); 149 topLayout->addWidget( label, 0, 0 );
150 topLayout->addWidget( mNameEdit, 0, 1 ); 150 topLayout->addWidget( mNameEdit, 0, 1 );
151 connect( mNameEdit, SIGNAL( textChanged( const QString& ) ), 151 connect( mNameEdit, SIGNAL( textChanged( const QString& ) ),
152 SLOT( filterNameTextChanged( const QString&) ) ); 152 SLOT( filterNameTextChanged( const QString&) ) );
153 153
154 mCategoriesView = new KListView( page ); 154 mCategoriesView = new KListView( page );
155 mCategoriesView->addColumn( i18n( "Categories" ) ); 155 mCategoriesView->addColumn( i18n( "Categories" ) );
156 topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 ); 156 topLayout->addMultiCellWidget( mCategoriesView, 1, 1, 0, 1 );
157 157
158 mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page ); 158 mMatchRuleGroup = new QHButtonGroup( i18n( "Category rule" ), page );
159 mMatchRuleGroup->setExclusive( true ); 159 mMatchRuleGroup->setExclusive( true );
160 QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup ); 160 QRadioButton *radio = new QRadioButton( i18n( "Include categories" ), mMatchRuleGroup );
161 radio->setChecked( true );
162 //mMatchRuleGroup->insert( radio ); 161 //mMatchRuleGroup->insert( radio );
163 radio = new QRadioButton( i18n( "Exclude categories" ), mMatchRuleGroup ); 162 radio = new QRadioButton( i18n( "Exclude categories" ), mMatchRuleGroup );
163 radio->setChecked( true );
164 //mMatchRuleGroup->insert( radio ); 164 //mMatchRuleGroup->insert( radio );
165 topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 ); 165 topLayout->addMultiCellWidget( mMatchRuleGroup, 2, 2, 0, 1 );
166 166
167 QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page ); 167 QHButtonGroup * mMatchPPCGroup = new QHButtonGroup(i18n( "Include contacts, that are:" ), page );
168 mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup ); 168 mPublic = new QCheckBox( i18n( "public" ), mMatchPPCGroup );
169 mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup ); 169 mPrivate = new QCheckBox( i18n( "private" ), mMatchPPCGroup );
170 mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup ); 170 mConfidential = new QCheckBox( i18n( "confidential" ), mMatchPPCGroup );
171 mPublic->setChecked( true ); 171 mPublic->setChecked( true );
172 mPrivate->setChecked( true ); 172 mPrivate->setChecked( true );
173 mConfidential->setChecked( true ); 173 mConfidential->setChecked( true );
174 topLayout->addMultiCellWidget( mMatchPPCGroup, 3, 3, 0, 1 ); 174 topLayout->addMultiCellWidget( mMatchPPCGroup, 3, 3, 0, 1 );
175 175
176} 176}
177 177
178void FilterEditDialog::filterNameTextChanged( const QString &text ) 178void FilterEditDialog::filterNameTextChanged( const QString &text )
179{ 179{
180 enableButtonOK( !text.isEmpty() ); 180 enableButtonOK( !text.isEmpty() );
181} 181}
182 182
183void FilterEditDialog::slotHelp() 183void FilterEditDialog::slotHelp()
184{ 184{
185#ifndef KAB_EMBEDDED 185#ifndef KAB_EMBEDDED
186 kapp->invokeHelp( "using-filters" ); 186 kapp->invokeHelp( "using-filters" );
187#endif //KAB_EMBEDDED 187#endif //KAB_EMBEDDED
188} 188}
189 189
190FilterDialog::FilterDialog( QWidget *parent, const char *name ) 190FilterDialog::FilterDialog( QWidget *parent, const char *name )
191 : KDialogBase( Plain, i18n( "Edit Address Book Filters" ), 191 : KDialogBase( Plain, i18n( "Edit Address Book Filters" ),
192 Ok | Cancel, Ok, parent, name, /*US false*/true, true ) 192 Ok | Cancel, Ok, parent, name, /*US false*/true, true )
193{ 193{
194 initGUI(); 194 initGUI();
195} 195}
196 196
197FilterDialog::~FilterDialog() 197FilterDialog::~FilterDialog()
198{ 198{
199} 199}
200 200
201void FilterDialog::setFilters( const Filter::List &list ) 201void FilterDialog::setFilters( const Filter::List &list )
202{ 202{
203 mFilterList.clear(); 203 mFilterList.clear();
204 mInternalFilterList.clear(); 204 mInternalFilterList.clear();
205 205
206 Filter::List::ConstIterator it; 206 Filter::List::ConstIterator it;
207 for ( it = list.begin(); it != list.end(); ++it ) { 207 for ( it = list.begin(); it != list.end(); ++it ) {
208 if ( (*it).isInternal() ) 208 if ( (*it).isInternal() )
209 mInternalFilterList.append( *it ); 209 mInternalFilterList.append( *it );
210 else 210 else
211 mFilterList.append( *it ); 211 mFilterList.append( *it );
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index e8f6132..59aa5a5 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -3141,194 +3141,197 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
3141 qDebug("KA: WB cancelled "); 3141 qDebug("KA: WB cancelled ");
3142 syncManager->mWriteBackFile = false; 3142 syncManager->mWriteBackFile = false;
3143 return syncOK; 3143 return syncOK;
3144 } 3144 }
3145 } 3145 }
3146 return syncOK; 3146 return syncOK;
3147} 3147}
3148 3148
3149 3149
3150//this is a overwritten callbackmethods from the syncinterface 3150//this is a overwritten callbackmethods from the syncinterface
3151bool KABCore::sync(KSyncManager* manager, QString filename, int mode) 3151bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
3152{ 3152{
3153 3153
3154 //pending prepare addresseeview for output 3154 //pending prepare addresseeview for output
3155 //pending detect, if remote file has REV field. if not switch to external sync 3155 //pending detect, if remote file has REV field. if not switch to external sync
3156 mGlobalSyncMode = SYNC_MODE_NORMAL; 3156 mGlobalSyncMode = SYNC_MODE_NORMAL;
3157 if ( manager != syncManager ) 3157 if ( manager != syncManager )
3158 qDebug("KABCore::sync:: ERROR! :: manager != syncManager "); 3158 qDebug("KABCore::sync:: ERROR! :: manager != syncManager ");
3159 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3159 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3160 3160
3161 AddressBook abLocal(filename,"syncContact"); 3161 AddressBook abLocal(filename,"syncContact");
3162 bool syncOK = false; 3162 bool syncOK = false;
3163 if ( abLocal.load() ) { 3163 if ( abLocal.load() ) {
3164 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode ); 3164 qDebug("KA: Sync::AB loaded %s,sync mode %d",filename.latin1(), mode );
3165 bool external = false; 3165 bool external = false;
3166 bool isXML = false; 3166 bool isXML = false;
3167 if ( filename.right(4) == ".xml") { 3167 if ( filename.right(4) == ".xml") {
3168 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3168 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3169 isXML = true; 3169 isXML = true;
3170 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3170 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3171 } else { 3171 } else {
3172 external = !manager->mIsKapiFile; 3172 external = !manager->mIsKapiFile;
3173 if ( external ) { 3173 if ( external ) {
3174 qDebug("KA: Sync::Setting vcf mode to external "); 3174 qDebug("KA: Sync::Setting vcf mode to external ");
3175 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3175 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3176 AddressBook::Iterator it; 3176 AddressBook::Iterator it;
3177 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3177 for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3178 (*it).setID( mCurrentSyncDevice, (*it).uid() ); 3178 (*it).setID( mCurrentSyncDevice, (*it).uid() );
3179 (*it).computeCsum( mCurrentSyncDevice ); 3179 (*it).computeCsum( mCurrentSyncDevice );
3180 } 3180 }
3181 } 3181 }
3182 } 3182 }
3183 //AddressBook::Iterator it; 3183 //AddressBook::Iterator it;
3184 //QStringList vcards; 3184 //QStringList vcards;
3185 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { 3185 //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) {
3186 // qDebug("Name %s ", (*it).familyName().latin1()); 3186 // qDebug("Name %s ", (*it).familyName().latin1());
3187 //} 3187 //}
3188 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); 3188 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode );
3189 syncManager->hideProgressBar();
3189 if ( syncOK ) { 3190 if ( syncOK ) {
3190 if ( syncManager->mWriteBackFile ) 3191 if ( syncManager->mWriteBackFile )
3191 { 3192 {
3192 if ( external ) 3193 if ( external )
3193 abLocal.removeSyncAddressees( !isXML); 3194 abLocal.removeSyncAddressees( !isXML);
3194 qDebug("KA: Sync::Saving remote AB "); 3195 qDebug("KA: Sync::Saving remote AB ");
3195 if ( ! abLocal.saveAB()) 3196 if ( ! abLocal.saveAB())
3196 qDebug("KA: sync::Error writing back AB to file "); 3197 qDebug("KA: sync::Error writing back AB to file ");
3197 if ( external ) { 3198 if ( external ) {
3198 // afterwrite processing 3199 // afterwrite processing
3199 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML); 3200 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ,isXML);
3200 } 3201 }
3201 } 3202 }
3202 } 3203 }
3203 setModified(); 3204 setModified();
3204 3205
3205 } 3206 }
3206 abLocal.removeResources(); 3207 abLocal.removeResources();
3207 if ( syncOK ) 3208 if ( syncOK )
3208 mViewManager->refreshView(); 3209 mViewManager->refreshView();
3209 return syncOK; 3210 return syncOK;
3210 3211
3211} 3212}
3212void KABCore::removeSyncInfo( QString syncProfile) 3213void KABCore::removeSyncInfo( QString syncProfile)
3213{ 3214{
3214 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1()); 3215 qDebug("KA: AB:removeSyncInfo for profile %s ", syncProfile.latin1());
3215 mAddressBook->removeSyncInfo( syncProfile ); 3216 mAddressBook->removeSyncInfo( syncProfile );
3216 setModified(); 3217 setModified();
3217} 3218}
3218 3219
3219 3220
3220//this is a overwritten callbackmethods from the syncinterface 3221//this is a overwritten callbackmethods from the syncinterface
3221bool KABCore::syncExternal(KSyncManager* manager, QString resource) 3222bool KABCore::syncExternal(KSyncManager* manager, QString resource)
3222{ 3223{
3223 if ( resource == "phone" ) 3224 if ( resource == "phone" )
3224 return syncPhone(); 3225 return syncPhone();
3225 disableBR( true ); 3226 disableBR( true );
3226 if ( manager != syncManager ) 3227 if ( manager != syncManager )
3227 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager "); 3228 qDebug("KABCore::syncExternal:: ERROR! :: manager != syncManager ");
3228 QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); 3229 QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
3229 3230
3230 AddressBook abLocal( resource,"syncContact"); 3231 AddressBook abLocal( resource,"syncContact");
3231 bool syncOK = false; 3232 bool syncOK = false;
3232 message(i18n("Loading DTM address data..."), false); 3233 message(i18n("Loading DTM address data..."), false);
3233 if ( abLocal.load() ) { 3234 if ( abLocal.load() ) {
3234 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3235 qDebug("KA: AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
3235 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3236 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3236 message(i18n("Sync preprocessing..."),false); 3237 message(i18n("Sync preprocessing..."),false);
3237 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false ); 3238 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
3238 message(i18n("Synchronizing..."),false); 3239 message(i18n("Synchronizing..."),false);
3239 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3240 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3241 syncManager->hideProgressBar();
3240 if ( syncOK ) { 3242 if ( syncOK ) {
3241 if ( syncManager->mWriteBackFile ) { 3243 if ( syncManager->mWriteBackFile ) {
3242 abLocal.removeSyncAddressees( false ); 3244 abLocal.removeSyncAddressees( false );
3243 message(i18n("Saving DTM address data..."),false); 3245 message(i18n("Saving DTM address data..."),false);
3244 abLocal.saveAB(); 3246 abLocal.saveAB();
3245 message(i18n("Sync postprocessing..."),false); 3247 message(i18n("Sync postprocessing..."),false);
3246 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3248 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3247 } 3249 }
3248 } else 3250 } else
3249 message( i18n("Sync cancelled or failed.") ); 3251 message( i18n("Sync cancelled or failed.") );
3250 setModified(); 3252 setModified();
3251 } 3253 }
3252 abLocal.removeResources(); 3254 abLocal.removeResources();
3253 if ( syncOK ) { 3255 if ( syncOK ) {
3254 mViewManager->refreshView(); 3256 mViewManager->refreshView();
3255 message(i18n("DTM syncing finished.")); 3257 message(i18n("DTM syncing finished."));
3256 } 3258 }
3257 disableBR( false ); 3259 disableBR( false );
3258 return syncOK; 3260 return syncOK;
3259 3261
3260} 3262}
3261void KABCore::message( QString m, bool startTimer) 3263void KABCore::message( QString m, bool startTimer)
3262{ 3264{
3263 topLevelWidget()->setCaption( m ); 3265 topLevelWidget()->setCaption( m );
3264 qApp->processEvents(); 3266 qApp->processEvents();
3265 if ( startTimer ) 3267 if ( startTimer )
3266 mMessageTimer->start( 15000, true ); 3268 mMessageTimer->start( 15000, true );
3267 else 3269 else
3268 mMessageTimer->stop(); 3270 mMessageTimer->stop();
3269} 3271}
3270bool KABCore::syncPhone() 3272bool KABCore::syncPhone()
3271{ 3273{
3272 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice(); 3274 QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
3273 QString fileName = getPhoneFile(); 3275 QString fileName = getPhoneFile();
3274 if ( !PhoneAccess::readFromPhone( fileName) ) { 3276 if ( !PhoneAccess::readFromPhone( fileName) ) {
3275 message(i18n("Phone access failed!")); 3277 message(i18n("Phone access failed!"));
3276 return false; 3278 return false;
3277 } 3279 }
3278 AddressBook abLocal( fileName,"syncContact"); 3280 AddressBook abLocal( fileName,"syncContact");
3279 bool syncOK = false; 3281 bool syncOK = false;
3280 { 3282 {
3281 abLocal.importFromFile( fileName ); 3283 abLocal.importFromFile( fileName );
3282 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1()); 3284 qDebug("KA: AB phone loaded ,sync device %s",mCurrentSyncDevice.latin1());
3283 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 3285 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
3284 abLocal.preparePhoneSync( mCurrentSyncDevice, true ); 3286 abLocal.preparePhoneSync( mCurrentSyncDevice, true );
3285 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); 3287 abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
3286 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); 3288 syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
3289 syncManager->hideProgressBar();
3287 if ( syncOK ) { 3290 if ( syncOK ) {
3288 if ( syncManager->mWriteBackFile ) { 3291 if ( syncManager->mWriteBackFile ) {
3289 abLocal.removeSyncAddressees( true ); 3292 abLocal.removeSyncAddressees( true );
3290 abLocal.saveABphone( fileName ); 3293 abLocal.saveABphone( fileName );
3291 abLocal.findNewExtIds( fileName, mCurrentSyncDevice ); 3294 abLocal.findNewExtIds( fileName, mCurrentSyncDevice );
3292 //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); 3295 //abLocal.preparePhoneSync( mCurrentSyncDevice, false );
3293 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); 3296 abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
3294 } 3297 }
3295 } 3298 }
3296 setModified(); 3299 setModified();
3297 } 3300 }
3298 abLocal.removeResources(); 3301 abLocal.removeResources();
3299 if ( syncOK ) 3302 if ( syncOK )
3300 mViewManager->refreshView(); 3303 mViewManager->refreshView();
3301 return syncOK; 3304 return syncOK;
3302} 3305}
3303void KABCore::getFile( bool success ) 3306void KABCore::getFile( bool success )
3304{ 3307{
3305 if ( ! success ) { 3308 if ( ! success ) {
3306 message( i18n("Error receiving file. Nothing changed!") ); 3309 message( i18n("Error receiving file. Nothing changed!") );
3307 return; 3310 return;
3308 } 3311 }
3309 int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); 3312 int count = mAddressBook->importFromFile( sentSyncFile() , false, true );
3310 if ( count ) 3313 if ( count )
3311 setModified( true ); 3314 setModified( true );
3312 message( i18n("Pi-Sync successful!") ); 3315 message( i18n("Pi-Sync successful!") );
3313 mViewManager->refreshView(); 3316 mViewManager->refreshView();
3314} 3317}
3315void KABCore::syncFileRequest() 3318void KABCore::syncFileRequest()
3316{ 3319{
3317 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { 3320 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
3318 syncManager->slotSyncMenu( 999 ); 3321 syncManager->slotSyncMenu( 999 );
3319 } 3322 }
3320 mAddressBook->export2File( sentSyncFile() ); 3323 mAddressBook->export2File( sentSyncFile() );
3321} 3324}
3322QString KABCore::sentSyncFile() 3325QString KABCore::sentSyncFile()
3323{ 3326{
3324#ifdef DESKTOP_VERSION 3327#ifdef DESKTOP_VERSION
3325 return locateLocal( "tmp", "copysyncab.vcf" ); 3328 return locateLocal( "tmp", "copysyncab.vcf" );
3326#else 3329#else
3327 return QString( "/tmp/copysyncab.vcf" ); 3330 return QString( "/tmp/copysyncab.vcf" );
3328#endif 3331#endif
3329} 3332}
3330 3333
3331void KABCore::setCaptionBack() 3334void KABCore::setCaptionBack()
3332{ 3335{
3333 mMessageTimer->stop(); 3336 mMessageTimer->stop();
3334 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); 3337 topLevelWidget()->setCaption( i18n("KAddressbook/Pi") );