-rw-r--r-- | korganizer/calendarview.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 47cd488..543897a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2429,60 +2429,66 @@ void CalendarView::moveIncidence(Incidence * inc ) | |||
2429 | mDatePicker->setDate( da ); | 2429 | mDatePicker->setDate( da ); |
2430 | } | 2430 | } |
2431 | void CalendarView::showDatePicker( ) | 2431 | void CalendarView::showDatePicker( ) |
2432 | { | 2432 | { |
2433 | //qDebug("CalendarView::showDatePicker( ) "); | 2433 | //qDebug("CalendarView::showDatePicker( ) "); |
2434 | if ( mDateFrame->isVisible() ) | 2434 | if ( mDateFrame->isVisible() ) |
2435 | mDateFrame->hide(); | 2435 | mDateFrame->hide(); |
2436 | else { | 2436 | else { |
2437 | int w =mDatePicker->sizeHint().width() ; | 2437 | int w =mDatePicker->sizeHint().width() ; |
2438 | int h = mDatePicker->sizeHint().height() ; | 2438 | int h = mDatePicker->sizeHint().height() ; |
2439 | int dw = QApplication::desktop()->width(); | 2439 | int dw = QApplication::desktop()->width(); |
2440 | int dh = QApplication::desktop()->height(); | 2440 | int dh = QApplication::desktop()->height(); |
2441 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); | 2441 | mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); |
2442 | mDateFrame->show(); | 2442 | mDateFrame->show(); |
2443 | } | 2443 | } |
2444 | mDatePickerMode = 1; | 2444 | mDatePickerMode = 1; |
2445 | mDatePicker->setDate( mNavigator->selectedDates().first() ); | 2445 | mDatePicker->setDate( mNavigator->selectedDates().first() ); |
2446 | } | 2446 | } |
2447 | 2447 | ||
2448 | void CalendarView::showEventEditor() | 2448 | void CalendarView::showEventEditor() |
2449 | { | 2449 | { |
2450 | #ifdef DESKTOP_VERSION | 2450 | #ifdef DESKTOP_VERSION |
2451 | mEventEditor->show(); | 2451 | mEventEditor->show(); |
2452 | #else | 2452 | #else |
2453 | if ( mEventEditor->width() != QApplication::desktop()->width() ) | 2453 | if ( mEventEditor->width() != QApplication::desktop()->width() ) { |
2454 | mEventEditor->hide(); | 2454 | qDebug("CalendarView: recreate mEventEditor "); |
2455 | delete mEventEditor; | ||
2456 | mEventEditor = mDialogManager->getEventEditor(); | ||
2457 | } | ||
2455 | mEventEditor->showMaximized(); | 2458 | mEventEditor->showMaximized(); |
2456 | #endif | 2459 | #endif |
2457 | } | 2460 | } |
2458 | void CalendarView::showTodoEditor() | 2461 | void CalendarView::showTodoEditor() |
2459 | { | 2462 | { |
2460 | #ifdef DESKTOP_VERSION | 2463 | #ifdef DESKTOP_VERSION |
2461 | mTodoEditor->show(); | 2464 | mTodoEditor->show(); |
2462 | #else | 2465 | #else |
2463 | if ( mTodoEditor->width() != QApplication::desktop()->width() ) | 2466 | if ( mTodoEditor->width() != QApplication::desktop()->width() ) { |
2464 | mTodoEditor->hide(); | 2467 | qDebug("CalendarView: recreate mTodoEditor "); |
2468 | delete mTodoEditor; | ||
2469 | mTodoEditor = mDialogManager->getTodoEditor(); | ||
2470 | } | ||
2465 | mTodoEditor->showMaximized(); | 2471 | mTodoEditor->showMaximized(); |
2466 | #endif | 2472 | #endif |
2467 | } | 2473 | } |
2468 | 2474 | ||
2469 | void CalendarView::cloneIncidence() | 2475 | void CalendarView::cloneIncidence() |
2470 | { | 2476 | { |
2471 | Incidence *incidence = currentSelection(); | 2477 | Incidence *incidence = currentSelection(); |
2472 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2478 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2473 | if ( incidence ) { | 2479 | if ( incidence ) { |
2474 | cloneIncidence(incidence); | 2480 | cloneIncidence(incidence); |
2475 | } | 2481 | } |
2476 | } | 2482 | } |
2477 | void CalendarView::moveIncidence() | 2483 | void CalendarView::moveIncidence() |
2478 | { | 2484 | { |
2479 | Incidence *incidence = currentSelection(); | 2485 | Incidence *incidence = currentSelection(); |
2480 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2486 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |
2481 | if ( incidence ) { | 2487 | if ( incidence ) { |
2482 | moveIncidence(incidence); | 2488 | moveIncidence(incidence); |
2483 | } | 2489 | } |
2484 | } | 2490 | } |
2485 | void CalendarView::beamIncidence() | 2491 | void CalendarView::beamIncidence() |
2486 | { | 2492 | { |
2487 | Incidence *incidence = currentSelection(); | 2493 | Incidence *incidence = currentSelection(); |
2488 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); | 2494 | if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); |