summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/desktop.cpp3
-rw-r--r--core/launcher/taskbar.cpp92
2 files changed, 51 insertions, 44 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp
index 85ba160..649862b 100644
--- a/core/launcher/desktop.cpp
+++ b/core/launcher/desktop.cpp
@@ -43,2 +43,5 @@
43#endif 43#endif
44#if defined(QT_QWS_IPAQ)
45#include "qpe/custom-ipaq.h"
46#endif
44 47
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 18d28cb..54777c6 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -37,2 +37,6 @@
37#endif 37#endif
38#if defined(QT_QWS_IPAQ)
39#include "qpe/custom-ipaq.h"
40#endif
41
38 42
@@ -52,12 +56,12 @@
52 static QWidget *new##T( bool maximized ) { \ 56 static QWidget *new##T( bool maximized ) { \
53 QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \ 57 QWidget *w = new T( 0, "test", QWidget::WDestructiveClose | QWidget::WGroupLeader ); \
54 if ( maximized ) { \ 58 if ( maximized ) { \
55 if ( qApp->desktop()->width() <= 350 ) { \ 59 if ( qApp->desktop()->width() <= 350 ) { \
56 w->showMaximized(); \ 60 w->showMaximized(); \
57 } else { \ 61 } else { \
58 w->resize( QSize( 300, 300 ) ); \ 62 w->resize( QSize( 300, 300 ) ); \
59 } \ 63 } \
60 } \ 64 } \
61 w->show(); \ 65 w->show(); \
62 return w; \ 66 return w; \
63 } 67 }
@@ -80,10 +84,10 @@ static Global::Command builtins[] = {
80#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX) 84#if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX)
81 { "calibrate", TaskBar::calibrate,1, 0 }, 85 { "calibrate", TaskBar::calibrate, 1, 0 },
82#endif 86#endif
83#if !defined(QT_QWS_CASSIOPEIA) 87#if !defined(QT_QWS_CASSIOPEIA)
84 { "shutdown", Global::shutdown, 1, 0 }, 88 { "shutdown", Global::shutdown, 1, 0 },
85 // { "run", run, 1, 0 }, 89// { "run", run, 1, 0 },
86#endif 90#endif
87 91
88 { 0, TaskBar::calibrate,0, 0 }, 92 { 0, TaskBar::calibrate, 0, 0 },
89}; 93};
@@ -102,7 +106,7 @@ public:
102 LockKeyState( QWidget *parent ) : 106 LockKeyState( QWidget *parent ) :
103 QWidget(parent), 107 QWidget(parent),
104 nl(initNumLock()), cl(FALSE) 108 nl(initNumLock()), cl(FALSE)
105 { 109 {
106 nl_pm = Resource::loadPixmap("numlock"); 110 nl_pm = Resource::loadPixmap("numlock");
107 cl_pm = Resource::loadPixmap("capslock"); 111 cl_pm = Resource::loadPixmap("capslock");
108 } 112 }
@@ -110,3 +114,3 @@ public:
110 { 114 {
111 return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1); 115 return QSize(nl_pm.width()+2,nl_pm.width()+nl_pm.height()+1);
112 } 116 }
@@ -114,3 +118,3 @@ public:
114 { 118 {
115 nl = !nl; repaint(); 119 nl = !nl; repaint();
116 } 120 }
@@ -118,3 +122,3 @@ public:
118 { 122 {
119 cl = !cl; repaint(); 123 cl = !cl; repaint();
120 } 124 }
@@ -122,8 +126,8 @@ public:
122 { 126 {
123 int y = (height()-sizeHint().height())/2; 127 int y = (height()-sizeHint().height())/2;
124 QPainter p(this); 128 QPainter p(this);
125 if ( nl ) 129 if ( nl )
126 p.drawPixmap(1,y,nl_pm); 130 p.drawPixmap(1,y,nl_pm);
127 if ( cl ) 131 if ( cl )
128 p.drawPixmap(1,y+nl_pm.height()+1,cl_pm); 132 p.drawPixmap(1,y+nl_pm.height()+1,cl_pm);
129 } 133 }
@@ -147,3 +151,3 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn
147 connect( inputMethods, SIGNAL(inputToggled(bool)), 151 connect( inputMethods, SIGNAL(inputToggled(bool)),
148 this, SLOT(calcMaxWindowRect()) ); 152 this, SLOT(calcMaxWindowRect()) );
149 //new QuickLauncher( this ); 153 //new QuickLauncher( this );
@@ -173,3 +177,3 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn
173 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), 177 connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
174 this, SLOT(receive(const QCString&, const QByteArray&)) ); 178 this, SLOT(receive(const QCString&, const QByteArray&)) );
175#endif 179#endif
@@ -188,3 +192,3 @@ void TaskBar::setStatusMessage( const QString &text )
188 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) 192 if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) )
189 sysTray->hide(); 193 sysTray->hide();
190 clearer->start( 3000 ); 194 clearer->start( 3000 );
@@ -237,5 +241,5 @@ void TaskBar::calcMaxWindowRect()
237 if ( ir.isValid() ) { 241 if ( ir.isValid() ) {
238 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 ); 242 wr.setCoords( 0, 0, displayWidth-1, ir.top()-1 );
239 } else { 243 } else {
240 wr.setCoords( 0, 0, displayWidth-1, y()-1 ); 244 wr.setCoords( 0, 0, displayWidth-1, y()-1 );
241 } 245 }
@@ -244,4 +248,4 @@ void TaskBar::calcMaxWindowRect()
244 QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr, 248 QWSServer::setMaxWindowRect( qt_screen->mapToDevice(wr,
245 QSize(qt_screen->width(),qt_screen->height())) 249 QSize(qt_screen->width(),qt_screen->height()))
246 ); 250 );
247#else 251#else
@@ -260,11 +264,11 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
260 } else if ( msg == "hideInputMethod()" ) { 264 } else if ( msg == "hideInputMethod()" ) {
261 inputMethods->hideInputMethod(); 265 inputMethods->hideInputMethod();
262 } else if ( msg == "showInputMethod()" ) { 266 } else if ( msg == "showInputMethod()" ) {
263 inputMethods->showInputMethod(); 267 inputMethods->showInputMethod();
264 } else if ( msg == "reloadInputMethods()" ) { 268 } else if ( msg == "reloadInputMethods()" ) {
265 inputMethods->loadInputMethods(); 269 inputMethods->loadInputMethods();
266 } else if ( msg == "reloadApplets()" ) { 270 } else if ( msg == "reloadApplets()" ) {
267 sysTray->loadApplets(); 271 sysTray->loadApplets();
268 } else if ( msg == "soundAlarm()" ) { 272 } else if ( msg == "soundAlarm()" ) {
269 Desktop::soundAlarm(); 273 Desktop::soundAlarm();
270 } 274 }
@@ -272,5 +276,5 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data )
272 else if ( msg == "setLed(int,bool)" ) { 276 else if ( msg == "setLed(int,bool)" ) {
273 int led, status; 277 int led, status;
274 stream >> led >> status; 278 stream >> led >> status;
275 CUSTOM_LEDS( led, status ); 279 CUSTOM_LEDS( led, status );
276 } 280 }
@@ -303,5 +307,5 @@ void TaskBar::toggleSymbolInput()
303 if ( inputMethods->currentShown() == "Unicode" ) { 307 if ( inputMethods->currentShown() == "Unicode" ) {
304 inputMethods->hideInputMethod(); 308 inputMethods->hideInputMethod();
305 } else { 309 } else {
306 inputMethods->showInputMethod("Unicode"); 310 inputMethods->showInputMethod("Unicode");
307 } 311 }