summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
Unidiff
Diffstat (limited to 'core/launcher/taskbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/taskbar.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index b4b7df6..77035a3 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -235,100 +235,110 @@ void TaskBar::resizeEvent( QResizeEvent *e )
235void TaskBar::styleChange( QStyle &s ) 235void TaskBar::styleChange( QStyle &s )
236{ 236{
237 QHBox::styleChange( s ); 237 QHBox::styleChange( s );
238 calcMaxWindowRect(); 238 calcMaxWindowRect();
239} 239}
240 240
241void TaskBar::calcMaxWindowRect() 241void TaskBar::calcMaxWindowRect()
242{ 242{
243#ifdef Q_WS_QWS 243#ifdef Q_WS_QWS
244 QRect wr; 244 QRect wr;
245 int displayWidth = qApp->desktop()->width(); 245 int displayWidth = qApp->desktop()->width();
246 QRect ir = inputMethods->inputRect(); 246 QRect ir = inputMethods->inputRect();
247 if ( ir.isValid() ) { 247 if ( ir.isValid() ) {
248 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); 248 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
249 } else { 249 } else {
250 wr.setCoords( 0, 0, displayWidth-1, y()-1 ); 250 wr.setCoords( 0, 0, displayWidth-1, y()-1 );
251 } 251 }
252 252
253#if QT_VERSION < 300 253#if QT_VERSION < 300
254 QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr, 254 QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,
255 QSize(qt_screen->width(),qt_screen->height())) 255 QSize(qt_screen->width(),qt_screen->height()))
256 ); 256 );
257#else 257#else
258 QWSServer::setMaxWindowRect( wr ); 258 QWSServer::setMaxWindowRect( wr );
259#endif 259#endif
260#endif 260#endif
261} 261}
262 262
263void TaskBar::receive( const QCString &msg, const QByteArray &data ) 263void TaskBar::receive( const QCString &msg, const QByteArray &data )
264{ 264{
265 QDataStream stream( data, IO_ReadOnly ); 265 QDataStream stream( data, IO_ReadOnly );
266 if ( msg == "message(QString)" ) { 266 if ( msg == "message(QString)" ) {
267 QString text; 267 QString text;
268 stream >> text; 268 stream >> text;
269 setStatusMessage( text ); 269 setStatusMessage( text );
270 } else if ( msg == "hideInputMethod()" ) { 270 } else if ( msg == "hideInputMethod()" ) {
271 inputMethods->hideInputMethod(); 271 inputMethods->hideInputMethod();
272 } else if ( msg == "showInputMethod()" ) { 272 } else if ( msg == "showInputMethod()" ) {
273 inputMethods->showInputMethod(); 273 inputMethods->showInputMethod();
274 } else if ( msg == "reloadInputMethods()" ) { 274 } else if ( msg == "reloadInputMethods()" ) {
275 inputMethods->loadInputMethods(); 275 inputMethods->loadInputMethods();
276 } else if ( msg == "reloadApps()" ) { 276 } else if ( msg == "reloadApps()" ) {
277 sm->reloadApps(); 277 sm->reloadApps();
278 } else if ( msg == "reloadApplets()" ) { 278 } else if ( msg == "reloadApplets()" ) {
279 sysTray->clearApplets(); 279 sysTray->clearApplets();
280 sysTray->addApplets(); 280 sysTray->addApplets();
281 sm->reloadApplets(); 281 sm->reloadApplets();
282 } else if ( msg == "soundAlarm()" ) { 282 } else if ( msg == "soundAlarm()" ) {
283 Desktop::soundAlarm(); 283 DesktopApplication::soundAlarm ( );
284 } 284 }
285 else if ( msg == "setLed(int,bool)" ) { 285 else if ( msg == "setLed(int,bool)" ) {
286 int led, status; 286 int led, status;
287 stream >> led >> status; 287 stream >> led >> status;
288 288
289 QValueList <OLed> ll = ODevice::inst ( )-> ledList ( ); 289 QValueList <OLed> ll = ODevice::inst ( )-> ledList ( );
290 if ( ll. count ( )){ 290 if ( ll. count ( )){
291 OLed l = ll. contains ( Led_Mail ) ? Led_Mail : ll [0]; 291 OLed l = ll. contains ( Led_Mail ) ? Led_Mail : ll [0];
292 bool canblink = ODevice::inst ( )-> ledStateList ( l ). contains ( Led_BlinkSlow ); 292 bool canblink = ODevice::inst ( )-> ledStateList ( l ). contains ( Led_BlinkSlow );
293 293
294 ODevice::inst ( )-> setLedState ( l, status ? ( canblink ? Led_BlinkSlow : Led_On ) : Led_Off ); 294 ODevice::inst ( )-> setLedState ( l, status ? ( canblink ? Led_BlinkSlow : Led_On ) : Led_Off );
295 } 295 }
296 } 296 }
297 else if ( msg == "toggleMenu()" ) {
298 if ( sm-> launchMenu-> isVisible ( ))
299 sm-> launch ( );
300 else {
301 QCopEnvelope e ( "QPE/System", "toggleApplicationMenu()" );
302 }
303 }
304 else if ( msg == "toggleStartMenu()" ) {
305 sm-> launch ( );
306 }
297} 307}
298 308
299QWidget *TaskBar::calibrate(bool) 309QWidget *TaskBar::calibrate(bool)
300{ 310{
301#ifdef Q_WS_QWS 311#ifdef Q_WS_QWS
302 Calibrate *c = new Calibrate; 312 Calibrate *c = new Calibrate;
303 c->show(); 313 c->show();
304 return c; 314 return c;
305#else 315#else
306 return 0; 316 return 0;
307#endif 317#endif
308} 318}
309 319
310void TaskBar::toggleNumLockState() 320void TaskBar::toggleNumLockState()
311{ 321{
312 if ( lockState ) lockState->toggleNumLockState(); 322 if ( lockState ) lockState->toggleNumLockState();
313} 323}
314 324
315void TaskBar::toggleCapsLockState() 325void TaskBar::toggleCapsLockState()
316{ 326{
317 if ( lockState ) lockState->toggleCapsLockState(); 327 if ( lockState ) lockState->toggleCapsLockState();
318} 328}
319 329
320void TaskBar::toggleSymbolInput() 330void TaskBar::toggleSymbolInput()
321{ 331{
322 if ( inputMethods->currentShown() == "Unicode" ) { 332 if ( inputMethods->currentShown() == "Unicode" ) {
323 inputMethods->hideInputMethod(); 333 inputMethods->hideInputMethod();
324 } else { 334 } else {
325 inputMethods->showInputMethod("Unicode"); 335 inputMethods->showInputMethod("Unicode");
326 } 336 }
327} 337}
328 338
329bool TaskBar::recoverMemory() 339bool TaskBar::recoverMemory()
330{ 340{
331 //eturn mru->quitOldApps(); 341 //eturn mru->quitOldApps();
332 return true; 342 return true;
333} 343}
334 344