aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-menu-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-21 20:54:28 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-21 20:54:28 +0100
commit39e811f976a80011703e7b0c04b891a1f1abdd68 (patch)
tree0e0e96c7ccb54adcf6fca8298554b4f981cd5f07 /src/metadata-menu-item.vala
parent6e001f4e0606bce9d3eb070df97d44a7b10081c5 (diff)
downloadayatana-indicator-sound-39e811f976a80011703e7b0c04b891a1f1abdd68.tar.gz
ayatana-indicator-sound-39e811f976a80011703e7b0c04b891a1f1abdd68.tar.bz2
ayatana-indicator-sound-39e811f976a80011703e7b0c04b891a1f1abdd68.zip
finally
Diffstat (limited to 'src/metadata-menu-item.vala')
-rw-r--r--src/metadata-menu-item.vala32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index 8d626ca..08b1b85 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -9,32 +9,14 @@ public class MetadataMenuitem : PlayerItem
this.property_set(MENUITEM_PROP_TYPE, MENUITEM_TYPE);
}
- //public override void update(HashMap<string, string> data)
- //{
- // this.property_set(MENUITEM_TEXT_ARTIST, data.get("artist").strip());
- // this.property_set(MENUITEM_TEXT_TITLE, data.get("title").strip());
- // this.property_set(MENUITEM_TEXT_ALBUM, data.get("album").strip());
- // this.property_set(MENUITEM_IMAGE_PATH, sanitize_image_path(data.get("arturl")));
- //}
-
- public static string sanitize_image_path(string path)
- {
- string result = path.strip();
- if(result.has_prefix("file:///")){
- result = result.slice(7, result.len());
- }
- debug("Sanitize image path - result = %s", result);
- return result;
- }
-
- public static HashMap<string, Type> attributes_format()
+ public static HashSet<string> attributes_format()
{
- HashMap<string,Type> results = new HashMap<string, Type>();
- results.set(MENUITEM_TEXT_TITLE, typeof(string));
- results.set(MENUITEM_TEXT_ARTIST, typeof(string));
- results.set(MENUITEM_TEXT_ALBUM, typeof(string));
- results.set(MENUITEM_ARTURL, typeof(string));
- return results;
+ HashSet<string> attrs = new HashSet<string>();
+ attrs.add(MENUITEM_TEXT_TITLE);
+ attrs.add(MENUITEM_TEXT_ARTIST);
+ attrs.add(MENUITEM_TEXT_ALBUM);
+ attrs.add(MENUITEM_ARTURL);
+ return attrs;
}
} \ No newline at end of file