aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--src/metadata-menu-item.vala23
-rw-r--r--src/player-item.vala6
-rw-r--r--vapi/common-defs.vapi9
-rw-r--r--vapi/music-bridge.vapi4
4 files changed, 20 insertions, 22 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)
diff --git a/vapi/common-defs.vapi b/vapi/common-defs.vapi
new file mode 100644
index 0000000..8f374d0
--- /dev/null
+++ b/vapi/common-defs.vapi
@@ -0,0 +1,9 @@
+/* music-bridge.vapi generated by valac, do not modify. */
+[CCode (cheader_filename = "common-defs.h")]
+namespace CommonDefs{
+ public const string DBUSMENU_METADATA_MENUITEM_TYPE;
+ public const string DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST;
+ public const string DBUSMENU_METADATA_MENUITEM_TEXT_TITLE;
+ public const string DBUSMENU_METADATA_MENUITEM_TEXT_ALBUM;
+ public const string DBUSMENU_METADATA_MENUITEM_IMAGE_PATH;
+} \ No newline at end of file
diff --git a/vapi/music-bridge.vapi b/vapi/music-bridge.vapi
deleted file mode 100644
index 65d40ec..0000000
--- a/vapi/music-bridge.vapi
+++ /dev/null
@@ -1,4 +0,0 @@
-/* music-bridge.vapi generated by valac, do not modify. */
-[CCode (cheader_filename = "common-defs.h")]
-namespace CommonDefs{
-} \ No newline at end of file