summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneral.cpp
Unidiff
Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 9df76e7..0045b7f 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -211,49 +211,49 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
211 mAlarmSoundButton = new QPushButton(parent); 211 mAlarmSoundButton = new QPushButton(parent);
212 mAlarmSoundButton->setPixmap(SmallIcon("playsound")); 212 mAlarmSoundButton->setPixmap(SmallIcon("playsound"));
213 mAlarmSoundButton->setToggleButton(true); 213 mAlarmSoundButton->setToggleButton(true);
214 QToolTip::add(mAlarmSoundButton, i18n("No sound set")); 214 QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
215 connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound())); 215 connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound()));
216 alarmLayout->addWidget(mAlarmSoundButton); 216 alarmLayout->addWidget(mAlarmSoundButton);
217 217
218 mAlarmProgramButton = new QPushButton(parent); 218 mAlarmProgramButton = new QPushButton(parent);
219 mAlarmProgramButton->setPixmap(SmallIcon("run")); 219 mAlarmProgramButton->setPixmap(SmallIcon("run"));
220 mAlarmProgramButton->setToggleButton(true); 220 mAlarmProgramButton->setToggleButton(true);
221 QToolTip::add(mAlarmProgramButton, i18n("No program set")); 221 QToolTip::add(mAlarmProgramButton, i18n("No program set"));
222 connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram())); 222 connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram()));
223 alarmLayout->addWidget(mAlarmProgramButton); 223 alarmLayout->addWidget(mAlarmProgramButton);
224 mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 ); 224 mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 );
225 mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 ); 225 mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 );
226 // if ( KOPrefs::instance()->mCompactDialogs ) { 226 // if ( KOPrefs::instance()->mCompactDialogs ) {
227 // mAlarmSoundButton->hide(); 227 // mAlarmSoundButton->hide();
228 // mAlarmProgramButton->hide(); 228 // mAlarmProgramButton->hide();
229 // } 229 // }
230} 230}
231 231
232void KOEditorGeneral::pickAlarmSound() 232void KOEditorGeneral::pickAlarmSound()
233{ 233{
234 234
235 qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() ); 235 //qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
236 236
237 bool oldState = mAlarmSoundButton->isOn(); 237 bool oldState = mAlarmSoundButton->isOn();
238 238
239 QString fileName(KFileDialog::getOpenFileName(mAlarmSound, 239 QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
240 i18n("*.wav|Wav Files"), 0)); 240 i18n("*.wav|Wav Files"), 0));
241 if (!fileName.isEmpty()) { 241 if (!fileName.isEmpty()) {
242 mAlarmSound = fileName; 242 mAlarmSound = fileName;
243 QToolTip::remove(mAlarmSoundButton); 243 QToolTip::remove(mAlarmSoundButton);
244 QString dispStr = i18n("Playing '%1'").arg(fileName); 244 QString dispStr = i18n("Playing '%1'").arg(fileName);
245 QToolTip::add(mAlarmSoundButton, dispStr); 245 QToolTip::add(mAlarmSoundButton, dispStr);
246 mAlarmProgramButton->setOn(false); 246 mAlarmProgramButton->setOn(false);
247 mAlarmSoundButton->setOn(true); 247 mAlarmSoundButton->setOn(true);
248 QToolTip::add(mAlarmProgramButton, i18n("No program set")); 248 QToolTip::add(mAlarmProgramButton, i18n("No program set"));
249 } else { 249 } else {
250 mAlarmProgramButton->setOn(oldState); 250 mAlarmProgramButton->setOn(oldState);
251 mAlarmSoundButton->setOn(!oldState); 251 mAlarmSoundButton->setOn(!oldState);
252 252
253 253
254 } 254 }
255 255
256 if (mAlarmProgramButton->isOn()) 256 if (mAlarmProgramButton->isOn())
257 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); 257 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
258 if ( mAlarmSoundButton->isOn()) 258 if ( mAlarmSoundButton->isOn())
259 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); 259 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );