-rw-r--r-- | bin/kdepim/korganizer/germantranslation.txt | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 5 | ||||
-rw-r--r-- | korganizer/main.cpp | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 64 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 6 |
6 files changed, 62 insertions, 23 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt index fcfa282..fbd262c 100644 --- a/bin/kdepim/korganizer/germantranslation.txt +++ b/bin/kdepim/korganizer/germantranslation.txt | |||
@@ -1556,5 +1556,5 @@ | |||
1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, | 1556 | { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, |
1557 | { "Conflict detection","Konflikterkennung" }, | 1557 | { "Conflict detection","Konflikterkennung" }, |
1558 | { "","" }, | 1558 | { "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, |
1559 | { "","" }, | 1559 | { "","" }, |
1560 | { "","" }, | 1560 | { "","" }, |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e3b62de..9928b48 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2392,6 +2392,6 @@ bool CalendarView::openCalendar(QString filename, bool merge) | |||
2392 | mCalendar->reInitAlarmSettings(); | 2392 | mCalendar->reInitAlarmSettings(); |
2393 | setSyncEventsReadOnly(); | 2393 | setSyncEventsReadOnly(); |
2394 | updateUnmanagedViews(); | 2394 | //updateUnmanagedViews(); |
2395 | updateView(); | 2395 | //updateView(); |
2396 | if ( filename != MainWindow::defaultFileName() ) { | 2396 | if ( filename != MainWindow::defaultFileName() ) { |
2397 | saveCalendar( MainWindow::defaultFileName() ); | 2397 | saveCalendar( MainWindow::defaultFileName() ); |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 17248dc..07bfdbf 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -505,4 +505,9 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
505 | KOrg::BaseView(calendar,parent,name) | 505 | KOrg::BaseView(calendar,parent,name) |
506 | { | 506 | { |
507 | |||
508 | mCurItem = 0; | ||
509 | mCurItemRootParent = 0; | ||
510 | mCurItemParent = 0; | ||
511 | mCurItemAbove = 0; | ||
507 | mActiveItem = 0; | 512 | mActiveItem = 0; |
508 | mCategoryPopupMenu = 0; | 513 | mCategoryPopupMenu = 0; |
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index c9d1345..6339370 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -90,5 +90,5 @@ int main( int argc, char **argv ) | |||
90 | #ifndef DESKTOP_VERSION | 90 | #ifndef DESKTOP_VERSION |
91 | 91 | ||
92 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 92 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(receiveStart( const QCString&, const QByteArray& ))); |
93 | a.showMainWidget(&m ); | 93 | a.showMainWidget(&m ); |
94 | #else | 94 | #else |
@@ -96,5 +96,5 @@ int main( int argc, char **argv ) | |||
96 | m.show(); | 96 | m.show(); |
97 | //m.resize( 800, 600 ); | 97 | //m.resize( 800, 600 ); |
98 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 98 | //QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |
99 | #endif | 99 | #endif |
100 | if ( argc > 1 ) { | 100 | if ( argc > 1 ) { |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9ae393d..8c72d89 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -347,17 +347,12 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
347 | } | 347 | } |
348 | 348 | ||
349 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | 349 | //QTime neededSaveTime = QDateTime::currentDateTime().time(); |
350 | mView->loadCalendars(); | 350 | //mView->loadCalendars(); |
351 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | 351 | //int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); |
352 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | 352 | //qDebug("KO: Calendar loading time: %d ms",msNeeded ); |
353 | 353 | ||
354 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { | 354 | if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { |
355 | KOPrefs::instance()->setAllDefaults(); | 355 | KOPrefs::instance()->setAllDefaults(); |
356 | } | 356 | } |
357 | processIncidenceSelection( 0 ); | ||
358 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | ||
359 | SLOT( processIncidenceSelection( Incidence * ) ) ); | ||
360 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | ||
361 | SLOT( slotModifiedChanged( bool ) ) ); | ||
362 | 357 | ||
363 | 358 | ||
@@ -365,7 +360,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
365 | SLOT( disableBR(bool) ) ); | 360 | SLOT( disableBR(bool) ) ); |
366 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 361 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
367 | mView->setModified( false ); | ||
368 | mBlockAtStartup = false; | ||
369 | mView->setModified( false ); | ||
370 | setCentralWidget( mView ); | 362 | setCentralWidget( mView ); |
371 | globalFlagBlockStartup = 0; | 363 | globalFlagBlockStartup = 0; |
@@ -380,5 +372,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
380 | 372 | ||
381 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 373 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
382 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | ||
383 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | 374 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); |
384 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 375 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
@@ -399,7 +390,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
399 | 390 | ||
400 | //US listen for result adressed from Ka/Pi | 391 | //US listen for result adressed from Ka/Pi |
401 | #ifndef DESKTOP_VERSION | 392 | |
402 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | ||
403 | #endif | ||
404 | #ifndef DESKTOP_VERSION | 393 | #ifndef DESKTOP_VERSION |
405 | infrared = 0; | 394 | infrared = 0; |
@@ -412,5 +401,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
412 | //toggleBeamReceive(); | 401 | //toggleBeamReceive(); |
413 | 402 | ||
414 | QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); | 403 | setCaption(i18n("Loading calendar files ... please wait" )); |
404 | QTimer::singleShot( 10, this, SLOT ( loadDataAfterStart() )); | ||
415 | } | 405 | } |
416 | MainWindow::~MainWindow() | 406 | MainWindow::~MainWindow() |
@@ -427,4 +417,36 @@ MainWindow::~MainWindow() | |||
427 | 417 | ||
428 | } | 418 | } |
419 | |||
420 | void MainWindow::loadDataAfterStart() | ||
421 | { | ||
422 | |||
423 | qDebug("KO: Start loading files..." ); | ||
424 | QTime neededSaveTime = QDateTime::currentDateTime().time(); | ||
425 | mView->loadCalendars(); | ||
426 | int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); | ||
427 | qDebug("KO: Calendar loading time: %d ms",msNeeded ); | ||
428 | //QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); | ||
429 | mView->setModified( false ); | ||
430 | mBlockAtStartup = false; | ||
431 | mView->setModified( false ); | ||
432 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | ||
433 | processIncidenceSelection( 0 ); | ||
434 | connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), | ||
435 | SLOT( processIncidenceSelection( Incidence * ) ) ); | ||
436 | connect( mView, SIGNAL( modifiedChanged( bool ) ), | ||
437 | SLOT( slotModifiedChanged( bool ) ) ); | ||
438 | |||
439 | #ifndef DESKTOP_VERSION | ||
440 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | ||
441 | connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); | ||
442 | disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); | ||
443 | if ( !mCStringMess.isEmpty() ) | ||
444 | recieve( mCStringMess, mByteData ); | ||
445 | #endif | ||
446 | |||
447 | |||
448 | QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); | ||
449 | } | ||
450 | |||
429 | void MainWindow::slotResetFocus() | 451 | void MainWindow::slotResetFocus() |
430 | { | 452 | { |
@@ -541,5 +563,10 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
541 | 563 | ||
542 | } | 564 | } |
543 | 565 | void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) | |
566 | { | ||
567 | qDebug("KO: QCOP start message received: %s ", cmsg.data() ); | ||
568 | mCStringMess = cmsg; | ||
569 | mByteData = data; | ||
570 | } | ||
544 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | 571 | void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) |
545 | { | 572 | { |
@@ -2517,4 +2544,5 @@ void MainWindow::importFile( QString fn, bool quick ) | |||
2517 | setCaption(i18n("Error importing file")); | 2544 | setCaption(i18n("Error importing file")); |
2518 | } | 2545 | } |
2546 | mView->updateView(); | ||
2519 | } | 2547 | } |
2520 | } | 2548 | } |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 7d3d492..fdcf7c4 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -51,5 +51,7 @@ class MainWindow : public QMainWindow | |||
51 | void configureAgenda( int ); | 51 | void configureAgenda( int ); |
52 | void recieve( const QCString& msg, const QByteArray& data ); | 52 | void recieve( const QCString& msg, const QByteArray& data ); |
53 | void receiveStart( const QCString& msg, const QByteArray& data ); | ||
53 | protected slots: | 54 | protected slots: |
55 | void loadDataAfterStart(); | ||
54 | void calHint(); | 56 | void calHint(); |
55 | void startMultiSync(); | 57 | void startMultiSync(); |
@@ -117,4 +119,8 @@ class MainWindow : public QMainWindow | |||
117 | 119 | ||
118 | private: | 120 | private: |
121 | |||
122 | QCString mCStringMess; | ||
123 | QByteArray mByteData; | ||
124 | |||
119 | //void setMenuBar( QMenuBar * ); | 125 | //void setMenuBar( QMenuBar * ); |
120 | bool mBRdisabled; | 126 | bool mBRdisabled; |