-rw-r--r-- | core/launcher/launcher.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index e74301c..3eb561a 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -55,6 +55,9 @@ #include <qtextstream.h> #include <qpopupmenu.h> +#include <opie/owait.h> + + #include "launcherview.h" #include "launcher.h" #include "syncdialog.h" @@ -360,6 +363,7 @@ void CategoryTabWidget::updateLink(const QString& linkfile) { int i=0; LauncherView* view; + qApp->processEvents(); while ((view = (LauncherView*)stack->widget(i++))) { if ( view->removeLink(linkfile) ) break; @@ -728,6 +732,13 @@ void Launcher::updateMimeTypes(AppLnkSet* folder) */ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: { + + OWait *owait = new OWait(); + Global::statusMessage( tr( "Finding documents" ) ); + + owait->show(); + qApp->processEvents(); + delete docsFolder; docsFolder = new DocLnkSet; @@ -789,6 +800,8 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: // we need to scan the list now. Hopefully the cache will be there // read the mimetypes from the config and search for documents QStringList mimetypes = configToMime( &cfg); + qApp->processEvents(); + Global::statusMessage( tr( "Searching documents" ) ); tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") ); docsFolder->appendFrom( *tmp ); delete tmp; @@ -803,6 +816,8 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: cfg.setGroup("main"); cfg.writeEntry("timestamp", newStamp ); cfg.write(); + + qApp->processEvents(); tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) ); docsFolder->appendFrom( *tmp ); delete tmp; @@ -814,6 +829,9 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: cfg.setGroup("main" ); bool check = cfg.readBoolEntry("autocheck", true ); if( check ){ // find the documents + + qApp->processEvents(); + Global::statusMessage( tr( "Searching documents" ) ); tmp = new DocLnkSet( (*it)->path(), configToMime(&cfg ).join(";") ); docsFolder->appendFrom( *tmp ); delete tmp; @@ -823,6 +841,8 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global:: } } m_timeStamp = newStamp; + owait->hide(); + delete owait; } void Launcher::updateTabs() @@ -1104,6 +1124,9 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data) } else if ( msg == "getAllDocLinks()" ) { loadDocs(); + // directly show updated docs in document tab + updateDocs(); + QString contents; // Categories cats; |