======================================================================== File: mimeswitch_03.zip Author: Raphael MOLL (raphael.moll@inforoute.cgs.fr) Release: 0.3 (hack, Septembre 5th, 1997) Compatibility: DR9 PR Location: contrib/Tracker/add-ons Description: Set MIME type of file to default types Notes: Resets the MIME type of common files to a common value. Default rules for conversion is governed by a mimeswitch.rc file in /boot/home or /boot/home/config/settings. By default, it resets .c, .h, .cpp & .hxx to text/x-mw-source, .txt and .text to text/plain & .html or .html to text/html. You can easily modify these rules. ======================================================================== Why this Tracker add-on ? ------------------------- In DR9 PR, mimeset has some limitations. It's hardwired, and sometime it badly recognize files or the system just loses type associations. This is a shorthand I like to use, it allows me to quickly fix mime types. I find this usefull, but your mileage may vary. By using the command-line "mimeset" command or the FileType Tracker add-on, you can achieve the same goal, but this way is just automated like I feel it. What else ? ----------- Alex will help me improve this system by examining insde of files too. Maybe another release next week. How to Install : ---------------- a) copy the binary MimeSwitch to /boot/beos/system/add-ons/Tracker b) copy mimeswitch.rc to /boot/home/config/settings How to Run : ------------ Once installed, select some files in the Tracker, and click the right mouse button (or Control-Click on a Mac), then in the contex menu select the add-on subitem and then select MimeSwitch there. If the files you selected are sources (cpp, h) or text (txt) or whatever else, their signature is set accordingly to what is said in the mimeswtich.rc files. The default is as follows : .cpp, .c, .h, .hxx, .java open as text/x-source-code (i.e. BeIDE) .txt, .text open as text/plain (i.e. StyledEdit) .html .htm open as text/html (NetPositive) .proj open as application/x-mw-project (BeIDE project) .mp3 open as audio/mpeg (typically SoundPlay in my config) In case of problems : --------------------- Make sure that the binary MimeSwitch has the "x" attribute when you issue a "dir" in the Terminal ; to check do that : a) open a Terminal, b) type in "cd /boot/beos/system/add-ons/Tracker" (without the quotes) c) type in "dir" d) yoiu should read : "-rwxrwxrwx 1 baron users 5176 Jul 19 19:57 MimeSwitch*" + some other stuff e) if you don't see "x" at in the first word or "*" at the end of the line, type in : "chmod +x MimeSwitch" End of file ----------- Raphael MOLL, #eof