aboutsummaryrefslogtreecommitdiff
path: root/src/sound-menu.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2014-02-28 17:01:11 -0600
committerTed Gould <ted@gould.cx>2014-02-28 17:01:11 -0600
commit5a9752b71c90d82342dff8138b25f6af2dcb6b28 (patch)
tree38c4ed679ce947dec3b45210ddfc54fe25b76764 /src/sound-menu.vala
parent386d973866817541a904198865d49ec040d4755d (diff)
downloadayatana-indicator-sound-5a9752b71c90d82342dff8138b25f6af2dcb6b28.tar.gz
ayatana-indicator-sound-5a9752b71c90d82342dff8138b25f6af2dcb6b28.tar.bz2
ayatana-indicator-sound-5a9752b71c90d82342dff8138b25f6af2dcb6b28.zip
Some debugging information
Diffstat (limited to 'src/sound-menu.vala')
-rw-r--r--src/sound-menu.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index 480e1cf..62f510d 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -123,16 +123,20 @@ class SoundMenu: Object
/* returns the position in this.menu of the section that's associated with @player */
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++) {
var section = this.menu.get_item_link (i, Menu.LINK_SECTION);
+ if (section == null) continue;
+
string action;
section.get_item_attribute (0, "action", "s", out action);
if (action == action_name)
return i;
}
+ debug("Unable to find section for player: %s", player.id);
return -1;
}
@@ -140,6 +144,8 @@ class SoundMenu: Object
var section = new Menu ();
Icon icon;
+ debug("Adding section for player: %s", player.id);
+
icon = player.icon;
if (icon == null)
icon = new ThemedIcon.with_default_fallbacks ("application-default-icon");