-rw-r--r-- | library/qpeapplication.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index dcc1001..34f5e6a 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp | |||
@@ -101,6 +101,7 @@ | |||
101 | 101 | ||
102 | 102 | ||
103 | static bool useBigPixmaps = 0; | 103 | static bool useBigPixmaps = 0; |
104 | static bool saveWindowsPos = 0; | ||
104 | 105 | ||
105 | class HackWidget : public QWidget | 106 | class HackWidget : public QWidget |
106 | { | 107 | { |
@@ -129,6 +130,7 @@ public: | |||
129 | fontSize = cfg.readNumEntry( "FontSize", 10 ); | 130 | fontSize = cfg.readNumEntry( "FontSize", 10 ); |
130 | smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 ); | 131 | smallIconSize = cfg.readNumEntry( "SmallIconSize", 14 ); |
131 | bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); | 132 | bigIconSize = cfg.readNumEntry( "BigIconSize", 32 ); |
133 | saveWindowsPos = cfg.readBoolEntry( "AllowWindowed", false ); | ||
132 | #ifdef OPIE_WITHROHFEEDBACK | 134 | #ifdef OPIE_WITHROHFEEDBACK |
133 | RoH = 0; | 135 | RoH = 0; |
134 | #endif | 136 | #endif |
@@ -250,7 +252,8 @@ public: | |||
250 | 252 | ||
251 | static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s) | 253 | static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s) |
252 | { | 254 | { |
253 | #ifndef OPIE_NO_WINDOWED | 255 | if (!saveWindowsPos) |
256 | return FALSE; | ||
254 | maximized = TRUE; | 257 | maximized = TRUE; |
255 | // 350 is the trigger in qwsdefaultdecoration for providing a resize button | 258 | // 350 is the trigger in qwsdefaultdecoration for providing a resize button |
256 | if ( qApp->desktop()->width() <= 350 ) | 259 | if ( qApp->desktop()->width() <= 350 ) |
@@ -272,8 +275,6 @@ public: | |||
272 | 275 | ||
273 | return TRUE; | 276 | return TRUE; |
274 | } | 277 | } |
275 | #endif | ||
276 | return FALSE; | ||
277 | } | 278 | } |
278 | 279 | ||
279 | 280 | ||
@@ -322,7 +323,8 @@ public: | |||
322 | { | 323 | { |
323 | if( !w ) | 324 | if( !w ) |
324 | return; | 325 | return; |
325 | #ifndef OPIE_NO_WINDOWED | 326 | if (!saveWindowsPos) |
327 | return; | ||
326 | // 350 is the trigger in qwsdefaultdecoration for providing a resize button | 328 | // 350 is the trigger in qwsdefaultdecoration for providing a resize button |
327 | if ( qApp->desktop()->width() <= 350 ) | 329 | if ( qApp->desktop()->width() <= 350 ) |
328 | return; | 330 | return; |
@@ -343,7 +345,6 @@ public: | |||
343 | QString s; | 345 | QString s; |
344 | s.sprintf("%d,%d,%d,%d,%d", r.left() + offsetX, r.top() + offsetY, r.width(), r.height(), w->isMaximized() ); | 346 | s.sprintf("%d,%d,%d,%d,%d", r.left() + offsetX, r.top() + offsetY, r.width(), r.height(), w->isMaximized() ); |
345 | cfg.writeEntry( app, s ); | 347 | cfg.writeEntry( app, s ); |
346 | #endif | ||
347 | } | 348 | } |
348 | 349 | ||
349 | static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) | 350 | static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) |
@@ -2207,6 +2208,11 @@ void QPEApplication::hideOrQuit() | |||
2207 | quit(); | 2208 | quit(); |
2208 | } | 2209 | } |
2209 | 2210 | ||
2211 | bool QPEApplication::isSaveWindowsPos() | ||
2212 | { | ||
2213 | return saveWindowsPos; | ||
2214 | } | ||
2215 | |||
2210 | #if (__GNUC__ > 2 ) && !defined(_OS_MACX_) | 2216 | #if (__GNUC__ > 2 ) && !defined(_OS_MACX_) |
2211 | extern "C" void __cxa_pure_virtual(); | 2217 | extern "C" void __cxa_pure_virtual(); |
2212 | 2218 | ||