View Single Post
Posts: 114 | Thanked: 109 times | Joined on Nov 2010 @ Finland
#1
1. Make two desktops. One with everything portrait and one with everything landscape. Note the number of each desktop. For example I used no. 1 desktop as landscape desktop and no. 2 as portrait desktop.

My landscape:
and portrait:

2. Make a new Queen beecon widget in the landscape desktop. Add new command:

Code:
if [ "`cat /sys/devices/platform/gpoi-switch/slide/state`" = "closed" ]; then
if [ "$QBW_ORIENTATION_MODE" = "portrait" ]; then
gconftool-2 -s /apps/osso/hildon-desktop/views/current -t int 2
fi
fi
where the bold 2 is the number of my portrait desktop. Change update policy to orientation only.

Make the widget invisible if you wish so.
Now when you you tilt your phone when on landscape desktop it switches to portrait desktop.

3. Do the same on portrait desktop, but change the command to
Code:
if [ "$QBW_ORIENTATION_MODE" = "landscape" ]; then
gconftool-2 -s /apps/osso/hildon-desktop/views/current -t int 1
fi
where the bold 1 is the number of landscape desktop.

Now when tilting your phone between landscape and portrait it should also switch the desktops according to devices orientation.

EDIT: Edited the code, this is not so rude anymore!
EDIT2: Now it doesn't switch to portrait if the keyboard is open

Last edited by Keneraali; 2011-04-20 at 11:16.
 

The Following 9 Users Say Thank You to Keneraali For This Useful Post: