SVN: vfmg/trunk/VFMG: xfce4_out.pm xpde_out.pm

sparky sparky at pld-linux.org
Sat Dec 2 23:50:04 CET 2006


Author: sparky
Date: Sat Dec  2 23:50:04 2006
New Revision: 8046

Modified:
   vfmg/trunk/VFMG/xfce4_out.pm
   vfmg/trunk/VFMG/xpde_out.pm
Log:
- use VFMG::Icons


Modified: vfmg/trunk/VFMG/xfce4_out.pm
==============================================================================
--- vfmg/trunk/VFMG/xfce4_out.pm	(original)
+++ vfmg/trunk/VFMG/xfce4_out.pm	Sat Dec  2 23:50:04 2006
@@ -2,6 +2,7 @@
 
 use strict;
 use warnings;
+use VFMG::Icons;
 
 sub xmlname($) {
 	$_ = $_[0];
@@ -19,8 +20,7 @@
 		my $d = $main::desktop[$entry];
 		my $name = ($$d{Name} =~ /["&<>]/) ?
 			xmlname($$d{Name}) : $$d{Name};
-		my $icon = "";
-		$icon = main::scale_icon($$d{Icon}) if $main::opt{icons};
+		my $icon = &$VFMG::Icons::scale_icon($$d{Icon});
 		if ($main::menu[$no]{$entry} < 0) {
 			$apps .= qq($level<app name="$name" cmd=");
 			$apps .= ($$d{Exec} =~ /["&<>]/) ? xmlname($$d{Exec}) : $$d{Exec};
@@ -35,10 +35,12 @@
 }
 
 sub do_menu() {
+	VFMG::Icons::init();
 	print "<xfdesktop-menu>\n";
 	print qq(<title name="Desktop Menu" visible="yes"/>\n) unless $main::opt{nomenu};
 	xfce4($main::opt{strip},"\t");
 	print "</xfdesktop-menu>\n";
+	VFMG::Icons::do_fork();
 }
 
 1;

Modified: vfmg/trunk/VFMG/xpde_out.pm
==============================================================================
--- vfmg/trunk/VFMG/xpde_out.pm	(original)
+++ vfmg/trunk/VFMG/xpde_out.pm	Sat Dec  2 23:50:04 2006
@@ -3,6 +3,7 @@
 use strict;
 use warnings;
 use File::Path qw(mkpath);
+use VFMG::Icons;
 
 sub destdir {
 	return "$ENV{'HOME'}/.xpde/Start Menu/Programs";
@@ -15,8 +16,7 @@
 		my $name = main::encode($main::opt{encoding},$$d{Name});
 		if ($main::menu[$no]{$entry} < 0) {
 			$name =~ s/\"/\\\"/g;
-			my $icon = "";
-			$icon = main::scale_icon($$d{Icon}) if $main::opt{icons};
+			my $icon = &$VFMG::Icons::scale_icon($$d{Icon});
 			open F_OUT, ">> $dir/$$d{file}.lnk" or warn "$dir/$$d{file}.lnk: $!\n";
 			print F_OUT "[Shortcut]\n",
 						"Caption=$name\n",
@@ -32,7 +32,9 @@
 }
 
 sub do_menu() {
+	VFMG::Icons::init();
 	xpde($main::opt{strip}, $main::opt{destdir});
+	VFMG::Icons::do_fork();
 }
 
 1;


More information about the pld-cvs-commit mailing list