I've tracked down cause of the problem:
There is a couple of bugs in tray.py update_menu()
1. There is a wrong if statement:
if self.player.is_stopped() or self.player.is_playing():
            stock_id = gtk.STOCK_MEDIA_PLAY
        elif self.player.is_paused():
            stock_id = gtk.STOCK_MEDIA_PAUSE
2. I'm not familiar with pygtk, but it seems that item's label should be 
updated another way:
Instead of:
  playpause_image = self.playpause_menuitem.get_image()  
  playpause_image.set_from_stock(stock_id, gtk.ICON_SIZE_MENU)
should use:
  self.playpause_menuitem.set_label(stock_id)


Here is diff for tray.py:

149c149,152
<         playpause_image = self.playpause_menuitem.get_image()
---
>         if self.player.is_playing():
>             stock_id = gtk.STOCK_MEDIA_PAUSE     
>         elif self.player.is_paused() or self.player.is_stopped():
>             stock_id = gtk.STOCK_MEDIA_PLAY   
151,156c154
<         if self.player.is_stopped() or self.player.is_playing():
<             stock_id = gtk.STOCK_MEDIA_PLAY
<         elif self.player.is_paused():
<             stock_id = gtk.STOCK_MEDIA_PAUSE
< 
<         playpause_image.set_from_stock(stock_id, gtk.ICON_SIZE_MENU)
---
>         self.playpause_menuitem.set_label(stock_id)
211a210
>

-- 
Tray 'Play/Pause' item doesn't reflect current state
https://bugs.launchpad.net/bugs/630221
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to