There's one more issue that I would like to consult.
4) There's a number of palettes provided with inkscape. If they are all displayed in tree mode, they occupy a lot of space in swatches dialog [1]. It can be quite uncomfortable to use "Ubuntu" and "Current document" palettes at the same time. In grid view mode, when all categories are collapsed into one, the situation is even worse [2].
I can think of three solutions: * Leave tree mode [1] as is and in grid mode [2] display only expanded palettes. To enhance discoverability it would be possible to expand and close palettes from popup menu [3] * Use the popup menu [3] to choose palettes that are shown in swatches dialog. If a category is shown it can further be expanded or collapsed. * Share a TreeModel behind swatches dialog between: patterns panel in fill and stroke dialog, color chooser bar at the bottom of the screen and swatches dialog. Add a dialog to choose active palettes, as shown in [4]. The solution is similar to GIMP behaviour.
Which of them do you like most?
In third case we have a data model common to a number of dialogs. How can I implement creating and sharing the object? What comes to my mind is making the data model a singleton, or associating it with SPDesktop object. Are there other possibilities?
[1] https://www.dropbox.com/s/5tfjj0ih62fxl03/swatches_categories1.png [2] https://www.dropbox.com/s/5675of3vfi926pt/swatches_categories2.png [3] https://www.dropbox.com/s/q16h3ecqhkn1pso/swatches_categories3.png [4] https://www.dropbox.com/s/v245xz3m1o82jch/palettes_dialog.png