summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-04-07 08:50:40 (UTC)
committer harlekin <harlekin>2003-04-07 08:50:40 (UTC)
commit7e43e12cf57a39f957096889d6b38563f73402df (patch) (unidiff)
treee2f01d497421b6cdae28fec9afcbdc6acdfc1433
parent1725b536c8a5a939a481196cce1dc35af2d9a63a (diff)
downloadopie-7e43e12cf57a39f957096889d6b38563f73402df.zip
opie-7e43e12cf57a39f957096889d6b38563f73402df.tar.gz
opie-7e43e12cf57a39f957096889d6b38563f73402df.tar.bz2
show owait and a message in taskbar while scanning for documents
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp23
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 @@
55#include <qtextstream.h> 55#include <qtextstream.h>
56#include <qpopupmenu.h> 56#include <qpopupmenu.h>
57 57
58#include <opie/owait.h>
59
60
58#include "launcherview.h" 61#include "launcherview.h"
59#include "launcher.h" 62#include "launcher.h"
60#include "syncdialog.h" 63#include "syncdialog.h"
@@ -360,6 +363,7 @@ void CategoryTabWidget::updateLink(const QString& linkfile)
360{ 363{
361 int i=0; 364 int i=0;
362 LauncherView* view; 365 LauncherView* view;
366 qApp->processEvents();
363 while ((view = (LauncherView*)stack->widget(i++))) { 367 while ((view = (LauncherView*)stack->widget(i++))) {
364 if ( view->removeLink(linkfile) ) 368 if ( view->removeLink(linkfile) )
365 break; 369 break;
@@ -728,6 +732,13 @@ void Launcher::updateMimeTypes(AppLnkSet* folder)
728 */ 732 */
729void Launcher::loadDocs() // ok here comes a hack belonging to Global:: 733void Launcher::loadDocs() // ok here comes a hack belonging to Global::
730{ 734{
735
736 OWait *owait = new OWait();
737 Global::statusMessage( tr( "Finding documents" ) );
738
739 owait->show();
740 qApp->processEvents();
741
731 delete docsFolder; 742 delete docsFolder;
732 docsFolder = new DocLnkSet; 743 docsFolder = new DocLnkSet;
733 744
@@ -789,6 +800,8 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
789 // we need to scan the list now. Hopefully the cache will be there 800 // we need to scan the list now. Hopefully the cache will be there
790 // read the mimetypes from the config and search for documents 801 // read the mimetypes from the config and search for documents
791 QStringList mimetypes = configToMime( &cfg); 802 QStringList mimetypes = configToMime( &cfg);
803 qApp->processEvents();
804 Global::statusMessage( tr( "Searching documents" ) );
792 tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") ); 805 tmp = new DocLnkSet( (*it)->path(), mimetypes.join(";") );
793 docsFolder->appendFrom( *tmp ); 806 docsFolder->appendFrom( *tmp );
794 delete tmp; 807 delete tmp;
@@ -803,6 +816,8 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
803 cfg.setGroup("main"); 816 cfg.setGroup("main");
804 cfg.writeEntry("timestamp", newStamp ); 817 cfg.writeEntry("timestamp", newStamp );
805 cfg.write(); 818 cfg.write();
819
820 qApp->processEvents();
806 tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) ); 821 tmp = new DocLnkSet( (*it)->path(), medium.mimeTypes().join(";" ) );
807 docsFolder->appendFrom( *tmp ); 822 docsFolder->appendFrom( *tmp );
808 delete tmp; 823 delete tmp;
@@ -814,6 +829,9 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
814 cfg.setGroup("main" ); 829 cfg.setGroup("main" );
815 bool check = cfg.readBoolEntry("autocheck", true ); 830 bool check = cfg.readBoolEntry("autocheck", true );
816 if( check ){ // find the documents 831 if( check ){ // find the documents
832
833 qApp->processEvents();
834 Global::statusMessage( tr( "Searching documents" ) );
817 tmp = new DocLnkSet( (*it)->path(), configToMime(&cfg ).join(";") ); 835 tmp = new DocLnkSet( (*it)->path(), configToMime(&cfg ).join(";") );
818 docsFolder->appendFrom( *tmp ); 836 docsFolder->appendFrom( *tmp );
819 delete tmp; 837 delete tmp;
@@ -823,6 +841,8 @@ void Launcher::loadDocs() // ok here comes a hack belonging to Global::
823 } 841 }
824 } 842 }
825 m_timeStamp = newStamp; 843 m_timeStamp = newStamp;
844 owait->hide();
845 delete owait;
826} 846}
827 847
828void Launcher::updateTabs() 848void Launcher::updateTabs()
@@ -1104,6 +1124,9 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data)
1104 } else if ( msg == "getAllDocLinks()" ) { 1124 } else if ( msg == "getAllDocLinks()" ) {
1105 loadDocs(); 1125 loadDocs();
1106 1126
1127 // directly show updated docs in document tab
1128 updateDocs();
1129
1107 QString contents; 1130 QString contents;
1108 1131
1109 //Categories cats; 1132 //Categories cats;