-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.cpp | 30 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 32 |
3 files changed, 30 insertions, 34 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index c6cd0ae..a8035d4 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt @@ -1106,3 +1106,3 @@ { "\nAre you sure you want\nto restore this?","\nMöchten Sie das wirklicht\nwiederherstellen?" }, -{ "% completed","% komplett" }, +{ "% completed","% erledigt" }, { "%d item(s) found.","%d Item(s) gefunden." }, diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 5508210..f287216 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -129,2 +129,13 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) int tW = fm.width("24:00i"); + int timeHeight = fm.height(); + if ( timeHeight > mCellHeight ) + timeHeight = mCellHeight-1; + int borderWidth = 5; + QFont nFont = p->font(); + QFont sFont = nFont; + sFont.setPointSize( sFont.pointSize()/2+2 ); + if (!KGlobal::locale()->use12Clock()) + suffix = "00"; + QFontMetrics fmS( sFont ); + int sHei = fmS.height(); @@ -133,3 +144,2 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) hour.setNum(cell); - suffix = "am"; @@ -138,6 +148,6 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) if (cell > 11) suffix = "pm"; + else + suffix = "am"; if (cell == 0) hour.setNum(12); if (cell > 12) hour.setNum(cell - 12); - } else { - suffix = ":00"; } @@ -145,3 +155,3 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) // create string in format of "XX:XX" or "XXpm/am" - fullTime = hour + suffix; + fullTime = hour;// + suffix; @@ -149,7 +159,9 @@ void TimeLabels::drawContents(QPainter *p,int cx, int cy, int cw, int ch) int timeWidth = fm.width(fullTime+"i"); - int offset = this->width() - timeWidth; - int borderWidth = 5; - int timeHeight = fm.height(); - timeHeight = timeHeight + 2 - ( timeHeight / 4 ); + int tw2 = fm.width(suffix); + int offset = this->width() - timeWidth - tw2; + p->setFont( nFont ); p->drawText(cx -borderWidth + offset, y+ timeHeight, fullTime); + p->setFont( sFont ); + offset += timeWidth; + p->drawText(cx - borderWidth + offset, y+ sHei, suffix); @@ -882,4 +894,2 @@ void KOAgendaView::updateConfig() - - // update config for children diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 4ee5292..cf0d4ae 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -230,8 +230,4 @@ void KOEditorGeneral::pickAlarmSound() if (!mAlarmSoundButton->isOn()) { - //mAlarmSound = ""; - QToolTip::remove(mAlarmSoundButton); - QToolTip::add(mAlarmSoundButton, i18n("No sound set")); - mAlarmProgramButton->setOn(true); - mAlarmSoundButton->setOn(false); - pickAlarmProgram(); + mAlarmSoundButton->setOn(true); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); } else { @@ -252,3 +248,3 @@ void KOEditorGeneral::pickAlarmSound() } - +#if 0 if (mAlarmProgramButton->isOn()) @@ -257,2 +253,3 @@ void KOEditorGeneral::pickAlarmSound() ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); +#endif } @@ -262,8 +259,4 @@ void KOEditorGeneral::pickAlarmProgram() if (!mAlarmProgramButton->isOn()) { - //mAlarmProgram = ""; - QToolTip::remove(mAlarmProgramButton); - QToolTip::add(mAlarmProgramButton, i18n("No program set")); - mAlarmProgramButton->setOn(false); - mAlarmSoundButton->setOn(true); - pickAlarmSound(); + mAlarmProgramButton->setOn(true); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); } else { @@ -282,2 +275,3 @@ void KOEditorGeneral::pickAlarmProgram() } +#if 0 if (mAlarmProgramButton->isOn()) @@ -286,2 +280,3 @@ void KOEditorGeneral::pickAlarmProgram() ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); +#endif } @@ -316,13 +311,4 @@ void KOEditorGeneral::enableAlarmEdit(bool enable) } - if (mAlarmProgramButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); - if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); } - else { ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage); - //((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Edit item: ") + mSummaryEdit->currentText()); - - - } mAlarmTimeEdit->setEnabled(enable); @@ -402,3 +388,3 @@ void KOEditorGeneral::readIncidence(Incidence *event) - mAlarmMessage = i18n("Edit") +" "+event->summary(); + mAlarmMessage = event->summary(); mAlarmIncrCombo->setCurrentItem(0); |