summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-02 16:54:00 (UTC)
committer zautrix <zautrix>2005-07-02 16:54:00 (UTC)
commit78866028c185f4227bfb653ee2050d7feb2e2b78 (patch) (unidiff)
tree899b85d02584992f608da22f48076f590483d2bd /korganizer
parent20c9e9cb71ad64aebfa27157bb152ece4e34c00a (diff)
downloadkdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.zip
kdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.tar.gz
kdepimpi-78866028c185f4227bfb653ee2050d7feb2e2b78.tar.bz2
fixxxxxxxx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp9
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/kofilterview.cpp4
3 files changed, 11 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 5c88abd..6746de2 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -407,129 +407,129 @@ void CalendarView::init()
407 407
408#ifdef KORG_NORESOURCEVIEW 408#ifdef KORG_NORESOURCEVIEW
409 mResourceView = 0; 409 mResourceView = 0;
410#else 410#else
411 if ( mResourceManager ) { 411 if ( mResourceManager ) {
412 mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); 412 mResourceView = new ResourceView( mResourceManager, mLeftSplitter );
413 mResourceView->updateView(); 413 mResourceView->updateView();
414 connect( mResourceView, SIGNAL( resourcesChanged() ), 414 connect( mResourceView, SIGNAL( resourcesChanged() ),
415 SLOT( updateView() ) ); 415 SLOT( updateView() ) );
416 } else { 416 } else {
417 mResourceView = 0; 417 mResourceView = 0;
418 } 418 }
419#endif 419#endif
420 QWidget *rightBox = new QWidget( mPanner ); 420 QWidget *rightBox = new QWidget( mPanner );
421 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 421 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
422 422
423 mRightFrame = new QWidgetStack( rightBox ); 423 mRightFrame = new QWidgetStack( rightBox );
424 rightLayout->addWidget( mRightFrame, 1 ); 424 rightLayout->addWidget( mRightFrame, 1 );
425 425
426 mLeftFrame = mLeftSplitter; 426 mLeftFrame = mLeftSplitter;
427#else 427#else
428 //QWidget *mainBox = new QWidget( this ); 428 //QWidget *mainBox = new QWidget( this );
429 //QWidget *leftFrame = new QWidget( mainBox ); 429 //QWidget *leftFrame = new QWidget( mainBox );
430 //QBoxLayout * mainBoxLayout; 430 //QBoxLayout * mainBoxLayout;
431 if ( KOPrefs::instance()->mVerticalScreen ) { 431 if ( KOPrefs::instance()->mVerticalScreen ) {
432 //mainBoxLayout = new QVBoxLayout(mainBox); 432 //mainBoxLayout = new QVBoxLayout(mainBox);
433 //leftFrameLayout = new QHBoxLayout(leftFrame ); 433 //leftFrameLayout = new QHBoxLayout(leftFrame );
434 mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); 434 mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this );
435 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 435 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
436 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; 436 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);;
437 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 437 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
438 } else { 438 } else {
439 //mainBoxLayout = new QHBoxLayout(mainBox); 439 //mainBoxLayout = new QHBoxLayout(mainBox);
440 //leftFrameLayout = new QVBoxLayout(leftFrame ); 440 //leftFrameLayout = new QVBoxLayout(leftFrame );
441 mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 441 mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
442 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); 442 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left);
443 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); 443 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame);
444 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 444 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
445 } 445 }
446 mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); 446 mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
447 //QBoxLayout * leftFrameLayout; 447 //QBoxLayout * leftFrameLayout;
448 topLayout->addWidget( mMainFrame ); 448 topLayout->addWidget( mMainFrame );
449#ifdef DESKTOP_VERSION 449#ifdef DESKTOP_VERSION
450 mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); 450 mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this );
451 topLayout->addWidget( mDateScrollBar ); 451 topLayout->addWidget( mDateScrollBar );
452 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); 452 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) );
453 if ( QApplication::desktop()->width() < 800 ) 453 if ( QApplication::desktop()->width() < 800 )
454 mDateScrollBar->hide(); 454 mDateScrollBar->hide();
455#endif 455#endif
456 //mainBoxLayout->addWidget (mLeftFrame); 456 //mainBoxLayout->addWidget (mLeftFrame);
457 mDateNavigator = new DateNavigatorContainer( mLeftFrame, 457 mDateNavigator = new DateNavigatorContainer( mLeftFrame,
458 "CalendarView::DateNavigator" ); 458 "CalendarView::DateNavigator" );
459#if 0 459#if 0
460 // FIXME 460 // FIXME
461 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, 461 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE,
462 "CalendarView::DateNavigator", QDate::currentDate()); 462 "CalendarView::DateNavigator", QDate::currentDate());
463#endif 463#endif
464 // mDateNavigator->blockSignals( true ); 464 // mDateNavigator->blockSignals( true );
465 //leftFrameLayout->addWidget( mDateNavigator ); 465 //leftFrameLayout->addWidget( mDateNavigator );
466 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); 466 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall");
467 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); 467 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView");
468 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); 468 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView");
469 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); 469 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) );
470 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); 470 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) );
471 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); 471 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) );
472 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); 472 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) );
473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); 473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) );
474 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); 474 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) );
475 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); 475 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) );
476 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); 476 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) );
477 connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); 477 connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() ));
478 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); 478 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) );
479 479
480 mTodoList->setNavigator( mNavigator ); 480 mTodoList->setNavigator( mNavigator );
481#if 0 481#if 0
482 if ( QApplication::desktop()->width() < 480 ) { 482 if ( QApplication::desktop()->width() < 480 ) {
483 leftFrameLayout->addWidget(mFilterView); 483 leftFrameLayout->addWidget(mFilterView);
484 leftFrameLayout->addWidget(mTodoList, 2 ); 484 leftFrameLayout->addWidget(mTodoList, 2 );
485 485
486 } else { 486 } else {
487 leftFrameLayout->addWidget(mTodoList,2 ); 487 leftFrameLayout->addWidget(mTodoList,2 );
488 leftFrameLayout->addWidget(mFilterView ); 488 leftFrameLayout->addWidget(mFilterView );
489 } 489 }
490#endif 490#endif
491 mFilterView->hide(); 491 mFilterView->hide();
492 mCalEditView->hide(); 492 mCalEditView->hide();
493 QWidget *rightBox = new QWidget( mMainFrame ); 493 QWidget *rightBox = new QWidget( mMainFrame );
494 //mainBoxLayout->addWidget ( rightBox, 10 ); 494 //mainBoxLayout->addWidget ( rightBox, 10 );
495 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 495 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
496 mRightFrame = new QWidgetStack( rightBox ); 496 mRightFrame = new QWidgetStack( rightBox );
497 rightLayout->addWidget( mRightFrame, 10 ); 497 rightLayout->addWidget( mRightFrame, 10 );
498 498
499 //mLeftFrame = (QWidget *)leftFrame; 499 //mLeftFrame = (QWidget *)leftFrame;
500 if ( KOPrefs::instance()->mVerticalScreen ) { 500 if ( KOPrefs::instance()->mVerticalScreen ) {
501 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); 501 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
502 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); 502 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
503 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); 503 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
504 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); 504 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() );
505 } else { 505 } else {
506 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); 506 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() );
507 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); 507 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() );
508 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); 508 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() );
509 } 509 }
510 if ( !KOPrefs::instance()->mShowDateNavigator) 510 if ( !KOPrefs::instance()->mShowDateNavigator)
511 mDateNavigator->hide(); 511 mDateNavigator->hide();
512 //qDebug("Calendarview Size %d %d ", width(), height()); 512 //qDebug("Calendarview Size %d %d ", width(), height());
513#endif 513#endif
514 514
515 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 515 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
516 SLOT( showDates( const KCal::DateList & ) ) ); 516 SLOT( showDates( const KCal::DateList & ) ) );
517 517
518 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 518 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
519 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 519 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
520 520
521 521
522 522
523 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), 523 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ),
524 mViewManager, SLOT( showMonth( const QDate & ) ) ); 524 mViewManager, SLOT( showMonth( const QDate & ) ) );
525 525
526 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), 526 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
527 mNavigator, SLOT( selectWeek( const QDate & ) ) ); 527 mNavigator, SLOT( selectWeek( const QDate & ) ) );
528 528
529 connect( mDateNavigator, SIGNAL( goPrevYear() ), 529 connect( mDateNavigator, SIGNAL( goPrevYear() ),
530 mNavigator, SLOT( selectPreviousYear() ) ); 530 mNavigator, SLOT( selectPreviousYear() ) );
531 connect( mDateNavigator, SIGNAL( goNextYear() ), 531 connect( mDateNavigator, SIGNAL( goNextYear() ),
532 mNavigator, SLOT( selectNextYear() ) ); 532 mNavigator, SLOT( selectNextYear() ) );
533 connect( mDateNavigator, SIGNAL( goPrevMonth() ), 533 connect( mDateNavigator, SIGNAL( goPrevMonth() ),
534 mNavigator, SLOT( selectPreviousMonth() ) ); 534 mNavigator, SLOT( selectPreviousMonth() ) );
535 connect( mDateNavigator, SIGNAL( goNextMonth() ), 535 connect( mDateNavigator, SIGNAL( goNextMonth() ),
@@ -593,128 +593,135 @@ void CalendarView::init()
593 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); 593 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) );
594 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); 594 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) );
595 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); 595 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) );
596 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); 596 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) );
597 597
598 598
599 599
600 600
601 601
602 connect(QApplication::clipboard(),SIGNAL(dataChanged()), 602 connect(QApplication::clipboard(),SIGNAL(dataChanged()),
603 SLOT(checkClipboard())); 603 SLOT(checkClipboard()));
604 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), 604 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ),
605 SLOT( processTodoListSelection( Incidence * ) ) ); 605 SLOT( processTodoListSelection( Incidence * ) ) );
606 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); 606 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool)));
607 607
608 // kdDebug() << "CalendarView::CalendarView() done" << endl; 608 // kdDebug() << "CalendarView::CalendarView() done" << endl;
609 609
610 mDateFrame = new QVBox(0,0,WType_Popup); 610 mDateFrame = new QVBox(0,0,WType_Popup);
611 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 611 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
612 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 612 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
613 mDateFrame->setLineWidth(3); 613 mDateFrame->setLineWidth(3);
614 mDateFrame->hide(); 614 mDateFrame->hide();
615 mDateFrame->setCaption( i18n( "Pick a date to display")); 615 mDateFrame->setCaption( i18n( "Pick a date to display"));
616 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); 616 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
617 617
618 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); 618 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
619 619
620 mEventEditor = mDialogManager->getEventEditor(); 620 mEventEditor = mDialogManager->getEventEditor();
621 mTodoEditor = mDialogManager->getTodoEditor(); 621 mTodoEditor = mDialogManager->getTodoEditor();
622 622
623 mFlagEditDescription = false; 623 mFlagEditDescription = false;
624 624
625 mSuspendTimer = new QTimer( this ); 625 mSuspendTimer = new QTimer( this );
626 mAlarmTimer = new QTimer( this ); 626 mAlarmTimer = new QTimer( this );
627 mRecheckAlarmTimer = new QTimer( this ); 627 mRecheckAlarmTimer = new QTimer( this );
628 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); 628 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
629 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); 629 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
630 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); 630 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
631 mAlarmDialog = new AlarmDialog( this ); 631 mAlarmDialog = new AlarmDialog( this );
632 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); 632 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
633 mAlarmDialog->setServerNotification( false ); 633 mAlarmDialog->setServerNotification( false );
634 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); 634 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
635 635
636 636
637#ifndef DESKTOP_VERSION 637#ifndef DESKTOP_VERSION
638//US listen for arriving address resultsets 638//US listen for arriving address resultsets
639 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), 639 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
640 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 640 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
641#endif 641#endif
642 mDateNavigator->setCalendar( mCalendar ); 642 mDateNavigator->setCalendar( mCalendar );
643} 643}
644 644
645 645
646CalendarView::~CalendarView() 646CalendarView::~CalendarView()
647{ 647{
648 // kdDebug() << "~CalendarView()" << endl; 648 // kdDebug() << "~CalendarView()" << endl;
649 //qDebug("CalendarView::~CalendarView() "); 649 //qDebug("CalendarView::~CalendarView() ");
650 delete mDialogManager; 650 delete mDialogManager;
651 delete mViewManager; 651 delete mViewManager;
652 delete mStorage; 652 delete mStorage;
653 delete mDateFrame ; 653 delete mDateFrame ;
654 delete mEventViewerDialog; 654 delete mEventViewerDialog;
655 //kdDebug() << "~CalendarView() done" << endl; 655 //kdDebug() << "~CalendarView() done" << endl;
656} 656}
657void CalendarView::setCalReadOnly( int id, bool readO )
658{
659 if ( readO ) {
660 emit save();
661 }
662 mCalendar->setReadOnly( id, readO );
663}
657void CalendarView::setScrollBarStep(int val ) 664void CalendarView::setScrollBarStep(int val )
658{ 665{
659#ifdef DESKTOP_VERSION 666#ifdef DESKTOP_VERSION
660 mDateScrollBar->setLineStep ( val ); 667 mDateScrollBar->setLineStep ( val );
661#endif 668#endif
662} 669}
663void CalendarView::scrollBarValue(int val ) 670void CalendarView::scrollBarValue(int val )
664{ 671{
665#ifdef DESKTOP_VERSION 672#ifdef DESKTOP_VERSION
666 if ( QApplication::desktop()->width() < 800 ) return; 673 if ( QApplication::desktop()->width() < 800 ) return;
667 static bool block = false; 674 static bool block = false;
668 if ( block ) return; 675 if ( block ) return;
669 block = true; 676 block = true;
670 val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep(); 677 val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep();
671 //qDebug("VAL %d ",val ); 678 //qDebug("VAL %d ",val );
672 int count = mNavigator->selectedDates().count(); 679 int count = mNavigator->selectedDates().count();
673 int year = mNavigator->selectedDates().first().year(); 680 int year = mNavigator->selectedDates().first().year();
674 int day = mNavigator->selectedDates().first().dayOfYear(); 681 int day = mNavigator->selectedDates().first().dayOfYear();
675 if ( val == day -1 ) { 682 if ( val == day -1 ) {
676 block = false; 683 block = false;
677 return; 684 return;
678 } 685 }
679 QDate d ( year,1,1 ); 686 QDate d ( year,1,1 );
680 mNavigator->selectDates( d.addDays( val ), count ); 687 mNavigator->selectDates( d.addDays( val ), count );
681 block = false; 688 block = false;
682#endif 689#endif
683 690
684} 691}
685void CalendarView::checkFiles() 692void CalendarView::checkFiles()
686{ 693{
687 QString message; 694 QString message;
688 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 695 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
689 KopiCalendarFile * cal = calendars.first(); 696 KopiCalendarFile * cal = calendars.first();
690 while ( cal ) { 697 while ( cal ) {
691 if ( cal->mErrorOnLoad ) { 698 if ( cal->mErrorOnLoad ) {
692 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; 699 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n";
693 } 700 }
694 cal = calendars.next(); 701 cal = calendars.next();
695 } 702 }
696 if ( !message.isEmpty() ) { 703 if ( !message.isEmpty() ) {
697 message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); 704 message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0);
698 KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); 705 KMessageBox::error(this,message, i18n("Loding of calendar(s) failed"));
699 } 706 }
700 QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); 707 QTimer::singleShot( 2000, this, SLOT ( checkAlarms() ));
701} 708}
702void CalendarView::checkAlarms() 709void CalendarView::checkAlarms()
703{ 710{
704 711
705 712
706 KConfig *config = KOGlobals::config(); 713 KConfig *config = KOGlobals::config();
707 config->setGroup( "AppRun" ); 714 config->setGroup( "AppRun" );
708 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 715 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
709 int daysto = dt.daysTo( QDate::currentDate() ); 716 int daysto = dt.daysTo( QDate::currentDate() );
710 int days = config->readNumEntry( "LatestProgramStopDays" , daysto); 717 int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
711 dt = dt.addDays( days ); 718 dt = dt.addDays( days );
712 int secto = dt.secsTo( QDateTime::currentDateTime() ); 719 int secto = dt.secsTo( QDateTime::currentDateTime() );
713 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30; 720 int secs = config->readNumEntry( "LatestProgramStopSecs" , secto) - 30;
714 //qDebug("KO: Reading program stop %d ", secs); 721 //qDebug("KO: Reading program stop %d ", secs);
715 //secs -= ( 3600 * 24*3 ); // debug only 722 //secs -= ( 3600 * 24*3 ); // debug only
716 QDateTime latest = dt.addSecs ( secs ); 723 QDateTime latest = dt.addSecs ( secs );
717 qDebug("KO: Last termination on %s ", latest.toString().latin1()); 724 qDebug("KO: Last termination on %s ", latest.toString().latin1());
718 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() ); 725 //qDebug("KO: Current Time %s ",QDateTime::currentDateTime().toString().latin1() );
719 QPtrList<Incidence> el = mCalendar->rawIncidences(); 726 QPtrList<Incidence> el = mCalendar->rawIncidences();
720 QPtrList<Incidence> al; 727 QPtrList<Incidence> al;
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 651194b..a5f230a 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -139,128 +139,129 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
139 Incidence *currentSelection(); 139 Incidence *currentSelection();
140 void checkSuspendAlarm(); 140 void checkSuspendAlarm();
141 141
142 signals: 142 signals:
143 void save (); 143 void save ();
144 void saveStopTimer (); 144 void saveStopTimer ();
145 void tempDisableBR(bool); 145 void tempDisableBR(bool);
146 /** This todo has been modified */ 146 /** This todo has been modified */
147 void todoModified(Todo *, int); 147 void todoModified(Todo *, int);
148 148
149 /** when change is made to options dialog, the topwidget will catch this 149 /** when change is made to options dialog, the topwidget will catch this
150 * and emit this signal which notifies all widgets which have registered 150 * and emit this signal which notifies all widgets which have registered
151 * for notification to update their settings. */ 151 * for notification to update their settings. */
152 void configChanged(); 152 void configChanged();
153 /** emitted when the topwidget is closing down, so that any attached 153 /** emitted when the topwidget is closing down, so that any attached
154 child windows can also close. */ 154 child windows can also close. */
155 void closingDown(); 155 void closingDown();
156 /** emitted right before we die */ 156 /** emitted right before we die */
157 void closed(QWidget *); 157 void closed(QWidget *);
158 158
159 /** Emitted when state of modified flag changes */ 159 /** Emitted when state of modified flag changes */
160 void modifiedChanged(bool); 160 void modifiedChanged(bool);
161 void signalmodified(); 161 void signalmodified();
162 162
163 /** Emitted when state of read-only flag changes */ 163 /** Emitted when state of read-only flag changes */
164 void readOnlyChanged(bool); 164 void readOnlyChanged(bool);
165 165
166 /** Emitted when the unit of navigation changes */ 166 /** Emitted when the unit of navigation changes */
167 void changeNavStringPrev(const QString &); 167 void changeNavStringPrev(const QString &);
168 void changeNavStringNext(const QString &); 168 void changeNavStringNext(const QString &);
169 169
170 /** Emitted when state of events selection has changed and user is organizer*/ 170 /** Emitted when state of events selection has changed and user is organizer*/
171 void organizerEventsSelected(bool); 171 void organizerEventsSelected(bool);
172 /** Emitted when state of events selection has changed and user is attendee*/ 172 /** Emitted when state of events selection has changed and user is attendee*/
173 void groupEventsSelected(bool); 173 void groupEventsSelected(bool);
174 /** 174 /**
175 Emitted when an incidence gets selected. If the selection is cleared the 175 Emitted when an incidence gets selected. If the selection is cleared the
176 signal is emitted with 0 as argument. 176 signal is emitted with 0 as argument.
177 */ 177 */
178 void incidenceSelected( Incidence * ); 178 void incidenceSelected( Incidence * );
179 /** Emitted, when a todoitem is selected or deselected. */ 179 /** Emitted, when a todoitem is selected or deselected. */
180 void todoSelected( bool ); 180 void todoSelected( bool );
181 181
182 /** 182 /**
183 Emitted, when clipboard content changes. Parameter indicates if paste 183 Emitted, when clipboard content changes. Parameter indicates if paste
184 is possible or not. 184 is possible or not.
185 */ 185 */
186 void pasteEnabled(bool); 186 void pasteEnabled(bool);
187 187
188 /** Emitted, when the number of incoming messages has changed. */ 188 /** Emitted, when the number of incoming messages has changed. */
189 void numIncomingChanged(int); 189 void numIncomingChanged(int);
190 190
191 /** Emitted, when the number of outgoing messages has changed. */ 191 /** Emitted, when the number of outgoing messages has changed. */
192 void numOutgoingChanged(int); 192 void numOutgoingChanged(int);
193 193
194 /** Send status message, which can e.g. be displayed in the status bar. */ 194 /** Send status message, which can e.g. be displayed in the status bar. */
195 void statusMessage(const QString &); 195 void statusMessage(const QString &);
196 196
197 void calendarViewExpanded( bool ); 197 void calendarViewExpanded( bool );
198 void updateSearchDialog(); 198 void updateSearchDialog();
199 void filtersUpdated(); 199 void filtersUpdated();
200 200
201 201
202 public slots: 202 public slots:
203 void setCalReadOnly( int id, bool readO );
203 void checkAlarms(); 204 void checkAlarms();
204 void checkFiles(); 205 void checkFiles();
205 void slotprintSelInc(); 206 void slotprintSelInc();
206 void showNextAlarms(); 207 void showNextAlarms();
207 void showOpenError(); 208 void showOpenError();
208 void watchSavedFile(); 209 void watchSavedFile();
209 void recheckTimerAlarm(); 210 void recheckTimerAlarm();
210 void checkNextTimerAlarm(); 211 void checkNextTimerAlarm();
211 void addAlarm(const QDateTime &qdt, const QString &noti ); 212 void addAlarm(const QDateTime &qdt, const QString &noti );
212 void addSuspendAlarm(const QDateTime &qdt, const QString &noti ); 213 void addSuspendAlarm(const QDateTime &qdt, const QString &noti );
213 void removeAlarm(const QDateTime &qdt, const QString &noti ); 214 void removeAlarm(const QDateTime &qdt, const QString &noti );
214 215
215 /** options dialog made a changed to the configuration. we catch this 216 /** options dialog made a changed to the configuration. we catch this
216 * and notify all widgets which need to update their configuration. */ 217 * and notify all widgets which need to update their configuration. */
217 void updateConfig(); 218 void updateConfig();
218 219
219 void insertBirthdays(const QString& uid, const QStringList& birthdayList, 220 void insertBirthdays(const QString& uid, const QStringList& birthdayList,
220 const QStringList& anniversaryList, const QStringList& realNameList, 221 const QStringList& anniversaryList, const QStringList& realNameList,
221 const QStringList& emailList, const QStringList& assembledNameList, 222 const QStringList& emailList, const QStringList& assembledNameList,
222 const QStringList& uidList); 223 const QStringList& uidList);
223 224
224 /** 225 /**
225 Load calendar from file \a filename. If \a merge is true, load 226 Load calendar from file \a filename. If \a merge is true, load
226 calendar into existing one, if it is false, clear calendar, before 227 calendar into existing one, if it is false, clear calendar, before
227 loading. Return true, if calendar could be successfully loaded. 228 loading. Return true, if calendar could be successfully loaded.
228 */ 229 */
229 bool openCalendar(QString filename, bool merge=false); 230 bool openCalendar(QString filename, bool merge=false);
230 bool loadCalendars(); 231 bool loadCalendars();
231 bool saveCalendars(); 232 bool saveCalendars();
232 bool restoreCalendarSettings(); 233 bool restoreCalendarSettings();
233 bool addCalendar( KopiCalendarFile * ); 234 bool addCalendar( KopiCalendarFile * );
234 void addCalendarId( int id ); 235 void addCalendarId( int id );
235 bool syncCalendar(QString filename,int mode = 0 ); 236 bool syncCalendar(QString filename,int mode = 0 );
236 237
237 /** 238 /**
238 Save calendar data to file. Return true if calendar could be 239 Save calendar data to file. Return true if calendar could be
239 successfully saved. 240 successfully saved.
240 */ 241 */
241 bool saveCalendar(QString filename); 242 bool saveCalendar(QString filename);
242 243
243 /** 244 /**
244 Close calendar. Clear calendar data and reset views to display an empty 245 Close calendar. Clear calendar data and reset views to display an empty
245 calendar. 246 calendar.
246 */ 247 */
247 void closeCalendar(); 248 void closeCalendar();
248 249
249 /** Archive old events of calendar */ 250 /** Archive old events of calendar */
250 void archiveCalendar(); 251 void archiveCalendar();
251 252
252 void showIncidence(); 253 void showIncidence();
253 void editIncidence(); 254 void editIncidence();
254 void editIncidenceDescription(); 255 void editIncidenceDescription();
255 void deleteIncidence(); 256 void deleteIncidence();
256 void cloneIncidence(); 257 void cloneIncidence();
257 void moveIncidence(); 258 void moveIncidence();
258 void beamIncidence(); 259 void beamIncidence();
259 void toggleCancelIncidence(); 260 void toggleCancelIncidence();
260 261
261 /** create an editeventwin with supplied date/time, and if bool is true, 262 /** create an editeventwin with supplied date/time, and if bool is true,
262 * make the event take all day. */ 263 * make the event take all day. */
263 void newEvent(QDateTime, QDateTime, bool allDay ); 264 void newEvent(QDateTime, QDateTime, bool allDay );
264 void newEvent(QDateTime, QDateTime); 265 void newEvent(QDateTime, QDateTime);
265 void newEvent(QDateTime fh); 266 void newEvent(QDateTime fh);
266 void newEvent(QDate dt); 267 void newEvent(QDate dt);
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 1335d7e..3f08ef8 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -96,145 +96,145 @@ void KOFilterView::setSelectedFilter(QString filterName)
96 for (i=0;i<filter_num;i++) { 96 for (i=0;i<filter_num;i++) {
97 if (mSelectionCombo->text(i)==filterName) 97 if (mSelectionCombo->text(i)==filterName)
98 mSelectionCombo->setCurrentItem(i); 98 mSelectionCombo->setCurrentItem(i);
99 } 99 }
100 emit filterChanged(); 100 emit filterChanged();
101} 101}
102void KOFilterView::setSelectedFilter( int fil ) 102void KOFilterView::setSelectedFilter( int fil )
103{ 103{
104 if ( fil >= mSelectionCombo->count() ) 104 if ( fil >= mSelectionCombo->count() )
105 return; 105 return;
106 mSelectionCombo->setCurrentItem( fil ); 106 mSelectionCombo->setCurrentItem( fil );
107 emit filterChanged(); 107 emit filterChanged();
108} 108}
109 109
110 110
111 111
112KOCalEditView::KOCalEditView(QWidget* parent, 112KOCalEditView::KOCalEditView(QWidget* parent,
113 const char* name ) 113 const char* name )
114 : QScrollView(parent,name) 114 : QScrollView(parent,name)
115{ 115{
116 mw = 0; 116 mw = 0;
117 setResizePolicy( AutoOneFit ); 117 setResizePolicy( AutoOneFit );
118 setFrameStyle ( QFrame::Panel | QFrame::Plain ); 118 setFrameStyle ( QFrame::Panel | QFrame::Plain );
119 setLineWidth ( 1 ); 119 setLineWidth ( 1 );
120 setMidLineWidth ( 1 ); 120 setMidLineWidth ( 1 );
121 setFocusPolicy(NoFocus); 121 setFocusPolicy(NoFocus);
122} 122}
123 123
124KOCalEditView::~KOCalEditView() 124KOCalEditView::~KOCalEditView()
125{ 125{
126 // no need to delete child widgets, Qt does it all for us 126 // no need to delete child widgets, Qt does it all for us
127} 127}
128void KOCalEditView::selectCal(int id ,bool b) 128void KOCalEditView::selectCal(int id ,bool b)
129{ 129{
130 KOPrefs::instance()->getCalendar( id )->isEnabled = b; 130 KOPrefs::instance()->getCalendar( id )->isEnabled = b;
131 emit calendarEnabled ( id, b ); 131 emit calendarEnabled ( id, b );
132 emit needsUpdate(); 132 emit needsUpdate();
133 133
134} 134}
135void KOCalEditView::selectStdCal( int id ) 135void KOCalEditView::selectStdCal( int id )
136{ 136{
137 KOCalRadioButton* it = mStdandardB.first(); 137 KOCalRadioButton* it = mStdandardB.first();
138 while ( it ) { 138 while ( it ) {
139 it->blockSignals( true ); 139 it->blockSignals( true );
140 it->setChecked( it->num() == id ); 140 it->setChecked( it->num() == id );
141 it->blockSignals( false ); 141 it->blockSignals( false );
142 it = mStdandardB.next(); 142 it = mStdandardB.next();
143 } 143 }
144 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 144 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
145 while ( kkf ) { 145 while ( kkf ) {
146 kkf->isStandard = (kkf->mCalNumber == id ); 146 kkf->isStandard = (kkf->mCalNumber == id );
147 kkf = KOPrefs::instance()->mCalendars.next(); 147 kkf = KOPrefs::instance()->mCalendars.next();
148 } 148 }
149 emit setCalendarDefault ( id ); 149 emit setCalendarDefault ( id );
150} 150}
151 151
152void KOCalEditView::selectCalAlarm(int id ,bool b ) 152void KOCalEditView::selectCalAlarm(int id ,bool b )
153{ 153{
154 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b; 154 KOPrefs::instance()->getCalendar( id )->isAlarmEnabled = b;
155 emit alarmEnabled ( id , b ); 155 emit alarmEnabled ( id , b );
156 emit needsUpdate(); 156 emit needsUpdate();
157} 157}
158void KOCalEditView::selectReadOnly(int id ,bool b ) 158void KOCalEditView::selectReadOnly(int id ,bool b )
159{ 159{
160 KOPrefs::instance()->getCalendar( id )->isReadOnly = b;
161 emit calendarReadonly ( id , b );
162 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) { 160 if ( KOPrefs::instance()->getCalendar( id )->isStandard && b ) {
163 findNewStandard(); 161 findNewStandard();
164 } else { 162 } else {
165 if ( !b ){ 163 if ( !b ){
166 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 164 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
167 while ( kkf ) { 165 while ( kkf ) {
168 if (kkf->isReadOnly && kkf->isStandard ) { 166 if (kkf->isReadOnly && kkf->isStandard ) {
169 selectStdCal( id ); 167 selectStdCal( id );
170 break; 168 break;
171 } 169 }
172 kkf = KOPrefs::instance()->mCalendars.next(); 170 kkf = KOPrefs::instance()->mCalendars.next();
173 } 171 }
174 } 172 }
175 } 173 }
176 mStdandardB.at(id-1)->setEnabled( !b ); 174 mStdandardB.at(id-1)->setEnabled( !b );
175 emit calendarReadonly ( id , b );
176 KOPrefs::instance()->getCalendar( id )->isReadOnly = b;
177 emit needsUpdate(); 177 emit needsUpdate();
178 178
179} 179}
180void KOCalEditView::findNewStandard() 180void KOCalEditView::findNewStandard()
181{ 181{
182 bool found = false; 182 bool found = false;
183 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first(); 183 KopiCalendarFile * kkf = KOPrefs::instance()->mCalendars.first();
184 while ( kkf ) { 184 while ( kkf ) {
185 if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) { 185 if (!kkf->isReadOnly && !kkf->mErrorOnLoad ) {
186 found = true; 186 found = true;
187 selectStdCal( kkf->mCalNumber ); 187 selectStdCal( kkf->mCalNumber );
188 break; 188 break;
189 } 189 }
190 kkf = KOPrefs::instance()->mCalendars.next(); 190 kkf = KOPrefs::instance()->mCalendars.next();
191 } 191 }
192 if ( !found ) { 192 if ( !found ) {
193 KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"), 193 KMessageBox::error( this,i18n("\nNO\n WRITEABLE\n CALENDAR\n FOUND!\n\nPlease fix your calendar settings!\n"),
194 i18n("Houston, we have a problem!") ); 194 i18n("Houston, we have a problem!") );
195 195
196 } 196 }
197} 197}
198 198
199void KOCalEditView::setColor( const QColor& c, int id ) 199void KOCalEditView::setColor( const QColor& c, int id )
200{ 200{
201 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c; 201 KOPrefs::instance()->getCalendar( id )->mDefaultColor = c;
202 emit needsUpdate(); 202 emit needsUpdate();
203} 203}
204void KOCalEditView::deleteCal( int id ) 204void KOCalEditView::deleteCal( int id )
205{ 205{
206 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); 206 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
207 QString name = kkf->mName; 207 QString name = kkf->mName;
208 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); 208 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 );
209 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; 209 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
210 bool findnewstd = kkf->isStandard; 210 bool findnewstd = kkf->isStandard;
211 emit removeCalendar ( id ); 211 emit removeCalendar ( id );
212 KOPrefs::instance()->mCalendars.remove ( kkf ); 212 KOPrefs::instance()->mCalendars.remove ( kkf );
213 if ( findnewstd ) findNewStandard(); 213 if ( findnewstd ) findNewStandard();
214 emit needsUpdate(); 214 emit needsUpdate();
215 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 215 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
216} 216}
217void KOCalEditView::infoCal( int id ) 217void KOCalEditView::infoCal( int id )
218{ 218{
219 QString name = KOPrefs::instance()->getCalendar( id )->mName; 219 QString name = KOPrefs::instance()->getCalendar( id )->mName;
220 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); 220 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 );
221 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { 221 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) {
222 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { 222 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) {
223 emit calendarAdded( id ); 223 emit calendarAdded( id );
224 emit needsUpdate(); 224 emit needsUpdate();
225 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 225 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
226 QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); 226 QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) );
227 } 227 }
228 } 228 }
229 else 229 else
230 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); 230 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
231} 231}
232void KOCalEditView::readConfig() 232void KOCalEditView::readConfig()
233{ 233{
234 234
235 mStdandardB.clear(); 235 mStdandardB.clear();
236 mEnabledB.clear(); 236 mEnabledB.clear();
237 mAlarmB.clear(); 237 mAlarmB.clear();
238 mROB.clear(); 238 mROB.clear();
239 239
240 if ( mw ) delete mw; 240 if ( mw ) delete mw;