setting an image multiple times on a gtk.ImageMenuItem fails in python-appindicator

Bug #934574 reported by Thomi Richards on 2012-02-17
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DBus Menu
Fix Released
Ted Gould

Bug Description

I'm using python-appindicator and pygtk2.

I'm writing an application where I occaisonally want to update the images in a
gtk.ImageMenuItem. The images represent the current state of a job, and my code
polls the running jobs, and updates the menu entry images accordingly.

I've noticed that if you set the same image twice consecutively, the
ImageMenuItem will not display any image at all. I.e.- if you have two images:
"img_A" and "img_B", doing this:


... will do what you expect. However, if you do this:


The image will dissapear when the second set_image call is made.

Attached is a python script that demonstrates the problem. There are two versions: reproduces the issue. It creates an entry
in the panel / status bar with a menu attached. Initially the first menu entry
will have a "red ball" image next to it. 5 seconds later this image is updated
to a "green ball" image. 5 seconds after that we try and update the image to
the "green ball" image again, and the image dissapears from the menu. does the same thing, but without the appindicator (it draws a gtk popup menu instead). This version does not suffer from the same issue.

Related branches

Ted Gould (ted) on 2012-03-02
affects: libappindicator → dbusmenu
Changed in dbusmenu:
assignee: nobody → Ted Gould (ted)
importance: Undecided → Medium
status: New → In Progress
Ted Gould (ted) on 2012-03-09
Changed in dbusmenu:
status: In Progress → Fix Released
milestone: none → 0.5.93
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers