author | zautrix <zautrix> | 2005-01-29 07:48:23 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-29 07:48:23 (UTC) |
commit | ef1d97a243957180f5ffc3c3b055ffd8bf52e157 (patch) (side-by-side diff) | |
tree | 57ebf97cfd0d324ffcecbfb0c9814745f73d54a5 /korganizer/koeditorgeneral.cpp | |
parent | 0850ade22908615389800c6ee973f5906154d980 (diff) | |
download | kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.zip kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.tar.gz kdepimpi-ef1d97a243957180f5ffc3c3b055ffd8bf52e157.tar.bz2 |
many stribg fixes
Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index b4fe965..f5eb52e 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -228,79 +228,79 @@ void KOEditorGeneral::pickAlarmSound() if (!mAlarmSoundButton->isOn()) { //mAlarmSound = ""; QToolTip::remove(mAlarmSoundButton); QToolTip::add(mAlarmSoundButton, i18n("No sound set")); mAlarmProgramButton->setOn(true); mAlarmSoundButton->setOn(false); } else { QString fileName(KFileDialog::getOpenFileName(mAlarmSound, i18n("*.wav|Wav Files"), 0)); if (!fileName.isEmpty()) { mAlarmSound = fileName; QToolTip::remove(mAlarmSoundButton); QString dispStr = i18n("Playing '%1'").arg(fileName); QToolTip::add(mAlarmSoundButton, dispStr); mAlarmProgramButton->setOn(false); mAlarmSoundButton->setOn(true); } else { mAlarmProgramButton->setOn(true); mAlarmSoundButton->setOn(false); } } if (mAlarmProgramButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram ); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); if ( mAlarmSoundButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + mAlarmSound ); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) ); } void KOEditorGeneral::pickAlarmProgram() { if (!mAlarmProgramButton->isOn()) { //mAlarmProgram = ""; QToolTip::remove(mAlarmProgramButton); QToolTip::add(mAlarmProgramButton, i18n("No program set")); mAlarmProgramButton->setOn(false); mAlarmSoundButton->setOn(true); } else { QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); if (!fileName.isEmpty()) { mAlarmProgram = fileName; QToolTip::remove(mAlarmProgramButton); QString dispStr = i18n("Running '%1'").arg(fileName); QToolTip::add(mAlarmProgramButton, dispStr); mAlarmSoundButton->setOn(false); mAlarmProgramButton->setOn(true); } else { mAlarmProgramButton->setOn(false); mAlarmSoundButton->setOn(true); } } if (mAlarmProgramButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram ); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); if ( mAlarmSoundButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + mAlarmSound ); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) ); } QString KOEditorGeneral::getFittingPath( const QString s ) { int maxlen = 50; if ( QApplication::desktop()->width() < 640 ) { if ( QApplication::desktop()->width() < 320 ) maxlen = 22; else maxlen = 35; } if ( s.length() > maxlen ) { return "..."+s.right(maxlen -3); } return s; } void KOEditorGeneral::enableAlarmEdit(bool enable) { if ( enable ) { if (!mAlarmProgramButton->isOn() && !mAlarmSoundButton->isOn()) { mAlarmSoundButton->setOn( true ); if ( mAlarmSound.isEmpty() ) |