Bug 5232 - Desktop Widget does not appear in "Add Widget" list
: Desktop Widget does not appear in "Add Widget" list
Status: VERIFIED FIXED
Product: PyMaemo
General
: unspecified
: All Windows
: Low critical with 6 votes (vote)
: ---
Assigned To: Luciano Wolf
: general
:
:
:
:
  Show dependency tree
 
Reported: 2009-09-28 18:47 UTC by Brent Chiodo
Modified: 2010-01-19 01:13 UTC (History)
3 users (show)

See Also:


Attachments
Returns the right plugin-id to be used inside Python scripts (573 bytes, patch)
2009-10-13 20:36 UTC, Luciano Wolf
Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Brent Chiodo (reporter) 2009-09-28 18:47:53 UTC
SOFTWARE VERSION:
python-hildon 0.9.0-1maemo12 and python-hildondesktop 0.0.3-1maemo2

STEPS TO REPRODUCE THE PROBLEM:
1. Create a desktop widget
2. Click on: Desktop > Desktop Options > Menu > Add Widget

EXPECTED OUTCOME:
The widget would appear in the list

ACTUAL OUTCOME:
The widget does not appear in the list

REPRODUCIBILITY:
always


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Comment 1 Valério Valério maemo.org 2009-10-05 11:41:17 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Luciano Wolf 2009-10-13 20:36:16 UTC
Created an attachment (id=1417) [details]
Returns the right plugin-id to be used inside Python scripts

Instead of using a plugin-id provided by the user it is better to use a self
generated one. This patch allows the widgets system to inform the right
plugin-id to the Python side, setting a new constant string (called
"hildon_plugin_id") inside the module. This string should be used at
hd_plugin_get_object definition, like this:

def hd_plugin_get_object():
    return gobject.new(HelloHomePlugin, plugin_id = hildon_plugin_id)
Comment 3 Luciano Wolf 2009-10-13 20:39:47 UTC
The proposed patch needs an update into the documentation page[1], to be
useful. This returned string is the same as the contained inside
~/.config/hildon-desktop/home.plugins file. A possible (ugly) workaround should
be to append a ".desktop-0" to the original plugin-id into the python script.

[1] http://wiki.maemo.org/PyMaemo/HildonDesktop
Comment 4 Anderson Lizardo 2009-10-18 21:27:30 UTC
Fixed in python-hildondesktop 0.1.0-1maemo1. Please note that you will need to
modify your code due to unavoidable API changes. See
http://wiki.maemo.org/PyMaemo/HildonDesktop for the instructions on how to
change your code and an updated example.

Hopefully this will be the last API change for python-hildondesktop applets
until the final PyMaemo release.

Any doubts, feel free to contact us through the mailing list:

pymaemo-developers_AT_garage.maemo.org
Comment 5 Daniel Martin Yerga 2009-10-28 10:48:14 UTC
Verified. Thanks!
Comment 6 Gianfranco D'Alessandro 2010-01-16 16:16:33 UTC
i have the same problem, i change my code like described in
http://wiki.maemo.org/PyMaemo/HildonDesktop but the widget does not appear in
the list.

Any other suggestion?

thanks
Comment 7 Anderson Lizardo 2010-01-16 17:06:04 UTC
(In reply to comment #6)
> i have the same problem, i change my code like described in
> http://wiki.maemo.org/PyMaemo/HildonDesktop but the widget does not appear in
> the list.

If you are already using the latest version of python-hildondesktop, your issue
is not the same of this report.

Please send to our mailing list
(http://garage.maemo.org/listinfo/pymaemo-developers/):

* The contents of your .desktop file and where did you put it (It should be in
/usr/share/applications/hildon-home/)
* If possible, the contents of your widget

Also make sure you have hildon-desktop-python-loader package installed. Also
try running your code by hand with:

run-standalone.sh python2.5 /path/to/widget.py

And check for any errors.

Hope that helps.
Comment 8 Gianfranco D'Alessandro 2010-01-19 01:13:03 UTC
Verified. Thanks!

though, launching the widget in this mode the gobject.timeout_add(etc..)
instruction does not work.