Dialog Manager
Jump to navigation
Jump to search
A page to discuss what a dialog manager should do (motivated by 2020 GSoC dialog work).
Functions of Dialog Manager (or equivalent)
- Keep a list of open dialogs (those attached to a notebook).
- Hide/show dialogs (notebooks).
- Update
- Floating dialogs when active window changes.
- Dialogs when document swapped.
- Dialogs when document changes(?).
- Delete (or hide) dialogs
- When closed directly.
- When notebook removed.
- When window is closed.
- When Inkscape closes (also save configuration).
- Track dialog meta-preferences. (Are there any?)
Observations/Questions
- The main code is in "ui/dialog/dialog-manager.h" and ...cpp.
- Dialogs, once created are not deleted (just hidden). (Verify)
- "Behavior"
- Floating dialogs are those that cannot be docked. The Preference dialog is currently always floating.
- Docking dialogs are those that can be docked, either in an Inkscape Window or in a floating Dialog Window.
- There is a preference to set which to use.
- Using Gtk::Notebooks, we should support only "dock" dialogs. (And remove an unnecessary layer of abstraction.)
- The use of GQuark identify dialogs should be unnecessary. Use a std::map<std::string> where the string is the dialog name. (GQuark can be used for efficient look-ups but thats not needed for dialogs.)
- In desktop.cpp there are two variables "_dlg_mgr" and "_dlg_mgr_owned". It's not clear why. I could not get "Inkscape::UI::Dialog::DialogManager::getInstance() to return an instance.
- The "PanelDialog" class handles linking dialogs to documents. It shouldn't be necessary, as we have a new (simpler) method of doing that.