-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 | |||
@@ -188,17 +188,21 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn | |||
188 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); | 188 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); |
189 | QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); | 189 | QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); |
190 | } | 190 | } |
191 | 191 | ||
192 | void TaskBar::setStatusMessage( const QString &text ) | 192 | void TaskBar::setStatusMessage( const QString &text ) |
193 | { | 193 | { |
194 | label->setText( text ); | 194 | if ( !text.isEmpty() ) { |
195 | stack->raiseWidget( label ); | 195 | label->setText( text ); |
196 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) | 196 | stack->raiseWidget( label ); |
197 | sysTray->hide(); | 197 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) |
198 | clearer->start( 3000 ); | 198 | sysTray->hide(); |
199 | clearer->start( 3000, TRUE ); | ||
200 | } else { | ||
201 | clearStatusBar(); | ||
202 | } | ||
199 | } | 203 | } |
200 | 204 | ||
201 | void TaskBar::clearStatusBar() | 205 | void TaskBar::clearStatusBar() |
202 | { | 206 | { |
203 | label->clear(); | 207 | label->clear(); |
204 | stack->raiseWidget(runningAppBar); | 208 | stack->raiseWidget(runningAppBar); |
@@ -209,13 +213,13 @@ void TaskBar::startWait() | |||
209 | { | 213 | { |
210 | waitIcon->setWaiting( true ); | 214 | waitIcon->setWaiting( true ); |
211 | // a catchall stop after 10 seconds... | 215 | // a catchall stop after 10 seconds... |
212 | waitTimer->start( 10 * 1000, true ); | 216 | waitTimer->start( 10 * 1000, true ); |
213 | } | 217 | } |
214 | 218 | ||
215 | void TaskBar::stopWait(const QString& app) | 219 | void TaskBar::stopWait(const QString& /*app*/) |
216 | { | 220 | { |
217 | waitTimer->stop(); | 221 | waitTimer->stop(); |
218 | //mru->addTask(sm->execToLink(app)); | 222 | //mru->addTask(sm->execToLink(app)); |
219 | waitIcon->setWaiting( false ); | 223 | waitIcon->setWaiting( false ); |
220 | } | 224 | } |
221 | 225 | ||
@@ -270,15 +274,18 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) | |||
270 | } else if ( msg == "hideInputMethod()" ) { | 274 | } else if ( msg == "hideInputMethod()" ) { |
271 | inputMethods->hideInputMethod(); | 275 | inputMethods->hideInputMethod(); |
272 | } else if ( msg == "showInputMethod()" ) { | 276 | } else if ( msg == "showInputMethod()" ) { |
273 | inputMethods->showInputMethod(); | 277 | inputMethods->showInputMethod(); |
274 | } else if ( msg == "reloadInputMethods()" ) { | 278 | } else if ( msg == "reloadInputMethods()" ) { |
275 | inputMethods->loadInputMethods(); | 279 | inputMethods->loadInputMethods(); |
280 | } else if ( msg == "reloadApps()" ) { | ||
281 | sm->reloadApps(); | ||
276 | } else if ( msg == "reloadApplets()" ) { | 282 | } else if ( msg == "reloadApplets()" ) { |
277 | sysTray->clearApplets(); | 283 | sysTray->clearApplets(); |
278 | sysTray->addApplets(); | 284 | sysTray->addApplets(); |
285 | sm->reloadApplets(); | ||
279 | } else if ( msg == "soundAlarm()" ) { | 286 | } else if ( msg == "soundAlarm()" ) { |
280 | Desktop::soundAlarm(); | 287 | Desktop::soundAlarm(); |
281 | } | 288 | } |
282 | else if ( msg == "setLed(int,bool)" ) { | 289 | else if ( msg == "setLed(int,bool)" ) { |
283 | int led, status; | 290 | int led, status; |
284 | stream >> led >> status; | 291 | stream >> led >> status; |