author | zecke <zecke> | 2004-04-19 07:12:16 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-04-19 07:12:16 (UTC) |
commit | 0b59a16b5a5a179c46ddb3f8c585dbca59b2826e (patch) (side-by-side diff) | |
tree | 3780a3ae09806e781582aefb23ad3040bc15d816 | |
parent | 359b681f32d5c3ac2ea3bfd39a3637d211338bf7 (diff) | |
download | opie-0b59a16b5a5a179c46ddb3f8c585dbca59b2826e.zip opie-0b59a16b5a5a179c46ddb3f8c585dbca59b2826e.tar.gz opie-0b59a16b5a5a179c46ddb3f8c585dbca59b2826e.tar.bz2 |
Small interface update. If we add doctypes disable the viewport() for
updates
-rw-r--r-- | core/launcher/documentlist.cpp | 8 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 10 | ||||
-rw-r--r-- | core/launcher/launcher.h | 2 | ||||
-rw-r--r-- | core/launcher/serverinterface.h | 2 |
4 files changed, 20 insertions, 2 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp index 59dd721..19ceb0f 100644 --- a/core/launcher/documentlist.cpp +++ b/core/launcher/documentlist.cpp @@ -63,17 +63,17 @@ public: void initialize(); const QString nextFile(); const DocLnk *iterate(); bool store( DocLnk* dl ); void estimatedPercentScanned(); void appendDocpath(FileSystem*); - + DocLnkSet dls; QDict<void> reference; QDictIterator<void> *dit; enum { Find, RemoveKnownFiles, MakeUnknownFiles, Done } state; QStringList docPaths; unsigned int docPathsSearched; @@ -185,30 +185,34 @@ void DocumentList::rescan() resume(); } void DocumentList::timerEvent( QTimerEvent *te ) { if ( te->timerId() == d->tid ) { // Do 3 at a time + if ( d->serverGui ) + d->serverGui->aboutToAddBegin(); for (int i = 0; i < 3; i++ ) { const DocLnk *lnk = d->iterate(); if ( lnk ) { add( *lnk ); } else { // stop when done pause(); if ( d->serverGui ) d->serverGui->documentScanningProgress( 100 ); if ( d->needToSendAllDocLinks ) sendAllDocLinks(); break; } - } + } + if ( d->serverGui ) + d->serverGui->aboutToAddEnd(); } } void DocumentList::reloadAppLnks() { if ( d->sendAppLnks && d->serverGui ) { d->serverGui->applicationScanningProgress( 0 ); diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index bf2287d..6afbcd8 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -691,16 +691,26 @@ void Launcher::allApplicationsRemoved() tabs->view( (*it) )->removeAllItems(); } void Launcher::documentAdded( const DocLnk& doc ) { tabs->docView()->addItem( new DocLnk( doc ), FALSE ); } +void Launcher::aboutToAddBegin() +{ + tabs->docView()->setUpdatesEnabled( false ); +} + +void Launcher::aboutToAddEnd() +{ + tabs->docView()->setUpdatesEnabled( true ); +} + void Launcher::showLoadingDocs() { tabs->docView()->hide(); } void Launcher::showDocTab() { if ( tabs->categoryBar->currentView() == tabs->docView() ) diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h index 4f3ff8c..29bd7db 100644 --- a/core/launcher/launcher.h +++ b/core/launcher/launcher.h @@ -105,16 +105,18 @@ public: void typeAdded( const QString& type, const QString& name, const QPixmap& pixmap, const QPixmap& bgPixmap ); void typeRemoved( const QString& type ); void applicationAdded( const QString& type, const AppLnk& doc ); void applicationRemoved( const QString& type, const AppLnk& doc ); void allApplicationsRemoved(); void applicationStateChanged( const QString& name, ApplicationState state ); void documentAdded( const DocLnk& doc ); void documentRemoved( const DocLnk& doc ); + void aboutToAddBegin(); + void aboutToAddEnd(); void allDocumentsRemoved(); void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ); void storageChanged( const QList<FileSystem> & ); void applicationScanningProgress( int percent ); void documentScanningProgress( int percent ); bool requiresApplications() const { return TRUE; } bool requiresDocuments() const; void showLoadingDocs(); diff --git a/core/launcher/serverinterface.h b/core/launcher/serverinterface.h index e57ea51..132766f 100644 --- a/core/launcher/serverinterface.h +++ b/core/launcher/serverinterface.h @@ -45,16 +45,18 @@ public: virtual void applicationRemoved( const QString& type, const AppLnk& doc ) = 0; virtual void allApplicationsRemoved() = 0; // Useful for wait icons, or running application lists etc enum ApplicationState { Launching, Running, Terminated }; virtual void applicationStateChanged( const QString& name, ApplicationState state ) = 0; static const AppLnkSet& appLnks(); // These functions notify of adding, removal and changes of document links used in the documents tab for example + virtual void aboutToAddBegin() {} + virtual void aboutToAddEnd() {} virtual void documentAdded( const DocLnk& doc ) = 0; virtual void documentRemoved( const DocLnk& doc ) = 0; virtual void allDocumentsRemoved() = 0; virtual void documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ) = 0; virtual void storageChanged( const QList<FileSystem> & ) = 0; virtual void applicationScanningProgress( int percent ) = 0; |