-rw-r--r-- | korganizer/calendarview.cpp | 15 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kofilterview.cpp | 2 | ||||
-rw-r--r-- | korganizer/kofilterview.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 7 |
5 files changed, 16 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 70a1d2d..678143d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -476,2 +476,3 @@ void CalendarView::init() connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); + connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() )); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); @@ -683,6 +684,4 @@ void CalendarView::scrollBarValue(int val ) } - -void CalendarView::checkAlarms() +void CalendarView::checkFiles() { - QString message; @@ -697,5 +696,11 @@ void CalendarView::checkAlarms() 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); + message = KGlobal::formatMessage( i18n("Calendar(s) not loaded:"),0 )+"\n" + message +KGlobal::formatMessage(i18n("You can try to reload the calendar in the Resource View!"),0); + KMessageBox::error(this,message, i18n("Loding of calendar(s) failed")); + } + QTimer::singleShot( 2000, this, SLOT ( checkAlarms() )); } +void CalendarView::checkAlarms() +{ + + KConfig *config = KOGlobals::config(); diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index c9e9870..651194b 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -203,2 +203,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser void checkAlarms(); + void checkFiles(); void slotprintSelInc(); diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp index 3cde103..20118aa 100644 --- a/korganizer/kofilterview.cpp +++ b/korganizer/kofilterview.cpp @@ -217,2 +217,3 @@ void KOCalEditView::infoCal( int id ) QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); + QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); } @@ -381,2 +382,3 @@ void KOCalEditView::addCal() addCalendar ( name, file ); + QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) ); } diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h index 54fe2c5..02107cf 100644 --- a/korganizer/kofilterview.h +++ b/korganizer/kofilterview.h @@ -235,2 +235,3 @@ class KOCalEditView : public QScrollView void needsUpdate(); + void checkCalendar(); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index b797d8c..501eed5 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -400,7 +400,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : //toggleBeamReceive(); - int tiint= 3000; -#ifndef DESKTOP_VERSION - tiint = 5000; -#endif - QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() )); + + QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); } |