-rw-r--r-- | korganizer/koagenda.cpp | 3 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.cpp | 15 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.h | 1 |
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 | |||
@@ -547,8 +547,11 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) | |||
547 | } | 547 | } |
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; |
554 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); | 557 | viewportToContents(viewportPos.x(),viewportPos.y(),x,y); |
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 496f125..4ee5292 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp | |||
@@ -224,15 +224,17 @@ void KOEditorGeneral::initAlarm(QWidget *parent,QBoxLayout *topLayout) | |||
224 | 224 | ||
225 | void KOEditorGeneral::pickAlarmSound() | 225 | void 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 = ""; |
231 | QToolTip::remove(mAlarmSoundButton); | 232 | QToolTip::remove(mAlarmSoundButton); |
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)); |
238 | if (!fileName.isEmpty()) { | 240 | if (!fileName.isEmpty()) { |
@@ -251,9 +253,9 @@ void KOEditorGeneral::pickAlarmSound() | |||
251 | 253 | ||
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 | ||
258 | void KOEditorGeneral::pickAlarmProgram() | 260 | void KOEditorGeneral::pickAlarmProgram() |
259 | { | 261 | { |
@@ -262,10 +264,11 @@ void KOEditorGeneral::pickAlarmProgram() | |||
262 | QToolTip::remove(mAlarmProgramButton); | 264 | QToolTip::remove(mAlarmProgramButton); |
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); |
271 | QString dispStr = i18n("Running '%1'").arg(fileName); | 274 | QString dispStr = i18n("Running '%1'").arg(fileName); |
@@ -279,9 +282,9 @@ void KOEditorGeneral::pickAlarmProgram() | |||
279 | } | 282 | } |
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 | ||
287 | QString KOEditorGeneral::getFittingPath( const QString s ) | 290 | QString KOEditorGeneral::getFittingPath( const QString s ) |
@@ -316,9 +319,11 @@ void KOEditorGeneral::enableAlarmEdit(bool enable) | |||
316 | if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) | 319 | if (!mAlarmSound.isEmpty() && mAlarmSoundButton->isOn()) |
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); |
324 | mAlarmSoundButton->setEnabled(enable); | 329 | mAlarmSoundButton->setEnabled(enable); |
@@ -362,8 +367,9 @@ void KOEditorGeneral::setDefaults(bool allDay) | |||
362 | #if 0 | 367 | #if 0 |
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. |
369 | int alarmTime; | 375 | int alarmTime; |
@@ -393,8 +399,9 @@ void KOEditorGeneral::setSecrecy( int num ) | |||
393 | } | 399 | } |
394 | void KOEditorGeneral::readIncidence(Incidence *event) | 400 | void 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()); |
400 | mDescriptionEdit->setText(event->description()); | 407 | mDescriptionEdit->setText(event->description()); |
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index de8edaf..f4728c7 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h | |||
@@ -107,7 +107,8 @@ class KOEditorGeneral : public QObject | |||
107 | private: | 107 | private: |
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 |