author | zautrix <zautrix> | 2005-02-07 22:39:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-07 22:39:50 (UTC) |
commit | 9927a063f34bb826a4b5f7f7029308c9c66acbce (patch) (side-by-side diff) | |
tree | 740386010794c8f5d50b92d49146642709a52e67 /korganizer | |
parent | d7a005e6c1a27d1084f30b940d54291a8d660f0e (diff) | |
download | kdepimpi-9927a063f34bb826a4b5f7f7029308c9c66acbce.zip kdepimpi-9927a063f34bb826a4b5f7f7029308c9c66acbce.tar.gz kdepimpi-9927a063f34bb826a4b5f7f7029308c9c66acbce.tar.bz2 |
fihix
-rw-r--r-- | korganizer/komonthview.cpp | 20 | ||||
-rw-r--r-- | korganizer/komonthview.h | 3 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 |
3 files changed, 16 insertions, 11 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 9b9e164..6ae4c6f 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -791,6 +791,8 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) : KOEventView( calendar, parent, name ), mDaysPerWeek( 7 ), mNumWeeks( 6 ), mNumCells( mDaysPerWeek * mNumWeeks ), - mShortDayLabels( false ), mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) + mWidthLongDayLabel( 0 ), mSelectedCell( 0 ) { + mShortDayLabelsM = false; + mShortDayLabelsW = false; skipResize = false; clPending = true; @@ -1051,11 +1053,11 @@ void KOMonthView::updateDayLabels() for (int i = 0; i < 7; i++) { if (mWeekStartsMonday) { - bool show = mShortDayLabels; + bool show = mShortDayLabelsW; if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) show = true; (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); } else { - if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); - else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); + if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsW)); + else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsW)); } @@ -1064,11 +1066,11 @@ void KOMonthView::updateDayLabels() for (int i = 0; i < 7; i++) { if (mWeekStartsMonday) { - bool show = mShortDayLabels; + bool show = mShortDayLabelsM; if ( i > 4 && mShowSatSunComp && mWidthLongDayLabel > (*mDayLabelsT)[i]->width() ) show = true; (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i+1,show)); } else { - if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabels)); - else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabels)); + if (i==0) (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(7,mShortDayLabelsM)); + else (*mDayLabelsT)[i]->setText(KOGlobals::self()->calendarSystem()->weekDayName(i,mShortDayLabelsM)); } @@ -1387,5 +1389,5 @@ void KOMonthView::computeLayoutWeek() // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); - mShortDayLabels = mDayLabelsW[0]->width() < mWidthLongDayLabel ; + mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ; updateDayLabels(); //bool forceUpdate = !updatePossible; @@ -1503,5 +1505,5 @@ void KOMonthView::computeLayout() // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); - mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; + mShortDayLabelsM = mDayLabels[0]->width()-2 < mWidthLongDayLabel ; updateDayLabels(); //bool forceUpdate = !updatePossible; diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index bf861ef..03f9dc6 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -283,5 +283,6 @@ class KOMonthView: public KOEventView QPtrVector<KOWeekButton> mWeekLabelsW; - bool mShortDayLabels; + bool mShortDayLabelsM; + bool mShortDayLabelsW; int mWidthLongDayLabel; diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 90be237..b0f26d1 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -107,4 +107,6 @@ void KOViewManager::showDateView( int view, QDate date) //qDebug("date %d %s", view, date.toString().latin1()); + if (view != 9) + lastMode = 0; //qDebug("%d %d ", lastNDMode, mFlagShowNextxDays ); bool savemFlagShowNextxDays = mFlagShowNextxDays; @@ -116,4 +118,5 @@ void KOViewManager::showDateView( int view, QDate date) lastNDMode = savemFlagShowNextxDays; mMainView->showDay( date ); + lastMode = 1; } else if (view == 4 ) { mCurrentAgendaView = 7 ; @@ -151,5 +154,4 @@ void KOViewManager::showDateView( int view, QDate date) mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); } - lastMode = view; } |