summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneral.cpp
Side-by-side diff
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
@@ -187,97 +187,97 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
else
mAlarmButton = new QCheckBox(i18n("Reminder:"),parent);
connect(mAlarmButton, SIGNAL(toggled(bool)), SLOT(enableAlarmEdit(bool)));
alarmLayout->addWidget(mAlarmButton);
mAlarmTimeEdit = new QSpinBox ( 0, 9999, 1, parent, "mAlarmTimeEdit " ) ;
mAlarmTimeEdit->setButtonSymbols( QSpinBox::PlusMinus );
alarmLayout->addWidget(mAlarmTimeEdit);
mAlarmIncrCombo = new QComboBox(false, parent);
if ( QApplication::desktop()->width() < 320 ) {
mAlarmIncrCombo->insertItem(i18n("min"));
mAlarmIncrCombo->insertItem(i18n("hou"));
mAlarmIncrCombo->insertItem(i18n("day"));
mAlarmTimeEdit->setMaximumWidth( mAlarmTimeEdit->sizeHint().width() );
mAlarmIncrCombo->setMaximumWidth( mAlarmIncrCombo->sizeHint().width() );
} else {
mAlarmIncrCombo->insertItem(i18n("minute(s)"));
mAlarmIncrCombo->insertItem(i18n("hour(s)"));
mAlarmIncrCombo->insertItem(i18n("day(s)"));
}
// mAlarmIncrCombo->setMinimumHeight(20);
alarmLayout->addWidget(mAlarmIncrCombo);
mAlarmSoundButton = new QPushButton(parent);
mAlarmSoundButton->setPixmap(SmallIcon("playsound"));
mAlarmSoundButton->setToggleButton(true);
QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
connect(mAlarmSoundButton, SIGNAL(clicked()), SLOT(pickAlarmSound()));
alarmLayout->addWidget(mAlarmSoundButton);
mAlarmProgramButton = new QPushButton(parent);
mAlarmProgramButton->setPixmap(SmallIcon("run"));
mAlarmProgramButton->setToggleButton(true);
QToolTip::add(mAlarmProgramButton, i18n("No program set"));
connect(mAlarmProgramButton, SIGNAL(clicked()), SLOT(pickAlarmProgram()));
alarmLayout->addWidget(mAlarmProgramButton);
mAlarmSoundButton->setMaximumWidth( mAlarmSoundButton->sizeHint().width() + 4 );
mAlarmProgramButton->setMaximumWidth(mAlarmProgramButton->sizeHint().width() + 4 );
// if ( KOPrefs::instance()->mCompactDialogs ) {
// mAlarmSoundButton->hide();
// mAlarmProgramButton->hide();
// }
}
void KOEditorGeneral::pickAlarmSound()
{
- qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
+ //qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
bool oldState = mAlarmSoundButton->isOn();
QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
i18n("*.wav|Wav Files"), 0));
if (!fileName.isEmpty()) {
mAlarmSound = fileName;
QToolTip::remove(mAlarmSoundButton);
QString dispStr = i18n("Playing '%1'").arg(fileName);
QToolTip::add(mAlarmSoundButton, dispStr);
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
QToolTip::add(mAlarmProgramButton, i18n("No program set"));
} else {
mAlarmProgramButton->setOn(oldState);
mAlarmSoundButton->setOn(!oldState);
}
if (mAlarmProgramButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
}
void KOEditorGeneral::pickAlarmProgram()
{
bool oldState = mAlarmProgramButton->isOn();
QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0));
if (!fileName.isEmpty()) {
mAlarmProgram = fileName;
QToolTip::remove(mAlarmProgramButton);
QString dispStr = i18n("Running '%1'").arg(fileName);
QToolTip::add(mAlarmProgramButton, dispStr);
mAlarmSoundButton->setOn(false);
mAlarmProgramButton->setOn(true);
QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
} else {
mAlarmProgramButton->setOn(!oldState);
mAlarmSoundButton->setOn(oldState);
}
if (mAlarmProgramButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())