vfmg (DEVEL): vfmg - allow using o_output - manage GenericName and...

sparky sparky at pld-linux.org
Fri Dec 1 23:28:09 CET 2006


Author: sparky                       Date: Fri Dec  1 22:28:09 2006 GMT
Module: vfmg                          Tag: DEVEL
---- Log message:
- allow using o_output
- manage GenericName and Comment tags nicer

---- Files affected:
vfmg:
   vfmg (1.98.2.2 -> 1.98.2.3) 

---- Diffs:

================================================================
Index: vfmg/vfmg
diff -u vfmg/vfmg:1.98.2.2 vfmg/vfmg:1.98.2.3
--- vfmg/vfmg:1.98.2.2	Fri Dec  1 22:50:42 2006
+++ vfmg/vfmg	Fri Dec  1 23:28:04 2006
@@ -41,7 +41,7 @@
 	
 );
 our %opt;
-my $o_output;
+our $o_output;
 $defopt{xterm}="$ENV{'VFMG_TERM'}" if $ENV{'VFMG_TERM'};
 
 sub wms() {
@@ -159,7 +159,7 @@
 die "Missing argument {".wms()."}\n" unless exists $ARGV[0];
 
 $o_output = $ARGV[0];
-# require "VFMG/${o_output}_out.pm"; # for testing
+require "VFMG/${o_output}_out.pm"; # for testing
 eval { require "VFMG/${o_output}_out.pm" }
 	or die "Unrecognized argument: $o_output\n";
 
@@ -314,6 +314,9 @@
 
 my @apps;	# $apps{name}{category}=[icon,exec]
 our @desktop;
+my @decode_tags = qw(Name);
+eval { push @decode_tags, VFMG::Output::decode_tags() };
+
 find(\&wanted, grep -d, map {"$_/applications"} @xdg_data_dirs);
 
 sub wanted { # {{{
@@ -388,10 +391,7 @@
 	
 	$tags{Encoding} = exists $tags{Encoding} ? $tags{Encoding} : 'iso-8859-1';
 	
-	my @to_decode = qw(Name);
-	push @to_decode, qw(GenericName Comment)
-		if $o_output eq "DR17" or $o_output eq "ASCII";
-	foreach my $tag_name (@to_decode) {
+	foreach my $tag_name (@decode_tags) {
 		my @all = (grep /^$tag_name/, keys %tags);
 		next if ($#all < 0);
 		my $first = findfirstlang(@all);
================================================================

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



More information about the pld-cvs-commit mailing list