aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-menu-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-16 18:19:35 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-16 18:19:35 +0100
commit71d315d3abec5b62e43b821232d70262bec92bd1 (patch)
tree955da2d757bf08cd788d67196dae714f103706e1 /src/metadata-menu-item.vala
parent0585eccbaa90e2d4eae447a5a69e1101c528d2c0 (diff)
downloadayatana-indicator-sound-71d315d3abec5b62e43b821232d70262bec92bd1.tar.gz
ayatana-indicator-sound-71d315d3abec5b62e43b821232d70262bec92bd1.tar.bz2
ayatana-indicator-sound-71d315d3abec5b62e43b821232d70262bec92bd1.zip
metadata being updated dynamically
Diffstat (limited to 'src/metadata-menu-item.vala')
-rw-r--r--src/metadata-menu-item.vala15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index ef72143..894ad3c 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -13,15 +13,16 @@ public class MetadataMenuitem : Dbusmenu.Menuitem
public MetadataMenuitem()
{
this.property_set(MENUITEM_PROP_TYPE, DBUSMENU_METADATA_MENUITEM_TYPE);
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, "Sonnamble");
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, "Nocturne");
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER, "Seven Months in E minor");
- this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, "/home/ronoc/Desktop/Sonnamble/Sonnamble_CD.jpg");
-
- debug("image_path property set %s:", this.property_get(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH));
-
}
+ public void update(HashMap<string, string> data)
+ {
+ this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, data.get("artist"));
+ this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, data.get("title"));
+ this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER, data.get("album"));
+ this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, data.get("arturl"));
+ }
+
public override void handle_event(string name, GLib.Value input_value, uint timestamp)
{
debug("MetadataItem -> handle event caught!");