Fixing orientation setting
authorEd Page <eopage@byu.net>
Wed, 12 Jan 2011 00:30:58 +0000 (18:30 -0600)
committerEd Page <eopage@byu.net>
Wed, 12 Jan 2011 00:30:58 +0000 (18:30 -0600)
src/util/qui_utils.py

index 2fd8e0c..4cc1f00 100644 (file)
@@ -296,11 +296,11 @@ def _null_set_window_orientation(window, orientation):
 
 def _maemo_set_window_orientation(window, orientation):
        if orientation == QtCore.Qt.Vertical:
-               newHint = QtCore.Qt.WA_Maemo5LandscapeOrientation
-               oldHint = QtCore.Qt.WA_Maemo5PortraitOrientation
-       elif orientation == QtCore.Qt.Horizontal:
                oldHint = QtCore.Qt.WA_Maemo5LandscapeOrientation
                newHint = QtCore.Qt.WA_Maemo5PortraitOrientation
+       elif orientation == QtCore.Qt.Horizontal:
+               oldHint = QtCore.Qt.WA_Maemo5PortraitOrientation
+               newHint = QtCore.Qt.WA_Maemo5LandscapeOrientation
        window.setAttribute(oldHint, False)
        window.setAttribute(newHint, True)