From 7be2c7248a0b29ea74e8e36db405d5974995a57b Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Mon, 21 Jun 2010 16:25:16 +0100 Subject: going for generic property updates --- src/player-item.vala | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/player-item.vala') diff --git a/src/player-item.vala b/src/player-item.vala index aa35b33..10dedc2 100644 --- a/src/player-item.vala +++ b/src/player-item.vala @@ -26,15 +26,17 @@ public class PlayerItem : Dbusmenu.Menuitem public MprisController mpris_adaptor; public PlayerItem() - { + { } - public virtual void update(HashMap data) + public void update(HashMap data, Type type) { debug("PlayerItem::update()"); - //foreach(var key in this.attributes().keys){ - // this.attributes.get(key); - //} + HashMap attributes = type.attributes_format(); + foreach(var property in data){ + //property.value as attributes.get(property.key) + //this.property_set(property.key, ); + } } public void set_adaptor(MprisController adaptor) @@ -58,8 +60,6 @@ public class PlayerItem : Dbusmenu.Menuitem PlayerItem separator = new PlayerItem(); separator.property_set(MENUITEM_PROP_TYPE, CLIENT_TYPES_SEPARATOR); return separator; - } - - + } } -- cgit v1.2.3