author | sandman <sandman> | 2002-09-30 22:48:46 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-09-30 22:48:46 (UTC) |
commit | 6fdaab436d4fa72b3de06a1a9cf9be0bd964677a (patch) (side-by-side diff) | |
tree | 7e7fb0fdbc5d4c4e2b2da9be790a764b8f45e0a5 /core/launcher/taskbar.cpp | |
parent | 21cacdafcef980a5ef712de6432750128a61ccdb (diff) | |
download | opie-6fdaab436d4fa72b3de06a1a9cf9be0bd964677a.zip opie-6fdaab436d4fa72b3de06a1a9cf9be0bd964677a.tar.gz opie-6fdaab436d4fa72b3de06a1a9cf9be0bd964677a.tar.bz2 |
Changes to use the new ODevice API
-rw-r--r-- | core/launcher/taskbar.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 1feae4a..46bcdb3 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp @@ -48,12 +48,14 @@ #if defined( Q_WS_QWS ) #include <qwsdisplay_qws.h> #include <qgfx_qws.h> #endif +using namespace Opie; + #define FACTORY(T) \ static QWidget *new##T( bool maximized ) { \ QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ if ( maximized ) { \ if ( qApp->desktop()->width() <= 350 ) { \ w->showMaximized(); \ @@ -278,13 +280,19 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) Desktop::soundAlarm(); } else if ( msg == "setLed(int,bool)" ) { int led, status; stream >> led >> status; - ODevice::inst ( )-> setLed ( led, status ? OLED_BlinkSlow : OLED_Off ); + 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 ); + } } } QWidget *TaskBar::calibrate(bool) { #ifdef Q_WS_QWS |