Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 496f125..4ee5292 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -225,6 +225,7 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) void KOEditorGeneral::pickAlarmSound() { + qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); //QString prefix = mAlarmSound; if (!mAlarmSoundButton->isOn()) { //mAlarmSound = ""; @@ -232,6 +233,7 @@ void KOEditorGeneral::pickAlarmSound() QToolTip::add(mAlarmSoundButton, i18n("No sound set")); mAlarmProgramButton->setOn(true); mAlarmSoundButton->setOn(false); + pickAlarmProgram(); } else { QString fileName(KFileDialog::getOpenFileName(mAlarmSound, i18n("*.wav|Wav Files"), 0)); @@ -252,7 +254,7 @@ void KOEditorGeneral::pickAlarmSound() if (mAlarmProgramButton->isOn()) ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); if ( mAlarmSoundButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) ); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); } void KOEditorGeneral::pickAlarmProgram() @@ -263,8 +265,9 @@ void KOEditorGeneral::pickAlarmProgram() QToolTip::add(mAlarmProgramButton, i18n("No program set")); mAlarmProgramButton->setOn(false); mAlarmSoundButton->setOn(true); + pickAlarmSound(); } else { - QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); + QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); if (!fileName.isEmpty()) { mAlarmProgram = fileName; QToolTip::remove(mAlarmProgramButton); @@ -280,7 +283,7 @@ void KOEditorGeneral::pickAlarmProgram() if (mAlarmProgramButton->isOn()) ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); if ( mAlarmSoundButton->isOn()) - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) ); + ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); } @@ -317,7 +320,9 @@ void KOEditorGeneral::enableAlarmEdit(bool enable) ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); } else { - ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled for this item")); + ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage); + //((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Edit item: ") + mSummaryEdit->currentText()); + } mAlarmTimeEdit->setEnabled(enable); @@ -363,6 +368,7 @@ void KOEditorGeneral::setDefaults(bool allDay) mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); #endif + mAlarmMessage = i18n("Edit new item"); enableAlarmEdit( !allDay ); // TODO: Implement a KPrefsComboItem to solve this in a clean way. @@ -394,6 +400,7 @@ void KOEditorGeneral::setSecrecy( int num ) void KOEditorGeneral::readIncidence(Incidence *event) { + mAlarmMessage = i18n("Edit") +" "+event->summary(); mAlarmIncrCombo->setCurrentItem(0); mSummaryEdit->setEditText(event->summary()); mLocationEdit->setEditText(event->location()); |