summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-10-08 13:31:08 (UTC)
committer zautrix <zautrix>2004-10-08 13:31:08 (UTC)
commitec5bc1b8c708b55884f1e03861204123de097129 (patch) (unidiff)
tree0c5c8a341fd69ed9b45a22a42b9445da8b56a5e8 /korganizer
parent38e390e51967b34d53e19bd275efd1760572cdfb (diff)
downloadkdepimpi-ec5bc1b8c708b55884f1e03861204123de097129.zip
kdepimpi-ec5bc1b8c708b55884f1e03861204123de097129.tar.gz
kdepimpi-ec5bc1b8c708b55884f1e03861204123de097129.tar.bz2
cleanup
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp36
-rw-r--r--korganizer/calendarview.h4
-rw-r--r--korganizer/mainwindow.cpp4
3 files changed, 12 insertions, 32 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 04051a2..0c35bb3 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -689,29 +689,24 @@ QDate CalendarView::endDate()
689 689
690 690
691void CalendarView::createPrinter() 691void CalendarView::createPrinter()
692{ 692{
693#ifndef KORG_NOPRINTER 693#ifndef KORG_NOPRINTER
694 if (!mCalPrinter) { 694 if (!mCalPrinter) {
695 mCalPrinter = new CalPrinter(this, mCalendar); 695 mCalPrinter = new CalPrinter(this, mCalendar);
696 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig())); 696 connect(this, SIGNAL(configChanged()), mCalPrinter, SLOT(updateConfig()));
697 } 697 }
698#endif 698#endif
699} 699}
700 700
701void CalendarView::confSync()
702{
703 //DELETE
704}
705
706 701
707//KOPrefs::instance()->mWriteBackFile 702//KOPrefs::instance()->mWriteBackFile
708//KOPrefs::instance()->mWriteBackExistingOnly 703//KOPrefs::instance()->mWriteBackExistingOnly
709 704
710// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict")); 705// 0 syncPrefsGroup->addRadio(i18n("Take local entry on conflict"));
711// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict")); 706// 1 syncPrefsGroup->addRadio(i18n("Take remote entry on conflict"));
712// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict")); 707// 2 syncPrefsGroup->addRadio(i18n("Take newest entry on conflict"));
713// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict")); 708// 3 syncPrefsGroup->addRadio(i18n("Ask for every entry on conflict"));
714// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always")); 709// 4 syncPrefsGroup->addRadio(i18n("Force take local entry always"));
715// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always")); 710// 5 syncPrefsGroup->addRadio(i18n("Force take remote entry always"));
716 711
717int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full ) 712int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , bool full )
@@ -1192,24 +1187,25 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
1192} 1187}
1193 1188
1194void CalendarView::setSyncDevice( QString s ) 1189void CalendarView::setSyncDevice( QString s )
1195{ 1190{
1196 mCurrentSyncDevice= s; 1191 mCurrentSyncDevice= s;
1197} 1192}
1198void CalendarView::setSyncName( QString s ) 1193void CalendarView::setSyncName( QString s )
1199{ 1194{
1200 mCurrentSyncName= s; 1195 mCurrentSyncName= s;
1201} 1196}
1202bool CalendarView::syncCalendar(QString filename, int mode) 1197bool CalendarView::syncCalendar(QString filename, int mode)
1203{ 1198{
1199 //qDebug("syncCalendar %s ", filename.latin1());
1204 mGlobalSyncMode = SYNC_MODE_NORMAL; 1200 mGlobalSyncMode = SYNC_MODE_NORMAL;
1205 CalendarLocal* calendar = new CalendarLocal(); 1201 CalendarLocal* calendar = new CalendarLocal();
1206 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 1202 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
1207 FileStorage* storage = new FileStorage( calendar ); 1203 FileStorage* storage = new FileStorage( calendar );
1208 bool syncOK = false; 1204 bool syncOK = false;
1209 storage->setFileName( filename ); 1205 storage->setFileName( filename );
1210 // qDebug("loading ... "); 1206 // qDebug("loading ... ");
1211 if ( storage->load() ) { 1207 if ( storage->load() ) {
1212 getEventViewerDialog()->setSyncMode( true ); 1208 getEventViewerDialog()->setSyncMode( true );
1213 syncOK = synchronizeCalendar( mCalendar, calendar, mode ); 1209 syncOK = synchronizeCalendar( mCalendar, calendar, mode );
1214 getEventViewerDialog()->setSyncMode( false ); 1210 getEventViewerDialog()->setSyncMode( false );
1215 if ( syncOK ) { 1211 if ( syncOK ) {
@@ -1218,28 +1214,25 @@ bool CalendarView::syncCalendar(QString filename, int mode)
1218 storage->setSaveFormat( new ICalFormat() ); 1214 storage->setSaveFormat( new ICalFormat() );
1219 storage->save(); 1215 storage->save();
1220 } 1216 }
1221 } 1217 }
1222 setModified( true ); 1218 setModified( true );
1223 } 1219 }
1224 delete storage; 1220 delete storage;
1225 delete calendar; 1221 delete calendar;
1226 if ( syncOK ) 1222 if ( syncOK )
1227 updateView(); 1223 updateView();
1228 return syncOK; 1224 return syncOK;
1229} 1225}
1230void CalendarView::syncPhone() 1226
1231{
1232 //DELETE
1233}
1234void CalendarView::syncExternal( int mode ) 1227void CalendarView::syncExternal( int mode )
1235{ 1228{
1236 mGlobalSyncMode = SYNC_MODE_EXTERNAL; 1229 mGlobalSyncMode = SYNC_MODE_EXTERNAL;
1237 1230
1238 qApp->processEvents(); 1231 qApp->processEvents();
1239 CalendarLocal* calendar = new CalendarLocal(); 1232 CalendarLocal* calendar = new CalendarLocal();
1240 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId); 1233 calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
1241 bool syncOK = false; 1234 bool syncOK = false;
1242 bool loadSuccess = false; 1235 bool loadSuccess = false;
1243 PhoneFormat* phoneFormat = 0; 1236 PhoneFormat* phoneFormat = 0;
1244#ifndef DESKTOP_VERSION 1237#ifndef DESKTOP_VERSION
1245 SharpFormat* sharpFormat = 0; 1238 SharpFormat* sharpFormat = 0;
@@ -1304,30 +1297,24 @@ void CalendarView::syncExternal( int mode )
1304 setModified( true ); 1297 setModified( true );
1305 } else { 1298 } else {
1306 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ; 1299 QString question = i18n("Sorry, the database access\ncommand failed!\n\nNothing synced!\n") ;
1307 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"), 1300 QMessageBox::information( 0, i18n("KO/Pi Import - ERROR"),
1308 question, i18n("Ok")) ; 1301 question, i18n("Ok")) ;
1309 1302
1310 } 1303 }
1311 delete calendar; 1304 delete calendar;
1312 updateView(); 1305 updateView();
1313 return ;//syncOK; 1306 return ;//syncOK;
1314 1307
1315} 1308}
1316void CalendarView::syncSharp()
1317{
1318 //DELETE
1319
1320}
1321
1322 1309
1323bool CalendarView::importBday() 1310bool CalendarView::importBday()
1324{ 1311{
1325#ifndef KORG_NOKABC 1312#ifndef KORG_NOKABC
1326 1313
1327#ifdef DESKTOP_VERSION 1314#ifdef DESKTOP_VERSION
1328 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true ); 1315 KABC::StdAddressBook* AddressBook = KABC::StdAddressBook::self( true );
1329 KABC::AddressBook::Iterator it; 1316 KABC::AddressBook::Iterator it;
1330 int count = 0; 1317 int count = 0;
1331 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) { 1318 for( it = AddressBook->begin(); it != AddressBook->end(); ++it ) {
1332 ++count; 1319 ++count;
1333 } 1320 }
@@ -1580,28 +1567,31 @@ bool CalendarView::openCalendar(QString filename, bool merge)
1580 //setModified( true ); 1567 //setModified( true );
1581 mViewManager->setDocumentId( filename ); 1568 mViewManager->setDocumentId( filename );
1582 mDialogManager->setDocumentId( filename ); 1569 mDialogManager->setDocumentId( filename );
1583 mTodoList->setDocumentId( filename ); 1570 mTodoList->setDocumentId( filename );
1584 } 1571 }
1585 globalFlagBlockAgenda = 2; 1572 globalFlagBlockAgenda = 2;
1586 // if ( getLastSyncEvent() ) 1573 // if ( getLastSyncEvent() )
1587 // getLastSyncEvent()->setReadOnly( true ); 1574 // getLastSyncEvent()->setReadOnly( true );
1588 mCalendar->reInitAlarmSettings(); 1575 mCalendar->reInitAlarmSettings();
1589 setSyncEventsReadOnly(); 1576 setSyncEventsReadOnly();
1590 updateUnmanagedViews(); 1577 updateUnmanagedViews();
1591 updateView(); 1578 updateView();
1592 setLoadedFileVersion( QDateTime::currentDateTime().addSecs( -1 ));
1593 if ( filename != MainWindow::defaultFileName() ) { 1579 if ( filename != MainWindow::defaultFileName() ) {
1594 saveCalendar( MainWindow::defaultFileName() ); 1580 saveCalendar( MainWindow::defaultFileName() );
1595 watchSavedFile(); 1581 } else {
1582 QFileInfo finf ( MainWindow::defaultFileName());
1583 if ( finf.exists() ) {
1584 setLoadedFileVersion( finf.lastModified () );
1585 }
1596 } 1586 }
1597 return true; 1587 return true;
1598 } else { 1588 } else {
1599 // while failing to load, the calendar object could 1589 // while failing to load, the calendar object could
1600 // have become partially populated. Clear it out. 1590 // have become partially populated. Clear it out.
1601 if ( !merge ) { 1591 if ( !merge ) {
1602 mCalendar->close(); 1592 mCalendar->close();
1603 mViewManager->setDocumentId( filename ); 1593 mViewManager->setDocumentId( filename );
1604 mDialogManager->setDocumentId( filename ); 1594 mDialogManager->setDocumentId( filename );
1605 mTodoList->setDocumentId( filename ); 1595 mTodoList->setDocumentId( filename );
1606 } 1596 }
1607 1597
@@ -1680,34 +1670,37 @@ bool CalendarView::checkFileVersion(QString fn)
1680 updateView(); 1670 updateView();
1681 return true; 1671 return true;
1682} 1672}
1683 1673
1684bool CalendarView::saveCalendar( QString filename ) 1674bool CalendarView::saveCalendar( QString filename )
1685{ 1675{
1686 1676
1687 // Store back all unsaved data into calendar object 1677 // Store back all unsaved data into calendar object
1688 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() ); 1678 // qDebug("file %s %d ", filename.latin1() , mViewManager->currentView() );
1689 if ( mViewManager->currentView() ) 1679 if ( mViewManager->currentView() )
1690 mViewManager->currentView()->flushView(); 1680 mViewManager->currentView()->flushView();
1691 1681
1692 //mStorage->setFileName( filename );
1693 1682
1683 QDateTime lfv = QDateTime::currentDateTime().addSecs( -2);
1694 mStorage->setSaveFormat( new ICalFormat() ); 1684 mStorage->setSaveFormat( new ICalFormat() );
1695 mStorage->setFileName( filename ); 1685 mStorage->setFileName( filename );
1696 bool success; 1686 bool success;
1697 success = mStorage->save(); 1687 success = mStorage->save();
1698 if ( !success ) { 1688 if ( !success ) {
1699 return false; 1689 return false;
1700 } 1690 }
1701 1691 if ( filename == MainWindow::defaultFileName() ) {
1692 setLoadedFileVersion( lfv );
1693 watchSavedFile();
1694 }
1702 return true; 1695 return true;
1703} 1696}
1704 1697
1705void CalendarView::closeCalendar() 1698void CalendarView::closeCalendar()
1706{ 1699{
1707 1700
1708 // child windows no longer valid 1701 // child windows no longer valid
1709 emit closingDown(); 1702 emit closingDown();
1710 1703
1711 mCalendar->close(); 1704 mCalendar->close();
1712 setModified(false); 1705 setModified(false);
1713 updateView(); 1706 updateView();
@@ -2173,29 +2166,24 @@ void CalendarView::edit_paste()
2173 2166
2174 DndFactory factory( mCalendar ); 2167 DndFactory factory( mCalendar );
2175 Event *pastedEvent = factory.pasteEvent( date ); 2168 Event *pastedEvent = factory.pasteEvent( date );
2176 2169
2177 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); 2170 changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED );
2178} 2171}
2179 2172
2180void CalendarView::edit_options() 2173void CalendarView::edit_options()
2181{ 2174{
2182 mDialogManager->showOptionsDialog(); 2175 mDialogManager->showOptionsDialog();
2183 //writeSettings(); 2176 //writeSettings();
2184} 2177}
2185void CalendarView::edit_sync_options()
2186{
2187 // DELETE
2188
2189}
2190 2178
2191void CalendarView::slotSelectPickerDate( QDate d) 2179void CalendarView::slotSelectPickerDate( QDate d)
2192{ 2180{
2193 mDateFrame->hide(); 2181 mDateFrame->hide();
2194 if ( mDatePickerMode == 1 ) { 2182 if ( mDatePickerMode == 1 ) {
2195 mNavigator->slotDaySelect( d ); 2183 mNavigator->slotDaySelect( d );
2196 } else if ( mDatePickerMode == 2 ) { 2184 } else if ( mDatePickerMode == 2 ) {
2197 if ( mMoveIncidence->type() == "Todo" ) { 2185 if ( mMoveIncidence->type() == "Todo" ) {
2198 Todo * to = (Todo *) mMoveIncidence; 2186 Todo * to = (Todo *) mMoveIncidence;
2199 QTime tim; 2187 QTime tim;
2200 if ( to->hasDueDate() ) 2188 if ( to->hasDueDate() )
2201 tim = to->dtDue().time(); 2189 tim = to->dtDue().time();
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 751b8d9..660cce7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -311,25 +311,24 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
311 311
312 /** cut the current appointment to the clipboard */ 312 /** cut the current appointment to the clipboard */
313 void edit_cut(); 313 void edit_cut();
314 314
315 /** copy the current appointment(s) to the clipboard */ 315 /** copy the current appointment(s) to the clipboard */
316 void edit_copy(); 316 void edit_copy();
317 317
318 /** paste the current vobject(s) in the clipboard buffer into calendar */ 318 /** paste the current vobject(s) in the clipboard buffer into calendar */
319 void edit_paste(); 319 void edit_paste();
320 320
321 /** edit viewing and configuration options. */ 321 /** edit viewing and configuration options. */
322 void edit_options(); 322 void edit_options();
323 void edit_sync_options();
324 /** 323 /**
325 Functions for printing, previewing a print, and setting up printing 324 Functions for printing, previewing a print, and setting up printing
326 parameters. 325 parameters.
327 */ 326 */
328 void print(); 327 void print();
329 void printSetup(); 328 void printSetup();
330 void printPreview(); 329 void printPreview();
331 330
332 /** Export as iCalendar file */ 331 /** Export as iCalendar file */
333 void exportICalendar(); 332 void exportICalendar();
334 333
335 /** Export as vCalendar file */ 334 /** Export as vCalendar file */
@@ -427,26 +426,24 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
427 void processTodoListSelection( Incidence * ); 426 void processTodoListSelection( Incidence * );
428 427
429 void processIncidenceSelection( Incidence * ); 428 void processIncidenceSelection( Incidence * );
430 429
431 void purgeCompleted(); 430 void purgeCompleted();
432 bool removeCompletedSubTodos( Todo* ); 431 bool removeCompletedSubTodos( Todo* );
433 void slotCalendarChanged(); 432 void slotCalendarChanged();
434 bool importBday(); 433 bool importBday();
435 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); 434 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday );
436 bool importQtopia( const QString &categoriesFile, 435 bool importQtopia( const QString &categoriesFile,
437 const QString &datebookFile, 436 const QString &datebookFile,
438 const QString &tasklistFile ); 437 const QString &tasklistFile );
439 void syncSharp( );
440 void syncPhone( );
441 void syncExternal( int mode ); 438 void syncExternal( int mode );
442 void slotSelectPickerDate( QDate ) ; 439 void slotSelectPickerDate( QDate ) ;
443 void showDatePicker( ) ; 440 void showDatePicker( ) ;
444 void moveIncidence(Incidence *) ; 441 void moveIncidence(Incidence *) ;
445 void beamIncidence(Incidence *) ; 442 void beamIncidence(Incidence *) ;
446 void beamCalendar() ; 443 void beamCalendar() ;
447 void beamFilteredCalendar() ; 444 void beamFilteredCalendar() ;
448 void beamIncidenceList(QPtrList<Incidence>) ; 445 void beamIncidenceList(QPtrList<Incidence>) ;
449 void manageCategories(); 446 void manageCategories();
450 int addCategories(); 447 int addCategories();
451 void removeCategories(); 448 void removeCategories();
452 void setSyncDevice( QString ); 449 void setSyncDevice( QString );
@@ -457,25 +454,24 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
457 void beamDone( Ir *ir ); 454 void beamDone( Ir *ir );
458 /** Select a view or adapt the current view to display the specified dates. */ 455 /** Select a view or adapt the current view to display the specified dates. */
459 void showDates( const KCal::DateList & ); 456 void showDates( const KCal::DateList & );
460 void selectWeekNum ( int ); 457 void selectWeekNum ( int );
461 458
462 public: 459 public:
463 // show a standard warning 460 // show a standard warning
464 // returns KMsgBox::yesNoCancel() 461 // returns KMsgBox::yesNoCancel()
465 int msgCalModified(); 462 int msgCalModified();
466 virtual bool sync(KSyncManager* manager, QString filename, int mode); 463 virtual bool sync(KSyncManager* manager, QString filename, int mode);
467 464
468 virtual bool syncExternal(KSyncManager* manager, QString resource); 465 virtual bool syncExternal(KSyncManager* manager, QString resource);
469 void confSync();
470 void setSyncManager(KSyncManager* manager); 466 void setSyncManager(KSyncManager* manager);
471 void setLoadedFileVersion(QDateTime); 467 void setLoadedFileVersion(QDateTime);
472 bool checkFileVersion(QString fn); 468 bool checkFileVersion(QString fn);
473 bool checkFileChanged(QString fn); 469 bool checkFileChanged(QString fn);
474 Event* getLastSyncEvent(); 470 Event* getLastSyncEvent();
475 /** Adapt navigation units correpsonding to step size of navigation of the 471 /** Adapt navigation units correpsonding to step size of navigation of the
476 * current view. 472 * current view.
477 */ 473 */
478 void adaptNavigationUnits(); 474 void adaptNavigationUnits();
479 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); 475 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode );
480 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); 476 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false );
481 //Attendee* getYourAttendee(Event *event); 477 //Attendee* getYourAttendee(Event *event);
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index c7ce8cb..2d17986 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1375,29 +1375,27 @@ void MainWindow::slotModifiedChanged( bool changed )
1375 mCalendarModifiedFlag = true; 1375 mCalendarModifiedFlag = true;
1376} 1376}
1377void MainWindow::save() 1377void MainWindow::save()
1378{ 1378{
1379 if ( mSyncManager->blockSave() ) 1379 if ( mSyncManager->blockSave() )
1380 return; 1380 return;
1381 mSyncManager->setBlockSave(true); 1381 mSyncManager->setBlockSave(true);
1382 if ( mView->checkFileVersion( defaultFileName()) ) { 1382 if ( mView->checkFileVersion( defaultFileName()) ) {
1383 1383
1384 QTime neededSaveTime = QDateTime::currentDateTime().time(); 1384 QTime neededSaveTime = QDateTime::currentDateTime().time();
1385 setCaption(i18n("KO/Pi:Saving Data to File ..." )); 1385 setCaption(i18n("KO/Pi:Saving Data to File ..." ));
1386 qDebug("KO: Start saving data to file!"); 1386 qDebug("KO: Start saving data to file!");
1387 mView->setLoadedFileVersion(QDateTime::currentDateTime().addSecs( -1));
1388 mView->saveCalendar( defaultFileName() ); 1387 mView->saveCalendar( defaultFileName() );
1389 1388
1390 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); 1389 int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
1391 mView->watchSavedFile();
1392 qDebug("KO: Needed %d ms for saving.",msNeeded ); 1390 qDebug("KO: Needed %d ms for saving.",msNeeded );
1393 QString savemes; 1391 QString savemes;
1394 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); 1392 savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
1395 setCaption(savemes); 1393 setCaption(savemes);
1396 } else 1394 } else
1397 setCaption(i18n("Saving cancelled!")); 1395 setCaption(i18n("Saving cancelled!"));
1398 mCalendarModifiedFlag = false; 1396 mCalendarModifiedFlag = false;
1399 mSyncManager->setBlockSave( false ); 1397 mSyncManager->setBlockSave( false );
1400} 1398}
1401 1399
1402void MainWindow::keyReleaseEvent ( QKeyEvent * e) 1400void MainWindow::keyReleaseEvent ( QKeyEvent * e)
1403{ 1401{
@@ -1812,28 +1810,26 @@ void MainWindow::exportVCalendar()
1812} 1810}
1813 1811
1814void MainWindow::syncFileRequest() 1812void MainWindow::syncFileRequest()
1815{ 1813{
1816 save(); 1814 save();
1817} 1815}
1818void MainWindow::getFile( bool success ) 1816void MainWindow::getFile( bool success )
1819{ 1817{
1820 if ( ! success ) { 1818 if ( ! success ) {
1821 setCaption( i18n("Error receiving file. Nothing changed!") ); 1819 setCaption( i18n("Error receiving file. Nothing changed!") );
1822 return; 1820 return;
1823 } 1821 }
1824 mView->watchSavedFile();
1825 mView->openCalendar( defaultFileName() ); 1822 mView->openCalendar( defaultFileName() );
1826 setCaption( i18n("Pi-Sync successful!") ); 1823 setCaption( i18n("Pi-Sync successful!") );
1827
1828} 1824}
1829 1825
1830void MainWindow::printSel( ) 1826void MainWindow::printSel( )
1831{ 1827{
1832 mView->viewManager()->agendaView()->agenda()->printSelection(); 1828 mView->viewManager()->agendaView()->agenda()->printSelection();
1833} 1829}
1834 1830
1835void MainWindow::printCal() 1831void MainWindow::printCal()
1836{ 1832{
1837 mView->print();//mCp->showDialog(); 1833 mView->print();//mCp->showDialog();
1838} 1834}
1839 1835