[Desktop Entry] Name=Demo Desktop Applet Type=python X-Path=desktop-applet
import gtk import hildondesktop import os class DesktopApplet(hildondesktop.HomeItem): def Button_clicked(self, Widget, Data = None): os.spawnlp(os.P_NOWAIT, "maemo-invoker", "maemo-invoker", "osso-xterm.launch") def __init__(self): hildondesktop.HomeItem.__init__(self) Button = gtk.Button() Image = gtk.image_new_from_file("/usr/share/icons/hicolor/64x64/apps/terminal.png") Button.set_image(Image) Button.connect("clicked", self.Button_clicked) Button.show() self.add(Button) def hd_plugin_get_objects(): plugin = DesktopApplet() return [plugin]