aboutsummaryrefslogtreecommitdiff
path: root/src/player-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-11-10 14:33:27 +0000
committerConor Curran <conor.curran@canonical.com>2010-11-10 14:33:27 +0000
commit9cbe93fc2a05f51bd8c849d492654c96d21e4c1a (patch)
treeae01ae8aaf4fb3edcd4843adfc5d946625ab94da /src/player-item.vala
parentaa60d69555c1a7d991457d8152d96908ad72869d (diff)
downloadayatana-indicator-sound-9cbe93fc2a05f51bd8c849d492654c96d21e4c1a.tar.gz
ayatana-indicator-sound-9cbe93fc2a05f51bd8c849d492654c96d21e4c1a.tar.bz2
ayatana-indicator-sound-9cbe93fc2a05f51bd8c849d492654c96d21e4c1a.zip
fixed the metadata visibility when there is nothing to show
Diffstat (limited to 'src/player-item.vala')
-rw-r--r--src/player-item.vala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/player-item.vala b/src/player-item.vala
index 68ae6ef..51471d1 100644
--- a/src/player-item.vala
+++ b/src/player-item.vala
@@ -87,9 +87,7 @@ public class PlayerItem : Dbusmenu.Menuitem
this.property_set_bool(property, v.get_boolean());
}
}
- if(this.property_get_bool(MENUITEM_PROP_VISIBLE) == false){
- this.property_set_bool(MENUITEM_PROP_VISIBLE, true);
- }
+ this.property_set_bool(MENUITEM_PROP_VISIBLE, populated(attributes));
}
public bool populated(HashSet<string> attrs)
@@ -97,8 +95,8 @@ public class PlayerItem : Dbusmenu.Menuitem
foreach(string prop in attrs){
debug("populated ? - prop: %s", prop);
int value_int = property_get_int(prop);
- debug("populated ? - prop %s and value %i", prop, value_int);
if(property_get_int(prop) != EMPTY){
+ debug("populated - prop %s and value %i", prop, value_int);
return true;
}
}