author | sandman <sandman> | 2002-11-17 02:03:01 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-11-17 02:03:01 (UTC) |
commit | 5a1f5ba99dfb754f1be4500dd55dca42b36413b8 (patch) (unidiff) | |
tree | 18b10582e1a4b1d28f5091494a2939fcad5f9de9 | |
parent | d28c78c564f3c6ecad91506c50e2c80e66c1a718 (diff) | |
download | opie-5a1f5ba99dfb754f1be4500dd55dca42b36413b8.zip opie-5a1f5ba99dfb754f1be4500dd55dca42b36413b8.tar.gz opie-5a1f5ba99dfb754f1be4500dd55dca42b36413b8.tar.bz2 |
- enabled the Shutdown button in Shutdown-Settings on OZ
- enabled the LockKeyState indicator for iPAQs (to the right of the clock
applet, since also iPAQs can have keyboards)
- kergoth forgot a QT_QWS_EBX -> QT_QWS_SHARP
- the launcher binary is now exactly the same on iPAQ and Zaurus
-rw-r--r-- | core/launcher/shutdownimpl.cpp | 5 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 8 |
2 files changed, 2 insertions, 11 deletions
diff --git a/core/launcher/shutdownimpl.cpp b/core/launcher/shutdownimpl.cpp index a202b7b..cf4f926 100644 --- a/core/launcher/shutdownimpl.cpp +++ b/core/launcher/shutdownimpl.cpp | |||
@@ -93,53 +93,48 @@ ShutdownImpl::ShutdownImpl( QWidget* parent, const char *name, WFlags fl ) | |||
93 | 93 | ||
94 | m_progress = new QProgressBar ( this, "progressBar" ); | 94 | m_progress = new QProgressBar ( this, "progressBar" ); |
95 | m_progress-> setFrameShape ( QProgressBar::Panel ); | 95 | m_progress-> setFrameShape ( QProgressBar::Panel ); |
96 | m_progress-> setFrameShadow ( QProgressBar::Sunken ); | 96 | m_progress-> setFrameShadow ( QProgressBar::Sunken ); |
97 | m_progress-> setTotalSteps ( 20 ); | 97 | m_progress-> setTotalSteps ( 20 ); |
98 | m_progress-> setIndicatorFollowsStyle ( false ); | 98 | m_progress-> setIndicatorFollowsStyle ( false ); |
99 | vbox-> addWidget ( m_progress ); | 99 | vbox-> addWidget ( m_progress ); |
100 | 100 | ||
101 | vbox-> addItem ( new QSpacerItem ( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); | 101 | vbox-> addItem ( new QSpacerItem ( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); |
102 | 102 | ||
103 | QPushButton *cancel = new QPushButton ( tr( "Cancel" ), this, "cancel" ); | 103 | QPushButton *cancel = new QPushButton ( tr( "Cancel" ), this, "cancel" ); |
104 | changeButtonColor ( cancel, QColor( 181, 222, 178 ) ); | 104 | changeButtonColor ( cancel, QColor( 181, 222, 178 ) ); |
105 | cancel-> setDefault ( true ); | 105 | cancel-> setDefault ( true ); |
106 | cancel-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding, cancel-> sizePolicy ( ). hasHeightForWidth ( ) ) ); | 106 | cancel-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding, cancel-> sizePolicy ( ). hasHeightForWidth ( ) ) ); |
107 | vbox-> addWidget ( cancel ); | 107 | vbox-> addWidget ( cancel ); |
108 | 108 | ||
109 | m_timer = new QTimer ( this ); | 109 | m_timer = new QTimer ( this ); |
110 | connect ( m_timer, SIGNAL( timeout ( ) ), this, SLOT( timeout ( ) ) ); | 110 | connect ( m_timer, SIGNAL( timeout ( ) ), this, SLOT( timeout ( ) ) ); |
111 | 111 | ||
112 | connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( buttonClicked ( int ) ) ); | 112 | connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( buttonClicked ( int ) ) ); |
113 | connect ( cancel, SIGNAL( clicked ( ) ), this, SLOT( cancelClicked ( ) ) ); | 113 | connect ( cancel, SIGNAL( clicked ( ) ), this, SLOT( cancelClicked ( ) ) ); |
114 | 114 | ||
115 | m_progress-> hide ( ); | 115 | m_progress-> hide ( ); |
116 | Global::hideInputMethod ( ); | 116 | Global::hideInputMethod ( ); |
117 | |||
118 | #ifdef QT_QWS_SHARP | ||
119 | |||
120 | shutdown-> hide ( ); | ||
121 | #endif | ||
122 | } | 117 | } |
123 | 118 | ||
124 | void ShutdownImpl::buttonClicked ( int b ) | 119 | void ShutdownImpl::buttonClicked ( int b ) |
125 | { | 120 | { |
126 | m_counter = 0; | 121 | m_counter = 0; |
127 | 122 | ||
128 | switch ( b ) { | 123 | switch ( b ) { |
129 | case 1: | 124 | case 1: |
130 | m_operation = ShutdownSystem; | 125 | m_operation = ShutdownSystem; |
131 | break; | 126 | break; |
132 | case 2: | 127 | case 2: |
133 | m_operation = RebootSystem; | 128 | m_operation = RebootSystem; |
134 | break; | 129 | break; |
135 | case 3: | 130 | case 3: |
136 | m_operation = RestartDesktop; | 131 | m_operation = RestartDesktop; |
137 | break; | 132 | break; |
138 | case 4: | 133 | case 4: |
139 | m_operation = TerminateDesktop; | 134 | m_operation = TerminateDesktop; |
140 | break; | 135 | break; |
141 | } | 136 | } |
142 | m_info-> hide ( ); | 137 | m_info-> hide ( ); |
143 | m_progress-> show ( ); | 138 | m_progress-> show ( ); |
144 | m_timer-> start ( 300 ); | 139 | m_timer-> start ( 300 ); |
145 | timeout ( ); | 140 | timeout ( ); |
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 1e6b74e..b4b7df6 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -61,49 +61,49 @@ using namespace Opie; | |||
61 | w->showMaximized(); \ | 61 | w->showMaximized(); \ |
62 | } else { \ | 62 | } else { \ |
63 | w->resize( QSize( 300, 300 ) ); \ | 63 | w->resize( QSize( 300, 300 ) ); \ |
64 | } \ | 64 | } \ |
65 | } \ | 65 | } \ |
66 | w->show(); \ | 66 | w->show(); \ |
67 | return w; \ | 67 | return w; \ |
68 | } | 68 | } |
69 | 69 | ||
70 | 70 | ||
71 | #ifdef SINGLE_APP | 71 | #ifdef SINGLE_APP |
72 | #define APP(a,b,c,d) FACTORY(b) | 72 | #define APP(a,b,c,d) FACTORY(b) |
73 | #include "../launcher/apps.h" | 73 | #include "../launcher/apps.h" |
74 | #undef APP | 74 | #undef APP |
75 | #endif // SINGLE_APP | 75 | #endif // SINGLE_APP |
76 | 76 | ||
77 | static Global::Command builtins[] = { | 77 | static Global::Command builtins[] = { |
78 | 78 | ||
79 | #ifdef SINGLE_APP | 79 | #ifdef SINGLE_APP |
80 | #define APP(a,b,c,d) { a, new##b, c }, | 80 | #define APP(a,b,c,d) { a, new##b, c }, |
81 | #include "../launcher/apps.h" | 81 | #include "../launcher/apps.h" |
82 | #undef APP | 82 | #undef APP |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_EBX) | 85 | #if defined(QT_QWS_IPAQ) || defined(QT_QWS_CASSIOPEIA) || defined(QT_QWS_SHARP) |
86 | { "calibrate", TaskBar::calibrate, 1, 0 }, | 86 | { "calibrate", TaskBar::calibrate, 1, 0 }, |
87 | #endif | 87 | #endif |
88 | #if !defined(QT_QWS_CASSIOPEIA) | 88 | #if !defined(QT_QWS_CASSIOPEIA) |
89 | { "shutdown", Global::shutdown, 1, 0 }, | 89 | { "shutdown", Global::shutdown, 1, 0 }, |
90 | // { "run", run, 1, 0 }, | 90 | // { "run", run, 1, 0 }, |
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | { 0, TaskBar::calibrate, 0, 0 }, | 93 | { 0, TaskBar::calibrate, 0, 0 }, |
94 | }; | 94 | }; |
95 | 95 | ||
96 | static bool initNumLock() | 96 | static bool initNumLock() |
97 | { | 97 | { |
98 | #ifdef QPE_INITIAL_NUMLOCK_STATE | 98 | #ifdef QPE_INITIAL_NUMLOCK_STATE |
99 | QPE_INITIAL_NUMLOCK_STATE | 99 | QPE_INITIAL_NUMLOCK_STATE |
100 | #endif | 100 | #endif |
101 | return FALSE; | 101 | return FALSE; |
102 | } | 102 | } |
103 | 103 | ||
104 | class LockKeyState : public QWidget | 104 | class LockKeyState : public QWidget |
105 | { | 105 | { |
106 | public: | 106 | public: |
107 | LockKeyState( QWidget *parent ) : | 107 | LockKeyState( QWidget *parent ) : |
108 | QWidget(parent), | 108 | QWidget(parent), |
109 | nl(initNumLock()), cl(FALSE) | 109 | nl(initNumLock()), cl(FALSE) |
@@ -147,54 +147,50 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn | |||
147 | Global::setBuiltinCommands(builtins); | 147 | Global::setBuiltinCommands(builtins); |
148 | 148 | ||
149 | sm = new StartMenu( this ); | 149 | sm = new StartMenu( this ); |
150 | 150 | ||
151 | inputMethods = new InputMethods( this ); | 151 | inputMethods = new InputMethods( this ); |
152 | connect( inputMethods, SIGNAL(inputToggled(bool)), | 152 | connect( inputMethods, SIGNAL(inputToggled(bool)), |
153 | this, SLOT(calcMaxWindowRect()) ); | 153 | this, SLOT(calcMaxWindowRect()) ); |
154 | //new QuickLauncher( this ); | 154 | //new QuickLauncher( this ); |
155 | 155 | ||
156 | stack = new QWidgetStack( this ); | 156 | stack = new QWidgetStack( this ); |
157 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); | 157 | stack->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum ) ); |
158 | label = new QLabel(stack); | 158 | label = new QLabel(stack); |
159 | 159 | ||
160 | //mru = new MRUList( stack ); | 160 | //mru = new MRUList( stack ); |
161 | //stack->raiseWidget( mru ); | 161 | //stack->raiseWidget( mru ); |
162 | 162 | ||
163 | runningAppBar = new RunningAppBar(stack); | 163 | runningAppBar = new RunningAppBar(stack); |
164 | stack->raiseWidget(runningAppBar); | 164 | stack->raiseWidget(runningAppBar); |
165 | 165 | ||
166 | waitIcon = new Wait( this ); | 166 | waitIcon = new Wait( this ); |
167 | (void) new AppIcons( this ); | 167 | (void) new AppIcons( this ); |
168 | 168 | ||
169 | sysTray = new SysTray( this ); | 169 | sysTray = new SysTray( this ); |
170 | 170 | ||
171 | // ## make customizable in some way? | 171 | // ## make customizable in some way? |
172 | #ifdef QT_QWS_SHARP | ||
173 | lockState = new LockKeyState( this ); | 172 | lockState = new LockKeyState( this ); |
174 | #else | ||
175 | lockState = 0; | ||
176 | #endif | ||
177 | 173 | ||
178 | #if defined(Q_WS_QWS) | 174 | #if defined(Q_WS_QWS) |
179 | #if !defined(QT_NO_COP) | 175 | #if !defined(QT_NO_COP) |
180 | QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); | 176 | QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); |
181 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | 177 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), |
182 | this, SLOT(receive(const QCString&, const QByteArray&)) ); | 178 | this, SLOT(receive(const QCString&, const QByteArray&)) ); |
183 | #endif | 179 | #endif |
184 | #endif | 180 | #endif |
185 | waitTimer = new QTimer( this ); | 181 | waitTimer = new QTimer( this ); |
186 | connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); | 182 | connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); |
187 | clearer = new QTimer( this ); | 183 | clearer = new QTimer( this ); |
188 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); | 184 | QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); |
189 | QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); | 185 | QObject::connect(clearer, SIGNAL(timeout()), sysTray, SLOT(show())); |
190 | } | 186 | } |
191 | 187 | ||
192 | void TaskBar::setStatusMessage( const QString &text ) | 188 | void TaskBar::setStatusMessage( const QString &text ) |
193 | { | 189 | { |
194 | if ( !text.isEmpty() ) { | 190 | if ( !text.isEmpty() ) { |
195 | label->setText( text ); | 191 | label->setText( text ); |
196 | stack->raiseWidget( label ); | 192 | stack->raiseWidget( label ); |
197 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) | 193 | if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) |
198 | sysTray->hide(); | 194 | sysTray->hide(); |
199 | clearer->start( 3000, TRUE ); | 195 | clearer->start( 3000, TRUE ); |
200 | } else { | 196 | } else { |