Re: Howto enable portrait mode support on Fremantle

2009-08-31 Thread Cornelius Hald
I´ve updated the wiki page with all the information that was provided in this thread. If something is not clear, please feel free to update the page. http://wiki.maemo.org/Using_Fremantle_Widgets#Automatic_Screen_Rotation Thanks again to everyone who answered on this thread, especially Vlad

Re: Howto enable portrait mode support on Fremantle

2009-08-31 Thread Alberto Garcia
On Mon, Aug 31, 2009 at 11:32:37AM +0200, Cornelius Hald wrote: I´ve updated the wiki page with all the information that was provided in this thread. If something is not clear, please feel free to update the page. http://wiki.maemo.org/Using_Fremantle_Widgets#Automatic_Screen_Rotation

Re: Howto enable portrait mode support on Fremantle

2009-08-31 Thread Cornelius Hald
On Mon, 2009-08-31 at 12:23 +0200, Alberto Garcia wrote: Thanks Cornelius for updating the wiki. There's one more thing about rotation that I think hasn't been discussed yet (among other things because it's a relatively recent change) and might be a good idea to mention in the wiki. The

Re: Howto enable portrait mode support on Fremantle

2009-08-25 Thread Cornelius Hald
On Mon, 2009-08-24 at 23:39 +0300, David Weinehall wrote: On mån, 2009-08-24 at 22:12 +0200, ext Cornelius Hald wrote: On Mon, 2009-08-24 at 23:07 +0300, David Weinehall wrote: MCE only listens to the system bus, maybe this is your problem? Unfortunately not, I tried both the system bus

Re: Howto enable portrait mode support on Fremantle

2009-08-25 Thread David Weinehall
On tis, 2009-08-25 at 09:25 +0200, ext Cornelius Hald wrote: On Mon, 2009-08-24 at 23:39 +0300, David Weinehall wrote: On mån, 2009-08-24 at 22:12 +0200, ext Cornelius Hald wrote: On Mon, 2009-08-24 at 23:07 +0300, David Weinehall wrote: MCE only listens to the system bus, maybe this is

Re: Howto enable portrait mode support on Fremantle

2009-08-25 Thread Cornelius Hald
On Tue, 2009-08-25 at 11:32 +0300, David Weinehall wrote: I suspect it's because if you're not running it in --debug-mode, it exits when it notices that it fails to connect to dsme. Check if dsme is running too... That's the only difference --debug-mode should make at least. Ok I see, so I

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread Kimmo Hämäläinen
On Fri, 2009-08-21 at 15:53 +0200, ext Alberto Garcia wrote: On Fri, Aug 21, 2009 at 02:53:01PM +0200, Cornelius Hald wrote: I'll try to summarize how it works (I'm adding Kimmo to Cc in case I'm forgetting something, as the rotating itself is done by the desktop, libhildon only sets a WM

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread Cornelius Hald
Kimmo, thanks for the clarification! I´ll update the wiki article accordingly! Thanks! Conny Kimmo Hämäläinen wrote: On Fri, 2009-08-21 at 15:53 +0200, ext Alberto Garcia wrote: On Fri, Aug 21, 2009 at 02:53:01PM +0200, Cornelius Hald wrote: I'll try to summarize how it works (I'm adding

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread Aniello Del Sorbo
Thanks to everyone for clarifying this. It'll greatly help ! Aniello 2009/8/24 Cornelius Hald h...@icandy.de: Kimmo, thanks for the clarification! I´ll update the wiki article accordingly! Thanks! Conny Kimmo Hämäläinen wrote: On Fri, 2009-08-21 at 15:53 +0200, ext Alberto Garcia wrote:

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread Cornelius Hald
Hello again :) Listening to the DBus messages and setting the SUPPORT/REQUEST flags works and the outcome is as described. Now the only problem left is the orientation detection during startup. When doing the call to MCE_DEVICE_ORIENTATION_GET I'm always getting the following error message: The

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread David Weinehall
On mån, 2009-08-24 at 19:44 +0200, ext Cornelius Hald wrote: Hello again :) Listening to the DBus messages and setting the SUPPORT/REQUEST flags works and the outcome is as described. Now the only problem left is the orientation detection during startup. When doing the call to

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread Cornelius Hald
On Mon, 2009-08-24 at 23:07 +0300, David Weinehall wrote: MCE only listens to the system bus, maybe this is your problem? Unfortunately not, I tried both the system bus and the session bus. On both I get the mentioned error. But thanks for the tip :) Cheers! Conny

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread David Weinehall
On mån, 2009-08-24 at 22:12 +0200, ext Cornelius Hald wrote: On Mon, 2009-08-24 at 23:07 +0300, David Weinehall wrote: MCE only listens to the system bus, maybe this is your problem? Unfortunately not, I tried both the system bus and the session bus. On both I get the mentioned error. But

Re: Howto enable portrait mode support on Fremantle

2009-08-24 Thread Claudio Saavedra
El lun, 24-08-2009 a las 23:39 +0300, David Weinehall escribió: * mce is not running I might be missing something, but mce doesn't seem to be running in the FREMANTLE_X86/ARMEL targets in scratchbox after a simple af-sb-init.sh start You probably need to start it by hand. Feel free to

Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
Hi all! For some time already Conboy has the ability to relayout it´s widget when switched from landscape into portrait mode. Now I wanted to know whether or not the window is actually rotated when the device is rotated, so I asked on tmo and Andre was so kind and did the test. It looks like

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread daniel wilms
Hi Conny, omweather used the orientation switch and it works fine. Perhaps it would help you to have a look at the sources there: https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/omweather/src/weather-portrait.c?revision=2951root=omweatherview=markup Cheers Daniel 2009/8/21 Cornelius

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
Thanks for the pointer Daniel! I was looking at the code, but it seems like they are not using the hildon_gtk_window_set_portrait_flags() function at all. Instead they set those window properties manual and listen on DBus for a orientation change. It´s good to know that it can be done somehow,

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
Just a bit more info to my last post The omweather code is doing the following: - Listens on DBus for device orientation change - If changed to portrait, it sets the window properties HILDON_PORTRAIT_MODE_SUPPORT and HILDON_PORTRAIT_MODE_REQUEST both to TRUE. - If changed to landscape, it

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Vlad Vasiliev
Hi Cornelius. See code in function get_mce_signal_cb in file weather-portrait.c BR, Vlad. Cornelius Hald wrote: Just a bit more info to my last post The omweather code is doing the following: - Listens on DBus for device orientation change - If changed to portrait, it sets the window

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
Hi Vlad, Vlad Vasiliev wrote: See code in function get_mce_signal_cb in file weather-portrait.c thanks for the help :) I see how you are doing it and I´m sure it works. I was just thinking that it should be easier and that it would not be required to listen to DBus by ourself. I will

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Vlad Vasiliev
I think this existing way is correct. Very often, the program will need to reorder some UI elements in window after rotation. Vlad. Cornelius Hald wrote: Just a bit more info to my last post The omweather code is doing the following: - Listens on DBus for device orientation change - If

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
Vlad Vasiliev wrote: I think this existing way is correct. Very often, the program will need to reorder some UI elements in window after rotation. Yes I know, I´m already doing the reordering. For that I listen to changes of the display size using the size-changed signal from GdkScreen.

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Vlad Vasiliev
Cornelius Hald wrote: Vlad Vasiliev wrote: I think this existing way is correct. Very often, the program will need to reorder some UI elements in window after rotation. Yes I know, I´m already doing the reordering. For that I listen to changes of the display size using the size-changed

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
Vlad Vasiliev wrote: I couldn't find the attribute, like Support rotation in the current HildonWindow. http://maemo.org/api_refs/5.0/beta/hildon/hildon-Additions-to-GTK+.html#HildonPortraitFlags And I think that the use of signal size-changed is not the right way.(IMHO) You will need

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Vlad Vasiliev
Cornelius Hald wrote: Vlad Vasiliev wrote: I couldn't find the attribute, like Support rotation in the current HildonWindow. http://maemo.org/api_refs/5.0/beta/hildon/hildon-Additions-to-GTK+.html#HildonPortraitFlags O, yes! I forgot about it. Thanks And I think that the use of signal

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Alberto Garcia
On Fri, Aug 21, 2009 at 10:59:32AM +0200, Cornelius Hald wrote: And I think that the use of signal size-changed is not the right way.(IMHO) You will need control real value size of window. You will need control changing to full screen and revert in window and in next Maemo devices size

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Alberto Garcia
On Fri, Aug 21, 2009 at 09:07:15AM +0200, Cornelius Hald wrote: hildon_gtk_window_set_portrait_flags(GTK_WINDOW(win), HILDON_PORTRAIT_MODE_SUPPORT); Use HILDON_PORTRAIT_MODE_SUPPORT | HILDON_PORTRAIT_MODE_REQUEST I assume that HILDON_PORTRAIT_MODE_SUPPORT means that this window is

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Frantisek Dufka
Alberto Garcia wrote: Landscape is by definition when width height, and portrait when width height Maybe I'm overlooking something, but why would you need any new API? And how would you expect that API to work? Not sure what Fremantle provides but in general there are more modes (90

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
On Fri, 2009-08-21 at 14:04 +0200, Alberto Garcia wrote: On Fri, Aug 21, 2009 at 09:07:15AM +0200, Cornelius Hald wrote: hildon_gtk_window_set_portrait_flags(GTK_WINDOW(win), HILDON_PORTRAIT_MODE_SUPPORT); Use HILDON_PORTRAIT_MODE_SUPPORT | HILDON_PORTRAIT_MODE_REQUEST I assume that

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Andre Klapper
Am Freitag, den 21.08.2009, 14:04 +0200 schrieb Alberto Garcia: On Fri, Aug 21, 2009 at 09:07:15AM +0200, Cornelius Hald wrote: hildon_gtk_window_set_portrait_flags(GTK_WINDOW(win), HILDON_PORTRAIT_MODE_SUPPORT); Use HILDON_PORTRAIT_MODE_SUPPORT | HILDON_PORTRAIT_MODE_REQUEST Maybe you

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Graham Cobb
On Friday 21 August 2009 13:53:01 Cornelius Hald wrote: Sorry for being so slow, but I really don't get it :( You're not the only one! Doesn't make any sense to me either. Graham ___ maemo-developers mailing list maemo-developers@maemo.org

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Alberto Garcia
On Fri, Aug 21, 2009 at 02:37:14PM +0200, Frantisek Dufka wrote: Not sure what Fremantle provides but in general there are more modes (90 vs 270 degrees, 0 vs 180) which may be important to your application because of position of HW buttons or maybe camera input format (may be upside down)

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Andrew Flegg
On Fri, Aug 21, 2009 at 14:15, Graham Cobbg+...@cobb.uk.net wrote: On Friday 21 August 2009 13:53:01 Cornelius Hald wrote: Sorry for being so slow, but I really don't get it :( You're not the only one!  Doesn't make any sense to me either. My interpretation: * You set

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Andrea Grandi
Hi, 2009/8/21 Alberto Garcia agar...@igalia.com: On Fri, Aug 21, 2009 at 02:37:14PM +0200, Frantisek Dufka wrote: Good point. However we don't have that in Fremantle so there's no need for that. I really would like to have a map application similar to the iPhone one, with compass support:

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread API
From: Andrea Grandi a.gra...@gmail.com Hi, 2009/8/21 Alberto Garcia agar...@igalia.com: On Fri, Aug 21, 2009 at 02:37:14PM +0200, Frantisek Dufka wrote: Good point. However we don't have that in Fremantle so there's no need for that. I really would like to have a map application

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Frantisek Dufka
Andrew Flegg wrote: My interpretation: * You set HILDON_PORTRAIT_MODE_SUPPORT _if_ the device is portrait _before_ you open a window. * You pick up events (DBus or size-changed depending on whether you need orientation or just aspect) and then explicitly set

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
On Fri, 2009-08-21 at 14:26 +0100, Andrew Flegg wrote: My interpretation: * You set HILDON_PORTRAIT_MODE_SUPPORT _if_ the device is portrait _before_ you open a window. * You pick up events (DBus or size-changed depending on whether you need orientation or just aspect) and

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Graham Cobb
On Friday 21 August 2009 14:26:33 Andrew Flegg wrote: My interpretation: * You set HILDON_PORTRAIT_MODE_SUPPORT _if_ the device is portrait _before_ you open a window. Why? What happens if the device is portrait before you open a window and you don't set HILDON_PORTRAIT_MODE_SUPPORT?

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
On Fri, 2009-08-21 at 15:44 +0200, Frantisek Dufka wrote: Andrew Flegg wrote: My interpretation: * You set HILDON_PORTRAIT_MODE_SUPPORT _if_ the device is portrait _before_ you open a window. * You pick up events (DBus or size-changed depending on whether you need

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Frantisek Dufka
Graham Cobb wrote: So, why are there two flags? I still don't understand what HILDON_PORTRAIT_MODE_SUPPORT does. This is link that Andre posted before http://wiki.maemo.org/Using_Fremantle_Widgets#Marking_Your_App_As_Portrait_Capable The support flag tells Hildon that it is allowed to rotate

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Alberto Garcia
On Fri, Aug 21, 2009 at 02:53:01PM +0200, Cornelius Hald wrote: I'll try to summarize how it works (I'm adding Kimmo to Cc in case I'm forgetting something, as the rotating itself is done by the desktop, libhildon only sets a WM hint). Let's suppose we open a new window. Before we open that

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Alberto Garcia
On Fri, Aug 21, 2009 at 02:59:38PM +0200, Andre Klapper wrote: hildon_gtk_window_set_portrait_flags(GTK_WINDOW(win), HILDON_PORTRAIT_MODE_SUPPORT); Use HILDON_PORTRAIT_MODE_SUPPORT | HILDON_PORTRAIT_MODE_REQUEST Maybe you could add a few lines / example code to

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
On Fri, 2009-08-21 at 15:52 +0200, Frantisek Dufka wrote: Graham Cobb wrote: So, why are there two flags? I still don't understand what HILDON_PORTRAIT_MODE_SUPPORT does. This is link that Andre posted before

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Cornelius Hald
On Fri, 2009-08-21 at 15:55 +0200, Alberto Garcia wrote: On Fri, Aug 21, 2009 at 02:59:38PM +0200, Andre Klapper wrote: hildon_gtk_window_set_portrait_flags(GTK_WINDOW(win), HILDON_PORTRAIT_MODE_SUPPORT); Use HILDON_PORTRAIT_MODE_SUPPORT | HILDON_PORTRAIT_MODE_REQUEST Maybe

Re: Howto enable portrait mode support on Fremantle

2009-08-21 Thread Attila Csipa
On Friday 21 August 2009 15:42:49 API wrote: I suppose that in this case you should use a library that access directly to the accelerometer, so you app could rotate the map view as you want. It's tricky business. The accelerometers are not really adequate to rotate maps - you'd need a 'real'