diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-03-09 18:58:36 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-03-09 18:58:36 +0000 |
commit | bc33d0a5ef7a294804719273811cdd2878bddbe9 (patch) | |
tree | d519241fb2e5c0b7ae08683c2e9718c53c322211 /src | |
parent | fb651cca574070250f95dca42c888f97be5989f2 (diff) | |
download | ayatana-indicator-sound-bc33d0a5ef7a294804719273811cdd2878bddbe9.tar.gz ayatana-indicator-sound-bc33d0a5ef7a294804719273811cdd2878bddbe9.tar.bz2 ayatana-indicator-sound-bc33d0a5ef7a294804719273811cdd2878bddbe9.zip |
now uses the correct basename minus the extension for the icon name property
Diffstat (limited to 'src')
-rw-r--r-- | src/playlists-menu-item.vala | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/playlists-menu-item.vala b/src/playlists-menu-item.vala index 9b1f724..78fb6dc 100644 --- a/src/playlists-menu-item.vala +++ b/src/playlists-menu-item.vala @@ -49,10 +49,14 @@ public class PlaylistsMenuitem : PlayerItem menuitem.property_set (MENUITEM_PROP_LABEL, detail.name); var icon_file = File.new_for_path (detail.icon_path); - if (icon_file.query_exists () == true) { - debug ("icon name = %s", icon_file.get_basename ()); + + if (icon_file.get_basename () != null) { + debug ("icon name = %s", icon_file.get_basename().split(".")[0]); menuitem.property_set (MENUITEM_PROP_ICON_NAME, - icon_file.get_basename () ); + icon_file.get_basename().split(".")[0]); + } + // TODO: Make sure to set a stock playlist image + else{ } menuitem.property_set (MENUITEM_PROP_ICON_NAME, detail.icon_path); menuitem.property_set (MENUITEM_PATH, (string)detail.path); |