summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-25 00:08:08 (UTC)
committer zautrix <zautrix>2005-03-25 00:08:08 (UTC)
commit7c2e130ddd194f1c4b5365af6999a27c08232f4b (patch) (unidiff)
tree75665681327ee49d7650f4d840b5c8c772180fb4 /korganizer
parent5cf054b82738d65f9b0a34ccb51c993ee4a0189f (diff)
downloadkdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.zip
kdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.tar.gz
kdepimpi-7c2e130ddd194f1c4b5365af6999a27c08232f4b.tar.bz2
fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagenda.cpp3
-rw-r--r--korganizer/koeditorgeneral.cpp15
-rw-r--r--korganizer/koeditorgeneral.h1
3 files changed, 15 insertions, 4 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp
index 5420822..2820ca2 100644
--- a/korganizer/koagenda.cpp
+++ b/korganizer/koagenda.cpp
@@ -548,6 +548,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me)
548 break; 548 break;
549 549
550 case QEvent::MouseButtonDblClick: 550 case QEvent::MouseButtonDblClick:
551 blockMoving = false;
552 leftMouseDown = false;
553 rightMouseDown = false;
551 if (object == viewport()) { 554 if (object == viewport()) {
552 selectItem(0); 555 selectItem(0);
553 int x,y; 556 int x,y;
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)
225void KOEditorGeneral::pickAlarmSound() 225void KOEditorGeneral::pickAlarmSound()
226{ 226{
227 227
228 qDebug("KOEditorGeneral::pickAlarmSound() %d",mAlarmSoundButton->isOn() );
228 //QString prefix = mAlarmSound; 229 //QString prefix = mAlarmSound;
229 if (!mAlarmSoundButton->isOn()) { 230 if (!mAlarmSoundButton->isOn()) {
230 //mAlarmSound = ""; 231 //mAlarmSound = "";
@@ -232,6 +233,7 @@ void KOEditorGeneral::pickAlarmSound()
232 QToolTip::add(mAlarmSoundButton, i18n("No sound set")); 233 QToolTip::add(mAlarmSoundButton, i18n("No sound set"));
233 mAlarmProgramButton->setOn(true); 234 mAlarmProgramButton->setOn(true);
234 mAlarmSoundButton->setOn(false); 235 mAlarmSoundButton->setOn(false);
236 pickAlarmProgram();
235 } else { 237 } else {
236 QString fileName(KFileDialog::getOpenFileName(mAlarmSound, 238 QString fileName(KFileDialog::getOpenFileName(mAlarmSound,
237 i18n("*.wav|Wav Files"), 0)); 239 i18n("*.wav|Wav Files"), 0));
@@ -252,7 +254,7 @@ void KOEditorGeneral::pickAlarmSound()
252 if (mAlarmProgramButton->isOn()) 254 if (mAlarmProgramButton->isOn())
253 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); 255 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
254 if ( mAlarmSoundButton->isOn()) 256 if ( mAlarmSoundButton->isOn())
255 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio.Al.: ") + getFittingPath(mAlarmSound) ); 257 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
256} 258}
257 259
258void KOEditorGeneral::pickAlarmProgram() 260void KOEditorGeneral::pickAlarmProgram()
@@ -263,8 +265,9 @@ void KOEditorGeneral::pickAlarmProgram()
263 QToolTip::add(mAlarmProgramButton, i18n("No program set")); 265 QToolTip::add(mAlarmProgramButton, i18n("No program set"));
264 mAlarmProgramButton->setOn(false); 266 mAlarmProgramButton->setOn(false);
265 mAlarmSoundButton->setOn(true); 267 mAlarmSoundButton->setOn(true);
268 pickAlarmSound();
266 } else { 269 } else {
267 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); 270 QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm: ") , 0));
268 if (!fileName.isEmpty()) { 271 if (!fileName.isEmpty()) {
269 mAlarmProgram = fileName; 272 mAlarmProgram = fileName;
270 QToolTip::remove(mAlarmProgramButton); 273 QToolTip::remove(mAlarmProgramButton);
@@ -280,7 +283,7 @@ void KOEditorGeneral::pickAlarmProgram()
280 if (mAlarmProgramButton->isOn()) 283 if (mAlarmProgramButton->isOn())
281 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) ); 284 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Proc.Al.: ") + getFittingPath(mAlarmProgram) );
282 if ( mAlarmSoundButton->isOn()) 285 if ( mAlarmSoundButton->isOn())
283 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Sound.Al.: ") + getFittingPath(mAlarmSound) ); 286 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
284} 287}
285 288
286 289
@@ -317,7 +320,9 @@ void KOEditorGeneral::enableAlarmEdit(bool enable)
317 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) ); 320 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Audio Al.: ") + getFittingPath(mAlarmSound) );
318 } 321 }
319 else { 322 else {
320 ((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Alarm disabled for this item")); 323 ((QWidget*)parent())->topLevelWidget()->setCaption(mAlarmMessage);
324 //((QWidget*)parent())->topLevelWidget()->setCaption(i18n("Edit item: ") + mSummaryEdit->currentText());
325
321 326
322 } 327 }
323 mAlarmTimeEdit->setEnabled(enable); 328 mAlarmTimeEdit->setEnabled(enable);
@@ -363,6 +368,7 @@ void KOEditorGeneral::setDefaults(bool allDay)
363 mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName()); 368 mOwnerLabel->setText(i18n("Owner: ") + KOPrefs::instance()->fullName());
364#endif 369#endif
365 370
371 mAlarmMessage = i18n("Edit new item");
366 enableAlarmEdit( !allDay ); 372 enableAlarmEdit( !allDay );
367 373
368 // TODO: Implement a KPrefsComboItem to solve this in a clean way. 374 // TODO: Implement a KPrefsComboItem to solve this in a clean way.
@@ -394,6 +400,7 @@ void KOEditorGeneral::setSecrecy( int num )
394void KOEditorGeneral::readIncidence(Incidence *event) 400void KOEditorGeneral::readIncidence(Incidence *event)
395{ 401{
396 402
403 mAlarmMessage = i18n("Edit") +" "+event->summary();
397 mAlarmIncrCombo->setCurrentItem(0); 404 mAlarmIncrCombo->setCurrentItem(0);
398 mSummaryEdit->setEditText(event->summary()); 405 mSummaryEdit->setEditText(event->summary());
399 mLocationEdit->setEditText(event->location()); 406 mLocationEdit->setEditText(event->location());
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index de8edaf..f4728c7 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -108,6 +108,7 @@ class KOEditorGeneral : public QObject
108 QString getFittingPath( const QString ) ; 108 QString getFittingPath( const QString ) ;
109 QString mAlarmSound; 109 QString mAlarmSound;
110 QString mAlarmProgram; 110 QString mAlarmProgram;
111 QString mAlarmMessage;
111}; 112};
112 113
113#endif 114#endif