Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index b4fe965..f5eb52e 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -240,27 +240,27 @@ void KOEditorGeneral::pickAlarmSound() | |||
240 | QString dispStr = i18n("Playing '%1'").arg(fileName); | 240 | QString dispStr = i18n("Playing '%1'").arg(fileName); |
241 | QToolTip::add(mAlarmSoundButton, dispStr); | 241 | QToolTip::add(mAlarmSoundButton, dispStr); |
242 | mAlarmProgramButton->setOn(false); | 242 | mAlarmProgramButton->setOn(false); |
243 | mAlarmSoundButton->setOn(true); | 243 | mAlarmSoundButton->setOn(true); |
244 | } else { | 244 | } else { |
245 | mAlarmProgramButton->setOn(true); | 245 | mAlarmProgramButton->setOn(true); |
246 | mAlarmSoundButton->setOn(false); | 246 | mAlarmSoundButton->setOn(false); |
247 | 247 | ||
248 | } | 248 | } |
249 | } | 249 | } |
250 | 250 | ||
251 | if (mAlarmProgramButton->isOn()) | 251 | if (mAlarmProgramButton->isOn()) |
252 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram ); | 252 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
253 | if ( mAlarmSoundButton->isOn()) | 253 | if ( mAlarmSoundButton->isOn()) |
254 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + mAlarmSound ); | 254 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) ); |
255 | } | 255 | } |
256 | 256 | ||
257 | void KOEditorGeneral::pickAlarmProgram() | 257 | void KOEditorGeneral::pickAlarmProgram() |
258 | { | 258 | { |
259 | if (!mAlarmProgramButton->isOn()) { | 259 | if (!mAlarmProgramButton->isOn()) { |
260 | //mAlarmProgram = ""; | 260 | //mAlarmProgram = ""; |
261 | QToolTip::remove(mAlarmProgramButton); | 261 | QToolTip::remove(mAlarmProgramButton); |
262 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); | 262 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); |
263 | mAlarmProgramButton->setOn(false); | 263 | mAlarmProgramButton->setOn(false); |
264 | mAlarmSoundButton->setOn(true); | 264 | mAlarmSoundButton->setOn(true); |
265 | } else { | 265 | } else { |
266 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); | 266 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); |
@@ -268,27 +268,27 @@ void KOEditorGeneral::pickAlarmProgram() | |||
268 | mAlarmProgram = fileName; | 268 | mAlarmProgram = fileName; |
269 | QToolTip::remove(mAlarmProgramButton); | 269 | QToolTip::remove(mAlarmProgramButton); |
270 | QString dispStr = i18n("Running '%1'").arg(fileName); | 270 | QString dispStr = i18n("Running '%1'").arg(fileName); |
271 | QToolTip::add(mAlarmProgramButton, dispStr); | 271 | QToolTip::add(mAlarmProgramButton, dispStr); |
272 | mAlarmSoundButton->setOn(false); | 272 | mAlarmSoundButton->setOn(false); |
273 | mAlarmProgramButton->setOn(true); | 273 | mAlarmProgramButton->setOn(true); |
274 | } else { | 274 | } else { |
275 | mAlarmProgramButton->setOn(false); | 275 | mAlarmProgramButton->setOn(false); |
276 | mAlarmSoundButton->setOn(true); | 276 | mAlarmSoundButton->setOn(true); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | if (mAlarmProgramButton->isOn()) | 279 | if (mAlarmProgramButton->isOn()) |
280 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + mAlarmProgram ); | 280 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); |
281 | if ( mAlarmSoundButton->isOn()) | 281 | if ( mAlarmSoundButton->isOn()) |
282 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + mAlarmSound ); | 282 | ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) ); |
283 | } | 283 | } |
284 | 284 | ||
285 | 285 | ||
286 | QString KOEditorGeneral::getFittingPath( const QString s ) | 286 | QString KOEditorGeneral::getFittingPath( const QString s ) |
287 | { | 287 | { |
288 | int maxlen = 50; | 288 | int maxlen = 50; |
289 | if ( QApplication::desktop()->width() < 640 ) { | 289 | if ( QApplication::desktop()->width() < 640 ) { |
290 | if ( QApplication::desktop()->width() < 320 ) | 290 | if ( QApplication::desktop()->width() < 320 ) |
291 | maxlen = 22; | 291 | maxlen = 22; |
292 | else | 292 | else |
293 | maxlen = 35; | 293 | maxlen = 35; |
294 | } | 294 | } |