diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-06-21 12:21:43 +0100 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-06-21 12:21:43 +0100 |
commit | 2357b40b5530215fc018302eaa288241b436d025 (patch) | |
tree | 01abd4541d21a9e0d06eb8be7bc257a234d03967 /src | |
parent | 4f84a27c35c47d5833547a4727016514ef98f2b0 (diff) | |
download | ayatana-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')
-rw-r--r-- | src/metadata-menu-item.vala | 23 | ||||
-rw-r--r-- | src/player-item.vala | 6 |
2 files changed, 11 insertions, 18 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; } diff --git a/src/player-item.vala b/src/player-item.vala index a0ea25a..aa35b33 100644 --- a/src/player-item.vala +++ b/src/player-item.vala @@ -32,9 +32,9 @@ public class PlayerItem : Dbusmenu.Menuitem public virtual void update(HashMap<string, Value?> data) { debug("PlayerItem::update()"); - foreach(var key in this.attributes().keys){ - this.attributes.get(key); - } + //foreach(var key in this.attributes().keys){ + // this.attributes.get(key); + //} } public void set_adaptor(MprisController adaptor) |