![]() |
Little help to make a python table clickable
Hi guys , i am trying to change the sms_counter_widget to use a different logic to account the SMSs. Everything is working fine but i'd like some help to make the python table CLICKABLE. So i can click it and it would call update_widget()
I have no idea how to do it.; Could anyone help me ? Bellow is the widget ui code. Code:
class SMS_widget(hildondesktop.HomePluginItem): If it is not possible, how could i make it update on "switching desktop" for example ? |
Re: Little help to make a python table clickable
Quote:
|
Re: Little help to make a python table clickable
Quote:
|
Re: Little help to make a python table clickable
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 |
All times are GMT. The time now is 23:15. |
vBulletin® Version 3.8.8