From 448e45e3fa53620804ab8ec9c5940946f45a8b62 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Fri, 11 Jun 2010 15:09:07 +0100 Subject: new widget for the metadata --- src/metadata-menu-item.vala | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/metadata-menu-item.vala (limited to 'src/metadata-menu-item.vala') diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala new file mode 100644 index 0000000..0f6d7d5 --- /dev/null +++ b/src/metadata-menu-item.vala @@ -0,0 +1,26 @@ +using Dbusmenu; +using Gee; + +public class MetadataMenuitem : Dbusmenu.Menuitem +{ + /* 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 = "x-canonical-metadata-image"; + + public MetadataMenuitem() + { + this.property_set(MENUITEM_PROP_TYPE, DBUSMENU_METADATA_MENUITEM_TYPE); + this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, "Sonnamble"); + this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, "Nocturne"); + this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER, "Seven Months in E minor"); + this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE, ""); + } + + public override void handle_event(string name, GLib.Value input_value, uint timestamp) + { + debug("MetadataItem -> handle event caught!"); + } +} \ No newline at end of file -- cgit v1.2.3 From 3337497532d6d726d9eaa42b5b1b3ed8e4dbedc7 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Sun, 13 Jun 2010 22:27:50 +0100 Subject: album art underway --- src/metadata-menu-item.vala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/metadata-menu-item.vala') diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala index 0f6d7d5..c9daee6 100644 --- a/src/metadata-menu-item.vala +++ b/src/metadata-menu-item.vala @@ -8,7 +8,7 @@ public class MetadataMenuitem : Dbusmenu.Menuitem 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 = "x-canonical-metadata-image"; + const string DBUSMENU_METADATA_MENUITEM_IMAGE_PATH = "x-canonical-metadata-image"; public MetadataMenuitem() { @@ -16,7 +16,7 @@ public class MetadataMenuitem : Dbusmenu.Menuitem this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_ARTIST, "Sonnamble"); this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, "Nocturne"); this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER, "Seven Months in E minor"); - this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE, ""); + this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, "/home/ronoc/Desktop/Sonnamble/Sonnamble_CD.jpg"); } public override void handle_event(string name, GLib.Value input_value, uint timestamp) -- cgit v1.2.3 From 11741257873bf35670e2503184821e2bd075c9f6 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Mon, 14 Jun 2010 11:07:28 +0100 Subject: properties working now both ways --- src/metadata-menu-item.vala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/metadata-menu-item.vala') diff --git a/src/metadata-menu-item.vala b/src/metadata-menu-item.vala index c9daee6..ef72143 100644 --- a/src/metadata-menu-item.vala +++ b/src/metadata-menu-item.vala @@ -17,6 +17,9 @@ public class MetadataMenuitem : Dbusmenu.Menuitem this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_PIECE, "Nocturne"); this.property_set(DBUSMENU_METADATA_MENUITEM_TEXT_CONTAINER, "Seven Months in E minor"); this.property_set(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH, "/home/ronoc/Desktop/Sonnamble/Sonnamble_CD.jpg"); + + debug("image_path property set %s:", this.property_get(DBUSMENU_METADATA_MENUITEM_IMAGE_PATH)); + } public override void handle_event(string name, GLib.Value input_value, uint timestamp) -- cgit v1.2.3