summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt1
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt2
-rw-r--r--korganizer/calendarview.cpp16
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/kofilterview.cpp6
-rw-r--r--korganizer/kofilterview.h1
-rw-r--r--libkcal/calendar.h2
-rw-r--r--libkcal/calendarlocal.cpp26
-rw-r--r--libkcal/calendarlocal.h1
9 files changed, 52 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 6c1f664..edf7eb1 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,31 +1,32 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.2.5 ************ 3********** VERSION 2.2.5 ************
4 4
5Bugfixes in KO/Pi, KA/Pi and OM/Pi. 5Bugfixes in KO/Pi, KA/Pi and OM/Pi.
6Added possibility to disable auto saving in KO/Pi. 6Added possibility to disable auto saving in KO/Pi.
7How to disable it? Good question! Next question, please? 7How to disable it? Good question! Next question, please?
8Added info about count of events/todos/journals to calendar info.
8 9
9 10
10********** VERSION 2.2.4 ************ 11********** VERSION 2.2.4 ************
11 12
12KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z. 13KO/Pi alarm applet: Made font smaller and added a dealy before starting KO/Pi to avoid problems accessing data storage when an alarm did wake up the Z.
13Added 3 sec notification about a started timer. 14Added 3 sec notification about a started timer.
14 15
15KO/Pi: 16KO/Pi:
16Added export option for all data to File->Export menu. 17Added export option for all data to File->Export menu.
17Better management if a save error occours. 18Better management if a save error occours.
18Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up. 19Added 15 sec delay in automatic saving when Z wake up from suspend and the automatic save timer did expire - to avoid problems accessing data storage directly after wake up.
19Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon. 20Fix for displaying month names of an utf8 translated language (like Russian). I hope a Russian version of KO/Pi will be available soon.
20 21
21Added duration info about multiday events. 22Added duration info about multiday events.
22Changed behaviour of "Set complete" in Todo viewer: Now Todo viewer closes not automatically. 23Changed behaviour of "Set complete" in Todo viewer: Now Todo viewer closes not automatically.
23 24
24KA/Pi: 25KA/Pi:
25Added for vCard import the option to import contact data in Latin1 format. 26Added for vCard import the option to import contact data in Latin1 format.
26 27
27********** VERSION 2.2.3 ************ 28********** VERSION 2.2.3 ************
28 29
29KO/Pi: 30KO/Pi:
30Fixed a problem with (non empty) exception dates in the exception date edit dialog of recurring events for newly created events. 31Fixed a problem with (non empty) exception dates in the exception date edit dialog of recurring events for newly created events.
31 32
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index e8b54fd..288ce4b 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1549,33 +1549,33 @@
1549{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, 1549{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" },
1550{ "Enable conflict detection","Schalte Konflikterkennung an" }, 1550{ "Enable conflict detection","Schalte Konflikterkennung an" },
1551{ "Filter for the edited event","Filter für den bearbeiteten Termin" }, 1551{ "Filter for the edited event","Filter für den bearbeiteten Termin" },
1552{ "Filter for other events","Filter für die anderen Termine" }, 1552{ "Filter for other events","Filter für die anderen Termine" },
1553{ "Check Allday with Allday","Prüfe GanzTag mit GanzTag" }, 1553{ "Check Allday with Allday","Prüfe GanzTag mit GanzTag" },
1554{ "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, 1554{ "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" },
1555{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, 1555{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" },
1556{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, 1556{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" },
1557{ "Conflict detection","Konflikterkennung" }, 1557{ "Conflict detection","Konflikterkennung" },
1558{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, 1558{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" },
1559{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, 1559{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." },
1560{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, 1560{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" },
1561{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, 1561{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." },
1562{ " Yes, close "," Ja, beenden " }, 1562{ " Yes, close "," Ja, beenden " },
1563{ "Export All Data","Exportiere alle Daten" }, 1563{ "Export All Data","Exportiere alle Daten" },
1564{ "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, 1564{ "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" },
1565{ "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, 1565{ "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" },
1566{ " (Duration: %1 days)"," (Dauer: %1 Tage)" }, 1566{ " (Duration: %1 days)"," (Dauer: %1 Tage)" },
1567{ "Autosave enabled!","Auto-Speichern angeschaltet!" }, 1567{ "Autosave enabled!","Auto-Speichern angeschaltet!" },
1568{ "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" }, 1568{ "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" },
1569{ "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" }, 1569{ "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" },
1570{ "Yes, Save!","Ja, Speichern!" }, 1570{ "Yes, Save!","Ja, Speichern!" },
1571{ "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" }, 1571{ "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" },
1572{ "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" }, 1572{ "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" },
1573{ "","" }, 1573{ "<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>","<br>Der Kalender enthält<br><b>%1 Termine<br>%2 Todos<br>%3 Journale</b>" },
1574{ "","" }, 1574{ "","" },
1575{ "","" }, 1575{ "","" },
1576{ "","" }, 1576{ "","" },
1577{ "","" }, 1577{ "","" },
1578{ "","" }, 1578{ "","" },
1579{ "","" }, 1579{ "","" },
1580{ "","" }, 1580{ "","" },
1581{ "","" }, 1581{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e31a6e1..28b17a5 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -456,49 +456,51 @@ void CalendarView::init()
456#endif 456#endif
457 //mainBoxLayout->addWidget (mLeftFrame); 457 //mainBoxLayout->addWidget (mLeftFrame);
458 mDateNavigator = new DateNavigatorContainer( mLeftFrame, 458 mDateNavigator = new DateNavigatorContainer( mLeftFrame,
459 "CalendarView::DateNavigator" ); 459 "CalendarView::DateNavigator" );
460#if 0 460#if 0
461 // FIXME 461 // FIXME
462 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, 462 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE,
463 "CalendarView::DateNavigator", QDate::currentDate()); 463 "CalendarView::DateNavigator", QDate::currentDate());
464#endif 464#endif
465 // mDateNavigator->blockSignals( true ); 465 // mDateNavigator->blockSignals( true );
466 //leftFrameLayout->addWidget( mDateNavigator ); 466 //leftFrameLayout->addWidget( mDateNavigator );
467 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); 467 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall");
468 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); 468 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView");
469 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); 469 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView");
470 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); 470 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) );
471 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); 471 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) );
472 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) ); 472 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),this, SLOT( setCalReadOnly(int,bool)) );
473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); 473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) );
474 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); 474 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) );
475 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); 475 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) );
476 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); 476 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) );
477 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); 477 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) );
478 connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); 478 connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() ));
479 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); 479 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) );
480 connect( mCalEditView, SIGNAL( requestCalendarInfo( int ) ),this, SLOT( displayCalendarInfo( int ) ) );
480 481
482
481 mTodoList->setNavigator( mNavigator ); 483 mTodoList->setNavigator( mNavigator );
482#if 0 484#if 0
483 if ( QApplication::desktop()->width() < 480 ) { 485 if ( QApplication::desktop()->width() < 480 ) {
484 leftFrameLayout->addWidget(mFilterView); 486 leftFrameLayout->addWidget(mFilterView);
485 leftFrameLayout->addWidget(mTodoList, 2 ); 487 leftFrameLayout->addWidget(mTodoList, 2 );
486 488
487 } else { 489 } else {
488 leftFrameLayout->addWidget(mTodoList,2 ); 490 leftFrameLayout->addWidget(mTodoList,2 );
489 leftFrameLayout->addWidget(mFilterView ); 491 leftFrameLayout->addWidget(mFilterView );
490 } 492 }
491#endif 493#endif
492 mFilterView->hide(); 494 mFilterView->hide();
493 mCalEditView->hide(); 495 mCalEditView->hide();
494 QWidget *rightBox = new QWidget( mMainFrame ); 496 QWidget *rightBox = new QWidget( mMainFrame );
495 //mainBoxLayout->addWidget ( rightBox, 10 ); 497 //mainBoxLayout->addWidget ( rightBox, 10 );
496 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 498 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
497 mRightFrame = new QWidgetStack( rightBox ); 499 mRightFrame = new QWidgetStack( rightBox );
498 rightLayout->addWidget( mRightFrame, 10 ); 500 rightLayout->addWidget( mRightFrame, 10 );
499 501
500 //mLeftFrame = (QWidget *)leftFrame; 502 //mLeftFrame = (QWidget *)leftFrame;
501 if ( KOPrefs::instance()->mVerticalScreen ) { 503 if ( KOPrefs::instance()->mVerticalScreen ) {
502 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); 504 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
503 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); 505 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
504 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); 506 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
@@ -5137,24 +5139,38 @@ void CalendarView::showNextAlarms()
5137 else if ( hours == 1 ) 5139 else if ( hours == 1 )
5138 message += i18n("1 hour\n"); 5140 message += i18n("1 hour\n");
5139 if ( min > 1 ) 5141 if ( min > 1 )
5140 message += i18n("%1 minutes\n").arg( min ); 5142 message += i18n("%1 minutes\n").arg( min );
5141 else if ( min == 1 ) 5143 else if ( min == 1 )
5142 message += i18n("1 minute\n"); 5144 message += i18n("1 minute\n");
5143 if ( message.isEmpty() ) 5145 if ( message.isEmpty() )
5144 message = i18n("The next alarm is in\nless than one minute!"); 5146 message = i18n("The next alarm is in\nless than one minute!");
5145 else 5147 else
5146 message = i18n("The next alarm is in:\n") + message; 5148 message = i18n("The next alarm is in:\n") + message;
5147 message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ; 5149 message += i18n("\n(%1)\n\n%2\n(%3)\n").arg( KGlobal::locale()->formatDateTime(nextA , false)).arg(sum ).arg( KGlobal::locale()->formatDateTime(nextAl , false)) ;
5148 } else { 5150 } else {
5149 message = i18n("There is no next alarm."); 5151 message = i18n("There is no next alarm.");
5150 5152
5151 } 5153 }
5152#ifdef DESKTOP_VERSION 5154#ifdef DESKTOP_VERSION
5153 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) { 5155 if ( ! KOPrefs::instance()->mUseInternalAlarmNotification ) {
5154 message += i18n("\nThe internal alarm notification is disabled!\n"); 5156 message += i18n("\nThe internal alarm notification is disabled!\n");
5155 message += i18n("Enable it in the settings menu, TAB alarm."); 5157 message += i18n("Enable it in the settings menu, TAB alarm.");
5156 } 5158 }
5157 5159
5158#endif 5160#endif
5159 KMessageBox::information( this, message); 5161 KMessageBox::information( this, message);
5160} 5162}
5163
5164void CalendarView::displayCalendarInfo( int id )
5165{
5166 int e, t,j;
5167 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
5168 QString name = kkf->mName;
5169 mCalendar->getIncidenceCount( id, e, t, j );
5170 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 );
5171 QString mess = i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file);
5172 mess += i18n("<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>").arg( e ).arg( t ).arg( j );
5173 KMessageBox::information( this, mess );
5174
5175
5176}
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 8670832..0924f07 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -180,48 +180,49 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
180 /** Emitted, when a todoitem is selected or deselected. */ 180 /** Emitted, when a todoitem is selected or deselected. */
181 void todoSelected( bool ); 181 void todoSelected( bool );
182 182
183 /** 183 /**
184 Emitted, when clipboard content changes. Parameter indicates if paste 184 Emitted, when clipboard content changes. Parameter indicates if paste
185 is possible or not. 185 is possible or not.
186 */ 186 */
187 void pasteEnabled(bool); 187 void pasteEnabled(bool);
188 188
189 /** Emitted, when the number of incoming messages has changed. */ 189 /** Emitted, when the number of incoming messages has changed. */
190 void numIncomingChanged(int); 190 void numIncomingChanged(int);
191 191
192 /** Emitted, when the number of outgoing messages has changed. */ 192 /** Emitted, when the number of outgoing messages has changed. */
193 void numOutgoingChanged(int); 193 void numOutgoingChanged(int);
194 194
195 /** Send status message, which can e.g. be displayed in the status bar. */ 195 /** Send status message, which can e.g. be displayed in the status bar. */
196 void statusMessage(const QString &); 196 void statusMessage(const QString &);
197 197
198 void calendarViewExpanded( bool ); 198 void calendarViewExpanded( bool );
199 void updateSearchDialog(); 199 void updateSearchDialog();
200 void filtersUpdated(); 200 void filtersUpdated();
201 201
202 202
203 public slots: 203 public slots:
204 void displayCalendarInfo( int id );
204 void nextConflict( bool all, bool allday ); 205 void nextConflict( bool all, bool allday );
205 void conflictAll(); 206 void conflictAll();
206 void conflictAllday(); 207 void conflictAllday();
207 void conflictNotAll(); 208 void conflictNotAll();
208 void setCalReadOnly( int id, bool readO ); 209 void setCalReadOnly( int id, bool readO );
209 void checkAlarms(); 210 void checkAlarms();
210 void checkFiles(); 211 void checkFiles();
211 void slotprintSelInc(); 212 void slotprintSelInc();
212 void showNextAlarms(); 213 void showNextAlarms();
213 void showOpenError(); 214 void showOpenError();
214 void watchSavedFile(); 215 void watchSavedFile();
215 void recheckTimerAlarm(); 216 void recheckTimerAlarm();
216 void checkNextTimerAlarm(); 217 void checkNextTimerAlarm();
217 void addAlarm(const QDateTime &qdt, const QString &noti ); 218 void addAlarm(const QDateTime &qdt, const QString &noti );
218 void addSuspendAlarm(const QDateTime &qdt, const QString &noti ); 219 void addSuspendAlarm(const QDateTime &qdt, const QString &noti );
219 void removeAlarm(const QDateTime &qdt, const QString &noti ); 220 void removeAlarm(const QDateTime &qdt, const QString &noti );
220 221
221 /** options dialog made a changed to the configuration. we catch this 222 /** options dialog made a changed to the configuration. we catch this
222 * and notify all widgets which need to update their configuration. */ 223 * and notify all widgets which need to update their configuration. */
223 void updateConfig(); 224 void updateConfig();
224 225
225 void insertBirthdays(const QString& uid, const QStringList& birthdayList, 226 void insertBirthdays(const QString& uid, const QStringList& birthdayList,
226 const QStringList& anniversaryList, const QStringList& realNameList, 227 const QStringList& anniversaryList, const QStringList& realNameList,
227 const QStringList& emailList, const QStringList& assembledNameList, 228 const QStringList& emailList, const QStringList& assembledNameList,
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ef25fd0..ee9c9f6 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -209,50 +209,52 @@ void KOCalEditView::deleteCal( int id )
209{ 209{
210 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); 210 KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id );
211 QString name = kkf->mName; 211 QString name = kkf->mName;
212 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); 212 QString file = KGlobal::formatMessage ( kkf->mFileName ,0 );
213 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return; 213 if ( KMessageBox::warningContinueCancel( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>. Do you want to remove this calendar from KO/Pi? (The file is not removed!)").arg(name).arg(file) ) != KMessageBox::Continue ) return;
214 bool findnewstd = kkf->isStandard; 214 bool findnewstd = kkf->isStandard;
215 emit removeCalendar ( id ); 215 emit removeCalendar ( id );
216 KOPrefs::instance()->mCalendars.remove ( kkf ); 216 KOPrefs::instance()->mCalendars.remove ( kkf );
217 if ( findnewstd ) findNewStandard(); 217 if ( findnewstd ) findNewStandard();
218 emit needsUpdate(); 218 emit needsUpdate();
219 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 219 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
220} 220}
221void KOCalEditView::infoCal( int id ) 221void KOCalEditView::infoCal( int id )
222{ 222{
223 QString name = KOPrefs::instance()->getCalendar( id )->mName; 223 QString name = KOPrefs::instance()->getCalendar( id )->mName;
224 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); 224 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 );
225 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { 225 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) {
226 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { 226 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) {
227 emit calendarAdded( id ); 227 emit calendarAdded( id );
228 emit needsUpdate(); 228 emit needsUpdate();
229 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 229 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
230 QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); 230 QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) );
231 } 231 }
232 } 232 }
233 else 233 else {
234 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); 234 emit requestCalendarInfo( id );
235
236 }
235} 237}
236void KOCalEditView::readConfig() 238void KOCalEditView::readConfig()
237{ 239{
238 240
239 mStdandardB.clear(); 241 mStdandardB.clear();
240 mEnabledB.clear(); 242 mEnabledB.clear();
241 mAlarmB.clear(); 243 mAlarmB.clear();
242 mROB.clear(); 244 mROB.clear();
243 245
244 if ( mw ) delete mw; 246 if ( mw ) delete mw;
245 mw = new QWidget ( viewport() ); 247 mw = new QWidget ( viewport() );
246 addChild(mw); 248 addChild(mw);
247 int ii = 0; 249 int ii = 0;
248 mainLayout = new QGridLayout ( mw , 2, 8 ); 250 mainLayout = new QGridLayout ( mw , 2, 8 );
249 mainLayout->setMargin( 2 ); 251 mainLayout->setMargin( 2 );
250 mainLayout->setSpacing( 2 ); 252 mainLayout->setSpacing( 2 );
251 QPushButton * addButT = new QPushButton ( mw ); 253 QPushButton * addButT = new QPushButton ( mw );
252 addButT->setFocusPolicy(NoFocus); 254 addButT->setFocusPolicy(NoFocus);
253 mainLayout->addWidget( addButT,0,0 ); 255 mainLayout->addWidget( addButT,0,0 );
254 addButT->setText( "D"); 256 addButT->setText( "D");
255 connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo())); 257 connect(addButT,SIGNAL(clicked()),SLOT(defaultInfo()));
256 QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") ); 258 QWhatsThis::add( addButT, i18n("Please choose the <b>default calendar</b> in this column. Newly created or imported items are added to the default calendar.") );
257 //addBut->setPixmap ( SmallIcon("greenhook16")); 259 //addBut->setPixmap ( SmallIcon("greenhook16"));
258 QPushButton *addBut = new QPushButton ( mw ); 260 QPushButton *addBut = new QPushButton ( mw );
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index d534dbf..0dd423a 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -219,38 +219,39 @@ class KOCalEditView : public QScrollView
219 void addCal(); 219 void addCal();
220 void enableAll(); 220 void enableAll();
221 void enableAlarm(); 221 void enableAlarm();
222 void disableRO(); 222 void disableRO();
223 void deleteAll(); 223 void deleteAll();
224 void selectStdCal(int); 224 void selectStdCal(int);
225 void selectCal(int,bool ); 225 void selectCal(int,bool );
226 void selectCalAlarm(int,bool ); 226 void selectCalAlarm(int,bool );
227 void selectReadOnly(int,bool ); 227 void selectReadOnly(int,bool );
228 void setColor(const QColor &,int) ; 228 void setColor(const QColor &,int) ;
229 void deleteCal(int) ; 229 void deleteCal(int) ;
230 void infoCal(int) ; 230 void infoCal(int) ;
231 void readConfig(); 231 void readConfig();
232 void defaultInfo(); 232 void defaultInfo();
233 void findNewStandard(); 233 void findNewStandard();
234 signals: 234 signals:
235 void alarmEnabled ( int cal, bool enable ); 235 void alarmEnabled ( int cal, bool enable );
236 void calendarEnabled ( int cal, bool enable ); 236 void calendarEnabled ( int cal, bool enable );
237 void calendarReadonly ( int cal, bool readonly ); 237 void calendarReadonly ( int cal, bool readonly );
238 void setCalendarDefault ( int cal ); 238 void setCalendarDefault ( int cal );
239 void removeCalendar ( int cal ); 239 void removeCalendar ( int cal );
240 void calendarAdded( int ); 240 void calendarAdded( int );
241 void needsUpdate(); 241 void needsUpdate();
242 void checkCalendar(); 242 void checkCalendar();
243 void requestCalendarInfo( int id );
243 244
244 private: 245 private:
245 QWidget *mw; 246 QWidget *mw;
246 void toggleList ( QPtrList<KOCalCheckButton> , bool b = true ); 247 void toggleList ( QPtrList<KOCalCheckButton> , bool b = true );
247 QPtrList<KOCalRadioButton> mStdandardB; 248 QPtrList<KOCalRadioButton> mStdandardB;
248 QPtrList<KOCalCheckButton> mEnabledB; 249 QPtrList<KOCalCheckButton> mEnabledB;
249 QPtrList<KOCalCheckButton> mAlarmB; 250 QPtrList<KOCalCheckButton> mAlarmB;
250 QPtrList<KOCalCheckButton> mROB; 251 QPtrList<KOCalCheckButton> mROB;
251 QGridLayout* mainLayout; 252 QGridLayout* mainLayout;
252}; 253};
253 254
254 255
255 256
256#endif // KOFILTERVIEW_H 257#endif // KOFILTERVIEW_H
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 3f6895d..4b8b3ff 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -298,48 +298,50 @@ public:
298 298
299 void registerObserver( Observer * ); 299 void registerObserver( Observer * );
300 300
301 void setModified( bool ); 301 void setModified( bool );
302 302
303 /** 303 /**
304 Set product id returned by loadedProductId(). This function is only 304 Set product id returned by loadedProductId(). This function is only
305 useful for the calendar loading code. 305 useful for the calendar loading code.
306 */ 306 */
307 void setLoadedProductId( const QString & ); 307 void setLoadedProductId( const QString & );
308 /** 308 /**
309 Return product id taken from file that has been loaded. Returns 309 Return product id taken from file that has been loaded. Returns
310 QString::null, if no calendar has been loaded. 310 QString::null, if no calendar has been loaded.
311 */ 311 */
312 QString loadedProductId(); 312 QString loadedProductId();
313 int defaultCalendar(); 313 int defaultCalendar();
314 void setDontDeleteIncidencesOnClose (); 314 void setDontDeleteIncidencesOnClose ();
315 public slots: 315 public slots:
316 void setDefaultCalendar( int ); 316 void setDefaultCalendar( int );
317 virtual void setCalendarEnabled( int id, bool enable ) = 0; 317 virtual void setCalendarEnabled( int id, bool enable ) = 0;
318 virtual void setAlarmEnabled( int id, bool enable ) = 0; 318 virtual void setAlarmEnabled( int id, bool enable ) = 0;
319 virtual void setReadOnly( int id, bool enable ) = 0; 319 virtual void setReadOnly( int id, bool enable ) = 0;
320 virtual void setDefaultCalendarEnabledOnly() = 0; 320 virtual void setDefaultCalendarEnabledOnly() = 0;
321 virtual void setCalendarRemove( int id ) = 0; 321 virtual void setCalendarRemove( int id ) = 0;
322 virtual void getIncidenceCount( int calId, int& events, int & todos, int & journals) = 0;
323
322 signals: 324 signals:
323 void calendarChanged(); 325 void calendarChanged();
324 void calendarSaved(); 326 void calendarSaved();
325 void calendarLoaded(); 327 void calendarLoaded();
326 void addAlarm(const QDateTime &qdt, const QString &noti ); 328 void addAlarm(const QDateTime &qdt, const QString &noti );
327 void removeAlarm(const QDateTime &qdt, const QString &noti ); 329 void removeAlarm(const QDateTime &qdt, const QString &noti );
328 330
329 protected: 331 protected:
330 /** 332 /**
331 Get unfiltered events, which occur on the given date. 333 Get unfiltered events, which occur on the given date.
332 */ 334 */
333 virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0; 335 virtual QPtrList<Event> rawEventsForDate( const QDateTime &qdt ) = 0;
334 /** 336 /**
335 Get unfiltered events, which occur on the given date. 337 Get unfiltered events, which occur on the given date.
336 */ 338 */
337 virtual QPtrList<Event> rawEventsForDate( const QDate &date, 339 virtual QPtrList<Event> rawEventsForDate( const QDate &date,
338 bool sorted = false ) = 0; 340 bool sorted = false ) = 0;
339 /** 341 /**
340 Get events in a range of dates. If inclusive is set to true, only events 342 Get events in a range of dates. If inclusive is set to true, only events
341 are returned, which are completely included in the range. 343 are returned, which are completely included in the range.
342 */ 344 */
343 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 345 virtual QPtrList<Event> rawEvents( const QDate &start, const QDate &end,
344 bool inclusive = false ) = 0; 346 bool inclusive = false ) = 0;
345 347
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 1a1c6be..0ddfeca 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -431,63 +431,87 @@ void CalendarLocal::removeSyncInfo( QString syncProfile)
431QPtrList<Event> CalendarLocal::getExternLastSyncEvents() 431QPtrList<Event> CalendarLocal::getExternLastSyncEvents()
432{ 432{
433 QPtrList<Event> el; 433 QPtrList<Event> el;
434 Event *todo; 434 Event *todo;
435 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { 435 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
436 if ( todo->uid().left( 15 ) == QString("last-syncEvent-") ) 436 if ( todo->uid().left( 15 ) == QString("last-syncEvent-") )
437 if ( todo->summary().left(3) == "E: " ) 437 if ( todo->summary().left(3) == "E: " )
438 el.append( todo ); 438 el.append( todo );
439 } 439 }
440 440
441 return el; 441 return el;
442 442
443} 443}
444Event *CalendarLocal::event( QString syncProf, QString id ) 444Event *CalendarLocal::event( QString syncProf, QString id )
445{ 445{
446 Event *todo; 446 Event *todo;
447 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) { 447 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
448 if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo; 448 if ( todo->calEnabled() && todo->getID( syncProf ) == id ) return todo;
449 } 449 }
450 450
451 return 0; 451 return 0;
452} 452}
453Todo *CalendarLocal::todo( const QString &uid ) 453Todo *CalendarLocal::todo( const QString &uid )
454{ 454{
455 Todo *todo;; 455 Todo *todo;
456 Todo *retVal = 0; 456 Todo *retVal = 0;
457 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) { 457 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
458 if ( todo->calEnabled() && todo->uid() == uid ) { 458 if ( todo->calEnabled() && todo->uid() == uid ) {
459 if ( retVal ) { 459 if ( retVal ) {
460 if ( retVal->calID() > todo->calID() ) { 460 if ( retVal->calID() > todo->calID() ) {
461 retVal = todo; 461 retVal = todo;
462 } 462 }
463 } else { 463 } else {
464 retVal = todo; 464 retVal = todo;
465 } 465 }
466 } 466 }
467 } 467 }
468 return retVal; 468 return retVal;
469} 469}
470void CalendarLocal::getIncidenceCount( int calId, int& events, int & todos, int & journals)
471{
472 events = 0;
473 todos = 0;
474 journals = 0;
475 {
476 Todo *todo;
477 for ( todo = mTodoList.first(); todo; todo = mTodoList.next() ) {
478 if ( todo->calID() == calId )
479 ++todos;
480 }
481 }
482 {
483 Event *todo;
484 for ( todo = mEventList.first(); todo; todo = mEventList.next() ) {
485 if ( todo->calID() == calId )
486 ++events;
487
488 }
489 }
490 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
491 if ( it->calID() == calId ) ++journals;
492
493}
470QString CalendarLocal::nextSummary() const 494QString CalendarLocal::nextSummary() const
471{ 495{
472 return mNextSummary; 496 return mNextSummary;
473} 497}
474QDateTime CalendarLocal::nextAlarmEventDateTime() const 498QDateTime CalendarLocal::nextAlarmEventDateTime() const
475{ 499{
476 return mNextAlarmEventDateTime; 500 return mNextAlarmEventDateTime;
477} 501}
478void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted) 502void CalendarLocal::checkAlarmForIncidence( Incidence * incidence, bool deleted)
479{ 503{
480 //mNextAlarmIncidence 504 //mNextAlarmIncidence
481 //mNextAlarmDateTime 505 //mNextAlarmDateTime
482 //return mNextSummary; 506 //return mNextSummary;
483 //return mNextAlarmEventDateTime; 507 //return mNextAlarmEventDateTime;
484 bool newNextAlarm = false; 508 bool newNextAlarm = false;
485 bool computeNextAlarm = false; 509 bool computeNextAlarm = false;
486 bool ok; 510 bool ok;
487 int offset; 511 int offset;
488 QDateTime nextA; 512 QDateTime nextA;
489 // QString nextSum; 513 // QString nextSum;
490 //QDateTime nextEvent; 514 //QDateTime nextEvent;
491 if ( mNextAlarmIncidence == 0 || incidence == 0 ) { 515 if ( mNextAlarmIncidence == 0 || incidence == 0 ) {
492 computeNextAlarm = true; 516 computeNextAlarm = true;
493 } else { 517 } else {
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index a7a85c8..ca0bd98 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -164,48 +164,49 @@ class CalendarLocal : public Calendar
164 /** 164 /**
165 This method should be called whenever a Event is modified directly 165 This method should be called whenever a Event is modified directly
166 via it's pointer. It makes sure that the calendar is internally 166 via it's pointer. It makes sure that the calendar is internally
167 consistent. 167 consistent.
168 */ 168 */
169 void update( IncidenceBase *incidence ); 169 void update( IncidenceBase *incidence );
170 170
171 /** 171 /**
172 Builds and then returns a list of all events that match for the 172 Builds and then returns a list of all events that match for the
173 date specified. useful for dayView, etc. etc. 173 date specified. useful for dayView, etc. etc.
174 */ 174 */
175 QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false ); 175 QPtrList<Event> rawEventsForDate( const QDate &date, bool sorted = false );
176 /** 176 /**
177 Get unfiltered events for date \a qdt. 177 Get unfiltered events for date \a qdt.
178 */ 178 */
179 QPtrList<Event> rawEventsForDate( const QDateTime &qdt ); 179 QPtrList<Event> rawEventsForDate( const QDateTime &qdt );
180 /** 180 /**
181 Get unfiltered events in a range of dates. If inclusive is set to true, 181 Get unfiltered events in a range of dates. If inclusive is set to true,
182 only events are returned, which are completely included in the range. 182 only events are returned, which are completely included in the range.
183 */ 183 */
184 QPtrList<Event> rawEvents( const QDate &start, const QDate &end, 184 QPtrList<Event> rawEvents( const QDate &start, const QDate &end,
185 bool inclusive = false ); 185 bool inclusive = false );
186 Todo *todo( QString, QString ); 186 Todo *todo( QString, QString );
187 Event *event( QString, QString ); 187 Event *event( QString, QString );
188 void getIncidenceCount( int calId, int& events, int & todos, int & journals);
188 189
189public slots: 190public slots:
190 void setCalendarEnabled( int id, bool enable ); 191 void setCalendarEnabled( int id, bool enable );
191 void setAlarmEnabled( int id, bool enable ); 192 void setAlarmEnabled( int id, bool enable );
192 void setReadOnly( int id, bool enable ); 193 void setReadOnly( int id, bool enable );
193 void setDefaultCalendarEnabledOnly(); 194 void setDefaultCalendarEnabledOnly();
194 void setCalendarRemove( int id ); 195 void setCalendarRemove( int id );
195 196
196 protected: 197 protected:
197 198
198 // Event* mNextAlarmEvent; 199 // Event* mNextAlarmEvent;
199 QString mNextSummary; 200 QString mNextSummary;
200 QString mNextAlarmEventDateTimeString; 201 QString mNextAlarmEventDateTimeString;
201 QString mLastAlarmNotificationString; 202 QString mLastAlarmNotificationString;
202 QDateTime mNextAlarmEventDateTime; 203 QDateTime mNextAlarmEventDateTime;
203 QDateTime mNextAlarmDateTime; 204 QDateTime mNextAlarmDateTime;
204 void reInitAlarmSettings(); 205 void reInitAlarmSettings();
205 206
206 /** Notification function of IncidenceBase::Observer. */ 207 /** Notification function of IncidenceBase::Observer. */
207 void incidenceUpdated( IncidenceBase *i ) { update( i ); } 208 void incidenceUpdated( IncidenceBase *i ) { update( i ); }
208 209
209 /** inserts an event into its "proper place" in the calendar. */ 210 /** inserts an event into its "proper place" in the calendar. */
210 void insertEvent( Event *event ); 211 void insertEvent( Event *event );
211 212