diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2010-06-25 11:28:09 -0400 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2010-06-25 11:28:09 -0400 |
commit | 9cc0e4c899ec24a9063f61b13b2dd3c5aa435dcf (patch) | |
tree | 7a7e67236275ac2bfe5f44e6266c655a887e6ac0 /src/player-item.vala | |
parent | 309d83d0d9920636910d25f71bd203acf76de9f5 (diff) | |
parent | 2118f6baaf6432811125901f5986e51fa55b4374 (diff) | |
download | ayatana-indicator-sound-9cc0e4c899ec24a9063f61b13b2dd3c5aa435dcf.tar.gz ayatana-indicator-sound-9cc0e4c899ec24a9063f61b13b2dd3c5aa435dcf.tar.bz2 ayatana-indicator-sound-9cc0e4c899ec24a9063f61b13b2dd3c5aa435dcf.zip |
* New upstream release.
- Fixes menu flicker when playing a song with artwork
displayed (LP: #598438)
Diffstat (limited to 'src/player-item.vala')
-rw-r--r-- | src/player-item.vala | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/player-item.vala b/src/player-item.vala index 7fcf912..a5c5512 100644 --- a/src/player-item.vala +++ b/src/player-item.vala @@ -27,6 +27,13 @@ public class PlayerItem : Dbusmenu.Menuitem public PlayerItem() { } + + public void reset(HashSet<string> attrs){ + foreach(string s in attrs){ + debug("attempting to set prop %s to null", s); + this.property_set(s, null); + } + } public void update(HashTable<string, Value?> data, HashSet<string> attributes) { @@ -39,7 +46,8 @@ public class PlayerItem : Dbusmenu.Menuitem string[] input_keys = property.split("-"); string search_key = input_keys[input_keys.length-1 : input_keys.length][0]; debug("search key = %s", search_key); - Value v = data.lookup(search_key); + Value? v = data.lookup(search_key); + if (v.holds (typeof (string))){ debug("with value : %s", v.get_string()); this.property_set(property, this.sanitize_string(v.get_string())); |