-rw-r--r-- | core/launcher/taskbar.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 46bcdb3..7d1aaf1 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp @@ -182,46 +182,50 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn this, SLOT(receive(const QCString&, const QByteArray&)) ); #endif #endif waitTimer = new QTimer( this ); connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); clearer = new QTimer( this ); QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); } void TaskBar::setStatusMessage( const QString &text ) { - label->setText( text ); - stack->raiseWidget( label ); - if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) - sysTray->hide(); - clearer->start( 3000 ); + if ( !text.isEmpty() ) { + label->setText( text ); + stack->raiseWidget( label ); + if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) + sysTray->hide(); + clearer->start( 3000, TRUE ); + } else { + clearStatusBar(); + } } void TaskBar::clearStatusBar() { label->clear(); stack->raiseWidget(runningAppBar); // stack->raiseWidget( mru ); } void TaskBar::startWait() { waitIcon->setWaiting( true ); // a catchall stop after 10 seconds... waitTimer->start( 10 * 1000, true ); } -void TaskBar::stopWait(const QString& app) +void TaskBar::stopWait(const QString& /*app*/) { waitTimer->stop(); //mru->addTask(sm->execToLink(app)); waitIcon->setWaiting( false ); } void TaskBar::stopWait() { waitTimer->stop(); waitIcon->setWaiting( false ); } @@ -264,27 +268,30 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) { QDataStream stream( data, IO_ReadOnly ); if ( msg == "message(QString)" ) { QString text; stream >> text; setStatusMessage( text ); } else if ( msg == "hideInputMethod()" ) { inputMethods->hideInputMethod(); } else if ( msg == "showInputMethod()" ) { inputMethods->showInputMethod(); } else if ( msg == "reloadInputMethods()" ) { inputMethods->loadInputMethods(); + } else if ( msg == "reloadApps()" ) { + sm->reloadApps(); } else if ( msg == "reloadApplets()" ) { sysTray->clearApplets(); sysTray->addApplets(); + sm->reloadApplets(); } else if ( msg == "soundAlarm()" ) { Desktop::soundAlarm(); } else if ( msg == "setLed(int,bool)" ) { int led, status; stream >> led >> status; QValueList <OLed> ll = ODevice::inst ( )-> ledList ( ); if ( ll. count ( )) { OLed l = ll. contains ( Led_Mail ) ? Led_Mail : ll [0]; bool canblink = ODevice::inst ( )-> ledStateList ( l ). contains ( Led_BlinkSlow ); |