author | zautrix <zautrix> | 2005-02-16 22:08:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-16 22:08:18 (UTC) |
commit | 451b4de59893b5c0801a7bbb2f8cbe8e0266b324 (patch) (unidiff) | |
tree | ce3f535541583d37cfe951ddd8d7474770d9c374 /korganizer/komonthview.cpp | |
parent | b2cf8e9a08082539e0a5578a98766e5990783f9a (diff) | |
download | kdepimpi-451b4de59893b5c0801a7bbb2f8cbe8e0266b324.zip kdepimpi-451b4de59893b5c0801a7bbb2f8cbe8e0266b324.tar.gz kdepimpi-451b4de59893b5c0801a7bbb2f8cbe8e0266b324.tar.bz2 |
month view fixes
-rw-r--r-- | korganizer/komonthview.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index d0380e3..f9bc1ca 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -937,44 +937,46 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
937 | computeLayout(); | 937 | computeLayout(); |
938 | 938 | ||
939 | if ( mShowWeekView ) | 939 | if ( mShowWeekView ) |
940 | mWidStack->raiseWidget( mWeekView ); | 940 | mWidStack->raiseWidget( mWeekView ); |
941 | else | 941 | else |
942 | mWidStack->raiseWidget( mMonthView ); | 942 | mWidStack->raiseWidget( mMonthView ); |
943 | } | 943 | } |
944 | 944 | ||
945 | KOMonthView::~KOMonthView() | 945 | KOMonthView::~KOMonthView() |
946 | { | 946 | { |
947 | delete mContextMenu; | 947 | delete mContextMenu; |
948 | } | 948 | } |
949 | 949 | ||
950 | void KOMonthView::selectInternalWeekNum ( int n ) | 950 | void KOMonthView::selectInternalWeekNum ( int n ) |
951 | { | 951 | { |
952 | switchView(); | 952 | switchView(); |
953 | if ( !KOPrefs::instance()->mMonthViewWeek ) | ||
954 | emit selectMonth (); | ||
955 | else | ||
953 | emit selectWeekNum ( n ); | 956 | emit selectWeekNum ( n ); |
954 | } | 957 | } |
955 | 958 | ||
956 | int KOMonthView::currentWeek() | 959 | int KOMonthView::currentWeek() |
957 | { | 960 | { |
958 | if ( mShowWeekView ) | 961 | if ( mShowWeekView ) |
959 | return mWeekLabelsW[0]->getWeekNum(); | 962 | return mWeekLabelsW[0]->getWeekNum(); |
960 | return mWeekLabels[0]->getWeekNum(); | 963 | return mWeekLabels[0]->getWeekNum(); |
961 | } | 964 | } |
962 | void KOMonthView::switchView() | 965 | void KOMonthView::switchView() |
963 | { | 966 | { |
964 | |||
965 | if ( selectedCell( ) ) | 967 | if ( selectedCell( ) ) |
966 | selectedCell()->deselect(); | 968 | selectedCell()->deselect(); |
967 | mShowWeekView = !mShowWeekView; | 969 | mShowWeekView = !mShowWeekView; |
968 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; | 970 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; |
969 | if ( clPending ) { | 971 | if ( clPending ) { |
970 | computeLayout(); | 972 | computeLayout(); |
971 | updateConfig(); | 973 | updateConfig(); |
972 | } | 974 | } |
973 | if ( mShowWeekView ) | 975 | if ( mShowWeekView ) |
974 | mWidStack->raiseWidget( mWeekView ); | 976 | mWidStack->raiseWidget( mWeekView ); |
975 | else | 977 | else |
976 | mWidStack->raiseWidget( mMonthView ); | 978 | mWidStack->raiseWidget( mMonthView ); |
977 | clPending = false; | 979 | clPending = false; |
978 | } | 980 | } |
979 | 981 | ||
980 | int KOMonthView::maxDatesHint() | 982 | int KOMonthView::maxDatesHint() |