-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 64 | ||||
-rw-r--r-- | korganizer/koagenda.cpp | 4 | ||||
-rw-r--r-- | korganizer/koagenda.h | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 5 |
5 files changed, 17 insertions, 61 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 814c541..aa4a89a 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -7,4 +7,4 @@ Added a button to add a subtodo quickly. | |||
7 | 7 | ||
8 | Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q" ). | 8 | Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). |
9 | 9 | Added an option to change the layout of the list week to column mode. | |
10 | 10 | ||
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 426e8f9..2582931 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -106,2 +106,3 @@ | |||
106 | #include "koagendaview.h" | 106 | #include "koagendaview.h" |
107 | #include "koagenda.h" | ||
107 | #include "kodialogmanager.h" | 108 | #include "kodialogmanager.h" |
@@ -665,3 +666,7 @@ void CalendarView::nextConflict( bool all, bool allday ) | |||
665 | } | 666 | } |
666 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first().addDays(1), QTime ( 0,0,0)); | 667 | QTime st ( 0,0,0); |
668 | if ( mViewManager->currentView() == mViewManager->agendaView() ) | ||
669 | st = mViewManager->agendaView()->agenda()->getEndTime(); | ||
670 | //qDebug("time %s ", st.toString().latin1()); | ||
671 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); | ||
667 | QDateTime conflict; | 672 | QDateTime conflict; |
@@ -722,59 +727,2 @@ void CalendarView::nextConflict( bool all, bool allday ) | |||
722 | return; | 727 | return; |
723 | |||
724 | |||
725 | |||
726 | |||
727 | |||
728 | #if 0 | ||
729 | |||
730 | |||
731 | QDate end = start.addDays( 365*2); | ||
732 | while ( start < end ) { | ||
733 | QPtrList<Event> eventList = calendar()->events( start ); | ||
734 | Event * ev = eventList.first(); | ||
735 | QPtrList<Event> test = eventList; | ||
736 | while ( ev ) { | ||
737 | //qDebug("found %d on %s ", eventList.count(), start.toString().latin1()); | ||
738 | Event * t_ev = test.first(); | ||
739 | QDateTime es = ev->dtStart(); | ||
740 | QDateTime ee = ev->dtEnd(); | ||
741 | if ( ev->doesFloat() ) | ||
742 | ee = ee.addDays( 1 ); | ||
743 | if ( ! all ) { | ||
744 | if ( ev->doesFloat() != allday ) | ||
745 | t_ev = 0; | ||
746 | } | ||
747 | while ( t_ev ) { | ||
748 | bool skip = false; | ||
749 | if ( ! all ) { | ||
750 | if ( t_ev->doesFloat() != allday ) | ||
751 | skip = true; | ||
752 | } | ||
753 | if ( !skip && ev != t_ev ) { | ||
754 | QDateTime ets = t_ev->dtStart(); | ||
755 | QDateTime ete = t_ev->dtEnd(); | ||
756 | if ( t_ev->doesFloat() ) | ||
757 | ete = ete.addDays( 1 ); | ||
758 | //qDebug("test %s -- %s -------- %s -- %s ", es.toString().latin1() , ee.toString().latin1(), ets.toString().latin1() , ete.toString().latin1() ); | ||
759 | if ( es < ete && ets < ee ) { | ||
760 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) | ||
761 | mViewManager->showDayView(); | ||
762 | mNavigator->slotDaySelect( start ); | ||
763 | int hour = es.time().hour(); | ||
764 | if ( ets > es ) | ||
765 | hour = ets.time().hour(); | ||
766 | mViewManager->agendaView()->setStartHour( hour ); | ||
767 | topLevelWidget()->setCaption( i18n("Conflict %1 <-> %2"). arg( ev->summary().left( 20 ) ).arg( t_ev->summary().left( 20 ) ) ); | ||
768 | return; | ||
769 | } | ||
770 | } | ||
771 | t_ev = test.next(); | ||
772 | } | ||
773 | ev = eventList.next(); | ||
774 | } | ||
775 | start = start.addDays( 1 ); | ||
776 | } | ||
777 | topLevelWidget()->setCaption( i18n("No conflict found within the next two years") ); | ||
778 | qDebug("No conflict found "); | ||
779 | #endif | ||
780 | } | 728 | } |
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index b290020..779f12e 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1635,2 +1635,6 @@ void KOAgenda::setStartHour(int startHour) | |||
1635 | } | 1635 | } |
1636 | QTime KOAgenda::getEndTime() | ||
1637 | { | ||
1638 | return QTime ( (contentsY ()+viewport()->height())*24/contentsHeight ()+1,0,0); | ||
1639 | } | ||
1636 | void KOAgenda::hideUnused() | 1640 | void KOAgenda::hideUnused() |
diff --git a/korganizer/koagenda.h b/korganizer/koagenda.h index 0e3aed8..86cf2f4 100644 --- a/korganizer/koagenda.h +++ b/korganizer/koagenda.h | |||
@@ -129,2 +129,3 @@ class KOAgenda : public QScrollView | |||
129 | void shrinkPixmap(); | 129 | void shrinkPixmap(); |
130 | QTime getEndTime(); | ||
130 | 131 | ||
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 53bbe28..b5a59af 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -1842,5 +1842,8 @@ void KOMonthView::doComputeLayoutWeek() | |||
1842 | int hei = height()-1-mNavigatorBar->height(); | 1842 | int hei = height()-1-mNavigatorBar->height(); |
1843 | #ifdef DESKTOP_VERSION | ||
1843 | if ( !KOPrefs::instance()->mMonthViewWeekRowlayout ) { | 1844 | if ( !KOPrefs::instance()->mMonthViewWeekRowlayout ) { |
1844 | daysToShow = 2; | 1845 | daysToShow = 2; |
1845 | } else { | 1846 | } else |
1847 | #endif | ||
1848 | { | ||
1846 | if ( wid < hei ) | 1849 | if ( wid < hei ) |