author | zautrix <zautrix> | 2005-04-03 04:33:19 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-03 04:33:19 (UTC) |
commit | f6c8249db564c1276d4c7ed5ad88c6fbac361b8d (patch) (unidiff) | |
tree | 8e5b6e2d6f9a7bc00326f7c0115bf2af53ae9ce8 /korganizer/koeditorgeneral.cpp | |
parent | 40e5edc1ab153144f0e824ad2d3a0ab37357e408 (diff) | |
download | kdepimpi-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.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 | |||
@@ -227,11 +227,9 @@ void KOEditorGeneral::pickAlarmSound() | |||
227 | { | 227 | { |
228 | 228 | ||
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, |
236 | i18n("*.wav|Wav Files"), 0)); | 234 | i18n("*.wav|Wav Files"), 0)); |
237 | if (!fileName.isEmpty()) { | 235 | if (!fileName.isEmpty()) { |
@@ -241,26 +239,25 @@ void KOEditorGeneral::pickAlarmSound() | |||
241 | QToolTip::add(mAlarmSoundButton, dispStr); | 239 | QToolTip::add(mAlarmSoundButton, dispStr); |
242 | mAlarmProgramButton->setOn(false); | 240 | mAlarmProgramButton->setOn(false); |
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()) |
252 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 251 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
253 | if ( mAlarmSoundButton->isOn()) | 252 | if ( mAlarmSoundButton->isOn()) |
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 | } |
257 | 256 | ||
258 | void KOEditorGeneral::pickAlarmProgram() | 257 | 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)); |
265 | if (!fileName.isEmpty()) { | 262 | if (!fileName.isEmpty()) { |
266 | mAlarmProgram = fileName; | 263 | mAlarmProgram = fileName; |
@@ -269,17 +266,17 @@ void KOEditorGeneral::pickAlarmProgram() | |||
269 | QToolTip::add(mAlarmProgramButton, dispStr); | 266 | QToolTip::add(mAlarmProgramButton, dispStr); |
270 | mAlarmSoundButton->setOn(false); | 267 | mAlarmSoundButton->setOn(false); |
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()) |
279 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); | 276 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
280 | if ( mAlarmSoundButton->isOn()) | 277 | if ( mAlarmSoundButton->isOn()) |
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 | } |
284 | 281 | ||
285 | 282 | ||