Author: sparky                       Date: Sun Oct 30 20:25:14 2005 GMT
Module: vfmg                          Tag: DEVEL
---- Log message:
- cleanups, looks usable for me

---- Files affected:
vfmg:
   vfmg (1.73.2.7 -> 1.73.2.8) 

---- Diffs:

================================================================
Index: vfmg/vfmg
diff -u vfmg/vfmg:1.73.2.7 vfmg/vfmg:1.73.2.8
--- vfmg/vfmg:1.73.2.7  Sun Oct 30 20:47:42 2005
+++ vfmg/vfmg   Sun Oct 30 21:25:05 2005
@@ -280,8 +280,7 @@
 }
 
 sub getname {
-       $file=~s/\s*(.*?)\s*<//;  # shouldn't be "s/^...</</"? --radek
-       $file="<".$file;
+       $file=~s/\s*(.*?)\s*</</;
        $1;
 }
 
@@ -642,19 +641,19 @@
 
 my $DoConvert = `which convert`;
 sub scale_icon {
-       my $icon_in = $_[0];
+       my $icon_in = shift;
 
        return $icon_in unless $DoConvert;
 
        my $icon_out = $icon_in;
-       my $icon_ext = $_[1];
-       my $convert_options = $_[2];
+       my $icon_ext = shift;
+       my @convert_options = @_;
 
        $icon_out =~ s/^.*\///;
        $icon_out =~ s/\..*$//;
        $icon_out = "$icon_dir/$icon_out.$icon_ext";
        if( ! -f "$icon_out") {
-               system("convert $convert_options $icon_in $icon_out");
+               system("convert",@convert_options,$icon_in,$icon_out);
        }
        return $icon_out;
 }
@@ -874,7 +873,7 @@
        print "AddToMenu $file \"$basename\" Title\n";
        foreach my $entry(sort keys %{$menu[$no]}) {
                $icon=$menu[$no]{$entry}[1] if $o_icons;
-               $icon=scale_icon($icon,"png","-geometry 21x18") if $icon;
+               $icon=scale_icon($icon,"png","-geometry","21x18") if $icon;
                $icon="\%$icon\%" if $icon;
                
                if($menu[$no]{$entry}[0]<0) {
@@ -961,7 +960,7 @@
                $name=encode($o_enc,$entry);
                my $icon="";
                $icon=$menu[$no]{$entry}[1] if $o_icons;
-               $icon=scale_icon($icon,"png","-geometry 18x18") if $icon;
+               $icon=scale_icon($icon,"png","-geometry","18x18") if $icon;
                if($menu[$no]{$entry}[0]<0) {
                        $name=~s/\"/\'/g;
                        print $F_OUT "\"$name\" \"$icon\" exec 
\"$menu[$no]{$entry}[2]\"\n";
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/vfmg/vfmg?r1=1.73.2.7&r2=1.73.2.8&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to