-rw-r--r-- | kaddressbook/kabcore.cpp | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 2f00a09..ea87929 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1312,10 +1312,12 @@ void KABCore::setDetailsVisible( bool visible ) if ( visible ) { mViewManager->hide(); mDetails->show(); + mIncSearchWidget->setFocus(); } else { mViewManager->show(); mDetails->hide(); + mViewManager->setFocusAV(); } setJumpButtonBarVisible( !visible ); } @@ -2044,6 +2046,9 @@ void KABCore::addActionsManually() mActionDelete->plug( tb ); mActionRedo->plug( tb ); } + } else { + if (KABPrefs::instance()->mMultipleViewsAtOnce ) + mActionSave->plug( tb ); } //mActionQuit->plug ( tb ); // tb->insertWidget(-1, 0, mIncSearchWidget, 6); @@ -2507,7 +2512,16 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo bool fullDateRange = false; local->resetTempSyncStat(); mLastAddressbookSync = QDateTime::currentDateTime(); - QDateTime modifiedCalendar = mLastAddressbookSync;; + if ( syncManager->syncWithDesktop() ) { + remote->removeSyncInfo( QString());//remove all info + if ( KSyncManager::mRequestedSyncEvent.isValid() ) { + mLastAddressbookSync = KSyncManager::mRequestedSyncEvent; + qDebug("using extern time for calendar sync: %s ", mLastAddressbookSync.toString().latin1() ); + } else { + qDebug("ERROR: KSyncManager::mRequestedSyncEvent has invalid datatime "); + } + } + QDateTime modifiedCalendar = mLastAddressbookSync; addresseeLSync = getLastSyncAddressee(); qDebug("Last Sync %s ", addresseeLSync.revision().toString().latin1()); addresseeR = remote->findByUid("last-syncAddressee-"+mCurrentSyncName ); @@ -2605,6 +2619,8 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { inR.setOriginalExternalUID( OidS ); inR.setExternalUID( idS ); + if ( syncManager->syncWithDesktop() ) + inR.setIDStr( "changed" ); } else { inR.setIDStr( idS ); } @@ -2897,7 +2913,10 @@ void KABCore::getFile( bool success ) mViewManager->refreshView(); } void KABCore::syncFileRequest() -{ +{ + if ( KABPrefs::instance()->mPassiveSyncWithDesktop ) { + syncManager->slotSyncMenu( 999 ); + } mAddressBook->export2File( sentSyncFile() ); } QString KABCore::sentSyncFile() |