Notices


Reply
Thread Tools
Posts: 123 | Thanked: 456 times | Joined on Feb 2012
#1
Most of the MeeGo 1.2 Harmattan stock applications (excluding a few like Facebook, Twitter, AccuWeather, Maps and Drive) in the Nokia N9 and the Nokia N950 are written using the libmeegotouch UI library. Libmeegotouch allows the orientation of the application to be locked so that it does not rotate freely when the device is rotated. Most of the applications are locked to portrait to emphasize portrait as the primary device orientation. Unfortunately this is done on the UI library level so that there is no easy way to unlock the orientation.

This patch, available from http://vesuri.jormas.com/harmattan/libmeegotouch.html, changes libmeegotouch's MWindow::isOrientationAngleLocked() and MWindow::isOrientationLocked() so that instead of returning the locking value set by the application they return whether the application window's name or class matches one of the names or classes defined by the user in two GConf keys, /meegotouch/orientationlock/names and /meegotouch/orientationlock/classes. Both contain lists of strings, which can
be set using GConfTool using the [value1,value2,value3] format.

A pre-built libmeegotouchcore0 package for Harmattan PR1.3 is provided for those who want to try the patch out. When trying out the patch one should notice that the libmeegotouchcore0 package is installed from the com.nokia.maemo Aegis origin by default and cannot be replaced with a package from a less trusted source. Since force removing and reinstalling the package has the potential of rendering the device useless it is not recommended on a device which has a watchdog enabled. Incepting the package will work, but it should be noted that then the package becomes installed from com.nokia.maemo/local, which may cause problems if there will be an operating system update which includes libmeegotouchcore0.

After installation the orientation of all libmeegotouch applications will be unlocked (after they are restarted). Orientations of specific windows can be locked by setting their names to the /meegotouch/orientationlock/names GConf key as follows:

gconftool -s -t list --list-type=string /meegotouch/orientationlock/names "[Screen Lock]"

Window names can be checked with the xprop utility available in the x11-utils package:

# xprop WM_NAME
WM_NAME(STRING) = "Screen Lock"

Window classes can also be used by setting the classes of the windows to be orientation locked to the /meegotouch/orientationlock/classes key:

gconftool -s -t list --list-type=string /meegotouch/orientationlock/classes "[calc,clock]"

Window classes can also be checked with the xprop utility available in the x11-utils package:

# xprop WM_CLASS
WM_CLASS(STRING) = "calc", "Calc"

The patch checks whether either the name or the class of the class hint exists in the GConf key value.

Since many of the stock applications have not been maintained to work in landscape, an additional theme package is provided to add landscape theming for those stock applications that have not been maintained in landscape.

As always, use at your own risk! There is absolutely no warranty. The author takes no responsibility for problems, loss of data or loss of functionality caused by this patch. Also note that QML applications like Facebook and Twitter do not benefit from this patch.

Last edited by Vesuri; 2012-08-14 at 09:47.
 

The Following 53 Users Say Thank You to Vesuri For This Useful Post:
Morpog's Avatar
Posts: 956 | Thanked: 2,621 times | Joined on Nov 2011
#2
Sounds like incepting it could do the trick to preserve the com.nokia.maemo origin. Anyone going to try out?
 
HtheB's Avatar
Moderator | Posts: 3,457 | Thanked: 5,962 times | Joined on Dec 2009 @ Bize Her Yer Trabzon
#3
Vesuri, did you already tried out incepting it first?
__________________
www.HtheB.com
Please donate if you think I'm doing a good job.
 
Posts: 123 | Thanked: 456 times | Joined on Feb 2012
#4
Originally Posted by HtheB View Post
Vesuri, did you already tried out incepting it first?
It works, but that changes the origin to com.nokia.maemo/local which can cause problems if there ever will be an OS upgrade which contains libmeegotouchcore0.

Last edited by Vesuri; 2012-07-15 at 17:17.
 

The Following User Says Thank You to Vesuri For This Useful Post:
Hariainm's Avatar
Posts: 485 | Thanked: 708 times | Joined on Feb 2010 @ Galiza
#5
This is great! Video anyone, please?
__________________
Adrian Filgueira, @hariainm
 
aironeous's Avatar
Posts: 818 | Thanked: 805 times | Joined on Jun 2009 @ Oxnard, Ca.
#6
This is great as the stock apps that won't do landscape are quite annoying.
 
Posts: 1,320 | Thanked: 913 times | Joined on Feb 2010
#7
Originally Posted by aironeous View Post
This is great as the stock apps that won't do landscape are quite annoying.
Facebook and twitter!
__________________
Well Nokia do at least know how to build a decent phone, just apparently don't know how to support it..

N900 Died Replaced with N8, Requested E7, "Accidentally Broke E7", Now rolling with an N9 and im loving it!


My Contributions

N900 Conversations Wiki Page
 
Posts: 123 | Thanked: 456 times | Joined on Feb 2012
#8
Originally Posted by godofwar424 View Post
Facebook and twitter!
Unfortunately those are not libmeegotouch applications and will not benefit from this patch. Sorry.
 

The Following User Says Thank You to Vesuri For This Useful Post:
Posts: 123 | Thanked: 456 times | Joined on Feb 2012
#9
I'm also working on a theme package which adds landscape theming for those stock applications that have not been maintained in landscape.

Originally Posted by Hariainm View Post
This is great! Video anyone, please?
No video, but here's a screenshot of Phone running in landscape with the theme package installed. The layout is not perfect but at least it's usable:



Also, here's the Calculator in landscape:



Clock:



Music:



Settings:



Store:



Music Store:



The patch, the pre-built libmeegotouch, the theme package and more information can be found from http://vesuri.jormas.com/harmattan/libmeegotouch.html.

Last edited by Vesuri; 2012-07-15 at 18:31.
 

The Following 15 Users Say Thank You to Vesuri For This Useful Post:
Posts: 44 | Thanked: 25 times | Joined on Apr 2012 @ Argentina
#10
in pr1.3?????
 
Reply

Tags
harmattan, nokia n9

Thread Tools

 
Forum Jump


All times are GMT. The time now is 11:28.