summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show 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
@@ -4,8 +4,9 @@ Info about the changes in new versions of KDE-Pim/Pi
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
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
@@ -1569,9 +1569,9 @@
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{ "","" },
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e31a6e1..28b17a5 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -476,8 +476,10 @@ void CalendarView::init()
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 ) ) );
481
480 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 ) {
@@ -5157,4 +5159,18 @@ void CalendarView::showNextAlarms()
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
@@ -200,8 +200,9 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
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();
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index ef25fd0..ee9c9f6 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -229,10 +229,12 @@ void KOCalEditView::infoCal( int id )
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
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index d534dbf..0dd423a 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -239,8 +239,9 @@ class KOCalEditView : public QScrollView
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 );
diff --git a/libkcal/calendar.h b/libkcal/calendar.h
index 3f6895d..4b8b3ff 100644
--- a/libkcal/calendar.h
+++ b/libkcal/calendar.h
@@ -318,8 +318,10 @@ public:
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();
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index 1a1c6be..0ddfeca 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -451,9 +451,9 @@ Event *CalendarLocal::event( QString syncProf, QString id )
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 ) {
@@ -466,8 +466,32 @@ Todo *CalendarLocal::todo( const QString &uid )
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}
diff --git a/libkcal/calendarlocal.h b/libkcal/calendarlocal.h
index a7a85c8..ca0bd98 100644
--- a/libkcal/calendarlocal.h
+++ b/libkcal/calendarlocal.h
@@ -184,8 +184,9 @@ class CalendarLocal : public Calendar
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 );