aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sound-menu.vala7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index bdb8df2..604e484 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -339,12 +339,13 @@ public class SoundMenu: Object
void update_player_section (MediaPlayer player, int index) {
var player_section = this.menu.get_item_link(index, Menu.LINK_SECTION) as Menu;
- if (player_section.get_n_items () == 2) {
+ if (player_section.get_n_items () == 2 || player_section.get_n_items () == 3) {
// we have 2 items, the second one is the playback item
- // remove it first
+ // if we have 3 items, it means we also have the playlist item.
+ // remove the playbak item first
player_section.remove (1);
MenuItem playback_item = create_playback_menu_item (player);
- player_section.append_item (playback_item);
+ player_section.insert_item (1, playback_item);
}
}