summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneral.cpp
authorzautrix <zautrix>2005-04-03 04:33:19 (UTC)
committer zautrix <zautrix>2005-04-03 04:33:19 (UTC)
commitf6c8249db564c1276d4c7ed5ad88c6fbac361b8d (patch) (side-by-side diff)
tree8e5b6e2d6f9a7bc00326f7c0115bf2af53ae9ce8 /korganizer/koeditorgeneral.cpp
parent40e5edc1ab153144f0e824ad2d3a0ab37357e408 (diff)
downloadkdepimpi-f6c8249db564c1276d4c7ed5ad88c6fbac361b8d.zip
kdepimpi-f6c8249db564c1276d4c7ed5ad88c6fbac361b8d.tar.gz
kdepimpi-f6c8249db564c1276d4c7ed5ad88c6fbac361b8d.tar.bz2
fixes
Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp35
1 files changed, 16 insertions, 19 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index b14ca43..abc80d4 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -227,11 +227,9 @@ void KOEditorGeneral::pickAlarmSound()
{
qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
- //QString prefix = mAlarmSound;
- if (!mAlarmSoundButton->isOn()) {
- mAlarmSoundButton->setOn(true);
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
- } else {
+
+ bool oldState = mAlarmSoundButton->isOn();
+
QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
i18n("*.wav|Wav Files"), 0));
if (!fileName.isEmpty()) {
@@ -241,26 +239,25 @@ void KOEditorGeneral::pickAlarmSound()
QToolTip::add(mAlarmSoundButton, dispStr);
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
+ QToolTip::add(mAlarmProgramButton, i18n("No program set"));
} else {
- mAlarmProgramButton->setOn(true);
- mAlarmSoundButton->setOn(false);
+ mAlarmProgramButton->setOn(oldState);
+ mAlarmSoundButton->setOn(!oldState);
+
}
- }
-#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()) {
- mAlarmProgramButton->setOn(true);
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
- } else {
+ bool oldState = mAlarmProgramButton->isOn();
+
QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0));
if (!fileName.isEmpty()) {
mAlarmProgram = fileName;
@@ -269,17 +266,17 @@ void KOEditorGeneral::pickAlarmProgram()
QToolTip::add(mAlarmProgramButton, dispStr);
mAlarmSoundButton->setOn(false);
mAlarmProgramButton->setOn(true);
+ QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
} else {
- mAlarmProgramButton->setOn(false);
- mAlarmSoundButton->setOn(true);
- }
+ mAlarmProgramButton->setOn(!oldState);
+ mAlarmSoundButton->setOn(oldState);
}
-#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
+
}