Stephan Aßmus писал 01.08.2012 11:48:
Basically our application resources are a bit like the declarative nature of Mac OS X application bundles. And if done correctly, that's a pretty nice thing, since it makes stuff known to the system independant of location that requires installation on Windows and you can't move the executable afterwards. So I am all for making the resources be capable to include all necessary information. It can currently definitely contain more than just a mime types list. Like for example document icons. I just don't know about whether it cancontain a sniffer rule. And whether it would be correctly extracted bythe sniffer, if it did.
/me sings: "Whatever happens, we have got: The BMessage, and they have not!" ;-) Corresponding RDEF entry may look like this: resource(0, "supported_types") message {message "foo" = message { string "_name" = "text/foo", string "_rule" = "0*", vector_icon "_icon" = vector_icon { $"000000" } }, message "foo1" = message { string "_name" = "text/foo1", string "_rule" = "1*", vector_icon "_icon" = vector_icon { $"000000" } },
[...]message "fooN" = message { string "_name" = "text/fooN", string "_rule" = "N*", vector_icon "_icon" = vector_icon { $"000000" } },
};There are also arrays, but I think the BMessage is much more easy to extract and parse.
-- Kind Regards, S.Zharski