summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneral.cpp
authorzautrix <zautrix>2005-03-25 00:08:08 (UTC)
committer zautrix <zautrix>2005-03-25 00:08:08 (UTC)
commit7c2e130ddd194f1c4b5365af6999a27c08232f4b (patch) (side-by-side diff)
tree75665681327ee49d7650f4d840b5c8c772180fb4 /korganizer/koeditorgeneral.cpp
parent5cf054b82738d65f9b0a34ccb51c993ee4a0189f (diff)
downloadkdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.zip
kdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.tar.gz
kdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.tar.bz2
fixes
Diffstat (limited to 'korganizer/koeditorgeneral.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 496f125..4ee5292 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -225,6 +225,7 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout)
void KOEditorGeneral::pickAlarmSound()
{
+ qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
//QString prefix = mAlarmSound;
if (!mAlarmSoundButton->isOn()) {
//mAlarmSound = "";
@@ -232,6 +233,7 @@ void KOEditorGeneral::pickAlarmSound()
QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
mAlarmProgramButton->setOn(true);
mAlarmSoundButton->setOn(false);
+ pickAlarmProgram();
} else {
QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
i18n("*.wav|Wav Files"), 0));
@@ -252,7 +254,7 @@ void KOEditorGeneral::pickAlarmSound()
if (mAlarmProgramButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
}
void KOEditorGeneral::pickAlarmProgram()
@@ -263,8 +265,9 @@ void KOEditorGeneral::pickAlarmProgram()
QToolTip::add(mAlarmProgramButton, i18n("No program set"));
mAlarmProgramButton->setOn(false);
mAlarmSoundButton->setOn(true);
+ pickAlarmSound();
} else {
- QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0));
+ QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0));
if (!fileName.isEmpty()) {
mAlarmProgram = fileName;
QToolTip::remove(mAlarmProgramButton);
@@ -280,7 +283,7 @@ void KOEditorGeneral::pickAlarmProgram()
if (mAlarmProgramButton->isOn())
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
if ( mAlarmSoundButton->isOn())
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) );
+ ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
}
@@ -317,7 +320,9 @@ void KOEditorGeneral::enableAlarmEdit(bool enable)
((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
}
else {
- ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled for this item"));
+ ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage);
+ //((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Edit item: ") + mSummaryEdit->currentText());
+
}
mAlarmTimeEdit->setEnabled(enable);
@@ -363,6 +368,7 @@ void KOEditorGeneral::setDefaults(bool allDay)
mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName());
#endif
+ mAlarmMessage = i18n("Edit new item");
enableAlarmEdit( !allDay );
// TODO: Implement a KPrefsComboItem to solve this in a clean way.
@@ -394,6 +400,7 @@ void KOEditorGeneral::setSecrecy( int num )
void KOEditorGeneral::readIncidence(Incidence *event)
{
+ mAlarmMessage = i18n("Edit") +" "+event->summary();
mAlarmIncrCombo->setCurrentItem(0);
mSummaryEdit->setEditText(event->summary());
mLocationEdit->setEditText(event->location());