Bug 5026 - Add support for hildon_gtk_window_set_portrait_flags and HildonPortraitFlags
: Add support for hildon_gtk_window_set_portrait_flags and HildonPortraitFlags
Status: RESOLVED FIXED
Product: PyMaemo
General
: unspecified
: All Linux
: Low normal (vote)
: ---
Assigned To: Anderson Lizardo
: general
:
:
:
:
  Show dependency tree
 
Reported: 2009-08-30 20:31 UTC by Thomas Perl
Modified: 2009-09-21 23:11 UTC (History)
1 user (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Thomas Perl (reporter) 2009-08-30 20:31:19 UTC
SOFTWARE VERSION:

Fremantle beta 2 with python-hildon version 0.9.0-1maemo1

STEPS TO REPRODUCE THE PROBLEM:

Try to implement rotation support in PyMaemo apps, as described in
http://wiki.maemo.org/Using_Fremantle_Widgets#Automatic_Rotation

EXPECTED OUTCOME:

The "hildon" module provides bindings for

hildon_gtk_window_set_portrait_flags ()

and

enum HildonPortraitFlags

(see
http://maemo.org/api_refs/5.0/beta/hildon/hildon-Additions-to-GTK+.html#hildon-gtk-window-set-portrait-flags)

ACTUAL OUTCOME:

No bindings available

OTHER COMMENTS:

I'd imagine the API would best be mapped like this:

w = hildon.Window() # or hildon.StackableWindow...

w.set_portrait_flags(hildon.PORTRAIT_MODE_REQUEST |
hildon.PORTRAIT_MODE_SUPPORT)

...
Comment 1 Anderson Lizardo 2009-09-16 14:47:21 UTC
*** Bug 5096 has been marked as a duplicate of this bug. ***
Comment 2 Thomas Perl (reporter) 2009-09-21 13:16:11 UTC
I have seen that this landed in the PyMaemo SVN in revision 1320. When can we
expect a new release in Extras-Devel to try this out? Thanks :)
Comment 3 Anderson Lizardo 2009-09-21 23:11:31 UTC
Fixed on python-hildon 0.9.0-1maemo12. Usage example:

>>> import hildon
>>> import gtk
>>> w = gtk.Window()
>>> hildon.hildon_gtk_window_set_portrait_flags(w, hildon.PORTRAIT_MODE_SUPPORT)

please note that you can't use:

w.set_portrait_flags(...)

To support this syntax, we would need to modify pygtk and link it against
hildon, which is not a good idea IMHO.

This might change in the future, towards a more "consistent" API, but for now
let's keep things simple.