Editing PyMaemo/HildonDesktop
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 22: | Line 22: | ||
<pre> | <pre> | ||
+ | import gobject | ||
import gtk | import gtk | ||
import hildondesktop | import hildondesktop | ||
Line 39: | Line 40: | ||
class HelloHomePlugin(hildondesktop.HomePluginItem): | class HelloHomePlugin(hildondesktop.HomePluginItem): | ||
+ | __gtype_name__ = 'HelloHomePlugin' | ||
+ | |||
def __init__(self): | def __init__(self): | ||
hildondesktop.HomePluginItem.__init__(self) | hildondesktop.HomePluginItem.__init__(self) | ||
Line 46: | Line 49: | ||
self.add(button) | self.add(button) | ||
- | + | def hd_plugin_get_object(): | |
+ | return gobject.new(HelloHomePlugin, plugin_id="hello_world_home.desktop-0") | ||
- | |||
- | |||
if __name__ == "__main__": | if __name__ == "__main__": | ||
- | + | obj = hd_plugin_get_object() | |
- | + | ||
- | obj = | + | |
obj.show_all() | obj.show_all() | ||
gtk.main() | gtk.main() |
Learn more about Contributing to the wiki.