summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp3
-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
5 files changed, 12 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 3908dbb..47cd488 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1992,4 +1992,7 @@ void CalendarView::writeFilterSettings(KConfig *config)
void CalendarView::goToday()
{
+ 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
@@ -200,4 +200,10 @@ 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
@@ -62,4 +62,5 @@ class DateNavigator : public QObject
void selectToday();
+ void selectTodayMonth();
void selectPreviousYear();
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
@@ -135,4 +135,5 @@ class BaseView : public QWidget
/** Return if this view is a view for displaying events. */
virtual bool isEventView() { return false; }
+ virtual bool isMonthView() { return false; }
public slots:
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index d976246..e94952f 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -201,4 +201,5 @@ class KOMonthView: public KOEventView
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
+ bool isMonthView() { return true; }
MonthViewCell * selectedCell();