53 lines
1.6 KiB
Diff
53 lines
1.6 KiB
Diff
|
--- xdg_menu
|
||
|
+++ xdg_menu
|
||
|
@@ -1241,10 +1241,11 @@
|
||
|
return 0 if defined $menu->{'Directory'} && $menu->{'Directory'}->{'NoDisplay'} eq 'true';
|
||
|
|
||
|
my $menu_name = $menu->{'Name'};
|
||
|
+ my $menu_icon = "";
|
||
|
|
||
|
if (defined $menu->{'Directory'}) {
|
||
|
my $directory = $menu->{'Directory'};
|
||
|
-
|
||
|
+ $menu_icon = $menu->{'Directory'}{'Icon'};
|
||
|
my $directory_name = get_loc_entry($directory, 'Name');
|
||
|
|
||
|
if (defined $directory_name) {
|
||
|
@@ -1256,6 +1257,7 @@
|
||
|
}
|
||
|
|
||
|
$menu->{'PrepName'} = $menu_name;
|
||
|
+ $menu->{'PrepIcon'} = $menu_icon;
|
||
|
|
||
|
my $i = 0;
|
||
|
while (defined $menu->{'entries'}[$i]) {
|
||
|
@@ -1620,14 +1622,14 @@
|
||
|
}
|
||
|
|
||
|
my $menu_name = $menu->{'PrepName'};
|
||
|
-
|
||
|
+ my $menu_ico = $menu->{'PrepIcon'};
|
||
|
$output .= ' ' x $indent;
|
||
|
|
||
|
if ($indent == 0) {
|
||
|
$output .= "<xfdesktop-menu>\n"
|
||
|
}
|
||
|
else {
|
||
|
- $output .= "<menu name=\"" . quote_xml($menu_name) ."\" visible=\"yes\">\n";
|
||
|
+ $output .= "<menu name=\"" . quote_xml($menu_name) ."\" visible=\"yes\" icon=\"${menu_ico}.png \">\n";
|
||
|
}
|
||
|
|
||
|
foreach my $entry (@{$menu->{'entries'}}) {
|
||
|
@@ -1637,9 +1639,9 @@
|
||
|
my $name = $desktop->{'PrepName'};
|
||
|
my $exec = prepare_exec_xfce4($desktop->{Exec}, $desktop);
|
||
|
my $term = ($desktop->{Terminal} eq '1' || $desktop->{Terminal} eq 'true') ? "yes" : "no";
|
||
|
-
|
||
|
+ my $ico = $desktop->{'Icon'};
|
||
|
$output .= ' ' x $indent;
|
||
|
- $output .= " <app name=\"" . quote_xml($name) ."\" cmd=\"$exec\" term=\"$term\"/>\n";
|
||
|
+ $output .= " <app name=\"" . quote_xml($name) ."\" cmd=\"$exec\" icon=\"$ico\" term=\"$term\"/>\n";
|
||
|
}
|
||
|
elsif ($entry->{type} eq 'menu') {
|
||
|
$output .= output_xfce4_menu ($entry->{'menu'}, $indent + 1);
|