[Fxruby-users] Re: Fxruby-users digest, Vol 1 #57 - 2 msgs
Status: Inactive
Brought to you by:
lyle
From: <kun...@ho...> - 2003-09-12 16:26:16
|
jeroen wrote: >>For someone not too familiar with the framework yet, can I find and use >>this database somewhere, to build upon when starting to build my own >>list if needed? > > > If you do it from FOX, it is a matter of adding entries under the > registry group FILETYPES with key,value pairs as follows: > > "key" is the extension. Note FOX's system can handle sub-extensions like > .tar.gz and .gz. Also, you can use the entire filename as well, e.g. > you can map README to a certain command. > That sounds really useful and powerful. :) > "value" is of the form: > command string ';' extension string ';' bigicon [ ':' bigiconopen ] ';' miniicon [ ':' miniiconopen ] ';' mimetype > > So for example for a .jpg image type one would add: > > jpg = "/usr/local/bin/xv %s &;JPEG Image;image.xpm;mini/image.xpm;image/jpeg" > > Note the "%s" which is replaced by the actual filename. > > You can also map directory names, as in: > > /home/jeroen = ";Home Directory;kfm_home.xpm;mini/kfm_home.xpm;application/x-folder" > > > In this case the "key" is a directory name. It must start with / or \. > FOX allows subdirectories, so you can do something like: > > /include - ... > > which causes directories of the form <blabla>/include to have a certain icon. > > The icons are found by consulting the registry entry: iconpath in the > group SETTINGS. Under windows, it is a ';' separated list of directories. > Thanks, great explanation. Although I don't seem to have any of these registry entries (according to search at least...) where should they be added? Or should the application create them? > I have looked at it a little bit, and involves quite a bit of work; nevertheless, > it can be done. I have not decided yet whether we should deliver a tool to > populate the FOX database from the native-stored information, or just use > the native-stored information. Continuing to use the FOX database, as you > see, has more flexibility in terms of the bindings, while the latter is > not so flexible and makes adding our own bindings more difficult. > I'd definitely would want a tool to populate my own db with, which I then could edit. Or, if it was built into the toolkit itself, it could first read directly from the defaults, then anything in the local db would override if pointing to the same. Either way, I do not like the non-flexible solution. Thanks again, -- Kristoffer -- Sent using: Mozilla Thunderbird 0.2 (20030901) http://www.mozilla.org/projects/thunderbird/ |