Last night I decided to make it so that all Inkscape's menus could be configurable with an XML file. There was a lot of discussion on the list about it, and it didn't seem that hard, so I just did it. I'm not entirely sure that it makes any sense what so ever. But, as you can see below, people have the power to make Inkscape completely unusable. Hopefully it will be used for good instead of evil.

A picture of Inkscape with an unreasonably deep menu structure

Some issues remain. It doesn't make much sense (nor work well) to merge the skeleton of the menus file into the user's current menu configuration. Preferences uses this so that when a new preference is added, all users get it quickly. But, currently, if someone adds a new menu item for a feature not all users will get it as the menus are not merged. This is not a good thing.

Also, the lookup of the verbs is a linear search for each verb. That's just plain painful. All the ids of the verbs need to be placed in hash table, probably the numerical lookup could be deprecated if that was the case too. That would definitely reduce code size in getting rid of a huge enum.

Overall, I'm not sure that configurable menus is a good thing. Yes, users will be able to make their menus look the way that they want. But, that also makes documentation virtually impossible. I'm not sure if it's a feature that makes Inkscape easier or harder to use. It will though, make looking at proposals for menu structures much easier.


posted Jul 30, 2005 | permanent link