summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-18 09:54:32 (UTC)
committer zautrix <zautrix>2005-01-18 09:54:32 (UTC)
commitf973a8310cc378cc86d96bfce3f08f06725a2b7d (patch) (unidiff)
treed5ebdc5193972a99d5c5cbd7957894a41dcd5d67
parent2d6776d79732f6771885a549de5c37f9e75f7641 (diff)
downloadkdepimpi-f973a8310cc378cc86d96bfce3f08f06725a2b7d.zip
kdepimpi-f973a8310cc378cc86d96bfce3f08f06725a2b7d.tar.gz
kdepimpi-f973a8310cc378cc86d96bfce3f08f06725a2b7d.tar.bz2
fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index da1edea..9c10ba6 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2463,110 +2463,112 @@ void CalendarView::moveIncidence(Incidence * inc )
2463 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2463 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2464 mDateFrame->show(); 2464 mDateFrame->show();
2465 } 2465 }
2466 mDatePickerMode = 2; 2466 mDatePickerMode = 2;
2467 mMoveIncidence = inc ; 2467 mMoveIncidence = inc ;
2468 QDate da; 2468 QDate da;
2469 if ( mMoveIncidence->type() == "Todo" ) { 2469 if ( mMoveIncidence->type() == "Todo" ) {
2470 Todo * to = (Todo *) mMoveIncidence; 2470 Todo * to = (Todo *) mMoveIncidence;
2471 if ( to->hasDueDate() ) 2471 if ( to->hasDueDate() )
2472 da = to->dtDue().date(); 2472 da = to->dtDue().date();
2473 else 2473 else
2474 da = QDate::currentDate(); 2474 da = QDate::currentDate();
2475 } else { 2475 } else {
2476 da = mMoveIncidence->dtStart().date(); 2476 da = mMoveIncidence->dtStart().date();
2477 } 2477 }
2478 //PENDING set date for recurring incidence to date of recurrence 2478 //PENDING set date for recurring incidence to date of recurrence
2479 //mMoveIncidenceOldDate; 2479 //mMoveIncidenceOldDate;
2480 mDatePicker->setDate( da ); 2480 mDatePicker->setDate( da );
2481} 2481}
2482void CalendarView::showDatePicker( ) 2482void CalendarView::showDatePicker( )
2483{ 2483{
2484 //qDebug("CalendarView::showDatePicker( ) "); 2484 //qDebug("CalendarView::showDatePicker( ) ");
2485 if ( mDateFrame->isVisible() ) 2485 if ( mDateFrame->isVisible() )
2486 mDateFrame->hide(); 2486 mDateFrame->hide();
2487 else { 2487 else {
2488 int w =mDatePicker->sizeHint().width() ; 2488 int w =mDatePicker->sizeHint().width() ;
2489 int h = mDatePicker->sizeHint().height() ; 2489 int h = mDatePicker->sizeHint().height() ;
2490 int dw = QApplication::desktop()->width(); 2490 int dw = QApplication::desktop()->width();
2491 int dh = QApplication::desktop()->height(); 2491 int dh = QApplication::desktop()->height();
2492 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2492 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2493 mDateFrame->show(); 2493 mDateFrame->show();
2494 } 2494 }
2495 mDatePickerMode = 1; 2495 mDatePickerMode = 1;
2496 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2496 mDatePicker->setDate( mNavigator->selectedDates().first() );
2497} 2497}
2498 2498
2499void CalendarView::showEventEditor() 2499void CalendarView::showEventEditor()
2500{ 2500{
2501#ifdef DESKTOP_VERSION 2501#ifdef DESKTOP_VERSION
2502 mEventEditor->show(); 2502 mEventEditor->show();
2503#else 2503#else
2504 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 2504 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2505 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2505 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2506 qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 2506 qDebug("CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2507 delete mEventEditor; 2507 delete mEventEditor;
2508 mEventEditor = mDialogManager->getEventEditor(); 2508 mEventEditor = mDialogManager->getEventEditor();
2509 } 2509 }
2510 mEventEditor->showMaximized(); 2510 mEventEditor->showMaximized();
2511 topLevelWidget()->setCaption( i18n("") );
2511#endif 2512#endif
2512} 2513}
2513void CalendarView::showTodoEditor() 2514void CalendarView::showTodoEditor()
2514{ 2515{
2515#ifdef DESKTOP_VERSION 2516#ifdef DESKTOP_VERSION
2516 mTodoEditor->show(); 2517 mTodoEditor->show();
2517#else 2518#else
2518 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 2519 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2519 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2520 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2520 qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 2521 qDebug("CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2521 delete mTodoEditor; 2522 delete mTodoEditor;
2522 mTodoEditor = mDialogManager->getTodoEditor(); 2523 mTodoEditor = mDialogManager->getTodoEditor();
2523 } 2524 }
2524 mTodoEditor->showMaximized(); 2525 mTodoEditor->showMaximized();
2526 topLevelWidget()->setCaption( i18n("") );
2525#endif 2527#endif
2526} 2528}
2527 2529
2528void CalendarView::cloneIncidence() 2530void CalendarView::cloneIncidence()
2529{ 2531{
2530 Incidence *incidence = currentSelection(); 2532 Incidence *incidence = currentSelection();
2531 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2533 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2532 if ( incidence ) { 2534 if ( incidence ) {
2533 cloneIncidence(incidence); 2535 cloneIncidence(incidence);
2534 } 2536 }
2535} 2537}
2536void CalendarView::moveIncidence() 2538void CalendarView::moveIncidence()
2537{ 2539{
2538 Incidence *incidence = currentSelection(); 2540 Incidence *incidence = currentSelection();
2539 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2541 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2540 if ( incidence ) { 2542 if ( incidence ) {
2541 moveIncidence(incidence); 2543 moveIncidence(incidence);
2542 } 2544 }
2543} 2545}
2544void CalendarView::beamIncidence() 2546void CalendarView::beamIncidence()
2545{ 2547{
2546 Incidence *incidence = currentSelection(); 2548 Incidence *incidence = currentSelection();
2547 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2549 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2548 if ( incidence ) { 2550 if ( incidence ) {
2549 beamIncidence(incidence); 2551 beamIncidence(incidence);
2550 } 2552 }
2551} 2553}
2552void CalendarView::toggleCancelIncidence() 2554void CalendarView::toggleCancelIncidence()
2553{ 2555{
2554 Incidence *incidence = currentSelection(); 2556 Incidence *incidence = currentSelection();
2555 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2557 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2556 if ( incidence ) { 2558 if ( incidence ) {
2557 cancelIncidence(incidence); 2559 cancelIncidence(incidence);
2558 } 2560 }
2559} 2561}
2560 2562
2561 2563
2562void CalendarView::cancelIncidence(Incidence * inc ) 2564void CalendarView::cancelIncidence(Incidence * inc )
2563{ 2565{
2564 inc->setCancelled( ! inc->cancelled() ); 2566 inc->setCancelled( ! inc->cancelled() );
2565 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED ); 2567 changeIncidenceDisplay( inc,KOGlobals::EVENTEDITED );
2566 updateView(); 2568 updateView();
2567} 2569}
2568void CalendarView::cloneIncidence(Incidence * orgInc ) 2570void CalendarView::cloneIncidence(Incidence * orgInc )
2569{ 2571{
2570 Incidence * newInc = orgInc->clone(); 2572 Incidence * newInc = orgInc->clone();
2571 newInc->recreate(); 2573 newInc->recreate();
2572 2574