
On Mon, Mar 26, 2007 at 02:07:49PM -0400, bulia byak wrote:
On 3/26/07, Gustav Broberg <broberg@...370...> wrote:
The patch adds a dockable pane to the desktop on which any GTKmm:ified dialog can be docked. Here are some screenshots showing what it's all about: http://wiki.inkscape.org/wiki/index.php/Image:Dock_patch_1.png http://wiki.inkscape.org/wiki/index.php/Image:Inkscape_dock2.png
This is an extremely desirable change. It turns Inkscape from a clunky and messy Gimp lookalike into a clean, modern-looking application. I'm all for it.
However, I foresee one problem. Currently all of our dialogs are built around the "one dialog serves all open windows" concept. Making them dock to the editing window seems to switch them to the "each window has its own dialog" paradigm. This therefore may not be as straightforward, because in each dialog we will also need to find and fix code which (1) assumes there's always only one copy of the dialog and (2) switches its state and display when a new window gets focus, and (3) applies the changes in dialog to the currently active window.
I think this may not be a showstopper. Currently, the dialogs use the ACTIVE_DOCUMENT macro or similar to get the currently active document, and adjust themselves accordingly.
But for the gtkmm'd dialogs, it would be straightforward to refactor them to use a routine in the dialog manager to get the document (and/or desktop) instead. The dialog manager is currently treated as a singleton, but I think it should not be difficult to switch it to be attached to a specific desktop/document.
Where things could get tricky is if the user docks some dialogs but leaves others undocked. Perhaps there should be a global dialog manager, plus ones that are attached to specific desktops. Sorting out the message handling could be a bit tricky, but not overly so.
Bryce