Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 35 |
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 | |||
@@ -229,7 +229,5 @@ void KOEditorGeneral::pickAlarmSound() | |||
229 | qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); | 229 | qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); |
230 | //QString prefix = mAlarmSound; | 230 | |
231 | if (!mAlarmSoundButton->isOn()) { | 231 | bool oldState = mAlarmSoundButton->isOn(); |
232 | mAlarmSoundButton->setOn(true); | 232 | |
233 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | ||
234 | } else { | ||
235 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, | 233 | QString fileName(KFileDialog::getOpenFileName(mAlarmSound, |
@@ -243,9 +241,10 @@ void KOEditorGeneral::pickAlarmSound() | |||
243 | mAlarmSoundButton->setOn(true); | 241 | mAlarmSoundButton->setOn(true); |
242 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); | ||
244 | } else { | 243 | } else { |
245 | mAlarmProgramButton->setOn(true); | 244 | mAlarmProgramButton->setOn(oldState); |
246 | mAlarmSoundButton->setOn(false); | 245 | mAlarmSoundButton->setOn(!oldState); |
246 | |||
247 | 247 | ||
248 | } | 248 | } |
249 | } | 249 | |
250 | #if 0 | ||
251 | if (mAlarmProgramButton->isOn()) | 250 | if (mAlarmProgramButton->isOn()) |
@@ -254,3 +253,3 @@ void KOEditorGeneral::pickAlarmSound() | |||
254 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 253 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
255 | #endif | 254 | |
256 | } | 255 | } |
@@ -259,6 +258,4 @@ void KOEditorGeneral::pickAlarmProgram() | |||
259 | { | 258 | { |
260 | if (!mAlarmProgramButton->isOn()) { | 259 | bool oldState = mAlarmProgramButton->isOn(); |
261 | mAlarmProgramButton->setOn(true); | 260 | |
262 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | ||
263 | } else { | ||
264 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); | 261 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0)); |
@@ -271,8 +268,8 @@ void KOEditorGeneral::pickAlarmProgram() | |||
271 | mAlarmProgramButton->setOn(true); | 268 | mAlarmProgramButton->setOn(true); |
269 | QToolTip::add(mAlarmSoundButton, i18n("No sound set")); | ||
272 | } else { | 270 | } else { |
273 | mAlarmProgramButton->setOn(false); | 271 | mAlarmProgramButton->setOn(!oldState); |
274 | mAlarmSoundButton->setOn(true); | 272 | mAlarmSoundButton->setOn(oldState); |
275 | } | ||
276 | } | 273 | } |
277 | #if 0 | 274 | |
278 | if (mAlarmProgramButton->isOn()) | 275 | if (mAlarmProgramButton->isOn()) |
@@ -281,3 +278,3 @@ void KOEditorGeneral::pickAlarmProgram() | |||
281 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); | 278 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); |
282 | #endif | 279 | |
283 | } | 280 | } |