aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-menu-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-21 12:21:43 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-21 12:21:43 +0100
commit2357b40b5530215fc018302eaa288241b436d025 (patch)
tree01abd4541d21a9e0d06eb8be7bc257a234d03967 /src/metadata-menu-item.vala
parent4f84a27c35c47d5833547a4727016514ef98f2b0 (diff)
downloadayatana-indicator-sound-2357b40b5530215fc018302eaa288241b436d025.tar.gz
ayatana-indicator-sound-2357b40b5530215fc018302eaa288241b436d025.tar.bz2
ayatana-indicator-sound-2357b40b5530215fc018302eaa288241b436d025.zip
changed name of local vapi for common defs
Diffstat (limited to 'src/metadata-menu-item.vala')
-rw-r--r--src/metadata-menu-item.vala23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index 28e034a..02ae1c9 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -4,25 +4,18 @@ using CommonDefs;
public class MetadataMenuitem : PlayerItem
{
- /* Not ideal duplicate definition of const - see common-defs/h */
- //const string DBUSMENU_METADATA_MENUITEM_TYPE = "x-canonical-metadata-menu-item";
- //const string DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST = "x-canonical-metadata-text-artist";
- //const string DBUSMENU_METADATA_MENUITEM_TEXT_TITLE = "x-canonical-metadata-text-title";
- //const string DBUSMENU_METADATA_MENUITEM_TEXT_ALBUM = "x-canonical-metadata-text-album";
- //const string DBUSMENU_METADATA_MENUITEM_IMAGE_PATH = "x-canonical-metadata-image";
-
public MetadataMenuitem()
{
- this.property_set(MENUITEM_PROP_TYPE, DBUSMENU_METADATA_MENUITEM_TYPE);
+ this.property_set(MENUITEM_PROP_TYPE, CommonDefs.DBUSMENU_METADATA_MENUITEM_TYPE);
}
public override void update(HashMap<string, string> data)
{
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, data.get("artist").strip());
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, data.get("title").strip());
- this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER, data.get("album").strip());
- this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, sanitize_image_path(data.get("arturl")));
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, data.get("artist").strip());
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_TEXT_TITLE, data.get("title").strip());
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_TEXT_ALBUM, data.get("album").strip());
+ this.property_set(CommonDefs.DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, sanitize_image_path(data.get("arturl")));
}
public static string sanitize_image_path(string path)
@@ -44,9 +37,9 @@ public class MetadataMenuitem : PlayerItem
{
HashMap<string, Type> result = new HashMap<string, Type>();
result.set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, typeof(string));
- result.set("x-canonical-metadata-text-title", typeof(string));
- result.set("x-canonical-metadata-text-album", typeof(string));
- result.set("x-canonical-metadata-text-image", typeof(string));
+ result.set(DBUSMENU_METADATA_MENUITEM_TEXT_TITLE, typeof(string));
+ result.set(DBUSMENU_METADATA_MENUITEM_TEXT_ALBUM, typeof(string));
+ result.set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, typeof(string));
return result;
}