summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-03 07:33:48 (UTC)
committer zautrix <zautrix>2005-07-03 07:33:48 (UTC)
commit914c795a77d8bb28fc8c2155cfc9524f3effdde1 (patch) (unidiff)
tree25f8bb908b4afd982a874fc890c5e3ae75fe6d6d
parent3e2908a91251482d91404464aaf98ce902a319ce (diff)
downloadkdepimpi-914c795a77d8bb28fc8c2155cfc9524f3effdde1.zip
kdepimpi-914c795a77d8bb28fc8c2155cfc9524f3effdde1.tar.gz
kdepimpi-914c795a77d8bb28fc8c2155cfc9524f3effdde1.tar.bz2
slider fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 6746de2..a10e93c 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2569,131 +2569,136 @@ void CalendarView::eventToBeDeleted(Event *)
2569 2569
2570void CalendarView::eventDeleted() 2570void CalendarView::eventDeleted()
2571{ 2571{
2572 changeEventDisplay(0,KOGlobals::EVENTDELETED); 2572 changeEventDisplay(0,KOGlobals::EVENTDELETED);
2573} 2573}
2574void CalendarView::changeTodoDisplay(Todo *which, int action) 2574void CalendarView::changeTodoDisplay(Todo *which, int action)
2575{ 2575{
2576 changeIncidenceDisplay((Incidence *)which, action); 2576 changeIncidenceDisplay((Incidence *)which, action);
2577 mDateNavigator->updateView(); //LR 2577 mDateNavigator->updateView(); //LR
2578 //mDialogManager->updateSearchDialog(); 2578 //mDialogManager->updateSearchDialog();
2579 2579
2580 if (which) { 2580 if (which) {
2581 mViewManager->updateWNview(); 2581 mViewManager->updateWNview();
2582 //mTodoList->updateView(); 2582 //mTodoList->updateView();
2583 } 2583 }
2584 2584
2585} 2585}
2586 2586
2587void CalendarView::changeIncidenceDisplay(Incidence *which, int action) 2587void CalendarView::changeIncidenceDisplay(Incidence *which, int action)
2588{ 2588{
2589 updateUnmanagedViews(); 2589 updateUnmanagedViews();
2590 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action ); 2590 //qDebug(" CalendarView::changeIncidenceDisplay++++++++++++++++++++++++++ %d %d ",which, action );
2591 if ( action == KOGlobals::EVENTDELETED ) { //delete 2591 if ( action == KOGlobals::EVENTDELETED ) { //delete
2592 mCalendar->checkAlarmForIncidence( 0, true ); 2592 mCalendar->checkAlarmForIncidence( 0, true );
2593 if ( mEventViewerDialog ) 2593 if ( mEventViewerDialog )
2594 mEventViewerDialog->hide(); 2594 mEventViewerDialog->hide();
2595 } 2595 }
2596 else 2596 else
2597 mCalendar->checkAlarmForIncidence( which , false ); 2597 mCalendar->checkAlarmForIncidence( which , false );
2598} 2598}
2599 2599
2600// most of the changeEventDisplays() right now just call the view's 2600// most of the changeEventDisplays() right now just call the view's
2601// total update mode, but they SHOULD be recoded to be more refresh-efficient. 2601// total update mode, but they SHOULD be recoded to be more refresh-efficient.
2602void CalendarView::changeEventDisplay(Event *which, int action) 2602void CalendarView::changeEventDisplay(Event *which, int action)
2603{ 2603{
2604 // kdDebug() << "CalendarView::changeEventDisplay" << endl; 2604 // kdDebug() << "CalendarView::changeEventDisplay" << endl;
2605 changeIncidenceDisplay((Incidence *)which, action); 2605 changeIncidenceDisplay((Incidence *)which, action);
2606 mDateNavigator->updateView(); 2606 mDateNavigator->updateView();
2607 //mDialogManager->updateSearchDialog(); 2607 //mDialogManager->updateSearchDialog();
2608 2608
2609 if (which) { 2609 if (which) {
2610 // If there is an event view visible update the display 2610 // If there is an event view visible update the display
2611 mViewManager->currentView()->changeEventDisplay(which,action); 2611 mViewManager->currentView()->changeEventDisplay(which,action);
2612 // TODO: check, if update needed 2612 // TODO: check, if update needed
2613 // if (which->getTodoStatus()) { 2613 // if (which->getTodoStatus()) {
2614 mTodoList->updateView(); 2614 mTodoList->updateView();
2615 // } 2615 // }
2616 } else { 2616 } else {
2617 mViewManager->currentView()->updateView(); 2617 mViewManager->currentView()->updateView();
2618 } 2618 }
2619} 2619}
2620 2620
2621 2621
2622void CalendarView::updateTodoViews() 2622void CalendarView::updateTodoViews()
2623{ 2623{
2624 mTodoList->updateView(); 2624 mTodoList->updateView();
2625 mViewManager->currentView()->updateView(); 2625 mViewManager->currentView()->updateView();
2626 2626
2627} 2627}
2628 2628
2629 2629
2630void CalendarView::updateView(const QDate &start, const QDate &end) 2630void CalendarView::updateView(const QDate &start, const QDate &end)
2631{ 2631{
2632#ifdef DESKTOP_VERSION 2632#ifdef DESKTOP_VERSION
2633 mDateScrollBar->blockSignals( true ); 2633 if ( ! mDateScrollBar->draggingSlider () ) {
2634 mDateScrollBar->setValue( start.dayOfYear()-1); 2634 int dof = start.dayOfYear()-1;
2635 mDateScrollBar->blockSignals( false ); 2635 if ( dof != mDateScrollBar->value() ) {
2636 mDateScrollBar->blockSignals( true );
2637 mDateScrollBar->setValue( start.dayOfYear()-1);
2638 mDateScrollBar->blockSignals( false );
2639 }
2640 }
2636#endif 2641#endif
2637 mTodoList->updateView(); 2642 mTodoList->updateView();
2638 mViewManager->updateView(start, end); 2643 mViewManager->updateView(start, end);
2639 //mDateNavigator->updateView(); 2644 //mDateNavigator->updateView();
2640} 2645}
2641 2646
2642void CalendarView::clearAllViews() 2647void CalendarView::clearAllViews()
2643{ 2648{
2644 mTodoList->clearList(); 2649 mTodoList->clearList();
2645 mViewManager->clearAllViews(); 2650 mViewManager->clearAllViews();
2646 SearchDialog * sd = mDialogManager->getSearchDialog(); 2651 SearchDialog * sd = mDialogManager->getSearchDialog();
2647 if ( sd ) { 2652 if ( sd ) {
2648 KOListView* kol = sd->listview(); 2653 KOListView* kol = sd->listview();
2649 if ( kol ) 2654 if ( kol )
2650 kol->clearList(); 2655 kol->clearList();
2651 } 2656 }
2652} 2657}
2653void CalendarView::updateView() 2658void CalendarView::updateView()
2654{ 2659{
2655 DateList tmpList = mNavigator->selectedDates(); 2660 DateList tmpList = mNavigator->selectedDates();
2656 2661
2657 if ( KOPrefs::instance()->mHideNonStartedTodos ) 2662 if ( KOPrefs::instance()->mHideNonStartedTodos )
2658 mTodoList->updateView(); 2663 mTodoList->updateView();
2659 // We assume that the navigator only selects consecutive days. 2664 // We assume that the navigator only selects consecutive days.
2660 updateView( tmpList.first(), tmpList.last() ); 2665 updateView( tmpList.first(), tmpList.last() );
2661} 2666}
2662 2667
2663void CalendarView::updateUnmanagedViews() 2668void CalendarView::updateUnmanagedViews()
2664{ 2669{
2665 mDateNavigator->updateDayMatrix(); 2670 mDateNavigator->updateDayMatrix();
2666} 2671}
2667 2672
2668int CalendarView::msgItemDelete(const QString name) 2673int CalendarView::msgItemDelete(const QString name)
2669{ 2674{
2670 return KMessageBox::warningContinueCancel(this,name +"\n\n"+ 2675 return KMessageBox::warningContinueCancel(this,name +"\n\n"+
2671 i18n("This item will be\npermanently deleted."), 2676 i18n("This item will be\npermanently deleted."),
2672 i18n("KO/Pi Confirmation"),i18n("Delete")); 2677 i18n("KO/Pi Confirmation"),i18n("Delete"));
2673} 2678}
2674 2679
2675 2680
2676void CalendarView::edit_cut() 2681void CalendarView::edit_cut()
2677{ 2682{
2678 Event *anEvent=0; 2683 Event *anEvent=0;
2679 2684
2680 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2685 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2681 2686
2682 if (mViewManager->currentView()->isEventView()) { 2687 if (mViewManager->currentView()->isEventView()) {
2683 if ( incidence && incidence->typeID() == eventID ) { 2688 if ( incidence && incidence->typeID() == eventID ) {
2684 anEvent = static_cast<Event *>(incidence); 2689 anEvent = static_cast<Event *>(incidence);
2685 } 2690 }
2686 } 2691 }
2687 2692
2688 if (!anEvent) { 2693 if (!anEvent) {
2689 KNotifyClient::beep(); 2694 KNotifyClient::beep();
2690 return; 2695 return;
2691 } 2696 }
2692 DndFactory factory( mCalendar ); 2697 DndFactory factory( mCalendar );
2693 factory.cutIncidence(anEvent); 2698 factory.cutIncidence(anEvent);
2694 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED); 2699 changeEventDisplay(anEvent, KOGlobals::EVENTDELETED);
2695} 2700}
2696 2701
2697void CalendarView::edit_copy() 2702void CalendarView::edit_copy()
2698{ 2703{
2699 Event *anEvent=0; 2704 Event *anEvent=0;