projects
/
gc-dialer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b2a0177
)
Tweaking the 'default' orientation choice
author
Ed Page
<eopage@byu.net>
Wed, 20 Apr 2011 02:45:14 +0000
(21:45 -0500)
committer
Ed Page
<eopage@byu.net>
Wed, 20 Apr 2011 02:45:14 +0000
(21:45 -0500)
src/util/qwrappers.py
patch
|
blob
|
history
diff --git
a/src/util/qwrappers.py
b/src/util/qwrappers.py
index
65ec755
..
2c50c8a
100644
(file)
--- a/
src/util/qwrappers.py
+++ b/
src/util/qwrappers.py
@@
-229,12
+229,16
@@
class WindowWrapper(object):
@property
def idealWindowOrientation(self):
@property
def idealWindowOrientation(self):
- if self._app.orientation == self._app.LANDSCAPE_ORIENTATION:
+ if self._app.orientation == self._app.AUTO_ORIENTATION:
+ windowOrientation = self.windowOrientation
+ elif self._app.orientation == self._app.DEFAULT_ORIENTATION:
+ windowOrientation = qui_utils.screen_orientation()
+ elif self._app.orientation == self._app.LANDSCAPE_ORIENTATION:
windowOrientation = QtCore.Qt.Horizontal
elif self._app.orientation == self._app.PORTRAIT_ORIENTATION:
windowOrientation = QtCore.Qt.Vertical
else:
windowOrientation = QtCore.Qt.Horizontal
elif self._app.orientation == self._app.PORTRAIT_ORIENTATION:
windowOrientation = QtCore.Qt.Vertical
else:
- windowOrientation = self.windowOrientation
+ raise RuntimeError("Bad! No %r for you" % self._app.orientation)
return windowOrientation
def walk_children(self):
return windowOrientation
def walk_children(self):