X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fhildonize.py;fp=src%2Fhildonize.py;h=77d585a580d1acd92e239c685bd3c64c1babdc41;hb=e4f7764f4ef7e2615608b95e4537656eafb9bab0;hp=09ee705d9115b013c0f4ee69d4421506e6d33a24;hpb=a1ead3e1b673a7288a6c724552ea9837e05f9285;p=quicknote diff --git a/src/hildonize.py b/src/hildonize.py index 09ee705..77d585a 100755 --- a/src/hildonize.py +++ b/src/hildonize.py @@ -277,30 +277,16 @@ else: hildonize_text_entry = _null_hildonize_text_entry -def _hildon_mark_window_rotatable(window): - # gtk documentation is unclear whether this does a "=" or a "|=" - window.set_flags(hildon.HILDON_PORTRAIT_MODE_SUPPORT) - - -def _null_mark_window_rotatable(window): - pass - - -try: - hildon.HILDON_PORTRAIT_MODE_SUPPORT - mark_window_rotatable = _hildon_mark_window_rotatable -except AttributeError: - mark_window_rotatable = _null_mark_window_rotatable - - def _hildon_window_to_portrait(window): # gtk documentation is unclear whether this does a "=" or a "|=" - window.set_flags(hildon.HILDON_PORTRAIT_MODE_SUPPORT) + flags = hildon.PORTRAIT_MODE_SUPPORT | hildon.PORTRAIT_MODE_REQUEST + hildon.hildon_gtk_window_set_portrait_flags(window, flags) def _hildon_window_to_landscape(window): # gtk documentation is unclear whether this does a "=" or a "&= ~" - window.unset_flags(hildon.HILDON_PORTRAIT_MODE_REQUEST) + flags = hildon.PORTRAIT_MODE_SUPPORT + hildon.hildon_gtk_window_set_portrait_flags(window, flags) def _null_window_to_portrait(window): @@ -312,8 +298,9 @@ def _null_window_to_landscape(window): try: - hildon.HILDON_PORTRAIT_MODE_SUPPORT - hildon.HILDON_PORTRAIT_MODE_REQUEST + hildon.PORTRAIT_MODE_SUPPORT + hildon.PORTRAIT_MODE_REQUEST + hildon.hildon_gtk_window_set_portrait_flags window_to_portrait = _hildon_window_to_portrait window_to_landscape = _hildon_window_to_landscape