summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 3ab4bb4..a76f2ed 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -370,7 +370,7 @@ void CalendarView::init()
370 setFocusPolicy (NoFocus ); 370 setFocusPolicy (NoFocus );
371 mViewerCallerIsSearchDialog = false; 371 mViewerCallerIsSearchDialog = false;
372 mBlockShowDates = false; 372 mBlockShowDates = false;
373 373 mConflictingEvent = 0;
374 mDatePickerMode = 0; 374 mDatePickerMode = 0;
375 mCurrentSyncDevice = ""; 375 mCurrentSyncDevice = "";
376 mViewManager = new KOViewManager( this ); 376 mViewManager = new KOViewManager( this );
@@ -2793,9 +2793,10 @@ void CalendarView::checkConflictForEvent()
2793 if (!KOPrefs::instance()->mConfirm) 2793 if (!KOPrefs::instance()->mConfirm)
2794 return; 2794 return;
2795 if ( ! mConflictingEvent ) return; 2795 if ( ! mConflictingEvent ) return;
2796 QDateTime current = QDateTime::currentDateTime(); 2796 Event * conflictingEvent = mConflictingEvent;
2797 if ( ! mConflictingEvent->matchTime( &current, 0 ) ) {
2798 mConflictingEvent = 0; 2797 mConflictingEvent = 0;
2798 QDateTime current = QDateTime::currentDateTime();
2799 if ( ! conflictingEvent->matchTime( &current, 0 ) ) {
2799 return; 2800 return;
2800 } 2801 }
2801 QPtrList<Event> testlist = mCalendar->events(); 2802 QPtrList<Event> testlist = mCalendar->events();
@@ -2813,7 +2814,7 @@ void CalendarView::checkConflictForEvent()
2813 else 2814 else
2814 skip = !test->matchTime( &current, 0 ); 2815 skip = !test->matchTime( &current, 0 );
2815 if ( !skip && !test->doesFloat() ) { 2816 if ( !skip && !test->doesFloat() ) {
2816 if ( mConflictingEvent->isOverlapping ( test, &retVal, &current ) ) { 2817 if ( conflictingEvent->isOverlapping ( test, &retVal, &current ) ) {
2817 if ( ! found ) { 2818 if ( ! found ) {
2818 conflict = retVal; 2819 conflict = retVal;
2819 cE = test; 2820 cE = test;
@@ -2830,7 +2831,7 @@ void CalendarView::checkConflictForEvent()
2830 } 2831 }
2831 topLevelWidget()->setCaption( i18n("KO/Pi") ); 2832 topLevelWidget()->setCaption( i18n("KO/Pi") );
2832 if ( found ) { 2833 if ( found ) {
2833 QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( mConflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ; 2834 QString mess = i18n("The event\n%1\nconflicts with event\n%2\nat date\n%3.\n").arg(KGlobal::formatMessage ( conflictingEvent->summary(),0 ) ).arg( KGlobal::formatMessage ( cE->summary(),0 )).arg(KGlobal::locale()->formatDate(conflict.date()) ) ;
2834 qApp->processEvents(); 2835 qApp->processEvents();
2835 int km = KMessageBox::warningContinueCancel(this,mess, 2836 int km = KMessageBox::warningContinueCancel(this,mess,
2836 i18n("KO/Pi Conflict delected"),i18n("Show date"),i18n("No problem!")); 2837 i18n("KO/Pi Conflict delected"),i18n("Show date"),i18n("No problem!"));
@@ -2842,10 +2843,9 @@ void CalendarView::checkConflictForEvent()
2842 mNavigator->slotDaySelect( conflict.date() ); 2843 mNavigator->slotDaySelect( conflict.date() );
2843 int hour = conflict.time().hour(); 2844 int hour = conflict.time().hour();
2844 mViewManager->agendaView()->setStartHour( hour ); 2845 mViewManager->agendaView()->setStartHour( hour );
2845 topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( mConflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) ); 2846 topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( conflictingEvent->summary().left( 20 ) ).arg( cE->summary().left( 20 ) ) );
2846 } else 2847 } else
2847 topLevelWidget()->setCaption( i18n("No conflict found") ); 2848 topLevelWidget()->setCaption( i18n("No conflict found") );
2848 mConflictingEvent = 0;
2849 return; 2849 return;
2850 2850
2851} 2851}
@@ -4092,12 +4092,13 @@ void CalendarView::openAddressbook()
4092 4092
4093void CalendarView::setModified(bool modified) 4093void CalendarView::setModified(bool modified)
4094{ 4094{
4095 //qDebug("CalendarView::setModified %d ", modified);
4095 if ( modified ) 4096 if ( modified )
4096 emit signalmodified(); 4097 emit signalmodified();
4097 if (mModified != modified) {
4098 mModified = modified; 4098 mModified = modified;
4099 if ( mModified )
4099 emit modifiedChanged(mModified); 4100 emit modifiedChanged(mModified);
4100 } 4101
4101} 4102}
4102 4103
4103bool CalendarView::isReadOnly() 4104bool CalendarView::isReadOnly()