summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp16
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/kofilterview.cpp6
-rw-r--r--korganizer/kofilterview.h1
4 files changed, 22 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index e31a6e1..28b17a5 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -477,6 +477,8 @@ 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
@@ -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 <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file);
+ mess += i18n("<br>The calendar contains<br><b>%1 events<br>%2 todos<br>%3 journals</b>").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 <b>%1</b> is displaying file <b>%2</b>").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;