Merge landscape rotation fix for PR1.2
authorThomas Perl <thp@thpinfo.com>
Fri, 4 Jun 2010 20:52:21 +0000 (22:52 +0200)
committerThomas Perl <thp@thpinfo.com>
Fri, 4 Jun 2010 20:52:21 +0000 (22:52 +0200)
For PR1.2, the semantics of the portrait mode
flags have slightly changed, so we must not
set the "SUPPORT" flag if we want to stay in
landscape-only mode.

src/portrait.py

index 2af4e67..bc07f00 100644 (file)
@@ -162,7 +162,11 @@ class FremantleRotation(object):
             # Ignore repeated requests
             return
 
-        flags = hildon.PORTRAIT_MODE_SUPPORT
+        flags = 0
+
+        if orientation != self._LANDSCAPE:
+            flags |= hildon.PORTRAIT_MODE_SUPPORT
+
         if orientation == self._PORTRAIT:
             flags |= hildon.PORTRAIT_MODE_REQUEST
 
@@ -186,4 +190,4 @@ class FremantleRotation(object):
             else:
                 # Ignore orientation changes for non-automatic modes, but save
                 # the current orientation for "automatic" mode later on
-                self._last_dbus_orientation = orientation
\ No newline at end of file
+                self._last_dbus_orientation = orientation