On 07 Mar 2004 15:39:31 +0100, calmar wrote:
> 
> if written a quick hack what splits the mailcap file, then it
> looks-up the extension -> mime-type in a function, and when found, compares
> that mime-type with the mime-type in the mailcap file, and
> uses finally (when found again) that mailcap program in fvwm-menu-directory.
> 
> I would have to make the code more proper, but then again I don't
> know much about perl.
> 
> I don't know if this is a good solution, that's why I ask here.

Please give me some time (I am very busy now), I will add the option you
want. I am not very happy with the patch. It should parse ~/.mime.types
or /etc/mime.types files. And if, instead, we use your hardcoded approach
to include file extentions in the script itself (disallowing users to
affect them), then Perl has hashes for this, something like:

        my $extension_mime_types = {
                zip  => 'application/zip',
                cpio => 'application/x-cpio',
                ...
        };

> The next problem would be to decide what icons to use for what
> programs/mime-types.
> 
> Maybe using an additional config file ?
> mime-type -> icon,
> 
> or more probably using a command line option like this:
> --mime-pic="text/html html.png, text/plain text.png" ...

Getopt::Long(3) gives a possibility for this elegant syntax:

        --mime-icon text/html=html.png --mime-icon text/plain=text.png

I will add --mime-icon and --mime-exec (working similarly) later,
together with --use-mailcap.

Regards,
Mikhael.

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to