summaryrefslogtreecommitdiff
path: root/core/launcher
Side-by-side diff
Diffstat (limited to 'core/launcher') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp22
-rw-r--r--core/launcher/launcher.cpp16
-rw-r--r--core/launcher/launcher.h2
3 files changed, 15 insertions, 25 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index dcea4b9..1a7de33 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -97,7 +97,11 @@ DocumentList::DocumentList( ServerInterface *serverGui, bool scanDocs,
appLnkSet = new AppLnkSet( MimeType::appsFolderName() );
d = new DocumentListPrivate( serverGui );
- d->scanDocs = scanDocs;
d->needToSendAllDocLinks = false;
+ Config cfg( "Launcher" );
+ cfg.setGroup( "DocTab" );
+ d->scanDocs = cfg.readBoolEntry( "Enable", true );
+ qDebug( "DocumentList::DocumentList() : scanDocs = %d", d->scanDocs );
+
QTimer::singleShot( 10, this, SLOT( startInitialScan() ) );
}
@@ -106,19 +110,5 @@ void DocumentList::startInitialScan()
{
reloadAppLnks();
-
- Config cfg( "Launcher" );
- cfg.setGroup( "DocTab" );
- bool docTabEnabled = cfg.readBoolEntry( "Enable", true );
- if ( docTabEnabled )
- reloadDocLnks();
- else
- {
- if ( d->sendDocLnks && d->serverGui )
- {
- d->serverGui->documentScanningProgress( 0 );
- d->serverGui->allDocumentsRemoved();
- }
- }
-
+ reloadDocLnks();
}
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index b312672..344cd46 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -153,4 +153,5 @@ void LauncherTabWidget::createDocLoadingWidget()
"Use Settings->Launcher->DocTab<p>to reenable it.</b></center>" ) );
docLoadingWidgetProgress->hide();
+ docLoadingWidgetEnabled = true;
}
@@ -502,4 +503,11 @@ Launcher::~Launcher()
}
+ bool Launcher::requiresDocuments() const
+ {
+ Config cfg( "Launcher" );
+ cfg.setGroup( "DocTab" );
+ return cfg.readBoolEntry( "Enable", true );
+}
+
void Launcher::makeVisible()
{
@@ -750,12 +758,4 @@ void Launcher::applicationScanningProgress( int percent )
void Launcher::documentScanningProgress( int percent )
{
- if ( !docTabEnabled )
- {
- qDebug( "Launcher: document tab disabled!" );
- tabs->setLoadingProgress( 100 );
- tabs->setLoadingWidgetEnabled( TRUE );
- return;
- }
-
switch ( percent ) {
case 0: {
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h
index 1d046ee..4f3ff8c 100644
--- a/core/launcher/launcher.h
+++ b/core/launcher/launcher.h
@@ -117,5 +117,5 @@ public:
void documentScanningProgress( int percent );
bool requiresApplications() const { return TRUE; }
- bool requiresDocuments() const { return TRUE; }
+ bool requiresDocuments() const;
void showLoadingDocs();
void showDocTab();