View Single Post
Posts: 47 | Thanked: 32 times | Joined on Nov 2009
#1175
Originally Posted by tomchiverton View Post
Originally Posted by ejasmudar View Post
I think a widget for fast switching between "forced rotation" and "no forced rotation" is required. It can also have orientation lock when CSSU supports it.

Any developers listening?
Yes, I think everyone understands asking end-users to hand-edit a .ini file is not ideal :-)
I have tested this but just re-wrote it on my computer so sorry for any typos. Just get queenbeecon to run this:

Code:
sed -e 's/forcerotation=0/tmpstr/' -e 's/forcerotation=1/forcerotation=0/' -e 's/tmpstr/forcerotation=1/' /usr/share/hildon-desktop/transitions.ini > tmpFile
mv tmpFile /usr/share/hildon-desktop/transitions.ini
This code looks through transitions.ini and flips the forcerotation variable between 1 and 0. So all you'd have to do is copy that text into a file, chmod +x it, and tell queenbeecon to use it.

There's probably a much better way of doing this so that it prints out what state it has changed to, and could also be changed to add the line if it isn't there, but I didn't have time so this is a pretty basic flipper for now.

EDIT: Better version

Last edited by llBlackenedll; 2011-02-25 at 11:33.
 

The Following User Says Thank You to llBlackenedll For This Useful Post: