author | zautrix <zautrix> | 2005-08-23 12:55:50 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-08-23 12:55:50 (UTC) |
commit | 72d600e2c3b3405e5f37615a56560811c0cf9a78 (patch) (side-by-side diff) | |
tree | 0f3eeb3ae34822149ba8b6d62990725e59a29187 | |
parent | e34e096c0e1b799904643c753591833f3ff2ab95 (diff) | |
download | kdepimpi-72d600e2c3b3405e5f37615a56560811c0cf9a78.zip kdepimpi-72d600e2c3b3405e5f37615a56560811c0cf9a78.tar.gz kdepimpi-72d600e2c3b3405e5f37615a56560811c0cf9a78.tar.bz2 |
kopi load change
-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 @@ -1554,9 +1554,9 @@ { "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, { "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, { "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, { "Conflict detection","Konflikterkennung" }, -{ "","" }, +{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, { "","" }, { "","" }, { "","" }, { "","" }, diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e3b62de..9928b48 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -2390,10 +2390,10 @@ bool CalendarView::openCalendar(QString filename, bool merge) // if ( getLastSyncEvent() ) // getLastSyncEvent()->setReadOnly( true ); mCalendar->reInitAlarmSettings(); setSyncEventsReadOnly(); - updateUnmanagedViews(); - updateView(); + //updateUnmanagedViews(); + //updateView(); if ( filename != MainWindow::defaultFileName() ) { saveCalendar( MainWindow::defaultFileName() ); } else { QFileInfo finf ( MainWindow::defaultFileName()); diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 17248dc..07bfdbf 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp @@ -503,8 +503,13 @@ void KOQuickTodo::focusOutEvent(QFocusEvent *ev) KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : KOrg::BaseView(calendar,parent,name) { + + mCurItem = 0; + mCurItemRootParent = 0; + mCurItemParent = 0; + mCurItemAbove = 0; mActiveItem = 0; mCategoryPopupMenu = 0; mPendingUpdateBeforeRepaint = false; isFlatDisplay = false; diff --git a/korganizer/main.cpp b/korganizer/main.cpp index c9d1345..6339370 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp @@ -88,15 +88,15 @@ int main( int argc, char **argv ) KPimGlobalPrefs::instance()->setGlobalConfig(); MainWindow m; #ifndef DESKTOP_VERSION - QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); + QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(receiveStart( const QCString&, const QByteArray& ))); a.showMainWidget(&m ); #else a.setMainWidget(&m ); m.show(); //m.resize( 800, 600 ); - QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); + //QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); #endif if ( argc > 1 ) { QCString command = argv[1]; if ( argc > 2 ) diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 9ae393d..8c72d89 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -345,29 +345,21 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : mView->saveCalendar( defaultFileName() ); newFile = true; } - QTime neededSaveTime = QDateTime::currentDateTime().time(); - mView->loadCalendars(); - int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); - qDebug("KO: Calendar loading time: %d ms",msNeeded ); + //QTime neededSaveTime = QDateTime::currentDateTime().time(); + //mView->loadCalendars(); + //int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); + //qDebug("KO: Calendar loading time: %d ms",msNeeded ); if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) { KOPrefs::instance()->setAllDefaults(); } - processIncidenceSelection( 0 ); - connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), - SLOT( processIncidenceSelection( Incidence * ) ) ); - connect( mView, SIGNAL( modifiedChanged( bool ) ), - SLOT( slotModifiedChanged( bool ) ) ); connect( mView, SIGNAL( tempDisableBR(bool) ), SLOT( disableBR(bool) ) ); connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); - mView->setModified( false ); - mBlockAtStartup = false; - mView->setModified( false ); setCentralWidget( mView ); globalFlagBlockStartup = 0; mView->show(); delete splash; @@ -378,9 +370,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : //fillSyncMenu(); connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); - connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); mSyncManager->setDefaultFileName( sentSyncFile()); @@ -397,11 +388,9 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : mView->dialogManager()->showSyncOptions(); } //US listen for result adressed from Ka/Pi -#ifndef DESKTOP_VERSION - connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); -#endif + #ifndef DESKTOP_VERSION infrared = 0; #endif updateFilterToolbar(); @@ -410,9 +399,10 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : SLOT( updateWeekNum( const KCal::DateList & ) ) ); mBRdisabled = false; //toggleBeamReceive(); - QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); + setCaption(i18n("Loading calendar files ... please wait" )); + QTimer::singleShot( 10, this, SLOT ( loadDataAfterStart() )); } MainWindow::~MainWindow() { //qDebug("MainWindow::~MainWindow() "); @@ -425,8 +415,40 @@ MainWindow::~MainWindow() #endif } + +void MainWindow::loadDataAfterStart() +{ + + qDebug("KO: Start loading files..." ); + QTime neededSaveTime = QDateTime::currentDateTime().time(); + mView->loadCalendars(); + int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() ); + qDebug("KO: Calendar loading time: %d ms",msNeeded ); + //QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); + mView->setModified( false ); + mBlockAtStartup = false; + mView->setModified( false ); + connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); + processIncidenceSelection( 0 ); + connect( mView, SIGNAL( incidenceSelected( Incidence * ) ), + SLOT( processIncidenceSelection( Incidence * ) ) ); + connect( mView, SIGNAL( modifiedChanged( bool ) ), + SLOT( slotModifiedChanged( bool ) ) ); + +#ifndef DESKTOP_VERSION + connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); + connect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(recieve( const QCString&, const QByteArray& ))); + disconnect( qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), this, SLOT(receiveStart( const QCString&, const QByteArray& ))); + if ( !mCStringMess.isEmpty() ) + recieve( mCStringMess, mByteData ); +#endif + + + QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); +} + void MainWindow::slotResetFocus() { //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar); mFocusLoop = 3; @@ -539,9 +561,14 @@ void MainWindow::closeEvent( QCloseEvent* ce ) } } - +void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) +{ + qDebug("KO: QCOP start message received: %s ", cmsg.data() ); + mCStringMess = cmsg; + mByteData = data; +} void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) { QDataStream stream( data, IO_ReadOnly ); // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); @@ -2515,8 +2542,9 @@ void MainWindow::importFile( QString fn, bool quick ) setCaption(i18n("Imported file successfully")); } else { setCaption(i18n("Error importing file")); } + mView->updateView(); } } void MainWindow::importIcal() diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 7d3d492..fdcf7c4 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -49,9 +49,11 @@ class MainWindow : public QMainWindow void updateFilterToolbar(); virtual void showMaximized (); void configureAgenda( int ); void recieve( const QCString& msg, const QByteArray& data ); + void receiveStart( const QCString& msg, const QByteArray& data ); protected slots: + void loadDataAfterStart(); void calHint(); void startMultiSync(); void setCaptionToDates(); void weekAction(); @@ -115,8 +117,12 @@ class MainWindow : public QMainWindow void displayText( QString, QString); void enableIncidenceActions( bool ); private: + + QCString mCStringMess; + QByteArray mByteData; + //void setMenuBar( QMenuBar * ); bool mBRdisabled; #ifndef DESKTOP_VERSION QCopChannel* infrared; |