summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-11-30 08:30:24 (UTC)
committer zautrix <zautrix>2005-11-30 08:30:24 (UTC)
commit042f35a481acf6c4e711e98184abb6c9f6542429 (patch) (unidiff)
tree47622f89ebfb6c677797d7906f167ba80976ab7d /korganizer
parent14bd7cc7412ffdbca09e1cd63a230222a3fbfd53 (diff)
downloadkdepimpi-042f35a481acf6c4e711e98184abb6c9f6542429.zip
kdepimpi-042f35a481acf6c4e711e98184abb6c9f6542429.tar.gz
kdepimpi-042f35a481acf6c4e711e98184abb6c9f6542429.tar.bz2
commit
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneral.cpp7
-rw-r--r--korganizer/koeditorgeneral.h2
-rw-r--r--korganizer/koeventeditor.cpp4
-rw-r--r--korganizer/koeventviewer.cpp8
-rw-r--r--korganizer/koincidenceeditor.cpp5
-rw-r--r--korganizer/koincidenceeditor.h3
-rw-r--r--korganizer/kotodoeditor.cpp4
7 files changed, 28 insertions, 5 deletions
diff --git a/korganizer/koeditorgeneral.cpp b/korganizer/koeditorgeneral.cpp
index 92e5a0f..21f220c 100644
--- a/korganizer/koeditorgeneral.cpp
+++ b/korganizer/koeditorgeneral.cpp
@@ -143,7 +143,6 @@ void KOEditorGeneral::setFocusOn( int i )
143} 143}
144void KOEditorGeneral::slotSetFocusOn() 144void KOEditorGeneral::slotSetFocusOn()
145{ 145{
146 mNextFocus;
147 if ( mNextFocus == 1 ) { 146 if ( mNextFocus == 1 ) {
148 mDescriptionEdit->setFocus(); 147 mDescriptionEdit->setFocus();
149 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333); 148 mDescriptionEdit->setCursorPosition( mDescriptionEdit->numLines (), 333);
@@ -355,7 +354,7 @@ void KOEditorGeneral::pickAlarmProgram()
355} 354}
356 355
357 356
358QString KOEditorGeneral::getFittingPath( const QString s ) 357QString KOEditorGeneral::getFittingPath( const QString & s )
359{ 358{
360 int maxlen = 50; 359 int maxlen = 50;
361 if ( QApplication::desktop()->width() < 640 ) { 360 if ( QApplication::desktop()->width() < 640 ) {
@@ -620,5 +619,7 @@ void KOEditorGeneral::writeIncidence(Incidence *event)
620 alarm->setType(Alarm::Invalid); 619 alarm->setType(Alarm::Invalid);
621 } 620 }
622 } 621 }
623 event->setCalID( getCalendarID() ); 622 int id = getCalendarID();
623 event->setCalID( id );
624 event->setAlarmEnabled( KOPrefs::instance()->getCalendar( id )->isAlarmEnabled );
624} 625}
diff --git a/korganizer/koeditorgeneral.h b/korganizer/koeditorgeneral.h
index d8b15af..b10a5d4 100644
--- a/korganizer/koeditorgeneral.h
+++ b/korganizer/koeditorgeneral.h
@@ -116,7 +116,7 @@ class KOEditorGeneral : public QObject
116 116
117 private: 117 private:
118 QPopupMenu * mCatPopup; 118 QPopupMenu * mCatPopup;
119 QString getFittingPath( const QString ) ; 119 QString getFittingPath( const QString &) ;
120 QString mAlarmSound; 120 QString mAlarmSound;
121 QString mAlarmProgram; 121 QString mAlarmProgram;
122 QString mAlarmMessage; 122 QString mAlarmMessage;
diff --git a/korganizer/koeventeditor.cpp b/korganizer/koeventeditor.cpp
index 9ede543..3e87197 100644
--- a/korganizer/koeventeditor.cpp
+++ b/korganizer/koeventeditor.cpp
@@ -25,6 +25,7 @@
25#include <qframe.h> 25#include <qframe.h>
26#include <qpixmap.h> 26#include <qpixmap.h>
27#include <qhbox.h> 27#include <qhbox.h>
28#include <qtimer.h>
28#include <qdir.h> 29#include <qdir.h>
29#include <qlayout.h> 30#include <qlayout.h>
30#include <qwidgetstack.h> 31#include <qwidgetstack.h>
@@ -249,6 +250,9 @@ bool KOEventEditor::processInput( bool emitTime )
249 mCalendar->addEvent(event); 250 mCalendar->addEvent(event);
250 mEvent = event; 251 mEvent = event;
251 emit eventAdded(event); 252 emit eventAdded(event);
253 if ( event->isAlarmEnabled () && !event->alarmEnabled () ) {
254 QTimer::singleShot( 0, this, SLOT ( alarmWarning() ) );
255 }
252 } 256 }
253 257
254 return true; 258 return true;
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp
index 02b54da..607e549 100644
--- a/korganizer/koeventviewer.cpp
+++ b/korganizer/koeventviewer.cpp
@@ -404,6 +404,10 @@ void KOEventViewer::appendEvent(Event *event, int mode )
404 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 404 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
405 } 405 }
406 //addTag("p",s); 406 //addTag("p",s);
407 if ( !(event->alarmEnabled() ) ) {
408 addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>");
409
410 }
407 } 411 }
408 412
409 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 413 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
@@ -521,6 +525,10 @@ void KOEventViewer::appendTodo(Todo *event, int mode )
521 addTag("p",i18n("<b>Alarm on: ") + s +" </b>"); 525 addTag("p",i18n("<b>Alarm on: ") + s +" </b>");
522 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate )); 526 addTag("p", KGlobal::locale()->formatDateTime( t, shortDate ));
523 } 527 }
528 if ( !(event->alarmEnabled() ) ) {
529 addTag("p", "<em>("+i18n("Enable alarm in resource settings") + ")</em>");
530
531 }
524 } 532 }
525 533
526 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr()); 534 addTag("p","<b>"+i18n("Access: ") + "</b>" + event->secrecyStr());
diff --git a/korganizer/koincidenceeditor.cpp b/korganizer/koincidenceeditor.cpp
index 9bc0302..236f6f9 100644
--- a/korganizer/koincidenceeditor.cpp
+++ b/korganizer/koincidenceeditor.cpp
@@ -90,6 +90,11 @@ void KOIncidenceEditor::setupAttendeesTab()
90 topLayout->addWidget(mDetails); 90 topLayout->addWidget(mDetails);
91} 91}
92 92
93void KOIncidenceEditor::alarmWarning()
94{
95 KMessageBox::information( 0, i18n("The alarm for this calendar\nis currently disabled!\nEnable it in resource settings."), i18n("Alarm disabled warning"));
96
97}
93 98
94void KOIncidenceEditor::slotApply() 99void KOIncidenceEditor::slotApply()
95{ 100{
diff --git a/korganizer/koincidenceeditor.h b/korganizer/koincidenceeditor.h
index bfd6cc6..2e4bbf8 100644
--- a/korganizer/koincidenceeditor.h
+++ b/korganizer/koincidenceeditor.h
@@ -65,7 +65,8 @@ class KOIncidenceEditor : public KDialogBase
65 void dialogClose( Incidence * ); 65 void dialogClose( Incidence * );
66 void jumpToTime( const QDate & ); 66 void jumpToTime( const QDate & );
67 67
68 protected slots: 68 protected slots:
69 void alarmWarning();
69 void slotApply(); 70 void slotApply();
70 void slotOk(); 71 void slotOk();
71 void slotCancel(); 72 void slotCancel();
diff --git a/korganizer/kotodoeditor.cpp b/korganizer/kotodoeditor.cpp
index 682f83b..20a35d2 100644
--- a/korganizer/kotodoeditor.cpp
+++ b/korganizer/kotodoeditor.cpp
@@ -27,6 +27,7 @@
27#include <qpixmap.h> 27#include <qpixmap.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qhbox.h> 29#include <qhbox.h>
30#include <qtimer.h>
30#include <qdir.h> 31#include <qdir.h>
31#include <qdatetime.h> 32#include <qdatetime.h>
32#include <qapplication.h> 33#include <qapplication.h>
@@ -259,6 +260,9 @@ bool KOTodoEditor::processInput( bool emitTime )
259 mCalendar->addTodo(todo); 260 mCalendar->addTodo(todo);
260 mTodo = todo; 261 mTodo = todo;
261 emit todoAdded(todo); 262 emit todoAdded(todo);
263 if ( todo->isAlarmEnabled () && !todo->alarmEnabled () ) {
264 QTimer::singleShot( 0, this, SLOT ( alarmWarning() ) );
265 }
262 } 266 }
263 267
264 return true; 268 return true;