summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-01 18:39:59 (UTC)
committer zautrix <zautrix>2005-07-01 18:39:59 (UTC)
commitc53efbe8f53f468d21d93f5e19b625d1a4beb242 (patch) (unidiff)
treef8fe2180733b6bd3514c02845cefa9f26e967e27 /korganizer
parent98d29d15275c4b8e9a3348742925f6e6d03f7a07 (diff)
downloadkdepimpi-c53efbe8f53f468d21d93f5e19b625d1a4beb242.zip
kdepimpi-c53efbe8f53f468d21d93f5e19b625d1a4beb242.tar.gz
kdepimpi-c53efbe8f53f468d21d93f5e19b625d1a4beb242.tar.bz2
fixxx
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp15
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/kofilterview.cpp2
-rw-r--r--korganizer/kofilterview.h1
-rw-r--r--korganizer/mainwindow.cpp7
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
@@ -471,12 +471,13 @@ void CalendarView::init()
471 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); 471 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) );
472 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); 472 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) );
473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); 473 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) );
474 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); 474 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) );
475 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); 475 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) );
476 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); 476 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) );
477 connect( mCalEditView, SIGNAL( checkCalendar() ),this, SLOT( checkFiles() ));
477 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); 478 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) );
478 479
479 mTodoList->setNavigator( mNavigator ); 480 mTodoList->setNavigator( mNavigator );
480#if 0 481#if 0
481 if ( QApplication::desktop()->width() < 480 ) { 482 if ( QApplication::desktop()->width() < 480 ) {
482 leftFrameLayout->addWidget(mFilterView); 483 leftFrameLayout->addWidget(mFilterView);
@@ -678,29 +679,33 @@ void CalendarView::scrollBarValue(int val )
678 QDate d ( year,1,1 ); 679 QDate d ( year,1,1 );
679 mNavigator->selectDates( d.addDays( val ), count ); 680 mNavigator->selectDates( d.addDays( val ), count );
680 block = false; 681 block = false;
681#endif 682#endif
682 683
683} 684}
684 685void CalendarView::checkFiles()
685void CalendarView::checkAlarms()
686{ 686{
687
688 QString message; 687 QString message;
689 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 688 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
690 KopiCalendarFile * cal = calendars.first(); 689 KopiCalendarFile * cal = calendars.first();
691 while ( cal ) { 690 while ( cal ) {
692 if ( cal->mErrorOnLoad ) { 691 if ( cal->mErrorOnLoad ) {
693 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n"; 692 message += cal->mName +"\n"+KGlobal::formatMessage ( "(" +i18n( "Filepath: ")+ cal->mFileName+")" ,0 )+"\n";
694 } 693 }
695 cal = calendars.next(); 694 cal = calendars.next();
696 } 695 }
697 if ( !message.isEmpty() ) { 696 if ( !message.isEmpty() ) {
698 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); 697 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);
699 KMessageBox::error(this,message); 698 KMessageBox::error(this,message, i18n("Loding of calendar(s) failed"));
699 }
700 QTimer::singleShot( 2000, this, SLOT ( checkAlarms() ));
700 } 701 }
702void CalendarView::checkAlarms()
703{
704
705
701 KConfig *config = KOGlobals::config(); 706 KConfig *config = KOGlobals::config();
702 config->setGroup( "AppRun" ); 707 config->setGroup( "AppRun" );
703 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) ); 708 QDateTime dt ( QDate (2005,1,1), QTime( 0,0,0 ) );
704 int daysto = dt.daysTo( QDate::currentDate() ); 709 int daysto = dt.daysTo( QDate::currentDate() );
705 int days = config->readNumEntry( "LatestProgramStopDays" , daysto); 710 int days = config->readNumEntry( "LatestProgramStopDays" , daysto);
706 dt = dt.addDays( days ); 711 dt = dt.addDays( days );
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index c9e9870..651194b 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -198,12 +198,13 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
198 void updateSearchDialog(); 198 void updateSearchDialog();
199 void filtersUpdated(); 199 void filtersUpdated();
200 200
201 201
202 public slots: 202 public slots:
203 void checkAlarms(); 203 void checkAlarms();
204 void checkFiles();
204 void slotprintSelInc(); 205 void slotprintSelInc();
205 void showNextAlarms(); 206 void showNextAlarms();
206 void showOpenError(); 207 void showOpenError();
207 void watchSavedFile(); 208 void watchSavedFile();
208 void recheckTimerAlarm(); 209 void recheckTimerAlarm();
209 void checkNextTimerAlarm(); 210 void checkNextTimerAlarm();
diff --git a/korganizer/kofilterview.cpp b/korganizer/kofilterview.cpp
index 3cde103..20118aa 100644
--- a/korganizer/kofilterview.cpp
+++ b/korganizer/kofilterview.cpp
@@ -212,12 +212,13 @@ void KOCalEditView::infoCal( int id )
212 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 ); 212 QString file = KGlobal::formatMessage ( KOPrefs::instance()->getCalendar( id )->mFileName, 0 );
213 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) { 213 if ( KOPrefs::instance()->getCalendar( id )->mErrorOnLoad ) {
214 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) { 214 if ( KMessageBox::Yes == KMessageBox::questionYesNo( this, i18n("The calendar <b>%1</b> is not loaded! Loading of file <b>%2</b> failed! <b>Try again to load the calendar?</b>").arg(name).arg(file) ) ) {
215 emit calendarAdded( id ); 215 emit calendarAdded( id );
216 emit needsUpdate(); 216 emit needsUpdate();
217 QTimer::singleShot( 0, this, SLOT ( readConfig() ) ); 217 QTimer::singleShot( 0, this, SLOT ( readConfig() ) );
218 QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) );
218 } 219 }
219 } 220 }
220 else 221 else
221 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) ); 222 KMessageBox::information( this, i18n("The calendar <b>%1</b> is displaying file <b>%2</b>").arg(name).arg(file) );
222} 223}
223void KOCalEditView::readConfig() 224void KOCalEditView::readConfig()
@@ -376,12 +377,13 @@ void KOCalEditView::addCal()
376 break; 377 break;
377 } 378 }
378 kkf = KOPrefs::instance()->mCalendars.next(); 379 kkf = KOPrefs::instance()->mCalendars.next();
379 } 380 }
380 } 381 }
381 addCalendar ( name, file ); 382 addCalendar ( name, file );
383 QTimer::singleShot( 100, this, SIGNAL ( checkCalendar() ) );
382} 384}
383int KOCalEditView::addCalendar( QString name, QString file, bool ask ) 385int KOCalEditView::addCalendar( QString name, QString file, bool ask )
384{ 386{
385 387
386 QFileInfo fi ( file ); 388 QFileInfo fi ( file );
387 if (!fi.exists() ) { 389 if (!fi.exists() ) {
diff --git a/korganizer/kofilterview.h b/korganizer/kofilterview.h
index 54fe2c5..02107cf 100644
--- a/korganizer/kofilterview.h
+++ b/korganizer/kofilterview.h
@@ -230,12 +230,13 @@ class KOCalEditView : public QScrollView
230 void calendarEnabled ( int cal, bool enable ); 230 void calendarEnabled ( int cal, bool enable );
231 void calendarReadonly ( int cal, bool readonly ); 231 void calendarReadonly ( int cal, bool readonly );
232 void setCalendarDefault ( int cal ); 232 void setCalendarDefault ( int cal );
233 void removeCalendar ( int cal ); 233 void removeCalendar ( int cal );
234 void calendarAdded( int ); 234 void calendarAdded( int );
235 void needsUpdate(); 235 void needsUpdate();
236 void checkCalendar();
236 237
237 private: 238 private:
238 QWidget *mw; 239 QWidget *mw;
239 void toggleList ( QPtrList<KOCalCheckButton> ); 240 void toggleList ( QPtrList<KOCalCheckButton> );
240 QPtrList<KOCalRadioButton> mStdandardB; 241 QPtrList<KOCalRadioButton> mStdandardB;
241 QPtrList<KOCalCheckButton> mEnabledB; 242 QPtrList<KOCalCheckButton> mEnabledB;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index b797d8c..501eed5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -395,17 +395,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
395 updateFilterToolbar(); 395 updateFilterToolbar();
396 updateWeek( mView->startDate() ); 396 updateWeek( mView->startDate() );
397 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 397 connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
398 SLOT( updateWeekNum( const KCal::DateList & ) ) ); 398 SLOT( updateWeekNum( const KCal::DateList & ) ) );
399 mBRdisabled = false; 399 mBRdisabled = false;
400 //toggleBeamReceive(); 400 //toggleBeamReceive();
401 int tiint= 3000; 401
402#ifndef DESKTOP_VERSION 402 QTimer::singleShot( 1000, mView, SLOT ( checkFiles() ));
403 tiint = 5000;
404#endif
405 QTimer::singleShot( tiint, mView, SLOT ( checkAlarms() ));
406} 403}
407MainWindow::~MainWindow() 404MainWindow::~MainWindow()
408{ 405{
409 //qDebug("MainWindow::~MainWindow() "); 406 //qDebug("MainWindow::~MainWindow() ");
410 //save toolbar location 407 //save toolbar location
411 delete mCalendar; 408 delete mCalendar;