summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
authorzautrix <zautrix>2005-07-01 14:47:16 (UTC)
committer zautrix <zautrix>2005-07-01 14:47:16 (UTC)
commitf330b9d0a7f755660ddd59739e3ab9b98d60bc18 (patch) (side-by-side diff)
treec29630a799dc39906e57ba1d23cba6861f1cc0bb /korganizer/calendarview.cpp
parenteee2e65aebe1c93a0c391a927b86ce87a278a4df (diff)
downloadkdepimpi-f330b9d0a7f755660ddd59739e3ab9b98d60bc18.zip
kdepimpi-f330b9d0a7f755660ddd59739e3ab9b98d60bc18.tar.gz
kdepimpi-f330b9d0a7f755660ddd59739e3ab9b98d60bc18.tar.bz2
fixii
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index c0f3be7..fd026fa 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -684,6 +684,20 @@ void CalendarView::scrollBarValue(int val )
void CalendarView::checkAlarms()
{
+
+ QString message;
+ QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
+ KopiCalendarFile * cal = calendars.first();
+ while ( cal ) {
+ if ( cal->mErrorOnLoad ) {
+ message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n";
+ }
+ cal = calendars.next();
+ }
+ if ( !message.isEmpty() ) {
+ message = KGlobal::formatMessage( i18n("The loading of one or more calendar failed:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0);
+ KMessageBox::error(this,message);
+ }
KConfig *config = KOGlobals::config();
config->setGroup( "AppRun" );
QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
@@ -1923,7 +1937,8 @@ bool CalendarView::restoreCalendarSettings()
void CalendarView::addCalendarId( int id )
{
KopiCalendarFile * cal = KOPrefs::instance()->getCalendar( id );
- addCalendar( cal );
+ if ( cal )
+ addCalendar( cal );
}
bool CalendarView::addCalendar( KopiCalendarFile * cal )
{
@@ -1932,8 +1947,7 @@ bool CalendarView::addCalendar( KopiCalendarFile * cal )
cal->mLoadDt = QDateTime::currentDateTime();
return true;
}
- qDebug("KO: Error adding calendar file %1 ",cal->mFileName.latin1() );
- KMessageBox::error(this,i18n("Error loading calendar file\n%1.").arg(cal->mFileName));
+ qDebug("KO: Error adding calendar file %s ",cal->mFileName.latin1() );
cal->mErrorOnLoad = true;
return false;
}