On Sun, 2013-05-05 at 22:59 +0200, Éloi Rivard wrote: > If I want to add a "category" metada to commands, that may be > multiple, to allow some filter in the command manager. Should I : > > 1 - Edit actions/menus files and add some category tags > > 2 - Get the category field when parsing the xml > > 3 - Adds a new "category" argument to register_command() what would the type of this argument be?
> and store categories in the list_store > > 4 - Update generate_source.c so register_commands.h use the new > argument This step could be tricky: either you just pass an empty category argument, in which case all the built-in commands have no categories, or you try to modify generate_source.c to output categories (of which I think it only has one, NAVIGATION, which I suspect is there to say whether the score should be marked as altered or not after the command has run. The second of these would be horrible, but the first leaves the question of how to add category information for built-in commands. > > 5 - Update generate_commands.c (that I just sent in the patch) so it > uses the new register_command argument too > > 6 - Regenerate register_commands.h and commands.c > > Did I miss something, There is the code that creates new commands via right-click on a menu item, that could offer a list of categories for the user to check off. > and would you be ok if I do this ? It sounds good. I think generate_source.c will be the problem, it is very horrid to work with. I will be very happy to act as tester for you if you create this on your branch in git; I will not let it languish on a branch once it is up and running. One minor thing I realized is that the menu system is (at the moment) essential for recording commands in the scheme window. Just recently I have made use of this twice. I had a sequence of commands (changing staccato into spiccato on groups of notes) that I recorded in the scheme window using the menu clicks, then (assigning the Return key to the Execute Scheme command) I was able to perform the task simply by hitting Return on the notes concerned. This at present requires menu items for commands, but it could be extended to use key-strokes, (otherwise cursor-right, for example, would still need to be a menu item). Richard _______________________________________________ Denemo-devel mailing list Denemo-devel@gnu.org https://lists.gnu.org/mailman/listinfo/denemo-devel