Active Topics

 


Reply
Thread Tools
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#21
Originally Posted by Venemo View Post
Well, it appears that I'm going to solve it in a matter of minutes, thanks to you - as you already posted 2 possible solutions for it.



Yes, but I could take care of remembering their positions myself.



Yes, but this way, adding that one widget is needed (not very user friendly compared to what my purpose is), so I'll go with your next proposal.



Ahh, this is it!
Some nice people on #qt-maemo also recommended this approach. On the bottom of this page, there is a small description about what is needed - it seems pretty straightforward.

Thank you very much!
Bummer I was hoping to have a nice quite night watching the football, but will have to try this out on Python
__________________
N900_Email_Options Wiki Page
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#22
Originally Posted by mikec View Post
Bummer I was hoping to have a nice quite night watching the football, but will have to try this out on Python
This should be interesting - I cannot wait to see the result.
 
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#23
Originally Posted by Venemo View Post
This should be interesting - I cannot wait to see the result.
seems that the Qt::WA_Maemo5DesktopApplet attribute is missing from the Python bindings . atilla77 is going to see why its missing from the documentation, which was why it was not included.
__________________
N900_Email_Options Wiki Page
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#24
Originally Posted by mikec View Post
seems that the Qt::WA_Maemo5DesktopApplet attribute is missing from the Python bindings
Hm.
I have never heard about that attribute.
All my code is working without it - expect to see some souce code soon.

EDIT: It seems that this attribute doesn't exist at all.

Last edited by Venemo; 2010-06-14 at 02:15.
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#25
Okay, I have completed the first iteration.

Big thanks to the authors of qt-example-hildondesktopwidget, and also the helpful people on #qt-maemo along with qwerty12 who helped me achieve this!
Also thanks to the author of evehomescreen - I got the idea of the nice transculent look from him.

You can find the source in this repo (specifically: header and source)
A working example is the EveMaemoWidget in here.
Feel free to grab your copy - it is free software.
(The licensing of the entire app is EUPL.)

It also persists the last position of the widgets with QSettings - it identifies them with a unique string (customizable) and loads the settings accordingly.

A quick screenshot of two Eve Widgets on my home screen:



The first character is mine, the other is a friend's.
The good thing about this stuff is that I can add as many of them to as many desktops as I want.

Last edited by Venemo; 2010-06-14 at 08:20.
 

The Following 2 Users Say Thank You to Venemo For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#26
Originally Posted by mikec View Post
seems that the Qt::WA_Maemo5DesktopApplet attribute is missing from the Python bindings . atilla77 is going to see why its missing from the documentation, which was why it was not included.
Mike, it seems it's old, deprecated stuff, so if you have C++ that uses it, it's a ticking time bomb anyway...
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#27
Originally Posted by attila77 View Post
Mike, it seems it's old, deprecated stuff, so if you have C++ that uses it, it's a ticking time bomb anyway...
For me, that is not working with C++, either.
It seems that it was a concept that didn't made it into the final release.
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#28
Okay, I now have a working solution. It is still rudimentary, but I'm still working on it.

Big thanks to alterego and w00t who helped me on IRC with their ideas. (Without w00t's help with Maemo & Qt develpoment, I'd be still nowhere, and alterego was the person whose idea finally solved the problem with re-adding the widgets to where they belong.)
  • I'm able to add as many widgets as I want from my application
  • The widgets remember their position and the number of the homescreen they were on
  • After shutdown, it remembers what widgets were on the desktop and re-adds them when the user scrolls to that desktop
  • These widgets don't run under hildon-home, so the won't bring it down in case of a crash

Several developers expressed thei wish to use this solution in their own applications, so I decided to put it into a separate library to allow easy reusing. (alterego said he would make python bindings for it.)

Any suggestions and general advices about publishing libraries in the repos are welcome.

Last edited by Venemo; 2010-06-20 at 08:19.
 

The Following User Says Thank You to Venemo For This Useful Post:
Posts: 724 | Thanked: 1,255 times | Joined on Nov 2007 @ Cambridge, UK
#29
Actually, I was just going to implement the solution in Python, seems like an easier approach than delving into writing Python bindings :/
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#30
Originally Posted by tswindell View Post
Actually, I was just going to implement the solution in Python, seems like an easier approach than delving into writing Python bindings :/
Alterego said that it is pretty straightforward, so I think you should see his result in a few days. Although it is a nice exercise if you want to deep dive into hildon desktop's workigs.

However, I wouldn't recommend it.
This stuff depends very much on undocumented behaviour of undocumented features of Hildon. So much so, that it required me several days to hack around it. The basic functionality is easy to achieve, but there are corner cases that just blows up your head as you try to solve them.

My favourite:
Usually when swiping to another desktop, Hildon changes the gconf entry (calls the callback), and then updates the widgets' _HILDON_APPLET_ON_CURRENT_DESKTOP property.
However, when the desktop is in edit mode and the user drags the widget to another homescreen after dragging it on the current one, the order is reversed: it sets the property first, and then changes gconf. This caused me headaches for some time. (filed a bug for that one here)
 

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


 
Forum Jump


All times are GMT. The time now is 15:20.