View Single Post
Posts: 56 | Thanked: 31 times | Joined on Jul 2008 @ Austria
#4
Hm... is that a trick question?

self.connect("notify::is-on-current-desktop", self.callback_function)

or without the scaffolding:
self.connect("notify::is-on-current-desktop", lambda *args, **kwargs: self.update_widget())

and as for making anything clickable, just put it into a Button
button = gtk.Button()
button.add(self.table)
and connect to its "clicked"
button.connect("clicked", whatever)
The button can also be made not look like a button (seems fashionable nowadays) by:
button.set_relief(gtk.RELIEF_NONE)
or some do
button.set_relief(gtk.RELIEF_HALF)
a few leave it alone.

http://wiki.maemo.org/PyMaemo/HildonDesktop

Last edited by dannym; 2010-08-24 at 21:59.
 

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