aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-03-03 11:34:58 -0600
committerTed Gould <ted@gould.cx>2014-03-03 11:34:58 -0600
commit621efbb8d9728da645aa1c9aeac6068f395c8dc2 (patch)
tree22eda23b5497760cd06ae702af55548fd7020d3b
parent37dcddab978f1d050287a83353216e54ad74670b (diff)
downloadayatana-indicator-sound-621efbb8d9728da645aa1c9aeac6068f395c8dc2.tar.gz
ayatana-indicator-sound-621efbb8d9728da645aa1c9aeac6068f395c8dc2.tar.bz2
ayatana-indicator-sound-621efbb8d9728da645aa1c9aeac6068f395c8dc2.zip
Check all the menu items, that way we don't have to handle all the exceptions
-rw-r--r--src/sound-menu.vala4
1 files changed, 2 insertions, 2 deletions
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;