author | ar <ar> | 2004-04-19 19:38:01 (UTC) |
---|---|---|
committer | ar <ar> | 2004-04-19 19:38:01 (UTC) |
commit | a57416ce6dc62bfd2b57d87434c04417ad23cbc5 (patch) (unidiff) | |
tree | 183a53a52327a2fe826203bae06ec1a95eb4f5c1 /library/qpeapplication.cpp | |
parent | 23edaa3c2240ae3792b507acf55996660c048336 (diff) | |
download | opie-a57416ce6dc62bfd2b57d87434c04417ad23cbc5.zip opie-a57416ce6dc62bfd2b57d87434c04417ad23cbc5.tar.gz opie-a57416ce6dc62bfd2b57d87434c04417ad23cbc5.tar.bz2 |
- BigScreen: show MainWidget not maximized on big screens
-rw-r--r-- | library/qpeapplication.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 755fb19..cf76000 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -155,60 +155,49 @@ public: | |||
155 | while((r=qcopq.dequeue())) { | 155 | while((r=qcopq.dequeue())) { |
156 | // remove from queue before sending... | 156 | // remove from queue before sending... |
157 | // event loop can come around again before getting | 157 | // event loop can come around again before getting |
158 | // back from sendLocally | 158 | // back from sendLocally |
159 | #ifndef QT_NO_COP | 159 | #ifndef QT_NO_COP |
160 | QCopChannel::sendLocally( r->channel, r->message, r->data ); | 160 | QCopChannel::sendLocally( r->channel, r->message, r->data ); |
161 | #endif | 161 | #endif |
162 | 162 | ||
163 | delete r; | 163 | delete r; |
164 | } | 164 | } |
165 | } | 165 | } |
166 | static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) | 166 | static void show_mx(QWidget* mw, bool nomaximize, const QString & = QString::null ) |
167 | { | 167 | { |
168 | 168 | ||
169 | // ugly hack, remove that later after finding a sane solution | 169 | // ugly hack, remove that later after finding a sane solution |
170 | // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, | 170 | // Addendum: Only Sharp currently has models with high resolution but (physically) small displays, |
171 | // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has | 171 | // so this is only useful if QT_QWS_SIMPAD is NOT defined. E.g. SIMpad has 800x600 but has |
172 | // a (physically) large enough display to use the small icons | 172 | // a (physically) large enough display to use the small icons |
173 | #if defined(OPIE_HIGH_RES_SMALL_PHY) | 173 | #if defined(OPIE_HIGH_RES_SMALL_PHY) |
174 | if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { | 174 | if ( QPEApplication::desktop() ->width() >= 600 && ( mw->inherits("QMainWindow") || mw->isA("QMainWindow") ) ) { |
175 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); | 175 | ( ( QMainWindow* ) mw )->setUsesBigPixmaps( true ); |
176 | } | 176 | } |
177 | #endif | 177 | #endif |
178 | 178 | ||
179 | if ( mw->layout() && mw->inherits("QDialog") ) { | 179 | QPEApplication::showWidget( mw, nomaximize ); |
180 | QPEApplication::showDialog((QDialog*)mw, nomaximize); | ||
181 | } | ||
182 | else { | ||
183 | #ifdef Q_WS_QWS | ||
184 | if ( !nomaximize ) | ||
185 | mw->showMaximized(); | ||
186 | else | ||
187 | #endif | ||
188 | |||
189 | mw->show(); | ||
190 | } | ||
191 | } | 180 | } |
192 | static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) | 181 | static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) |
193 | { | 182 | { |
194 | /* | 183 | /* |
195 | // This works but disable it for now until it is safe to apply | 184 | // This works but disable it for now until it is safe to apply |
196 | // What is does is scan the .desktop files of all the apps for | 185 | // What is does is scan the .desktop files of all the apps for |
197 | // the applnk that has the corresponding argv[0] as this program | 186 | // the applnk that has the corresponding argv[0] as this program |
198 | // then it uses the name stored in the .desktop file as the caption | 187 | // then it uses the name stored in the .desktop file as the caption |
199 | // for the main widget. This saves duplicating translations for | 188 | // for the main widget. This saves duplicating translations for |
200 | // the app name in the program and in the .desktop files. | 189 | // the app name in the program and in the .desktop files. |
201 | 190 | ||
202 | AppLnkSet apps( appsPath ); | 191 | AppLnkSet apps( appsPath ); |
203 | 192 | ||
204 | QList<AppLnk> appsList = apps.children(); | 193 | QList<AppLnk> appsList = apps.children(); |
205 | for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { | 194 | for ( QListIterator<AppLnk> it(appsList); it.current(); ++it ) { |
206 | if ( (*it)->exec() == appName ) { | 195 | if ( (*it)->exec() == appName ) { |
207 | mw->setCaption( (*it)->name() ); | 196 | mw->setCaption( (*it)->name() ); |
208 | return TRUE; | 197 | return TRUE; |
209 | } | 198 | } |
210 | } | 199 | } |
211 | */ | 200 | */ |
212 | return FALSE; | 201 | return FALSE; |
213 | } | 202 | } |
214 | 203 | ||