summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp30
-rw-r--r--kaddressbook/kabcore.h4
-rw-r--r--korganizer/calendarview.cpp12
-rw-r--r--korganizer/mainwindow.cpp48
-rw-r--r--korganizer/mainwindow.h2
-rw-r--r--libkdepim/ksyncmanager.cpp4
6 files changed, 73 insertions, 27 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index 5ebd3a4..bdc5bd8 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -1889,48 +1889,54 @@ void KABCore::initActions()
mActionCategories = new KAction( i18n( "Set Categories" ), 0, this,
SLOT( setCategories() ), actionCollection(),
"edit_set_categories" );
mActionRemoveVoice = new KAction( i18n( "Remove \"voice\"..." ), 0, this,
SLOT( removeVoice() ), actionCollection(),
"remove_voice" );
mActionImportOL = new KAction( i18n( "Import from Outlook..." ), 0, this,
SLOT( importFromOL() ), actionCollection(),
"import_OL" );
#ifdef KAB_EMBEDDED
mActionLicence = new KAction( i18n( "Licence" ), 0,
this, SLOT( showLicence() ), actionCollection(),
"licence_about_data" );
mActionFaq = new KAction( i18n( "Faq" ), 0,
this, SLOT( faq() ), actionCollection(),
"faq_about_data" );
mActionWN = new KAction( i18n( "What's New?" ), 0,
this, SLOT( whatsnew() ), actionCollection(),
"wn" );
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(),
"kaddressbook_about_data" );
#endif //KAB_EMBEDDED
clipboardDataChanged();
connect( UndoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
connect( RedoStack::instance(), SIGNAL( changed() ), SLOT( updateActionMenu() ) );
}
//US we need this function, to plug all actions into the correct menues.
// KDE uses a XML format to plug the actions, but we work her without this overhead.
void KABCore::addActionsManually()
{
//US qDebug("KABCore::initActions(): mIsPart %i", mIsPart);
#ifdef KAB_EMBEDDED
QPopupMenu *fileMenu = new QPopupMenu( this );
QPopupMenu *editMenu = new QPopupMenu( this );
QPopupMenu *helpMenu = new QPopupMenu( this );
KToolBar* tb = mMainWindow->toolBar();
@@ -2030,50 +2036,52 @@ void KABCore::addActionsManually()
//mActionConfigShortcuts->plug( settingsMenu );
//mActionConfigureToolbars->plug( settingsMenu );
} else {
//US not implemented yet
//mActionKeyBindings->plug( settingsMenu );
}
settingsMenu->insertSeparator();
mActionJumpBar->plug( settingsMenu );
mActionDetails->plug( settingsMenu );
//if (!KABPrefs::instance()->mMultipleViewsAtOnce || KGlobal::getDesktopSize() == KGlobal::Desktop )
mActionDetails->plug( tb );
settingsMenu->insertSeparator();
mActionBR->plug(settingsMenu );
settingsMenu->insertSeparator();
mActionWhoAmI->plug( settingsMenu );
mActionCategories->plug( settingsMenu );
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 ) {
mActionSave->plug( tb );
mViewManager->getFilterAction()->plug ( tb);
if (KGlobal::getDesktopSize() == KGlobal::Desktop ) {
mActionUndo->plug( tb );
mActionDelete->plug( tb );
mActionRedo->plug( tb );
}
} else {
mActionSave->plug( tb );
tb->enableMoving(false);
}
//mActionQuit->plug ( tb );
// tb->insertWidget(-1, 0, mIncSearchWidget, 6);
//US link the searchwidget first to this.
// The real linkage to the toolbar happens later.
//US mIncSearchWidget->reparent(tb, 0, QPoint(50,0), TRUE);
//US tb->insertItem( mIncSearchWidget );
/*US
mIncSearchWidget = new IncSearchWidget( tb );
@@ -2329,49 +2337,56 @@ void KABCore::requestForDetails(const QString& sourceChannel, const QString& ses
mMainWindow->showMaximized();
mMainWindow-> raise();
mViewManager->setSelected( "", false);
mViewManager->refreshView( "" );
mViewManager->setSelected( foundUid, true );
mViewManager->refreshView( foundUid );
if ( !mMultipleViewsAtOnce )
{
setDetailsVisible( true );
mActionDetails->setChecked(true);
}
}
}
void KABCore::whatsnew()
{
KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
}
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" );
}
#include <libkcal/syncdefines.h>
KABC::Addressee KABCore::getLastSyncAddressee()
{
Addressee lse;
QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
//qDebug("CurrentSyncDevice %s ",mCurrentSyncDevice .latin1() );
lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice );
if (lse.isEmpty()) {
qDebug("Creating new last-syncAddressee ");
lse.setUid( "last-syncAddressee-"+mCurrentSyncDevice );
QString sum = "";
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL )
sum = "E: ";
lse.setFamilyName("!"+sum+mCurrentSyncDevice + i18n(" - sync event"));
lse.setRevision( mLastAddressbookSync );
lse.setCategories( i18n("SyncEvent") );
mAddressBook->insertAddressee( lse );
@@ -2757,52 +2772,56 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo
++incCounter;
}
el.clear();
syncManager->hideProgressBar();
mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 );
// get rid of micro seconds
QTime t = mLastAddressbookSync.time();
mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) );
addresseeLSync.setRevision( mLastAddressbookSync );
addresseeRSync.setRevision( mLastAddressbookSync );
addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ;
addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName );
addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ;
addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") );
addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ;
addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() );
addresseeRSync.setNote( "" ) ;
addresseeLSync.setNote( "" );
if ( mGlobalSyncMode == SYNC_MODE_NORMAL)
remote->insertAddressee( addresseeRSync, false );
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 );
+ qDebug( mes );
if ( syncManager->mShowSyncSummary ) {
- KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") );
+ if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes,
+ i18n("KA/Pi Synchronization"),i18n("Write back"))) {
+ qDebug("cancelled ");
+ return false;
+ }
}
- qDebug( mes );
return syncOK;
}
//this is a overwritten callbackmethods from the syncinterface
bool KABCore::sync(KSyncManager* manager, QString filename, int mode)
{
//pending prepare addresseeview for output
//pending detect, if remote file has REV field. if not switch to external sync
mGlobalSyncMode = SYNC_MODE_NORMAL;
QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
AddressBook abLocal(filename,"syncContact");
bool syncOK = false;
if ( abLocal.load() ) {
qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode );
bool external = false;
bool isXML = false;
if ( filename.right(4) == ".xml") {
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
isXML = true;
abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true );
} else {
@@ -2853,49 +2872,50 @@ void KABCore::removeSyncInfo( QString syncProfile)
}
//this is a overwritten callbackmethods from the syncinterface
bool KABCore::syncExternal(KSyncManager* manager, QString resource)
{
if ( resource == "phone" )
return syncPhone();
disableBR( true );
QString mCurrentSyncDevice = manager->getCurrentSyncDevice();
AddressBook abLocal( resource,"syncContact");
bool syncOK = false;
if ( abLocal.load() ) {
qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1());
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, false );
syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs );
if ( syncOK ) {
if ( syncManager->mWriteBackFile ) {
abLocal.removeSyncAddressees( false );
abLocal.saveAB();
abLocal.postExternSync( mAddressBook,mCurrentSyncDevice, true );
}
- }
+ } else
+ message( i18n("Sync cancelled or failed.") );
setModified();
}
if ( syncOK )
mViewManager->refreshView();
disableBR( false );
return syncOK;
}
void KABCore::message( QString m )
{
topLevelWidget()->setCaption( m );
mMessageTimer->start( 15000, true );
}
bool KABCore::syncPhone()
{
QString mCurrentSyncDevice = syncManager->getCurrentSyncDevice();
QString fileName = getPhoneFile();
if ( !PhoneAccess::readFromPhone( fileName) ) {
message(i18n("Phone access failed!"));
return false;
}
AddressBook abLocal( fileName,"syncContact");
bool syncOK = false;
{
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h
index 6831ec9..c01d598 100644
--- a/kaddressbook/kabcore.h
+++ b/kaddressbook/kabcore.h
@@ -131,48 +131,50 @@ class KABCore : public QWidget, public KSyncInterface
resource or a null pointer if no resource was selected by
the user.
*/
KABC::Resource *requestResource( QWidget *parent );
#ifndef KAB_EMBEDDED
static KAboutData *createAboutData();
#endif //KAB_EMBEDDED
#ifdef KAB_EMBEDDED
inline QPopupMenu* getImportMenu() { return ImportMenu;}
inline QPopupMenu* getExportMenu() { return ExportMenu;}
#endif //KAB_EMBEDDED
public slots:
#ifdef KAB_EMBEDDED
void createAboutData();
#endif //KAB_EMBEDDED
void setDetailsToggle();
void showLicence();
void faq();
void whatsnew() ;
void synchowto() ;
+ void multisynchowto() ;
+ void kdesynchowto() ;
void writeToPhone();
/**
Is called whenever a contact is selected in the view.
*/
void setContactSelected( const QString &uid );
/**
Opens the preferred mail composer with all selected contacts as
arguments.
*/
void sendMail();
/**
Opens the preferred mail composer with the given contacts as
arguments.
*/
void sendMail( const QString& email );
void mailVCard();
void mailVCard(const QStringList& uids);
/**
@@ -433,48 +435,50 @@ class KABCore : public QWidget, public KSyncInterface
//US edit menu
KAction *mActionCopy;
KAction *mActionCut;
KAction *mActionPaste;
KAction *mActionSelectAll;
KAction *mActionUndo;
KAction *mActionRedo;
KAction *mActionDelete;
//US settings menu
KAction *mActionConfigResources;
KAction *mActionConfigKAddressbook;
KAction *mActionConfigShortcuts;
KAction *mActionConfigureToolbars;
KAction *mActionKeyBindings;
KToggleAction *mActionJumpBar;
KToggleAction *mActionDetails;
KAction *mActionWhoAmI;
KAction *mActionCategories;
KAction *mActionAboutKAddressbook;
KAction *mActionLicence;
KAction *mActionFaq;
KAction *mActionWN;
KAction *mActionSyncHowto;
+ KAction *mActionKdeSyncHowto;
+ KAction *mActionMultiSyncHowto;
KAction *mActionDeleteView;
QPopupMenu *viewMenu;
QPopupMenu *filterMenu;
QPopupMenu *settingsMenu;
QPopupMenu *changeMenu;
//US QAction *mActionSave;
QPopupMenu *ImportMenu;
QPopupMenu *ExportMenu;
//LR additional methods
KAction *mActionRemoveVoice;
KAction * mActionImportOL;
#ifndef KAB_EMBEDDED
KAddressBookService *mAddressBookService;
#endif //KAB_EMBEDDED
class KABCorePrivate;
KABCorePrivate *d;
//US bool mBlockSaveFlag;
#ifdef KAB_EMBEDDED
KAddressBookMain *mMainWindow; // should be the same like mGUIClient
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 6e61351..4667918 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1173,53 +1173,57 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
inR = er.next();
}
}
bar.hide();
mLastCalendarSync = QDateTime::currentDateTime().addSecs( 1 );
eventLSync->setReadOnly( false );
eventLSync->setDtStart( mLastCalendarSync );
eventRSync->setDtStart( mLastCalendarSync );
eventLSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
eventRSync->setDtEnd( mLastCalendarSync.addSecs( 3600 ) );
eventRSync->setLocation( i18n("Remote from: ")+mCurrentSyncName ) ;
eventLSync->setLocation(i18n("Local from: ") + mCurrentSyncName );
eventLSync->setReadOnly( true );
if ( mGlobalSyncMode == SYNC_MODE_NORMAL && !mSyncManager->syncWithDesktop()) // kde is abnormal...
remote->addEvent( eventRSync );
else
delete eventRSync;
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"),addedEvent, addedEventR, changedLocal, changedRemote, deletedEventL, deletedEventR );
QString delmess;
if ( delFut ) {
delmess.sprintf( i18n("%d items skipped on remote,\nbecause they are in the past or\nmore than %d weeks in the future.\nAfter skipping, remote has\n%d calendar/todo items."), delFut,mSyncManager->mWriteBackInFuture, remRem-delFut);
mes += delmess;
}
+ 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;
}
void CalendarView::setSyncDevice( QString s )
{
mCurrentSyncDevice= s;
}
void CalendarView::setSyncName( QString s )
{
mCurrentSyncName= s;
}
bool CalendarView::syncCalendar(QString filename, int mode)
{
//qDebug("syncCalendar %s ", filename.latin1());
mGlobalSyncMode = SYNC_MODE_NORMAL;
CalendarLocal* calendar = new CalendarLocal();
calendar->setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
FileStorage* storage = new FileStorage( calendar );
bool syncOK = false;
storage->setFileName( filename );
// qDebug("loading ... ");
if ( storage->load() ) {
getEventViewerDialog()->setSyncMode( true );
syncOK = synchronizeCalendar( mCalendar, calendar, mode );
@@ -1291,48 +1295,50 @@ void CalendarView::syncExternal( int mode )
sharpFormat->save(calendar);
#endif
if ( phoneFormat )
phoneFormat->save(calendar);
iL = calendar->rawIncidences();
inc = iL.first();
Incidence* loc;
while ( inc ) {
if ( inc->tempSyncStat() == SYNC_TEMPSTATE_NEW_ID ) {
loc = mCalendar->incidence(inc->uid() );
if ( loc ) {
loc->setID(mCurrentSyncDevice, inc->getID(mCurrentSyncDevice) );
loc->setCsum( mCurrentSyncDevice, inc->getCsum(mCurrentSyncDevice) );
}
}
inc = iL.next();
}
Incidence* lse = getLastSyncEvent();
if ( lse ) {
lse->setReadOnly( false );
lse->setDescription( "" );
lse->setReadOnly( true );
}
}
+ } else {
+ topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
}
setModified( true );
} else {
QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ;
QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"),
question, i18n("Ok")) ;
}
delete calendar;
updateView();
emit tempDisableBR(false);
return ;//syncOK;
}
bool CalendarView::importBday()
{
#ifndef KORG_NOKABC
#ifdef DESKTOP_VERSION
KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
KABC::AddressBook::Iterator it;
int count = 0;
for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index fc2d59b..65566b5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -828,90 +828,97 @@ void MainWindow::initActions()
action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ),
this, SLOT( printCal() ) );
icon = loadPixmap( pathString + "print" );
action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ),
this, SLOT( printSel() ) );
#endif
importMenu->insertSeparator();
action = new QAction( "beam all", i18n("Save"), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), this, SLOT( save() ) );
action = new QAction( "beam all", i18n("Exit (+save)"), 0,
this );
action->addTo( importMenu );
connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
//menuBar->insertItem( "Configure",configureMenu );
//configureMenu->insertItem( "Toolbar",configureToolBarMenu );
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 );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
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 );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( aboutAutoSaving() ) );
action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( aboutKnownBugs() ) );
action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
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 );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
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 );
action->addTo( helpMenu );
connect( action, SIGNAL( activated() ),
SLOT( licence() ) );
+ action = new QAction( "about", i18n("About..."), 0, this );
+ action->addTo( helpMenu );
+ connect( action, SIGNAL( activated() ),
+ SLOT( about() ) );
//menuBar->insertSeparator();
// ******************************************************
// menubar icons
iconToolBar->setHorizontalStretchable (true );
//menuBar->insertItem( iconToolBar );
//xdays_action
if (p-> mShowIconNewEvent)
ne_action->addTo( iconToolBar );
if (p->mShowIconNewTodo )
nt_action->addTo( iconToolBar );
if (p-> mShowIconSearch)
search_action->addTo( iconToolBar );
if (p-> mShowIconNext)
whatsnext_action->addTo( iconToolBar );
if (p-> mShowIconNextDays)
xdays_action->addTo( iconToolBar );
if (p-> mShowIconList)
showlist_action->addTo( iconToolBar );
if (p-> mShowIconDay1)
day1_action->addTo( iconToolBar );
if (p-> mShowIconDay5)
@@ -1126,51 +1133,58 @@ void MainWindow::displayFile( QString fn, QString cap )
QString fileName = resourcePath() + fn;
QString text;
QFile file( fileName );
if (!file.open( IO_ReadOnly ) ) {
return ;
}
QTextStream ts( &file );
text = ts.read();
file.close();
displayText( text, cap);
}
void MainWindow::features()
{
displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") );
}
void MainWindow::usertrans()
{
displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") );
}
+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" );
}
void MainWindow::faq()
{
displayFile( "kopiFAQ.txt",i18n("KO/Pi FAQ") );
}
void MainWindow::whatsNew()
{
KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
}
void MainWindow::licence()
{
KApplication::showLicence();
}
void MainWindow::about()
{
QString version;
#include <../version>
QMessageBox::about( this, i18n("About KOrganizer/Pi"),
i18n("KOrganizer/Platform-independent\n") +
"(KO/Pi) " + version + " - " +
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 0926313..ed65d36 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -32,48 +32,50 @@ class CalendarLocal;
using namespace KCal;
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
MainWindow( QWidget *parent = 0, const char *name = 0, QString command = "");
~MainWindow();
bool beamReceiveEnabled();
public slots:
virtual void showMaximized ();
void configureAgenda( int );
void recieve( const QCString& msg, const QByteArray& data );
static QString defaultFileName();
static QString syncFileName();
static QString resourcePath();
protected slots:
void setCaptionToDates();
void about();
void licence();
void faq();
void usertrans();
void features();
void synchowto();
+ void kdesynchowto();
+ void multisynchowto();
void whatsNew();
void keyBindings();
void aboutAutoSaving();;
void aboutKnownBugs();
void processIncidenceSelection( Incidence * );
void importQtopia();
void importBday();
void importOL();
void importIcal();
void importFile( QString, bool );
void quickImportIcal();
void slotModifiedChanged( bool );
void save();
void configureToolBar( int );
void printSel();
void printCal();
void saveCalendar();
void loadCalendar();
void exportVCalendar();
void fillFilterMenu();
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 17e6c75..9857e3e 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -459,83 +459,83 @@ bool KSyncManager::syncWithFile( QString fn , bool quick )
int result = QMessageBox::warning( mParent, i18n("Warning!"),
mess );
return ret;
}
int result = 0;
if ( !quick ) {
mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
result = QMessageBox::warning( mParent, i18n("Warning!"),
mess,
i18n("Sync"), i18n("Cancel"), 0,
0, 1 );
if ( result )
return false;
}
if ( mAskForPreferences )
if ( !edit_sync_options()) {
mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
return false;
}
if ( result == 0 ) {
//qDebug("Now sycing ... ");
if ( ret = mImplementation->sync( this, fn, mSyncAlgoPrefs ) )
mParent->topLevelWidget()->setCaption( i18n("Synchronization successful") );
else
- mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed. Nothing synced.") );
+ mParent->topLevelWidget()->setCaption( i18n("Sync cancelled or failed.") );
if ( ! quick )
mPrefs->mLastSyncedLocalFile = fn;
}
return ret;
}
void KSyncManager::quickSyncLocalFile()
{
if ( syncWithFile( mPrefs->mLastSyncedLocalFile, true ) ) {
qDebug("quick syncLocalFile() successful ");
}
}
void KSyncManager::multiSync( bool askforPrefs )
{
if (blockSave())
return;
setBlockSave(true);
QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"),
question,
i18n("Yes"), i18n("No"),
0, 0 ) != 0 ) {
setBlockSave(false);
mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!"));
return;
}
mCurrentSyncDevice = i18n("Multiple profiles") ;
mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs;
if ( askforPrefs ) {
if ( !edit_sync_options()) {
- mParent->topLevelWidget()->setCaption( i18n("Syncing aborted. Nothing synced.") );
+ mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") );
return;
}
mPrefs->mRingSyncAlgoPrefs = mSyncAlgoPrefs;
}
mParent->topLevelWidget()->setCaption(i18n("Multiple sync started.") );
qApp->processEvents();
int num = ringSync() ;
if ( num > 1 )
ringSync();
setBlockSave(false);
if ( num )
emit save();
if ( num )
mParent->topLevelWidget()->setCaption(i18n("%1 profiles synced. Multiple sync complete!").arg(num) );
else
mParent->topLevelWidget()->setCaption(i18n("Nothing synced! No profiles defined for multisync!"));
return;
}
int KSyncManager::ringSync()
{
int syncedProfiles = 0;
unsigned int i;
QTime timer;