From 3ec18dd19fdf4eb7e763b8022f90de83249facfd Mon Sep 17 00:00:00 2001 From: zautrix Date: Sat, 22 Oct 2005 16:49:42 +0000 Subject: fixxx --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e31a6e1..28b17a5 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -477,7 +477,9 @@ void CalendarView::init() connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); + connect( mCalEditView, SIGNAL( requestCalendarInfo( int ) ),this, SLOT( displayCalendarInfo( int ) ) ); + mTodoList->setNavigator( mNavigator ); #if 0 if ( QApplication::desktop()->width() < 480 ) { @@ -5158,3 +5160,17 @@ void CalendarView::showNextAlarms() #endif KMessageBox::information( this, message); } + +void CalendarView::displayCalendarInfo( int id ) +{ + int e, t,j; + KopiCalendarFile * kkf = KOPrefs::instance()->getCalendar( id ); + QString name = kkf->mName; + mCalendar->getIncidenceCount( id, e, t, j ); + QString file = KGlobal::formatMessage ( kkf->mFileName ,0 ); + QString mess = i18n("The calendar %1 is displaying file %2").arg(name).arg(file); + mess += i18n("
The calendar contains
%1 events
%2 todos
%3 journals
").arg( e ).arg( t ).arg( j ); + KMessageBox::information( this, mess ); + + +} diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 8670832..0924f07 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -201,6 +201,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser public slots: + void displayCalendarInfo( int id ); void nextConflict( bool all, bool allday ); void conflictAll(); void conflictAllday(); diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index ef25fd0..ee9c9f6 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -230,8 +230,10 @@ void KOCalEditView::infoCal( int id ) QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); } } - else - KMessageBox::information( this, i18n("The calendar %1 is displaying file %2").arg(name).arg(file) ); + else { + emit requestCalendarInfo( id ); + + } } void KOCalEditView::readConfig() { diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index d534dbf..0dd423a 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -240,6 +240,7 @@ class KOCalEditView : public QScrollView void calendarAdded( int ); void needsUpdate(); void checkCalendar(); + void requestCalendarInfo( int id ); private: QWidget *mw; -- cgit v0.9.0.2