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 sets both window properties to FALSE.

So basically if it is in portrait mode the app requests portrait mode. 
Should it be like that?

In my understanding it should be that we just set the flag that portrait 
mode is supported and then the framework takes care of rotating?!

It would be great if someone could clarify that.

Thanks!
Conny


Cornelius Hald wrote:
> 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, but I´ve never seen it 
> documented like that. It quite a lot of code only for rotating the screen...
> 
> So is this the recommended way or is there another more hildon-ish way?
> 
> Thanks!
> Conny
> 
> 
> daniel wilms wrote:
>> 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=2951&root=omweather&view=markup
>>  
>> <https://garage.maemo.org/plugins/scmsvn/viewcvs.php/trunk/omweather/src/weather-portrait.c?revision=2951&root=omweather&view=markup>
>>
>> Cheers Daniel
>>
>>
>> 2009/8/21 Cornelius Hald <h...@icandy.de <mailto:h...@icandy.de>>
>>
>>     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 it is not working[1].
>>
>>     What I did is I added the following line to all windows of my
>>     application:
>>
>>     hildon_gtk_window_set_portrait_flags(GTK_WINDOW(win),
>>     HILDON_PORTRAIT_MODE_SUPPORT);
>>
>>     I assume that HILDON_PORTRAIT_MODE_SUPPORT means that this window is
>>     supporting the portrait mode and thus can be rotated. And that
>>     HILDON_PORTRAIT_MODE_REQUEST means that the UI should be switched to
>>     portrait mode no matter what the orientation of the device is, right?
>>
>>     Is there something else I need to do? Did I do something wrong?
>>
>>     Help would be very welcome :)
>>
>>     Thanks!
>>     Conny
>>
>>
>>     [1] http://talk.maemo.org/showthread.php?t=30883
>>     _______________________________________________
>>     maemo-developers mailing list
>>     maemo-developers@maemo.org <mailto:maemo-developers@maemo.org>
>>     https://lists.maemo.org/mailman/listinfo/maemo-developers
>>
>>
> 
> _______________________________________________
> maemo-developers mailing list
> maemo-developers@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-developers

_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers

Reply via email to