Author: alexander Date: 2006-05-15 23:43:23 -0600 (Mon, 15 May 2006) New Revision: 1555
Modified: trunk/packages/xfce/cleanup-panel.pl Log: Added Xfce Menu (sort of kicker) as the first panel icon. Modified: trunk/packages/xfce/cleanup-panel.pl =================================================================== --- trunk/packages/xfce/cleanup-panel.pl 2006-05-16 03:50:36 UTC (rev 1554) +++ trunk/packages/xfce/cleanup-panel.pl 2006-05-16 05:43:23 UTC (rev 1555) @@ -2,11 +2,26 @@ use strict; use warnings; +my $lang = $ARGV[0]; +$lang =~ s/.*xml.?// ; + local $/; open(FH, "<$ARGV[0]"); my $content = <FH>; close FH; +# Translate "Xfce Menu" to the given language, present the result as UTF-8 +my $xfcemenu = `LC_ALL=en_US.UTF-8 LANGUAGE=$lang TEXTDOMAIN=xfdesktop gettext \"Xfce Menu\"`; + +# Test whether the translated menu file exists +my $menufile = "/etc/xdg/xfce4/desktop/menu.xml.$lang"; +$menufile = "/etc/xdg/xfce4/desktop/menu.xml" unless -e $menufile; + +my $menuentry = " <Group>\n <Control id=\"-1\" filename=\"libdesktopmenu.so\" use_default_menu=\"1\" menu_file=\"$menufile\" icon_file=\"/usr/share/pixmaps/xfce4_xicon1.png\" show_menu_icons=\"1\" button_title=\"$xfcemenu\"/>\n </Group>"; + +# Add this entry as the first panel icon +$content =~ s,<Groups>,<Groups>\n$menuentry,g; + # Remove popup menus related to Konqueror etc. $content =~ s,<Popup>.*?</Popup>,<Popup/>,sg; $content =~ s,popup="1",popup="0",g; -- http://linuxfromscratch.org/mailman/listinfo/livecd FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page
