possible fix to the problem with the widget not appearing in the add widget list.
authorMarcus W <mece@LeChuck2.(none)>
Mon, 1 Feb 2010 00:28:20 +0000 (02:28 +0200)
committerMarcus W <mece@LeChuck2.(none)>
Mon, 1 Feb 2010 00:28:20 +0000 (02:28 +0200)
debian/control
src/usr/lib/hildon-desktop/comic-widget.py
src/usr/share/applications/hildon-home/comic-widget.desktop

index 80e9425..b2db597 100644 (file)
@@ -6,7 +6,7 @@ Build-Depends: debhelper (>= 5)
 Standards-Version: 3.7.2
 
 Package: comic-widget
 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:
 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
  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=
index 0965909..03b299f 100644 (file)
@@ -1,3 +1,4 @@
+import gobject
 import hildon
 import hildondesktop
 import gtk
 import hildon
 import hildondesktop
 import gtk
@@ -281,6 +282,7 @@ class ComicDb():
 # ------------UI
 
 class ComicHomePlugin(hildondesktop.HomePluginItem):
 # ------------UI
 
 class ComicHomePlugin(hildondesktop.HomePluginItem):
+       __gtype_name__ = 'ComicHomePlugin'
        def __init__(self):
                hildondesktop.HomePluginItem.__init__(self)
                global supports_alpha
        def __init__(self):
                hildondesktop.HomePluginItem.__init__(self)
                global supports_alpha
@@ -640,12 +642,11 @@ class ComicHomePlugin(hildondesktop.HomePluginItem):
                dialog.run()
                dialog.destroy()
 
                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__":
 
 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()
        obj.show_all()
+    print obj.get_text()
        gtk.main()
        gtk.main()
index 621aca4..98c3fc6 100644 (file)
@@ -1,5 +1,7 @@
 [Desktop Entry]
 Name=Comic Widget
 [Desktop Entry]
 Name=Comic Widget
+
 Comment=Simple Comic widget
 Type=python
 X-Path=comic-widget.py
 Comment=Simple Comic widget
 Type=python
 X-Path=comic-widget.py
+