summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kabcore.cpp
Unidiff
Diffstat (limited to 'kaddressbook/kabcore.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 2f00a09..ea87929 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1311,12 +1311,14 @@ void KABCore::setDetailsVisible( bool visible )
1311 { 1311 {
1312 if ( visible ) { 1312 if ( visible ) {
1313 mViewManager->hide(); 1313 mViewManager->hide();
1314 mDetails->show(); 1314 mDetails->show();
1315 mIncSearchWidget->setFocus();
1315 } 1316 }
1316 else { 1317 else {
1317 mViewManager->show(); 1318 mViewManager->show();
1318 mDetails->hide(); 1319 mDetails->hide();
1320 mViewManager->setFocusAV();
1319 } 1321 }
1320 setJumpButtonBarVisible( !visible ); 1322 setJumpButtonBarVisible( !visible );
1321 } 1323 }
1322 1324
@@ -2043,8 +2045,11 @@ void KABCore::addActionsManually()
2043 mActionUndo->plug( tb ); 2045 mActionUndo->plug( tb );
2044 mActionDelete->plug( tb ); 2046 mActionDelete->plug( tb );
2045 mActionRedo->plug( tb ); 2047 mActionRedo->plug( tb );
2046 } 2048 }
2049 } else {
2050 if (KABPrefs::instance()->mMultipleViewsAtOnce )
2051 mActionSave->plug( tb );
2047 } 2052 }
2048 //mActionQuit->plug ( tb ); 2053 //mActionQuit->plug ( tb );
2049 // tb->insertWidget(-1, 0, mIncSearchWidget, 6); 2054 // tb->insertWidget(-1, 0, mIncSearchWidget, 6);
2050 2055
@@ -2506,9 +2511,18 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
2506 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees(); 2511 //KABC::Addressee::List addresseeLSyncSharp = local->getExternLastSyncAddressees();
2507 bool fullDateRange = false; 2512 bool fullDateRange = false;
2508 local->resetTempSyncStat(); 2513 local->resetTempSyncStat();
2509 mLastAddressbookSync = QDateTime::currentDateTime(); 2514 mLastAddressbookSync = QDateTime::currentDateTime();
2510 QDateTime modifiedCalendar = mLastAddressbookSync;; 2515 if ( syncManager->syncWithDesktop() ) {
2516 remote->removeSyncInfo( QString());//remove all info
2517 if ( KSyncManager::mRequestedSyncEvent.isValid() ) {
2518 mLastAddressbookSync = KSyncManager::mRequestedSyncEvent;
2519 qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() );
2520 } else {
2521 qDebug("ERROR: KSyncManager::mRequestedSyncEvent has invalid datatime ");
2522 }
2523 }
2524 QDateTime modifiedCalendar = mLastAddressbookSync;
2511 addresseeLSync = getLastSyncAddressee(); 2525 addresseeLSync = getLastSyncAddressee();
2512 qDebug("Last Sync %s ", addresseeLSync.revision().toString().latin1()); 2526 qDebug("Last Sync %s ", addresseeLSync.revision().toString().latin1());
2513 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); 2527 addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName );
2514 if ( !addresseeR.isEmpty() ) { 2528 if ( !addresseeR.isEmpty() ) {
@@ -2604,8 +2618,10 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
2604 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); 2618 inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL );
2605 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { 2619 if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
2606 inR.setOriginalExternalUID( OidS ); 2620 inR.setOriginalExternalUID( OidS );
2607 inR.setExternalUID( idS ); 2621 inR.setExternalUID( idS );
2622 if ( syncManager->syncWithDesktop() )
2623 inR.setIDStr( "changed" );
2608 } else { 2624 } else {
2609 inR.setIDStr( idS ); 2625 inR.setIDStr( idS );
2610 } 2626 }
2611 inR.setResource( 0 ); 2627 inR.setResource( 0 );
@@ -2897,8 +2913,11 @@ void KABCore::getFile( bool success )
2897 mViewManager->refreshView(); 2913 mViewManager->refreshView();
2898} 2914}
2899void KABCore::syncFileRequest() 2915void KABCore::syncFileRequest()
2900{ 2916{
2917 if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) {
2918 syncManager->slotSyncMenu( 999 );
2919 }
2901 mAddressBook->export2File( sentSyncFile() ); 2920 mAddressBook->export2File( sentSyncFile() );
2902} 2921}
2903QString KABCore::sentSyncFile() 2922QString KABCore::sentSyncFile()
2904{ 2923{