From ae440bf75e7f74f35f83d082de9c7a34d2d3c65d Mon Sep 17 00:00:00 2001 From: zautrix Date: Fri, 25 Mar 2005 19:42:13 +0000 Subject: layout fixes --- (limited to 'korganizer/koeditorgeneral.cpp') diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 4ee5292..cf0d4ae 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -228,12 +228,8 @@ void KOEditorGeneral::pickAlarmSound() qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); //QString prefix = mAlarmSound; 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 { QString fileName(KFileDialog::getOpenFileName(mAlarmSound, i18n("*.wav|Wav Files"), 0)); @@ -250,22 +246,19 @@ void KOEditorGeneral::pickAlarmSound() } } - +#if 0 if (mAlarmProgramButton->isOn()) ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); if ( mAlarmSoundButton->isOn()) ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); +#endif } 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 { QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); if (!fileName.isEmpty()) { @@ -280,10 +273,12 @@ void KOEditorGeneral::pickAlarmProgram() mAlarmSoundButton->setOn(true); } } +#if 0 if (mAlarmProgramButton->isOn()) ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); if ( mAlarmSoundButton->isOn()) ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); +#endif } @@ -314,17 +309,8 @@ void KOEditorGeneral::enableAlarmEdit(bool enable) mAlarmSound = KOPrefs::instance()->mDefaultAlarmFile; } } - 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()); - - } + ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage); mAlarmTimeEdit->setEnabled(enable); mAlarmSoundButton->setEnabled(enable); mAlarmProgramButton->setEnabled(enable); @@ -400,7 +386,7 @@ void KOEditorGeneral::setSecrecy( int num ) void KOEditorGeneral::readIncidence(Incidence *event) { - mAlarmMessage = i18n("Edit") +" "+event->summary(); + mAlarmMessage = event->summary(); mAlarmIncrCombo->setCurrentItem(0); mSummaryEdit->setEditText(event->summary()); mLocationEdit->setEditText(event->location()); -- cgit v0.9.0.2