summaryrefslogtreecommitdiff
path: root/core/launcher/taskbar.cpp
Side-by-side diff
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 )
void TaskBar::styleChange( QStyle &s )
{
QHBox::styleChange( s );
calcMaxWindowRect();
}
void TaskBar::calcMaxWindowRect()
{
#ifdef Q_WS_QWS
QRect wr;
int displayWidth = qApp->desktop()->width();
QRect ir = inputMethods->inputRect();
if ( ir.isValid() ) {
wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
} else {
wr.setCoords( 0, 0, displayWidth-1, y()-1 );
}
#if QT_VERSION < 300
QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,
QSize(qt_screen->width(),qt_screen->height()))
);
#else
QWSServer::setMaxWindowRect( wr );
#endif
#endif
}
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();
+ DesktopApplication::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 );
ODevice::inst ( )-> setLedState ( l, status ? ( canblink ? Led_BlinkSlow : Led_On ) : Led_Off );
}
}
+ else if ( msg == "toggleMenu()" ) {
+ if ( sm-> launchMenu-> isVisible ( ))
+ sm-> launch ( );
+ else {
+ QCopEnvelope e ( "QPE/System", "toggleApplicationMenu()" );
+ }
+ }
+ else if ( msg == "toggleStartMenu()" ) {
+ sm-> launch ( );
+ }
}
QWidget *TaskBar::calibrate(bool)
{
#ifdef Q_WS_QWS
Calibrate *c = new Calibrate;
c->show();
return c;
#else
return 0;
#endif
}
void TaskBar::toggleNumLockState()
{
if ( lockState ) lockState->toggleNumLockState();
}
void TaskBar::toggleCapsLockState()
{
if ( lockState ) lockState->toggleCapsLockState();
}
void TaskBar::toggleSymbolInput()
{
if ( inputMethods->currentShown() == "Unicode" ) {
inputMethods->hideInputMethod();
} else {
inputMethods->showInputMethod("Unicode");
}
}
bool TaskBar::recoverMemory()
{
//eturn mru->quitOldApps();
return true;
}