From 98f3ef2689de06e8ab8b46a91acfa7dd2056a3a6 Mon Sep 17 00:00:00 2001 From: Alessandro Ghedini Date: Mon, 5 Mar 2012 12:19:59 +0100 Subject: Imported Upstream version 0.5.1 --- src/actionGroups/menuGroup.vala | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src/actionGroups/menuGroup.vala') diff --git a/src/actionGroups/menuGroup.vala b/src/actionGroups/menuGroup.vala index 247376d..26a2662 100644 --- a/src/actionGroups/menuGroup.vala +++ b/src/actionGroups/menuGroup.vala @@ -131,18 +131,11 @@ public class MenuGroup : ActionGroup { if (type == GMenu.TreeItemType.DIRECTORY && !item.get_directory().get_is_nodisplay()) { // create a MenuGroup for sub menus - string[] icons = item.get_directory().get_icon().to_string().split(" "); - string final_icon = "application-default-icon"; - // search for available icons - foreach (var icon in icons) { - if (Gtk.IconTheme.get_default().has_icon(icon)) { - final_icon = icon; - break; - } - } - - var sub_menu = PieManager.create_dynamic_pie(item.get_directory().get_name(), final_icon); + // get icon + var icon = item.get_directory().get_icon(); + + var sub_menu = PieManager.create_dynamic_pie(item.get_directory().get_name(), Icon.get_icon_name(icon)); var group = new MenuGroup.sub_menu(sub_menu.id); group.add_action(new PieAction(parent_id, true)); group.load_contents(item.get_directory(), sub_menu.id); -- cgit v1.2.3