summaryrefslogtreecommitdiff
path: root/src/actionGroups/menuGroup.vala
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-03-05 12:19:59 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2012-03-05 12:19:59 +0100
commit98f3ef2689de06e8ab8b46a91acfa7dd2056a3a6 (patch)
treeb98e438ac1082925e12af6dfec6d9ebeb4e3035e /src/actionGroups/menuGroup.vala
parenta824c3e5bdab686901b02667609282e7d596a6af (diff)
Imported Upstream version 0.5.1
Diffstat (limited to 'src/actionGroups/menuGroup.vala')
-rw-r--r--src/actionGroups/menuGroup.vala15
1 files changed, 4 insertions, 11 deletions
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);