Ben:
Is the inkscape object and the inkscape_application_init( ) which creates it intended to be a Singleton pattern, or a Factory pattern, allowing more than one Inkscape::Application object, perhaps parameterised (or something else)?
Intended by whom? And why didn't he use a singleton pattern? I think answering this is moot, the code is as it is, and what could be better than my rewrite not only as singleton, but also with separation between app-wide and gui-wide code in the two singletons Application and Editor?
inkscape_application_init( ) is called in three places, in main.cpp, exactly once at application start-up; by SVGPreview::SVGPreview() when we want to provide a preview of an SVG file in a File->Open dialogue and by ImageIcon::init(), probably for similar reasons.
And what does the inkscape object do? It provides preferences info for all apps, and desktop/document info/GUI services for GUI apps.
I am assuming that the code is not wrong (the new-gui is intended to run with inkscape being NULL), but I suspect that it need to be better commented documented. If this is worth doing, could some
Again, intended by whom? I might even suspect Bryce/Derek intended to use the inkscape object in new-gui. However, I no longer rely on it, and even not on it being 0 in new-gui, to not introduce unwanted behaviour, as already seen once but quickly steered away from.
ralf