From 5dd9bda0ea449024dbc97e26f92631401048bc57 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 15 Oct 2014 13:24:48 -0500 Subject: Removing the remove code that was supposed to be removed earlier --- src/sound-menu.vala | 1 - 1 file changed, 1 deletion(-) (limited to 'src/sound-menu.vala') diff --git a/src/sound-menu.vala b/src/sound-menu.vala index a9efd74..05570b9 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -118,7 +118,6 @@ public class SoundMenu: Object while ((location = find_action(this.volume_section, "indicator.high-volume-warning-item")) != -1) { this.volume_section.remove (location); } - this.volume_section.remove (this.volume_section.get_n_items () -1); this.high_volume_warning_shown = false; } } -- cgit v1.2.3 From 1e193a4b99e62b52fb759d00a8745f1c477d965f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 15 Oct 2014 13:52:31 -0500 Subject: Make sure to check the item in the loop --- src/sound-menu.vala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sound-menu.vala') diff --git a/src/sound-menu.vala b/src/sound-menu.vala index 05570b9..3881faf 100644 --- a/src/sound-menu.vala +++ b/src/sound-menu.vala @@ -127,7 +127,7 @@ public class SoundMenu: Object int n = menu.get_n_items (); for (int i = 0; i < n; i++) { string action; - menu.get_item_attribute (0, "action", "s", out action); + menu.get_item_attribute (i, "action", "s", out action); if (in_action == action) return i; } -- cgit v1.2.3