maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Patch] Unlock the rotation of most stock applications (https://talk.maemo.org/showthread.php?t=85425)

Vesuri 2012-07-11 10:20

[Patch] Unlock the rotation of most stock applications
 
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.

Morpog 2012-07-11 14:47

Re: [Patch] Unlock the rotation of most stock applications
 
Sounds like incepting it could do the trick to preserve the com.nokia.maemo origin. Anyone going to try out? :D

HtheB 2012-07-11 14:59

Re: [Patch] Unlock the rotation of most stock applications
 
Vesuri, did you already tried out incepting it first?

Vesuri 2012-07-11 17:22

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by HtheB (Post 1236065)
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.

Hariainm 2012-07-11 18:48

Re: [Patch] Unlock the rotation of most stock applications
 
This is great! Video anyone, please?

aironeous 2012-07-11 19:21

Re: [Patch] Unlock the rotation of most stock applications
 
This is great as the stock apps that won't do landscape are quite annoying.

godofwar424 2012-07-11 19:30

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by aironeous (Post 1236259)
This is great as the stock apps that won't do landscape are quite annoying.

Facebook and twitter!

Vesuri 2012-07-11 20:30

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by godofwar424 (Post 1236262)
Facebook and twitter!

Unfortunately those are not libmeegotouch applications and will not benefit from this patch. Sorry. :(

Vesuri 2012-07-11 20:36

Re: [Patch] Unlock the rotation of most stock applications
 
I'm also working on a theme package which adds landscape theming for those stock applications that have not been maintained in landscape.

Quote:

Originally Posted by Hariainm (Post 1236242)
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:

http://vesuri.jormas.com/harmattan/m...cape-phone.png

Also, here's the Calculator in landscape:

http://vesuri.jormas.com/harmattan/m...calculator.png

Clock:

http://vesuri.jormas.com/harmattan/m...cape-clock.png

Music:

http://vesuri.jormas.com/harmattan/m...musicsuite.png

Settings:

http://vesuri.jormas.com/harmattan/m...e-settings.png

Store:

http://vesuri.jormas.com/harmattan/m...e-ovistore.png

Music Store:

http://vesuri.jormas.com/harmattan/m...musicstore.png

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

eennbb 2012-07-13 06:54

Re: [Patch] Unlock the rotation of most stock applications
 
in pr1.3?????

arcean 2012-07-16 19:58

Re: [Patch] Unlock the rotation of most stock applications
 
Thanks for updated theme package :).

jleholeho 2012-07-17 01:59

Re: [Patch] Unlock the rotation of most stock applications
 
just downloaded the .deb file from the first post, tried to install, it didn't go through..."invalid installation package"
??

kai_en 2012-07-17 02:13

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by Vesuri (Post 1236287)
I'm also working on a theme package which adds landscape theming for those stock applications that have not been maintained in landscape.



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:

http://vesuri.jormas.com/harmattan/m...cape-phone.png

Also, here's the Calculator in landscape:

http://vesuri.jormas.com/harmattan/m...calculator.png

Clock:

http://vesuri.jormas.com/harmattan/m...cape-clock.png

Music:

http://vesuri.jormas.com/harmattan/m...musicsuite.png

Settings:

http://vesuri.jormas.com/harmattan/m...e-settings.png

Store:

http://vesuri.jormas.com/harmattan/m...e-ovistore.png

Music Store:

http://vesuri.jormas.com/harmattan/m...musicstore.png

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

At first, I was eager to install this patch to unlock Twitter and FB stock on landscape, then I learned that it wasn't applicable, so I decided not to potentially break my devices.

Then, after viewing the screenshots, I am more determined not to install it at all because frankly, those apps are not meant to be used in landscape mode especially the dialer. Just an opinion I want to share to those who potentially wished to install this. In fact, thread starter should put those screen shots on the first post, so that eager "puppies" can get the visual notice how the patch would affect the system.

wook_sf 2012-07-17 03:13

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by kai_en (Post 1238523)
At first, I was eager to install this patch to unlock Twitter and FB stock on landscape, then I learned that it wasn't applicable, so I decided not to potentially break my devices.

Then, after viewing the screenshots, I am more determined not to install it at all because frankly, those apps are not meant to be used in landscape mode especially the dialer. Just an opinion I want to share to those who potentially wished to install this. In fact, thread starter should put those screen shots on the first post, so that eager "puppies" can get the visual notice how the patch would affect the system.

relax dude, it's your choice to install or not, at least give thumbs up for efforts. it is really awful to use some application in portrait when you have qwerty open, so, as you might read in first post (before editing), author mentioned that it is mainly for n950.
nobody forces you to install anything nor nobody who knows how to fix device gives care about your opinion.
with comments like that you just making developers to work less and if everyone would leave comments like that then we would endup with no devs at all.
so, save your opinion for "fart app" or something like that...

kai_en 2012-07-17 06:10

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by wook_sf (Post 1238535)
relax dude, it's your choice to install or not, at least give thumbs up for efforts. it is really awful to use some application in portrait when you have qwerty open, so, as you might read in first post (before editing), author mentioned that it is mainly for n950.
nobody forces you to install anything nor nobody who knows how to fix device gives care about your opinion.
with comments like that you just making developers to work less and if everyone would leave comments like that then we would endup with no devs at all.
so, save your opinion for "fart app" or something like that...

You might have misunderstood my intention. Sorry for sounding harsh but I would like give clear indications to many people who blindly installed anything they find in this forum a good "heads up" to only install it if you know what it is for or else ended up whining over "Why is this not working on FB and Twitter Apps? This sucks, that sucks!"

I think screen shot helped big time in determining one's preference over patch and a clear indication that twitter and facebook won't work in landscape is a bonus. However, as this thread progresses, all these messages will be lost if it's not put on First or Second post. So I mere advise the thread starter to put these info on 1st page as FYI purposes

I commend the thread starter's good effort by the way and love to see more innovation to come.

Manatus 2012-07-17 07:47

Re: [Patch] Unlock the rotation of most stock applications
 
I've noticed that the browser windows now rotate in multitasking screen. :)

Also switching from landscape browser to multitasking view also mostly preserves the orientation, but not always. I haven't figured out the logic yet what specific condition forces them back to portrait.

Vesuri 2012-07-17 09:34

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by kai_en (Post 1238523)
Then, after viewing the screenshots, I am more determined not to install it at all because frankly, those apps are not meant to be used in landscape mode especially the dialer.

On the N9 it's a matter of taste. However, this patch is mainly for N950 users.

On the N950 there is no reason whatsoever why they wouldn't be "meant to be used" in landscape. Calculator, Settings, Search etc. definitely should be usable with the hardware keyboard open. Even in the Phone the user should be able to enter a phone number using the hardware keyboard and actually see the number entered in the correct orientation. If the loudspeaker or a pair of headphones is used the phone doesn't have to be in portrait to make a phone call.

The Harmattan UI was supposed to work in both portrait and landscape. Some applications were locked in portrait when consumer devices with a hardware keyboard were canceled, leaving the N9 as the only device to truly target Harmattan for. (The N950 was chosen to be a limited developer device running the same software, so the limitations made for the N9 were taken into use in the N950 as well). The patch restores functionality that was originally intended to be in devices that have the hardware keyboard.

Quote:

Originally Posted by kai_en (Post 1238561)
many people who blindly installed anything they find in this forum

If anyone installs anything that requires modifying system packages, be it libmeegotouchcore0 or system-ui or whatever, they need to have a really good understanding of what they are doing and why and what the implications and risks are. Blindly installing anything is asking for trouble - especially if developer mode needs to be activated or even more so if Inception needs to be used.

Indeed, the good thing about this is that no one has to install this. It's good that the screenshots have helped make the decision for you but I'm sure other users can make up their own minds about this.

Quote:

Originally Posted by kai_en (Post 1238561)
However, as this thread progresses, all these messages will be lost if it's not put on First or Second post.

Information about Facebook and Twitter were in comment #8 of this thread and won't be lost. It requires just a little bit of patience to read that far, which is definitely worth it if one doesn't understand what "libmeegotouch" is.

Quote:

Originally Posted by kai_en (Post 1238561)
So I mere advise the thread starter to put these info on 1st page as FYI purposes

They are on the first page as they always were, but Facebook and Twitter are now explicitly mentioned in the original post to make this particular point more evident.

jleholeho 2012-07-18 01:09

Re: [Patch] Unlock the rotation of most stock applications
 
@vesuri:

any idea of "invalid installation package" reason?
thanks

TrD 2012-08-14 09:31

Re: [Patch] Unlock the rotation of most stock applications
 
mines pretty much different on some apps in landscape, music player is pretty much unusable and so is dialer and store wont rotate.
heres few screens:
http://i.imgur.com/9IBy3.png

http://i.imgur.com/8pNza.png
http://i.imgur.com/40T4g.png
http://i.imgur.com/XKyvE.png

N9 on PR1.3

edit:forgot clock app (it has some black mod from N9Qtweak but landscape puts default bg color on the clock side)
http://i.imgur.com/oFjnz.png

Vesuri 2012-08-14 09:43

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by TrD (Post 1251617)
mines pretty much different on some apps in landscape, music player is pretty much unusable and so is dialer and store wont rotate.

That's because you need to install the supplementary theme package as explained in comment #9. The applications have not been maintained in landscape and thus require the missing styles to be added for landscape. The Store won't rotate on the N9, since there is no physical keyboard on the N9 and for some reason Store only opens in landscape if the physical keyboard is open. If a hack like N9Qtweak modifies the theme of the stock applications the modifications probably won't apply to landscape since the landscape themes are provided by a separate package.

From the support page (linked to in the original post):

Quote:

Not all applications have been maintained to look as expected in landscape. In most cases this is only because the theme does not contain proper size/image definitions for landscape. This package contains additional theme files which fix some of the stock applications, such as Phone and Calculator. Music will work properly only in the orientation it was started in (because of a problem in the application itself). The alarm definition clock in the Clock application goes on top of other UI components in landscape but is still usable. Store and Music Store will only start in landscape if the physical keyboard (on the N950) is open. The package also contains a GConf schema for the patched libmeegotouch GConf keys and locks the orientation of those windows that do not work properly in landscape, like the touch screen lock and the call UI.

TrD 2012-08-14 10:42

Re: [Patch] Unlock the rotation of most stock applications
 
ahh thanks, most likely missed that post :P managed to fix Clock app myself already tho

baem90 2012-08-14 10:42

Re: [Patch] Unlock the rotation of most stock applications
 
did someone knows how to fix this situation?

' open native browser when in landscape mode,then open new windows, then have to swipe to get to the page,, then when in the previous windows, the web browser go to portrait orientation instead of in landscape.'

kinda annoyed me sometimes,

topet2k12001 2012-08-15 02:48

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by baem90 (Post 1251651)
did someone knows how to fix this situation?

' open native browser when in landscape mode,then open new windows, then have to swipe to get to the page,, then when in the previous windows, the web browser go to portrait orientation instead of in landscape.'

kinda annoyed me sometimes,

Post #16 says in his observation:

Quote:

Also switching from landscape browser to multitasking view also mostly preserves the orientation, but not always. I haven't figured out the logic yet what specific condition forces them back to portrait.

Schturman 2012-08-21 15:22

Re: [Patch] Unlock the rotation of most stock applications
 
Hi Vesuri
Can you please explain what the order of installation of this 3 packages ? Like this:

Quote:

patch -p0 -i /path/to/libmeegotouch-unlockorientation.patch
/usr/sbin/incept /path/to/libmeegotouchcore0_0.25.10-1+0m8_armel.deb
dpkg -i /path/to/meegotouchtheme-landscape_0.1.1-1_all.deb
or

Quote:

/usr/sbin/incept /path/to/libmeegotouchcore0_0.25.10-1+0m8_armel.deb
patch -p0 -i /path/to/libmeegotouch-unlockorientation.patch
dpkg -i /path/to/meegotouchtheme-landscape_0.1.1-1_all.deb
I ask this because one guy from my thread have problem with installation of patch like in the second order. Can you check this errors please ?

https://www.dropbox.com/s/c11ymj078q...weak-b-7-1.PNG

thanks

chenliangchen 2012-08-22 01:22

Re: [Patch] Unlock the rotation of most stock applications
 
Is it possible to pack all the packages into one whole? Anyway thank you so much for this.

Arie 2012-08-22 01:26

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by chenliangchen (Post 1254373)
Is it possible to pack all the packages into one whole? Anyway thank you so much for this.

you only need 2 packages... what does he need to pack into just one?

is dpkg -i twice too hard?

chenliangchen 2012-08-22 01:30

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by Arie (Post 1254375)
you only need 2 packages... what does he need to pack into just one?

is dpkg -i twice too hard?

1 I'm not quite sure with the order (as above post)

2 I can't install the second deb file as the reason stated in 1st post (will try incept)

3 Do you argue with anyone you see in the forum? Are you the smartest person or whatever? Who you are?!

Arie 2012-08-22 02:10

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by chenliangchen (Post 1254378)
1 I'm not quite sure with the order (as above post)

2 I can't install the second deb file as the reason stated in 1st post (will try incept)

3 Do you argue with anyone you see in the forum? Are you the smartest person or whatever? Who you are?!

1) you incept this:
ftp://ftp.jormas.com/users/vesuri/ha...+0m8_armel.deb

then you install this via dpkg:
ftp://ftp.jormas.com/users/vesuri/ha....1.1-1_all.deb

No, I don't argue with everyone...

Smartest person, I am far from it...

I hope i helped...

chenliangchen 2012-08-22 12:53

Re: [Patch] Unlock the rotation of most stock applications
 
When I try to incept libmeegotouchcore0, it failed because of dependency problems.

Code:

dpkg: dependency problems prevent configuration of libmeegotouchcore0
It this only work for PR1.3?

topet2k12001 2012-08-22 13:09

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by chenliangchen (Post 1254517)
When I try to incept libmeegotouchcore0, it failed because of dependency problems.

Code:

dpkg: dependency problems prevent configuration of libmeegotouchcore0
It this only work for PR1.3?

Looks like it. But you may want to check this out, someone may have packaged a version that works with older firmware: http://talk.maemo.org/showthread.php?t=85456

EDIT #1: Yeah it's for PR 1.3. However, I was trying to get this to work also on PR 1.2 (Beta) on N950. I documented the steps I did to make it work...I will try on the Nokia N9 and see if it will give the same results. :)

Here's my post: http://talk.maemo.org/showpost.php?p...4&postcount=23

EDIT #2: Problems encountered after. :( Will work again to see how to solve. Last solution: upgrade to PR 1.3.

EDIT #3: I took a look at the repackaged version of mikhail for PR1.2, I think the reason why it isn't installing on PR1.2 is because the "owner" (user and group) of the files in the deb need to be changed. :)

tiiagoFernandez 2012-09-29 00:14

Re: [Patch] Unlock the rotation of most stock applications
 
Can you explain how to install it properly?

Also, im a Designer so if you need help doing graphics just give me a buzz :D

suyog 2012-10-06 21:05

Re: [Patch] Unlock the rotation of most stock applications
 
I am also looking for help here.
I incepted libmeegotouchcore0_0.25.10-1+0m8_armel.deb
Then installed meegotouchtheme-landscape_0.1.1-1_all.deb
Then I tried applying patch but got message "patch not found"

I want to know how to resolve this.

But I can see most apps now work in landscape, though music player gets messed up.
Also how can i rotate lockscreen and Low power screen rotatable?

tiiagoFernandez 2012-10-06 22:21

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by suyog (Post 1277391)
I am also looking for help here.
I incepted libmeegotouchcore0_0.25.10-1+0m8_armel.deb
Then installed meegotouchtheme-landscape_0.1.1-1_all.deb
Then I tried applying patch but got message "patch not found"

I want to know how to resolve this.

But I can see most apps now work in landscape, though music player gets messed up.
Also how can i rotate lockscreen and Low power screen rotatable?

My stock dont even rotate.
I know im installing it wrongly.

What you say about lockscreen and lp screen can be achieved my using N9QT app

thedead1440 2012-10-07 02:07

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by suyog (Post 1277391)
Then I tried applying patch but got message "patch not found"

I want to know how to resolve this.


Now tell me, when you get patch not found doesn't it mean the utility "patch" isn't installed in your system?

So just do "apt-get install patch" and proceed to apply the patch...

Please try reading errors and understanding them...

tiiagoFernandez 2012-10-07 02:08

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by thedead1440 (Post 1277453)
Now tell me, when you get patch not found doesn't it mean the utility "patch" isn't installed in your system?

So just do "apt-get install patch" and proceed to apply the patch...

Please try reading errors and understanding them...

Install tutorial? Complete steps?
I really dont get the apt thingy.

Sorry about the coding ignorance :)

thedead1440 2012-10-07 02:14

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by tiiagoFernandez (Post 1277454)
Install tutorial? Complete steps?
I really dont get the apt thingy.

Sorry about the coding ignorance :)

Open terminal:

Code:

devel-su
{your password} default is rootme
apt-get install patch


Voila done ;)

tiiagoFernandez 2012-10-07 02:19

Re: [Patch] Unlock the rotation of most stock applications
 
Then we install the debs?
Because i always got some error at the deb install, and i read someone that was saying it needed a dpkg or something via terminal..

tiiagoFernandez 2012-10-07 02:20

Re: [Patch] Unlock the rotation of most stock applications
 
Does "Incepted" means it need inception?
Cuz i sure dont have it nor want it installed :D

thedead1440 2012-10-07 02:20

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by tiiagoFernandez (Post 1277459)
Then we install the debs?
Because i always got some error at the deb install, and i read someone that was saying it needed a dpkg or something via terminal..

Those above commands is to help you do the patch...

Post the errors you are getting and i'll guide you along :)

thedead1440 2012-10-07 02:21

Re: [Patch] Unlock the rotation of most stock applications
 
Quote:

Originally Posted by tiiagoFernandez (Post 1277460)
Does "Incepted" means it need inception?
Cuz i sure dont have it nor want it installed :D

Yes inception is required...

If you don't want it then you can't use this...simples...


All times are GMT. The time now is 16:50.

vBulletin® Version 3.8.8