-rw-r--r-- | korganizer/calendarview.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 7c7466b..4794414 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2499,69 +2499,71 @@ void CalendarView::edit_copy() | |||
2499 | 2499 | ||
2500 | if (mViewManager->currentView()->isEventView()) { | 2500 | if (mViewManager->currentView()->isEventView()) { |
2501 | if ( incidence && incidence->typeID() == eventID ) { | 2501 | if ( incidence && incidence->typeID() == eventID ) { |
2502 | anEvent = static_cast<Event *>(incidence); | 2502 | anEvent = static_cast<Event *>(incidence); |
2503 | } | 2503 | } |
2504 | } | 2504 | } |
2505 | 2505 | ||
2506 | if (!anEvent) { | 2506 | if (!anEvent) { |
2507 | KNotifyClient::beep(); | 2507 | KNotifyClient::beep(); |
2508 | return; | 2508 | return; |
2509 | } | 2509 | } |
2510 | DndFactory factory( mCalendar ); | 2510 | DndFactory factory( mCalendar ); |
2511 | factory.copyIncidence(anEvent); | 2511 | factory.copyIncidence(anEvent); |
2512 | } | 2512 | } |
2513 | 2513 | ||
2514 | void CalendarView::edit_paste() | 2514 | void CalendarView::edit_paste() |
2515 | { | 2515 | { |
2516 | QDate date = mNavigator->selectedDates().first(); | 2516 | QDate date = mNavigator->selectedDates().first(); |
2517 | 2517 | ||
2518 | DndFactory factory( mCalendar ); | 2518 | DndFactory factory( mCalendar ); |
2519 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); | 2519 | Event *pastedEvent = (Event *)factory.pasteIncidence( date ); |
2520 | 2520 | ||
2521 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); | 2521 | changeEventDisplay( pastedEvent, KOGlobals::EVENTADDED ); |
2522 | } | 2522 | } |
2523 | 2523 | void CalendarView::edit_global_options() | |
2524 | void CalendarView::edit_options() | ||
2525 | { | 2524 | { |
2526 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; | 2525 | QString tz = KPimGlobalPrefs::instance()->mTimeZoneId; |
2527 | emit save(); | 2526 | emit save(); |
2528 | emit saveStopTimer(); | 2527 | emit saveStopTimer(); |
2529 | mDialogManager->showOptionsDialog(); | 2528 | mDialogManager->showGlobalOptionsDialog(); |
2530 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { | 2529 | if ( tz != KPimGlobalPrefs::instance()->mTimeZoneId) { |
2531 | emit saveStopTimer(); | 2530 | emit saveStopTimer(); |
2532 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), | 2531 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, i18n("The timezone has changed!\nShould the calendar be reloaded\nto apply timezone changes?\nPlease read Menu: Help->FAQ:\n\"How do I change the timezone?\"\nas well!"), |
2533 | i18n("Timezone settings"),i18n("Reload"))) { | 2532 | i18n("Timezone settings"),i18n("Reload"))) { |
2534 | qDebug("KO: TZ reload cancelled "); | 2533 | qDebug("KO: TZ reload cancelled "); |
2535 | return; | 2534 | return; |
2536 | } | 2535 | } |
2537 | qDebug("KO: Timezone change "); | 2536 | qDebug("KO: Timezone change "); |
2538 | openCalendar( MainWindow::defaultFileName() ); | 2537 | openCalendar( MainWindow::defaultFileName() ); |
2539 | setModified(true); | 2538 | setModified(true); |
2540 | } | 2539 | } |
2541 | else | 2540 | else |
2542 | qDebug("KO: No tz change "); | 2541 | qDebug("KO: No tz change "); |
2543 | 2542 | } | |
2543 | void CalendarView::edit_options() | ||
2544 | { | ||
2545 | mDialogManager->showOptionsDialog(); | ||
2544 | } | 2546 | } |
2545 | 2547 | ||
2546 | 2548 | ||
2547 | void CalendarView::slotSelectPickerDate( QDate d) | 2549 | void CalendarView::slotSelectPickerDate( QDate d) |
2548 | { | 2550 | { |
2549 | mDateFrame->hide(); | 2551 | mDateFrame->hide(); |
2550 | if ( mDatePickerMode == 1 ) { | 2552 | if ( mDatePickerMode == 1 ) { |
2551 | mNavigator->slotDaySelect( d ); | 2553 | mNavigator->slotDaySelect( d ); |
2552 | } else if ( mDatePickerMode == 2 ) { | 2554 | } else if ( mDatePickerMode == 2 ) { |
2553 | if ( mMoveIncidence->typeID() == todoID ) { | 2555 | if ( mMoveIncidence->typeID() == todoID ) { |
2554 | Todo * to = (Todo *) mMoveIncidence; | 2556 | Todo * to = (Todo *) mMoveIncidence; |
2555 | QTime tim; | 2557 | QTime tim; |
2556 | int len = 0; | 2558 | int len = 0; |
2557 | if ( to->hasStartDate() && to->hasDueDate() ) | 2559 | if ( to->hasStartDate() && to->hasDueDate() ) |
2558 | len = to->dtStart().secsTo( to->dtDue()); | 2560 | len = to->dtStart().secsTo( to->dtDue()); |
2559 | if ( to->hasDueDate() ) | 2561 | if ( to->hasDueDate() ) |
2560 | tim = to->dtDue().time(); | 2562 | tim = to->dtDue().time(); |
2561 | else { | 2563 | else { |
2562 | tim = QTime ( 0,0,0 ); | 2564 | tim = QTime ( 0,0,0 ); |
2563 | to->setFloats( true ); | 2565 | to->setFloats( true ); |
2564 | to->setHasDueDate( true ); | 2566 | to->setHasDueDate( true ); |
2565 | } | 2567 | } |
2566 | QDateTime dt ( d,tim ); | 2568 | QDateTime dt ( d,tim ); |
2567 | to->setDtDue( dt ); | 2569 | to->setDtDue( dt ); |