Re: [Audacity-devel] Menu code committed (fixes for Linux)
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: Brian G. <bm...@ya...> - 2002-12-19 05:21:44
|
I forgot to give an overview of how it works. I am doing this from memory so I may be inaccurate. First, AudacityProject calls Commands to parse the commands.cfg XML file. Commands forewards this to CommandsReader. CommandsReader parses the XML and calls various methods in CommandsMenu. Most of the functions in CommandsMenu are simple. The intresting part is adding items and dynamic items. When adding items, GetUniqueIdentifier is called with the function list and key list. This associates the functions and keys with the identifier. When adding an effect it uses similar code that was used before and then calls the same function used to add items, with the function list set to "*@*@Effect" (Where the first * is the effect ID [integer], the second * is the type of effect [string]). Currently, all CommandsWriter does is write the default XML. When assigning defaults, the following happens. The default commands.cfg overwrites the current one. Then CommandsMenu is purged of all its data. CommandsReader then starts reading commands.cfg just like it did the first time. This could be optimized, but it doesn't seem to be a big issue. A lot of the code conversion was done by hand or using simple key macros. So there may be some code that is missing. I also checked for memory leaks on Windows and eliminated all that I could find. Brian Gunlogson __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |