trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: February 2012

Re: [trinity-devel] Perl expert needed

From: "E. Liddell" <ejlddll@...>
Date: Fri, 24 Feb 2012 16:26:40 -0500
On Fri, 24 Feb 2012 11:30:27 -0800 (PST)
Darrell Anderson <humanreadable@...> wrote:

> Skilled with perl? Here are some nuisance bug reports that need resolving:
> 
> 719 Koffice: unknown icon types (http://bugs.pearsoncomputing.net/show_bug.cgi?id=719)
> 804 gwenview: unknown icon type (http://bugs.pearsoncomputing.net/show_bug.cgi?id=804)
> 805 tdeutils: unknown icon type (http://bugs.pearsoncomputing.net/show_bug.cgi?id=805)
> 806 kipi-plugins: unknown icon type (http://bugs.pearsoncomputing.net/show_bug.cgi?id=806)
> 807 tdeaddons: unknown icon type (http://bugs.pearsoncomputing.net/show_bug.cgi?id=807)
> 
> All we need to know is how to rename the problematic files and I'll create the patches.
> 
> My troubleshooting reveals the build warnings are caused by the way the perl scripts parse the 
>names of the file names. The perl scripts are looking for specific prefixes in the file names. 
>The trick is to figure out the correct file name. That's where the perl skills are needed.
> 
> For example, the problematic files in gwenview are imageops.svg and imageops.svgz. 
>I can resolve the problem by renaming those two files to hisc-action-imageops.svg and 
>hisc-action-imageops.svgz. I lack perls skills to resolve the other bug reports.

The correct names are all of the form $prefix-$type-[name].[extension], from the looks of it. The list of
acceptable values for $type is short and fairly self-explanatory: "action", "app", "device", "filesys", 
"mime". The acceptable values for $prefix are the keys of the hash %dir_hash found around line 1550 
of am_edit: "los", "lom", "him" and so on.  The corresponding values in the hash indicate that the 
$prefix is used to indicate whether the icon is generic low-colour (256-colour palette), generic high 
colour (16/24/32-bit colour), or part of the Crystal SVG set, and its pixel dimensions if it isn't vector
art.

Bug 805: kregexpeditor.svgz -> hisc-action-kregexpeditor.svgz ?  (That will get past the Perl check,
and it's the $prefix/$type combination that makes the most apparent sense, but I don't know for certain 
if the author of the application would agree with me.)

The other images are going to need to be checked for size and usage.  Assign one of the prefixes
"hi16", "hi22", "hi32", "hi48", "hi64", where the number matches the pixel dimensions of the image,
and choose a type according to how it's used (or if you have no idea, "action" is probably a safe
choice), and that will get you past the Perl check.

(Not a Perl expert by any stretch of the imagination, but I can handle regexps and hashes.)