I've started hacking on a home applet to provide access to a quickdial list, or messages, etc. Given that I'd like to reuse as much Dialcentral code as possible, it's being written in python using the hildon-desktop-python-loader and python-hildondesktop bindings. I've looked at the homememfree applet source code, which is also written in python. But when I try to write a simple applet that displays just a label with static text, it doesn't work. It shows up in the list of available applets just fine, but when I select it, it does nothing, and going back to the list of applets shows it deselected. If I convert the exact code I have to instead inherit from hildon.Window instead of hildondesktop.HomeItem, it runs fine as a regular program. Anybody have any hints for debugging this kind of thing? /usr/lib/hildon-desktop/quickdial.py Code: import gtk import hildondesktop #import hildon class QuickDial(hildondesktop.HomeItem): #class QuickDial(hildon.Window): def __init__(self): hildondesktop.HomeItem.__init__(self) #hildon.Window.__init__(self) self.label = gtk.Label() self.label.set_text("Hello World!") self.add(self.label) self.connect("destroy", gtk.main_quit) self.show_all() def hd_plugin_get_objects(): plugin = QuickDial() return [plugin] if __name__ == "__main__": objects = hd_plugin_get_objects() gtk.main() /usr/share/applications/hildon-home/quickdial.desktop Code: [Desktop Entry] Name=QuickDial Type=python X-Path=quickdial.py
import gtk import hildondesktop #import hildon class QuickDial(hildondesktop.HomeItem): #class QuickDial(hildon.Window): def __init__(self): hildondesktop.HomeItem.__init__(self) #hildon.Window.__init__(self) self.label = gtk.Label() self.label.set_text("Hello World!") self.add(self.label) self.connect("destroy", gtk.main_quit) self.show_all() def hd_plugin_get_objects(): plugin = QuickDial() return [plugin] if __name__ == "__main__": objects = hd_plugin_get_objects() gtk.main()
[Desktop Entry] Name=QuickDial Type=python X-Path=quickdial.py