-rw-r--r-- | kaddressbook/kabcore.cpp | 32 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 4 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 12 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 48 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 2 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 4 |
6 files changed, 74 insertions, 28 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 5ebd3a4..bdc5bd8 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp @@ -1912,2 +1912,8 @@ void KABCore::initActions() "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" ); @@ -2053,4 +2059,6 @@ void KABCore::addActionsManually() mActionSyncHowto->plug( helpMenu ); - mActionLicence->plug( helpMenu ); + mActionKdeSyncHowto->plug( helpMenu ); + mActionMultiSyncHowto->plug( helpMenu ); mActionFaq->plug( helpMenu ); + mActionLicence->plug( helpMenu ); mActionAboutKAddressbook->plug( helpMenu ); @@ -2352,3 +2360,10 @@ void KABCore::synchowto() } - +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() @@ -2780,6 +2795,10 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo 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; @@ -2876,3 +2895,4 @@ bool KABCore::syncExternal(KSyncManager* manager, QString resource) } - } + } else + message( i18n("Sync cancelled or failed.") ); setModified(); diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 6831ec9..c01d598 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h @@ -154,2 +154,4 @@ class KABCore : public QWidget, public KSyncInterface void synchowto() ; + void multisynchowto() ; + void kdesynchowto() ; void writeToPhone(); @@ -456,2 +458,4 @@ class KABCore : public QWidget, public KSyncInterface KAction *mActionSyncHowto; + KAction *mActionKdeSyncHowto; + KAction *mActionMultiSyncHowto; diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 6e61351..4667918 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1196,7 +1196,11 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int } + mCalendar->checkAlarmForIncidence( 0, true ); + qDebug( mes ); if ( mSyncManager->mShowSyncSummary ) { - KMessageBox::information(this, mes, i18n("KO/Pi Synchronization") ); + if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, + i18n("KO/Pi Synchronization"),i18n("Write back"))) { + qDebug("cancelled "); + return false; + } } - qDebug( mes ); - mCalendar->checkAlarmForIncidence( 0, true ); return syncOK; @@ -1314,2 +1318,4 @@ void CalendarView::syncExternal( int mode ) } + } else { + topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); } diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index fc2d59b..65566b5 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -851,6 +851,7 @@ void MainWindow::initActions() icon = loadPixmap( "korganizer/korganizer" ); - action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); + + action = new QAction( "Whats New", i18n("What's new?"), 0,this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), - SLOT( keyBindings() ) ); + SLOT( whatsNew() ) ); action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); @@ -859,2 +860,18 @@ void MainWindow::initActions() SLOT( features() ) ); + action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); + action->addTo( helpMenu ); + connect( action, SIGNAL( activated() ), + SLOT( keyBindings() ) ); + action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); + action->addTo( helpMenu ); + connect( action, SIGNAL( activated() ), + SLOT( synchowto() ) ); + action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); + action->addTo( helpMenu ); + connect( action, SIGNAL( activated() ), + SLOT( kdesynchowto() ) ); + action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); + action->addTo( helpMenu ); + connect( action, SIGNAL( activated() ), + SLOT( multisynchowto() ) ); action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); @@ -871,10 +888,2 @@ void MainWindow::initActions() SLOT( usertrans() ) ); - action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); - action->addTo( helpMenu ); - connect( action, SIGNAL( activated() ), - SLOT( synchowto() ) ); - action = new QAction( "Whats New", i18n("What's new?"), 0,this ); - action->addTo( helpMenu ); - connect( action, SIGNAL( activated() ), - SLOT( whatsNew() ) ); action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); @@ -883,8 +892,2 @@ void MainWindow::initActions() SLOT( faq() ) ); - - - action = new QAction( "about", i18n("About..."), 0, this ); - action->addTo( helpMenu ); - connect( action, SIGNAL( activated() ), - SLOT( about() ) ); action = new QAction( "licence", i18n("Licence..."), 0, this ); @@ -893,2 +896,6 @@ void MainWindow::initActions() SLOT( licence() ) ); + action = new QAction( "about", i18n("About..."), 0, this ); + action->addTo( helpMenu ); + connect( action, SIGNAL( activated() ), + SLOT( about() ) ); //menuBar->insertSeparator(); @@ -1149,5 +1156,12 @@ void MainWindow::usertrans() +void MainWindow::kdesynchowto() +{ + KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); +} +void MainWindow::multisynchowto() +{ + KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); +} void MainWindow::synchowto() { - KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 0926313..ed65d36 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -55,2 +55,4 @@ class MainWindow : public QMainWindow void synchowto(); + void kdesynchowto(); + void multisynchowto(); void whatsNew(); diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 17e6c75..9857e3e 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -482,3 +482,3 @@ bool KSyncManager::syncWithFile( QString fn , bool quick ) else - mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed. Nothing synced.") ); + mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") ); if ( ! quick ) @@ -516,3 +516,3 @@ void KSyncManager::multiSync( bool askforPrefs ) if ( !edit_sync_options()) { - mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") ); + mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") ); return; |