summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 779fe54..87a54bf 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -319,56 +319,71 @@ void LauncherTabWidget::paletteChange( const QPalette &p )
319{ 319{
320 QVBox::paletteChange( p ); 320 QVBox::paletteChange( p );
321 QPalette pal = palette(); 321 QPalette pal = palette();
322 pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) ); 322 pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) );
323 pal.setColor( QColorGroup::Background, pal.active().background().light(110) ); 323 pal.setColor( QColorGroup::Background, pal.active().background().light(110) );
324 categoryBar->setPalette( pal ); 324 categoryBar->setPalette( pal );
325 categoryBar->update(); 325 categoryBar->update();
326} 326}
327 327
328void LauncherTabWidget::styleChange( QStyle & ) 328void LauncherTabWidget::styleChange( QStyle & )
329{ 329{
330 QTimer::singleShot( 0, this, SLOT(setProgressStyle()) ); 330 QTimer::singleShot( 0, this, SLOT(setProgressStyle()) );
331} 331}
332 332
333void LauncherTabWidget::setProgressStyle() 333void LauncherTabWidget::setProgressStyle()
334{ 334{
335 if (docLoadingWidgetProgress) { 335 if (docLoadingWidgetProgress) {
336 docLoadingWidgetProgress->setFrameShape( QProgressBar::Box ); 336 docLoadingWidgetProgress->setFrameShape( QProgressBar::Box );
337 docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain ); 337 docLoadingWidgetProgress->setFrameShadow( QProgressBar::Plain );
338 docLoadingWidgetProgress->setMargin( 1 ); 338 docLoadingWidgetProgress->setMargin( 1 );
339 docLoadingWidgetProgress->setLineWidth( 1 ); 339 docLoadingWidgetProgress->setLineWidth( 1 );
340 } 340 }
341} 341}
342 342
343/*
344 * FIXME
345 * The following NULL check is triggered by inserting, then removing a tab on the fly
346 * as you would if you had removable media (which I do). Without this check
347 * the first app launched after a tab removal causes qpe to Segfault.
348 * This obviously has a more sinister cause, but this works around it with no
349 * obvious adverse effects. Please FIXME
350 * bkc - 17/6/2004
351 *
352 */
353
343void LauncherTabWidget::setBusy(bool on) 354void LauncherTabWidget::setBusy(bool on)
344{ 355{
345 if ( on ) 356 if ( on )
346 currentView()->setBusy(TRUE); 357 currentView()->setBusy(TRUE);
347 else { 358 else {
348 for ( int i = 0; i < categoryBar->count(); i++ ) { 359 for ( int i = 0; i < categoryBar->count(); i++ ) {
349 LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; 360 if (categoryBar->tab(i)) {
350 view->setBusy( FALSE ); 361 LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view;
362 view->setBusy( FALSE );
363 } else {
364 odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl;
365 }
351 } 366 }
352 } 367 }
353} 368}
354 369
355void LauncherTabWidget::setBusyIndicatorType( const QString& str ) { 370void LauncherTabWidget::setBusyIndicatorType( const QString& str ) {
356 for (int i = 0; i < categoryBar->count(); i++ ) { 371 for (int i = 0; i < categoryBar->count(); i++ ) {
357 LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view; 372 LauncherView* view = static_cast<LauncherTab*>( categoryBar->tab(i) )->view;
358 view->setBusyIndicatorType( str ); 373 view->setBusyIndicatorType( str );
359 } 374 }
360} 375}
361 376
362LauncherView *LauncherTabWidget::currentView(void) 377LauncherView *LauncherTabWidget::currentView(void)
363{ 378{
364 return (LauncherView*)stack->visibleWidget(); 379 return (LauncherView*)stack->visibleWidget();
365} 380}
366 381
367 382
368 383
369void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &data) 384void LauncherTabWidget::launcherMessage( const QCString &msg, const QByteArray &data)
370{ 385{
371 QDataStream stream( data, IO_ReadOnly ); 386 QDataStream stream( data, IO_ReadOnly );
372 if ( msg == "setTabView(QString,int)" ) { 387 if ( msg == "setTabView(QString,int)" ) {
373 QString id; 388 QString id;
374 stream >> id; 389 stream >> id;