summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt6
-rw-r--r--korganizer/calendarview.cpp5
-rw-r--r--korganizer/datenavigator.cpp6
-rw-r--r--korganizer/datenavigator.h1
-rw-r--r--korganizer/interfaces/korganizer/baseview.h1
-rw-r--r--korganizer/komonthview.h1
6 files changed, 19 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index eb7cf13..4fff7e1 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -23,2 +23,8 @@ Now KOpieMail will store all mails on the SD card.
+KO/Pi Monthview:
+Now "Go to Today" selects the current month from day 1-end,
+not the current date + some days.
+I.e. "Go to Today" shows now always
+the current month with first day of month in the first row.
+
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 3908dbb..47cd488 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1993,3 +1993,6 @@ void CalendarView::goToday()
{
- mNavigator->selectToday();
+ if ( mViewManager->currentView()->isMonthView() )
+ mNavigator->selectTodayMonth();
+ else
+ mNavigator->selectToday();
}
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index e26e20b..3156b2b 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -201,2 +201,8 @@ void DateNavigator::selectWorkWeek( const QDate &d )
+void DateNavigator::selectTodayMonth()
+{
+ QDate date = QDate::currentDate().addDays( 1-QDate::currentDate().day() );
+ selectDates( date , date.daysInMonth ());
+
+}
void DateNavigator::selectToday()
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index 747e3d3..4a19e17 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -63,2 +63,3 @@ class DateNavigator : public QObject
void selectToday();
+ void selectTodayMonth();
diff --git a/korganizer/interfaces/korganizer/baseview.h b/korganizer/interfaces/korganizer/baseview.h
index 09f8ba3..2ac9de1 100644
--- a/korganizer/interfaces/korganizer/baseview.h
+++ b/korganizer/interfaces/korganizer/baseview.h
@@ -136,2 +136,3 @@ class BaseView : public QWidget
virtual bool isEventView() { return false; }
+ virtual bool isMonthView() { return false; }
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index d976246..e94952f 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -202,2 +202,3 @@ class KOMonthView: public KOEventView
const QDate &, const QDate &);
+ bool isMonthView() { return true; }