icon-naming-utils-01-extra-file.diff revision 10209
10209N/Adiff -u icon-naming-utils-0.8.1-orig/icon-name-mapping.pl.in icon-naming-utils-0.8.1/icon-name-mapping.pl.in
10209N/A--- icon-naming-utils-0.8.1-orig/icon-name-mapping.pl.in Tue Sep 19 09:59:27 2006
10209N/A+++ icon-naming-utils-0.8.1/icon-name-mapping.pl.in Tue Sep 19 10:04:25 2006
10209N/A@@ -16,6 +16,7 @@
10209N/A my $condir;
10209N/A my $LN_S = ($^O eq 'MSWin32' ? 'cp' : 'ln -s');
10209N/A my $mappingdir = "@DATADIR@";
10209N/A+my $extrafile;
10209N/A
10209N/A if (defined ($ENV{"ICON_NAME_MAPPING_DIR"})) {
10209N/A $mappingdir = $ENV{ICON_NAME_MAPPING_DIR};
10209N/A@@ -27,9 +28,9 @@
10209N/A
10209N/A Getopt::Long::Configure (@default_getopt_config);
10209N/A GetOptions ("help|h" => \&usage,
10209N/A- "context|c=s" => \$condir);
10209N/A+ "context|c=s" => \$condir,
10209N/A+ "extrafile|e=s" => \$extrafile);
10209N/A
10209N/A-
10209N/A ############################################################################
10209N/A
10209N/A sub tls_load_mapping {
10209N/A@@ -75,6 +76,7 @@
10209N/A print "Usage: $PROGRAM [OPTIONS] ...
10209N/A
10209N/A -c, --context=<dirname> Set up mapping for Context <dirname>
10209N/A+ -e, --extrafile=<file> Specify an extra mapping file <file>
10209N/A
10209N/A This utility must be run from the <theme>/<size> directory, with a
10209N/A context passsed in as the argument.
10209N/A@@ -89,4 +91,9 @@
10209N/A } else {
10209N/A my $iconmap = tls_load_mapping ("$mappingdir/legacy-icon-mapping.xml");
10209N/A tls_map_icons ($iconmap, $condir);
10209N/A+ if (defined $extrafile)
10209N/A+ {
10209N/A+ my $tmpiconmap = tls_load_mapping ("$extrafile");
10209N/A+ tls_map_icons ($tmpiconmap, $condir);
10209N/A+ }
10209N/A }