summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Unidiff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 953f9d0..0f3e4a4 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -247,12 +247,13 @@ public:
247 } 247 }
248 } 248 }
249 } 249 }
250 250
251 static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s) 251 static bool read_widget_rect(const QString &app, bool &maximized, QPoint &p, QSize &s)
252 { 252 {
253#ifndef OPIE_NO_WINDOWED
253 maximized = TRUE; 254 maximized = TRUE;
254 // 350 is the trigger in qwsdefaultdecoration for providing a resize button 255 // 350 is the trigger in qwsdefaultdecoration for providing a resize button
255 if ( qApp->desktop()->width() <= 350 ) 256 if ( qApp->desktop()->width() <= 350 )
256 return FALSE; 257 return FALSE;
257 258
258 Config cfg( "qpe" ); 259 Config cfg( "qpe" );
@@ -268,13 +269,13 @@ public:
268 s.setHeight( l[3].toInt() ); 269 s.setHeight( l[3].toInt() );
269 270
270 maximized = l[4].toInt(); 271 maximized = l[4].toInt();
271 272
272 return TRUE; 273 return TRUE;
273 } 274 }
274 275#endif
275 return FALSE; 276 return FALSE;
276 } 277 }
277 278
278 279
279 static bool validate_widget_size(const QWidget *w, QPoint &p, QSize &s) 280 static bool validate_widget_size(const QWidget *w, QPoint &p, QSize &s)
280 { 281 {
@@ -317,14 +318,14 @@ public:
317 return TRUE; 318 return TRUE;
318 } 319 }
319 320
320 static void store_widget_rect(QWidget *w, QString &app) 321 static void store_widget_rect(QWidget *w, QString &app)
321 { 322 {
322 if( !w ) 323 if( !w )
323 return; 324 return;
324 325#ifndef OPIE_NO_WINDOWED
325 // 350 is the trigger in qwsdefaultdecoration for providing a resize button 326 // 350 is the trigger in qwsdefaultdecoration for providing a resize button
326 if ( qApp->desktop()->width() <= 350 ) 327 if ( qApp->desktop()->width() <= 350 )
327 return; 328 return;
328 // we use these to map the offset of geometry and pos. ( we can only use normalGeometry to 329 // we use these to map the offset of geometry and pos. ( we can only use normalGeometry to
329 // get the non-maximized version, so we have to do it the hard way ) 330 // get the non-maximized version, so we have to do it the hard way )
330 int offsetX = w->x() - w->geometry().left(); 331 int offsetX = w->x() - w->geometry().left();
@@ -339,12 +340,13 @@ public:
339 // Stores the window placement as pos(), size() (due to the offset mapping) 340 // Stores the window placement as pos(), size() (due to the offset mapping)
340 Config cfg( "qpe" ); 341 Config cfg( "qpe" );
341 cfg.setGroup("ApplicationPositions"); 342 cfg.setGroup("ApplicationPositions");
342 QString s; 343 QString s;
343 s.sprintf("%d,%d,%d,%d,%d", r.left() + offsetX, r.top() + offsetY, r.width(), r.height(), w->isMaximized() ); 344 s.sprintf("%d,%d,%d,%d,%d", r.left() + offsetX, r.top() + offsetY, r.width(), r.height(), w->isMaximized() );
344 cfg.writeEntry( app, s ); 345 cfg.writeEntry( app, s );
346#endif
345 } 347 }
346 348
347 static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ ) 349 static bool setWidgetCaptionFromAppName( QWidget* /*mw*/, const QString& /*appName*/, const QString& /*appsPath*/ )
348 { 350 {
349 /* 351 /*
350 // This works but disable it for now until it is safe to apply 352 // This works but disable it for now until it is safe to apply