Tray 'Play/Pause' item doesn't reflect current state
Bug #630221 reported by
ruhe
This bug affects 5 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Exaile |
Fix Released
|
Low
|
Mathias Brodala | ||
exaile (Ubuntu) |
Fix Released
|
Low
|
Andrew Starr-Bochicchio |
Bug Description
Binary package hint: exaile
Ubuntu maverick (development branch) Release: 10.10
exaile:
Installed: 0.3.2.0-0ubuntu2
Candidate: 0.3.2.0-0ubuntu2
Version table:
*** 0.3.2.0-0ubuntu2 0
500 http://
100 /var/lib/
Expected:
1. Player is currently playing a track, right-click tray icon. 'Play/Pause' item's label should be 'Pause'.
2. Player is currently paused or stopped, right-click tray icon. 'Play/Pause' item's label should be 'Play'.
Current behavior:
'Play/Pause' item's label is always 'Play'.
Changed in exaile: | |
status: | New → Confirmed |
importance: | Undecided → Low |
milestone: | none → 0.3.2.1 |
Changed in exaile: | |
status: | Fix Committed → Fix Released |
Changed in exaile (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Low |
assignee: | nobody → Andrew Starr-Bochicchio (andrewsomething) |
To post a comment you must log in.
I've tracked down cause of the problem: is_stopped( ) or self.player. is_playing( ):
stock_ id = gtk.STOCK_ MEDIA_PLAY is_paused( ):
stock_ id = gtk.STOCK_ MEDIA_PAUSE menuitem. get_image( ) image.set_ from_stock( stock_id, gtk.ICON_SIZE_MENU) playpause_ menuitem. set_label( stock_id)
There is a couple of bugs in tray.py update_menu()
1. There is a wrong if statement:
if self.player.
elif self.player.
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_
playpause_
should use:
self.
Here is diff for tray.py:
149c149,152 menuitem. get_image( ) is_playing( ): MEDIA_PAUSE is_paused( ) or self.player. is_stopped( ): MEDIA_PLAY is_stopped( ) or self.player. is_playing( ): MEDIA_PLAY is_paused( ): MEDIA_PAUSE image.set_ from_stock( stock_id, gtk.ICON_SIZE_MENU) menuitem. set_label( stock_id)
< playpause_image = self.playpause_
---
> if self.player.
> stock_id = gtk.STOCK_
> elif self.player.
> stock_id = gtk.STOCK_
151,156c154
< if self.player.
< stock_id = gtk.STOCK_
< elif self.player.
< stock_id = gtk.STOCK_
<
< playpause_
---
> self.playpause_
211a210
>