From: Tito D. C. <ti...@da...> - 2007-12-02 23:36:48
|
Hardcoded things are ugly. Collection names were hardcoded, until now. ShapeFusion now reads them from a simple external text file, /usr/local/share/shapefusion/DefaultNames.txt. It looks for lines in the form collection N string and collection N will get the name specified by string. Comments start with the usual '#', and blanks are ignored (except those inside names). If the file is not found, if it is not readable, or if a name for a particular collection is missing, a collection will get a dummy "Collection N" name. A planned improvement is to extend this to sounds, with the same syntax and in the same file. An awesome thing is that the shapes sequence editor will be able to know sound names and display nice popup menus, rather than those meaningless sound IDs. Another planned feature is to look in different places for that file. For example, the MacOS X build should look inside the application bundle rather than /usr/local/share/shapefusion, and the Windows build could look in the directory containing the executable. But more important, precedence will be given to a similar file in the user's home directory (.shapefusion/DefaultNames.txt or similar), so one will be able to give meaningful names for her own scenario in a simple and consistent way. The only drawback I can think of is that a 'make install' step is now required in linux, to make sure the file is there. But we can also tell the user "put that default file in ~/.shapefusion" in the README. Comments? Tito -- Physics is reverse engineering |