aboutsummaryrefslogtreecommitdiff
path: root/src/metadata-menu-item.vala
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-06-21 11:36:58 +0100
committerConor Curran <conor.curran@canonical.com>2010-06-21 11:36:58 +0100
commit1b9837ab2ddfac074149d020e700e9272579b211 (patch)
tree8f3906ac4bd479ec9c1ee3aede7152a20e20b848 /src/metadata-menu-item.vala
parent9bba58ee4dae536ce92f396854e2c0e671d9b7f0 (diff)
downloadayatana-indicator-sound-1b9837ab2ddfac074149d020e700e9272579b211.tar.gz
ayatana-indicator-sound-1b9837ab2ddfac074149d020e700e9272579b211.tar.bz2
ayatana-indicator-sound-1b9837ab2ddfac074149d020e700e9272579b211.zip
lots of changes
Diffstat (limited to 'src/metadata-menu-item.vala')
-rw-r--r--src/metadata-menu-item.vala28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala
index 82926b1..28e034a 100644
--- a/src/metadata-menu-item.vala
+++ b/src/metadata-menu-item.vala
@@ -1,21 +1,23 @@
using Dbusmenu;
using Gee;
+using CommonDefs;
-public class MetadataMenuitem : Dbusmenu.Menuitem
+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_PIECE = "x-canonical-metadata-text-piece";
- const string DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER = "x-canonical-metadata-text-container";
- const string DBUSMENU_METADATA_MENUITEM_IMAGE_PATH = "x-canonical-metadata-image";
+ //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);
+
}
- public void update(HashMap<string, string> data)
+ 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());
@@ -37,4 +39,16 @@ public class MetadataMenuitem : Dbusmenu.Menuitem
{
debug("MetadataItem -> handle event caught!");
}
+
+ public static HashMap<string, Type> attributes()
+ {
+ 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));
+
+ return result;
+ }
+
} \ No newline at end of file