-rw-r--r-- | kaddressbook/kabcore.cpp | 32 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 4 |
2 files changed, 30 insertions, 6 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 5ebd3a4..bdc5bd8 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1910,6 +1910,12 @@ void KABCore::initActions() mActionSyncHowto = new KAction( i18n( "Sync HowTo" ), 0, this, SLOT( synchowto() ), actionCollection(), "sync" ); + mActionKdeSyncHowto = new KAction( i18n( "Kde Sync HowTo" ), 0, + this, SLOT( kdesynchowto() ), actionCollection(), + "kdesync" ); + mActionMultiSyncHowto = new KAction( i18n( "Multi Sync HowTo" ), 0, + this, SLOT( multisynchowto() ), actionCollection(), + "multisync" ); mActionAboutKAddressbook = new KAction( i18n( "&About KAddressBook" ), "kaddressbook2", 0, this, SLOT( createAboutData() ), actionCollection(), @@ -2051,8 +2057,10 @@ void KABCore::addActionsManually() mActionWN->plug( helpMenu ); mActionSyncHowto->plug( helpMenu ); - mActionLicence->plug( helpMenu ); + mActionKdeSyncHowto->plug( helpMenu ); + mActionMultiSyncHowto->plug( helpMenu ); mActionFaq->plug( helpMenu ); + mActionLicence->plug( helpMenu ); mActionAboutKAddressbook->plug( helpMenu ); if (KGlobal::getDesktopSize() > KGlobal::Small ) { @@ -2350,7 +2358,14 @@ void KABCore::synchowto() { KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); } - +void KABCore::kdesynchowto() +{ + KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); +} +void KABCore::multisynchowto() +{ + KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); +} void KABCore::faq() { KApplication::showFile( "KA/Pi FAQ", "kdepim/kaddressbook/kapiFAQ.txt" ); @@ -2778,10 +2793,14 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo local->insertAddressee( addresseeLSync, false ); QString mes; mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); - if ( syncManager->mShowSyncSummary ) { - KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); - } qDebug( mes ); + if ( syncManager->mShowSyncSummary ) { + if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, + i18n("KA/Pi Synchronization"),i18n("Write back"))) { + qDebug("cancelled "); + return false; + } + } return syncOK; } @@ -2874,7 +2893,8 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) abLocal.saveAB(); abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true ); } - } + } else + message( i18n("Sync cancelled or failed.") ); setModified(); } if ( syncOK ) diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 6831ec9..c01d598 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -152,6 +152,8 @@ class KABCore : public QWidget, public KSyncInterface void faq(); void whatsnew() ; void synchowto() ; + void multisynchowto() ; + void kdesynchowto() ; void writeToPhone(); /** @@ -454,6 +456,8 @@ class KABCore : public QWidget, public KSyncInterface KAction *mActionFaq; KAction *mActionWN; KAction *mActionSyncHowto; + KAction *mActionKdeSyncHowto; + KAction *mActionMultiSyncHowto; KAction *mActionDeleteView; |