author | zautrix <zautrix> | 2004-10-28 11:03:42 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-28 11:03:42 (UTC) |
commit | 01cd4ef94b8604532181c390e9abd560aebaf372 (patch) (side-by-side diff) | |
tree | 96ca1a524512ae2e2868f0bd3df03e4da5c445f9 /korganizer | |
parent | 61d9eb436349a841410559f51e2601a34ceb5794 (diff) | |
download | kdepimpi-01cd4ef94b8604532181c390e9abd560aebaf372.zip kdepimpi-01cd4ef94b8604532181c390e9abd560aebaf372.tar.gz kdepimpi-01cd4ef94b8604532181c390e9abd560aebaf372.tar.bz2 |
added howto to menus
-rw-r--r-- | korganizer/calendarview.cpp | 12 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 48 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 2 |
3 files changed, 42 insertions, 20 deletions
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(); |