-rw-r--r-- | korganizer/koagenda.cpp | 4 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 8 | ||||
-rw-r--r-- | korganizer/koagendaitem.h | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 1 |
4 files changed, 8 insertions, 7 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 796d633..d9d1283 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp | |||
@@ -1838,3 +1838,3 @@ KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,i | |||
1838 | } | 1838 | } |
1839 | 1839 | //qDebug("insertallday %s -- %d - %d ",qd.toString().latin1(), XBegin, XEnd ); | |
1840 | KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); | 1840 | KOAgendaItem *agendaItem = getNewItem(event,qd,viewport()); |
@@ -1843,3 +1843,3 @@ KOAgendaItem *KOAgenda::insertAllDayItem (Incidence *event,QDate qd,int XBegin,i | |||
1843 | agendaItem->setCellXWidth(XEnd); | 1843 | agendaItem->setCellXWidth(XEnd); |
1844 | agendaItem->resizeMe(mGridSpacingX, mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY); | 1844 | agendaItem->resizeMe(mGridSpacingX, mGridSpacingX * agendaItem->cellWidth(),mGridSpacingY, true ); |
1845 | 1845 | ||
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 7a685d8..81681df 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp | |||
@@ -584,3 +584,4 @@ void KOAgendaItem::computeText() | |||
584 | } else { | 584 | } else { |
585 | mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) ; | 585 | int dur = 1+ (static_cast<Event*>(mIncidence))->dtStart().date().daysTo( (static_cast<Event*>(mIncidence))->dtEnd().date() ); |
586 | mDisplayedText += ": " +KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtStart().date(), true) + " - " + KGlobal::locale()->formatDate((static_cast<Event*>(mIncidence))->dtEnd().date(), true) + " ("+QString::number( dur )+i18n(" days") +")" ; | ||
586 | } | 587 | } |
@@ -660,3 +661,3 @@ int KOAgendaItem::cellHeight() | |||
660 | // this code is to fix this problem | 661 | // this code is to fix this problem |
661 | int KOAgendaItem::resizeMe( int grid, int wid, int hei ) | 662 | int KOAgendaItem::resizeMe( int grid, int wid, int hei, bool invalidWidth ) |
662 | { | 663 | { |
@@ -671,3 +672,3 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei ) | |||
671 | } | 672 | } |
672 | if ( wid == width() || diff >= wid ) | 673 | if ( (!invalidWidth && wid == width() ) || diff >= wid ) |
673 | resize( wid, hei ); | 674 | resize( wid, hei ); |
@@ -675,2 +676,3 @@ int KOAgendaItem::resizeMe( int grid, int wid, int hei ) | |||
675 | resize( wid - diff, hei ); | 676 | resize( wid - diff, hei ); |
677 | //qDebug("wid %d x %d ", width(), x()); | ||
676 | return diff; | 678 | return diff; |
diff --git a/korganizer/koagendaitem.h b/korganizer/koagendaitem.h index 97acd4c..37d89a6 100644 --- a/korganizer/koagendaitem.h +++ b/korganizer/koagendaitem.h | |||
@@ -111,3 +111,3 @@ class KOAgendaItem : public QWidget | |||
111 | bool isAllDay() { return mAllDay; } | 111 | bool isAllDay() { return mAllDay; } |
112 | int resizeMe( int grid, int wid, int hei ); | 112 | int resizeMe( int grid, int wid, int hei, bool invalidHei = false ); |
113 | public slots: | 113 | public slots: |
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 1cf03a0..d8a2134 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -1237,3 +1237,2 @@ void KOAgendaView::fillAgenda() | |||
1237 | } | 1237 | } |
1238 | |||
1239 | } else { | 1238 | } else { |