From e2792ab0a1dfd8ca0c96b59b675fa09e8cd0e5d7 Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 14 Oct 2010 17:58:42 +0100 Subject: moving towards getting the icon across the divide --- src/player-controller.vala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/player-controller.vala') diff --git a/src/player-controller.vala b/src/player-controller.vala index d5b79e7..4b5144a 100644 --- a/src/player-controller.vala +++ b/src/player-controller.vala @@ -19,6 +19,7 @@ with this program. If not, see . */ using Dbusmenu; +using DbusmenuGtk; using Gee; public class PlayerController : GLib.Object @@ -62,6 +63,7 @@ public class PlayerController : GLib.Object construct_widgets(); establish_mpris_connection(); this.update_layout(); + } public void update_state(state new_state) @@ -167,6 +169,20 @@ public class PlayerController : GLib.Object return formatted; } + public void set_icon_path() + { + if(this.app_info != null){ + /*Gtk.IconTheme icon_t = Gtk.IconTheme.get_default(); + Gtk.IconInfo iconInfo = icon_t.lookup_icon(app_info.get_icon(), + getIconSize(), + Gtk.ICON_LOOKUP_USE_BUILTIN);*/ + //return iconInfo.load_icon(); + dbusmenu_menuitem_property_set_image(this.custom_items[widget_order.TITLE], + MENUITEM_PROP_ICON_DATA, + app_info.get_icon()); + } + } + // Temporarily we will need to handle to different mpris implemenations // Do it for now - a couple of weeks should see this messy carry on out of // the codebase. -- cgit v1.2.3