summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.cpp
authoralwin <alwin>2004-11-11 21:10:16 (UTC)
committer alwin <alwin>2004-11-11 21:10:16 (UTC)
commitd2d25a3c1e60a34436cd93e5214a35b3edd05c6c (patch) (unidiff)
tree0c1bd62dd09e7a86292399f68c823b7eb6ae031e /core/launcher/launcher.cpp
parente85cf7184c3444e26c1858d0564fa5d3614dd7b5 (diff)
downloadopie-d2d25a3c1e60a34436cd93e5214a35b3edd05c6c.zip
opie-d2d25a3c1e60a34436cd93e5214a35b3edd05c6c.tar.gz
opie-d2d25a3c1e60a34436cd93e5214a35b3edd05c6c.tar.bz2
- flush icon cache if reloading all documents
- send QCop message when the doctab is enabled/disabled so the disabled widget appears or the doc-list will reread
Diffstat (limited to 'core/launcher/launcher.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp107
1 files changed, 64 insertions, 43 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index ccc2114..970b8cb 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -390,47 +390,47 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
390 if ( msg == "setTabView(QString,int)" ) { 390 if ( msg == "setTabView(QString,int)" ) {
391 QString id; 391 QString id;
392 stream >> id; 392 stream >> id;
393 int mode; 393 int mode;
394 stream >> mode; 394 stream >> mode;
395 if ( view(id) ) 395 if ( view(id) )
396 view(id)->setViewMode( (LauncherView::ViewMode)mode ); 396 view(id)->setViewMode( (LauncherView::ViewMode)mode );
397 } else if ( msg == "setTabBackground(QString,int,QString)" ) { 397 } else if ( msg == "setTabBackground(QString,int,QString)" ) {
398 QString id; 398 QString id;
399 stream >> id; 399 stream >> id;
400 int mode; 400 int mode;
401 stream >> mode; 401 stream >> mode;
402 QString pixmapOrColor; 402 QString pixmapOrColor;
403 stream >> pixmapOrColor; 403 stream >> pixmapOrColor;
404 if ( view(id) ) 404 if ( view(id) )
405 view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); 405 view(id)->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor );
406 if ( id == "Documents" ) 406 if ( id == "Documents" )
407 docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor ); 407 docLoadingWidget->setBackgroundType( (LauncherView::BackgroundType)mode, pixmapOrColor );
408 } else if ( msg == "setTextColor(QString,QString)" ) { 408 } else if ( msg == "setTextColor(QString,QString)" ) {
409 QString id; 409 QString id;
410 stream >> id; 410 stream >> id;
411 QString color; 411 QString color;
412 stream >> color; 412 stream >> color;
413 if ( view(id) ) 413 if ( view(id) )
414 view(id)->setTextColor( QColor(color) ); 414 view(id)->setTextColor( QColor(color) );
415 if ( id == "Documents" ) 415 if ( id == "Documents" )
416 docLoadingWidget->setTextColor( QColor(color) ); 416 docLoadingWidget->setTextColor( QColor(color) );
417 } else if ( msg == "setFont(QString,QString,int,int,int)" ) { 417 } else if ( msg == "setFont(QString,QString,int,int,int)" ) {
418 QString id; 418 QString id;
419 stream >> id; 419 stream >> id;
420 QString fam; 420 QString fam;
421 stream >> fam; 421 stream >> fam;
422 int size; 422 int size;
423 stream >> size; 423 stream >> size;
424 int weight; 424 int weight;
425 stream >> weight; 425 stream >> weight;
426 int italic; 426 int italic;
427 stream >> italic; 427 stream >> italic;
428 if ( view(id) ) { 428 if ( view(id) ) {
429 if ( !fam.isEmpty() ) { 429 if ( !fam.isEmpty() ) {
430 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) ); 430 view(id)->setViewFont( QFont(fam, size, weight, italic!=0) );
431 odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl; 431 odebug << "setFont: " << fam << ", " << size << ", " << weight << ", " << italic << "" << oendl;
432 } else { 432 } else {
433 view(id)->clearViewFont(); 433 view(id)->clearViewFont();
434 }
434 } 435 }
435 }
436 }else if ( msg == "setBusyIndicatorType(QString)" ) { 436 }else if ( msg == "setBusyIndicatorType(QString)" ) {
@@ -443,4 +443,9 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
443 categoryBar->nextTab(); 443 categoryBar->nextTab();
444 }else 444 }else {
445 static_cast<QWidget*>(parent())->raise(); 445 static_cast<QWidget*>(parent())->raise();
446 }
447 } else if (msg=="doctabEnabled(int)") {
448 int id; stream >> id;
449 odebug << "Doctab enabled " << id << oendl;
450 reCheckDoctab(id);
446 } 451 }
@@ -448,3 +453,19 @@ void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &
448 453
449 454void LauncherTabWidget::reCheckDoctab(int how)
455{
456 if ((bool)how == docTabEnabled) {
457 /* nothing to do */
458 return;
459 }
460 if (docLoadingWidget) {
461 stack->removeWidget(docLoadingWidget);
462 delete docLoadingWidget;
463 docLoadingWidget = 0;
464 }
465 createDocLoadingWidget();
466 {
467 QCopEnvelope( "QPE/System", "reforceDocuments()" );
468 odebug << "Sending doc rescan" << oendl;
469 }
470}
450 471