After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640541 - [PATCH] hamster-applet crashed with TypeError in show_popup(): could not convert argument to correct param type
[PATCH] hamster-applet crashed with TypeError in show_popup(): could not conv...
Status: RESOLVED FIXED
Product: hamster-applet
Classification: Deprecated
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: hamster-applet-maint
hamster-applet-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-25 13:50 UTC by James Strandboge
Modified: 2011-05-21 13:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use cell-background-gdk with bgcolor (1.31 KB, patch)
2011-01-25 13:50 UTC, James Strandboge
committed Details | Review

Description James Strandboge 2011-01-25 13:50:25 UTC
Created attachment 179289 [details] [review]
use cell-background-gdk with bgcolor

On Ubuntu 11.04 (natty), python 2.7 is the default. Hamster crashes with the following when adding a new entry:
Traceback:
 Traceback (most recent call last):
  • File "/usr/lib/pymodules/python2.7/hamster/widgets/activityentry.py", line 274 in _on_button_press_event
    self.show_popup()
  • File "/usr/lib/pymodules/python2.7/hamster/widgets/activityentry.py", line 153 in show_popup
    self.time_icon_cell.set_property("cell-background", bgcolor)  TypeError: could not convert argument to correct param type

Looking around, I discovered that self.get_style().bg[gtk.STATE_NORMAL] is a GdkColor (get_style().bg is an array of gtk,gdk.Colors), so we must use cell-background-gdk instead of cell-background, since cell-background is used with strings. I'm not sure if previous versions of python or PyGTK converted this for you automatically, but it does not any more. I am not a PyGTK programmer, but attached is a patch to use cell-background-gdk instead, which I believe to be the correct fix.

This is Ubuntu bug https://launchpad.net/bugs/705482
Comment 1 Toms Bauģis 2011-05-21 13:26:15 UTC
Review of attachment 179289 [details] [review]:

committed
Comment 2 Toms Bauģis 2011-05-21 13:27:14 UTC
thanks! although i can't reproduce the bug here on natty 11.04, the documentation seems to concur and the change does not seem to be doing anything bad, so i applied the patch.
fixed in git master