Reply
Thread Tools
Posts: 187 | Thanked: 41 times | Joined on May 2010
#1
Hi guys , is there an event i can listen to make my widget update on desktop switching ?

btw, how can i get which signal/events are available ?
 
nicolai's Avatar
Posts: 1,637 | Thanked: 4,424 times | Joined on Apr 2009 @ Germany
#2
Hi colchaodemola,

it would be better to ask those question in the development subforum.
Is your widget a QT or a hildon desktop widget?
If it is hildon, you can search the api doc:
http://maemo.org/api_refs/5.0/5.0-fi...tem.properties
To react on desktop switching connect to the notify event
for the is-on-current-desktop property.

regards
Nicolai
 
dchky's Avatar
Posts: 549 | Thanked: 299 times | Joined on Jun 2010 @ Australian in the Philippines
#3
I would suggest you pick through the source code of swipecounter - it does exactly what you are looking for.

Available here
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#4
Originally Posted by colchaodemola View Post
Hi guys , is there an event i can listen to make my widget update on desktop switching ?

btw, how can i get which signal/events are available ?
YES, you can set up a gconf monitor.
You can specify a callback method, and it will call you back when the actual desktop has been changed.

You can checkout Sticky Notes to see how.

The actual relevant code is in this file. (Added to Sticky Notes via svn:externals.)

If you have questions about it, just ask.

Note that there is also a Qt-based gconf client in libqg. (Part of MAFW), though I preferred to use gconf directly.
 
Posts: 187 | Thanked: 41 times | Joined on May 2010
#5
Originally Posted by Venemo View Post
YES, you can set up a gconf monitor.
You can specify a callback method, and it will call you back when the actual desktop has been changed.

You can checkout Sticky Notes to see how.

The actual relevant code is in this file. (Added to Sticky Notes via svn:externals.)

If you have questions about it, just ask.

Note that there is also a Qt-based gconf client in libqg. (Part of MAFW), though I preferred to use gconf directly.
Any examples in Python ?
I am changing the sms_counter plugin ... and i am using EOP (Example oriented programming :P)
 
Venemo's Avatar
Posts: 1,296 | Thanked: 1,773 times | Joined on Aug 2009 @ Budapest, Hungary
#6
Originally Posted by colchaodemola View Post
Any examples in Python ?
I am changing the sms_counter plugin ... and i am using EOP (Example oriented programming :P)
Well, if you can interface Python with C libraries, it is most likely doable.
Anyways, it seems that there have been others who use gconf from Python code:
Here's your friend.
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:12.