author | zautrix <zautrix> | 2005-09-24 21:22:20 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-09-24 21:22:20 (UTC) |
commit | 7140721e3421557624a49c5dcc7a38caee8f0ce7 (patch) (side-by-side diff) | |
tree | 584fc9709aaebee0eefa64e933c4b627ffb0eee0 /korganizer | |
parent | 396aeedb3351ecf9024a3975a5bce9166f0d8aef (diff) | |
download | kdepimpi-7140721e3421557624a49c5dcc7a38caee8f0ce7.zip kdepimpi-7140721e3421557624a49c5dcc7a38caee8f0ce7.tar.gz kdepimpi-7140721e3421557624a49c5dcc7a38caee8f0ce7.tar.bz2 |
fix of utf8 month name
-rw-r--r-- | korganizer/navigatorbar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index b03870f..f6a1a6a 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp @@ -177,103 +177,103 @@ QSize NavigatorBar::sizeHint() const wid += mCurrentButtonMinWid; if ( mNextWeek->isVisible() ) wid += mCurrentButtonMinWid; if ( mNextYear->isVisible() ) wid += mCurrentButtonMinWid; //qDebug("ret %d %d ", wid, mCurrentHei); return QSize ( wid, mCurrentHei ); } QSize NavigatorBar::sizeHintTwoButtons( int butNum ) const { return QSize ( mCurrentMinWid + butNum * mCurrentButtonMinWid , mCurrentHei ); } void NavigatorBar::resetFont ( QFont fo ) { QFont tfont = fo; if ( QApplication::desktop()->width() >= 480 ) tfont.setPointSize(tfont.pointSize()+2); tfont.setBold(true); mSelectMonth->setFont( tfont ); // Set minimum width to width of widest month name label int i; int maxwidth = 0; QFontMetrics fm ( mSelectMonth->font() ); int width = fm.width("September '00" ); maxwidth = width+2; int size = fm.height()+2; if ( QApplication::desktop()->width() >= 480 ) { size += 6; maxwidth+= 6; } mSelectMonth->setMinimumWidth( maxwidth ); mSelectMonth->setFixedHeight( size ); mPrevYear->setFixedHeight( size ); mPrevMonth->setFixedHeight( size ); mPrevWeek->setFixedHeight( size ); mNextMonth->setFixedHeight( size ); mNextWeek->setFixedHeight( size ); mNextYear->setFixedHeight ( size ); mCurrentHei = size +2; mCurrentMinWid = maxwidth+2; mCurrentButtonMinWid = mPrevYear->sizeHint().width(); } void NavigatorBar::showButtons( bool left, bool right ) { if ( left ) { mPrevYear->show(); mPrevMonth->show(); } else { mPrevYear->hide(); mPrevMonth->hide(); } if ( right ) { mNextYear->show(); mNextMonth->show(); } else { mNextYear->hide(); mNextMonth->hide(); } if ( !left && !right ) { //mSelectMonth->setMaximumWidth( 1024 ); mSelectMonth->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); } } void NavigatorBar::selectMonth() { int month; KPopupFrame* popup = new KPopupFrame(this); KDateInternalMonthPicker* picker = new KDateInternalMonthPicker(popup); // ----- picker->resize(picker->sizeHint()); popup->setMainWidget(picker); picker->setFocus(); connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); if(popup->exec(mSelectMonth->mapToGlobal(QPoint(0, mSelectMonth->height())))) { month = picker->getResult(); emit monthSelected ( month ); } else { KNotifyClient::beep(); } delete popup; } void NavigatorBar::selectDates( const KCal::DateList &dateList ) { if (dateList.count() > 0) { QDate date = dateList.first(); const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem(); // compute the label at the top of the navigator - QString dtstr = i18n(calSys->monthName( date )) + " '" + + QString dtstr = calSys->monthName( date ) + " '" + QString::number( calSys->year( date ) ).right(2); mSelectMonth->setText( dtstr ); } } |