GNOME Bugzilla – Bug 640541
[PATCH] hamster-applet crashed with TypeError in show_popup(): could not convert argument to correct param type
Last modified: 2011-05-21 13:27:14 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):
+ Trace 225698
self.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
Review of attachment 179289 [details] [review]: committed
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