-rw-r--r-- | korganizer/koeditorgeneral.cpp | 7 | ||||
-rw-r--r-- | korganizer/koeditorgeneral.h | 2 | ||||
-rw-r--r-- | korganizer/koeventeditor.cpp | 4 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 8 | ||||
-rw-r--r-- | korganizer/koincidenceeditor.cpp | 5 | ||||
-rw-r--r-- | korganizer/koincidenceeditor.h | 1 | ||||
-rw-r--r-- | korganizer/kotodoeditor.cpp | 4 |
7 files changed, 27 insertions, 4 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp index 92e5a0f..21f220c 100644 --- a/korganizer/koeditorgeneral.cpp +++ b/korganizer/koeditorgeneral.cpp @@ -145,3 +145,2 @@ void KOEditorGeneral::slotSetFocusOn() { - mNextFocus; if ( mNextFocus == 1 ) { @@ -357,3 +356,3 @@ void KOEditorGeneral::pickAlarmProgram() -QString KOEditorGeneral::getFittingPath( const QString s ) +QString KOEditorGeneral::getFittingPath( const QString & s ) { @@ -622,3 +621,5 @@ void KOEditorGeneral::writeIncidence(Incidence *event) } - event->setCalID( getCalendarID() ); + int id = getCalendarID(); + event->setCalID( id ); + event->setAlarmEnabled( KOPrefs::instance()->getCalendar( id )->isAlarmEnabled ); } diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h index d8b15af..b10a5d4 100644 --- a/korganizer/koeditorgeneral.h +++ b/korganizer/koeditorgeneral.h @@ -118,3 +118,3 @@ class KOEditorGeneral : public QObject QPopupMenu * mCatPopup; - QString getFittingPath( const QString ) ; + QString getFittingPath( const QString &) ; QString mAlarmSound; diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp index 9ede543..3e87197 100644 --- a/korganizer/koeventeditor.cpp +++ b/korganizer/koeventeditor.cpp @@ -27,2 +27,3 @@ #include <qhbox.h> +#include <qtimer.h> #include <qdir.h> @@ -251,2 +252,5 @@ bool KOEventEditor::processInput( bool emitTime ) emit eventAdded(event); + if ( event->isAlarmEnabled () && !event->alarmEnabled () ) { + QTimer::singleShot( 0, this, SLOT ( alarmWarning() ) ); + } } diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index 02b54da..607e549 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp @@ -406,2 +406,6 @@ void KOEventViewer::appendEvent(Event *event, int mode ) //addTag("p",s); + if ( !(event->alarmEnabled() ) ) { + addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>"); + + } } @@ -523,2 +527,6 @@ void KOEventViewer::appendTodo(Todo *event, int mode ) } + if ( !(event->alarmEnabled() ) ) { + addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>"); + + } } diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp index 9bc0302..236f6f9 100644 --- a/korganizer/koincidenceeditor.cpp +++ b/korganizer/koincidenceeditor.cpp @@ -92,2 +92,7 @@ void KOIncidenceEditor::setupAttendeesTab() +void KOIncidenceEditor::alarmWarning() +{ + KMessageBox::information( 0, i18n("The alarm for this calendar\nis currently disabled!\nEnable it in resource settings."), i18n("Alarm disabled warning")); + +} diff --git a/korganizer/koincidenceeditor.h b/korganizer/koincidenceeditor.h index bfd6cc6..2e4bbf8 100644 --- a/korganizer/koincidenceeditor.h +++ b/korganizer/koincidenceeditor.h @@ -68,2 +68,3 @@ class KOIncidenceEditor : public KDialogBase protected slots: + void alarmWarning(); void slotApply(); diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp index 682f83b..20a35d2 100644 --- a/korganizer/kotodoeditor.cpp +++ b/korganizer/kotodoeditor.cpp @@ -29,2 +29,3 @@ #include <qhbox.h> +#include <qtimer.h> #include <qdir.h> @@ -261,2 +262,5 @@ bool KOTodoEditor::processInput( bool emitTime ) emit todoAdded(todo); + if ( todo->isAlarmEnabled () && !todo->alarmEnabled () ) { + QTimer::singleShot( 0, this, SLOT ( alarmWarning() ) ); + } } |