From 621efbb8d9728da645aa1c9aeac6068f395c8dc2 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 3 Mar 2014 11:34:58 -0600 Subject: Check all the menu items, that way we don't have to handle all the exceptions --- src/sound-menu.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sound-menu.vala') diff --git a/src/sound-menu.vala b/src/sound-menu.vala index 8c087bc..e4b8ad1 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -135,8 +135,8 @@ public class SoundMenu: Object int find_player_section (MediaPlayer player) { debug("Looking for player: %s", player.id); string action_name = @"indicator.$(player.id)"; - int n = this.menu.get_n_items () -1; - for (int i = 1; i < n; i++) { + int n = this.menu.get_n_items (); + for (int i = 0; i < n; i++) { var section = this.menu.get_item_link (i, Menu.LINK_SECTION); if (section == null) continue; -- cgit v1.2.3