From: Marcus W Date: Mon, 1 Feb 2010 00:28:20 +0000 (+0200) Subject: possible fix to the problem with the widget not appearing in the add widget list. X-Git-Url: http://git.maemo.org/git/?p=comic-widget;a=commitdiff_plain;h=ddff2f06351ce255e08cb2b1e14f10691d7b685b possible fix to the problem with the widget not appearing in the add widget list. --- diff --git a/debian/control b/debian/control index 80e9425..b2db597 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 5) Standards-Version: 3.7.2 Package: comic-widget -Architecture: all +Architecture: any Depends: python2.5, python-osso, python-gtk2, python-hildon, python-hildondesktop, python2.5-cairo, hildon-desktop-python-loader Description: A widget that displays comics taken from the web. XB-Maemo-Icon-26: @@ -87,4 +87,4 @@ XB-Maemo-Icon-26: pcLpJIpJ4oQkSTSJY5y1JElEksRYG5EkEdZWRzxlOAJe3LqFOKrURlQ7j6a8JlGUnsdegyUxwxfP kcg0jeMKpVKRYj73wFPf/ebKhz77ZYaHz1/7fyWuPh767D/NB1mrqmsUneP/5cBd+ynIVT4GQeIx PvRn9/onNw2O93Wh/lr9oqr0w0yG32zZnJ8omP1qgo1jVy4f3vKrp+1HP/kozz3zxP//Uej9n/jE - n/y/2/wfjUewq/FSuIsAAAAASUVORK5CYII= \ No newline at end of file + n/y/2/wfjUewq/FSuIsAAAAASUVORK5CYII= diff --git a/src/usr/lib/hildon-desktop/comic-widget.py b/src/usr/lib/hildon-desktop/comic-widget.py index 0965909..03b299f 100644 --- a/src/usr/lib/hildon-desktop/comic-widget.py +++ b/src/usr/lib/hildon-desktop/comic-widget.py @@ -1,3 +1,4 @@ +import gobject import hildon import hildondesktop import gtk @@ -281,6 +282,7 @@ class ComicDb(): # ------------UI class ComicHomePlugin(hildondesktop.HomePluginItem): + __gtype_name__ = 'ComicHomePlugin' def __init__(self): hildondesktop.HomePluginItem.__init__(self) global supports_alpha @@ -640,12 +642,11 @@ class ComicHomePlugin(hildondesktop.HomePluginItem): dialog.run() dialog.destroy() -hd_plugin_type = ComicHomePlugin - +def hd_plugin_get_object(): + return gobject.new(ComicHomePlugin, plugin_id = hildon_plugin_id) if __name__ == "__main__": - import gobject - gobject.type_register(hd_plugin_type) - obj = gobject.new(hd_plugin_type, plugin_id="plugin_id") + obj = hd_plugin_get_object() obj.show_all() + print obj.get_text() gtk.main() diff --git a/src/usr/share/applications/hildon-home/comic-widget.desktop b/src/usr/share/applications/hildon-home/comic-widget.desktop index 621aca4..98c3fc6 100644 --- a/src/usr/share/applications/hildon-home/comic-widget.desktop +++ b/src/usr/share/applications/hildon-home/comic-widget.desktop @@ -1,5 +1,7 @@ [Desktop Entry] Name=Comic Widget + Comment=Simple Comic widget Type=python X-Path=comic-widget.py +