Dialog Manager

From Inkscape Wiki
Revision as of 14:14, 30 June 2020 by Tavmjong (talk | contribs) (Created page with " 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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)

  1. Keep a list of open dialogs (those attached to a notebook).
  2. Hide/show dialogs (notebooks).
  3. Update
    1. Floating dialogs when active window changes.
    2. Dialogs when document swapped.
    3. Dialogs when document changes(?).
  4. Delete (or hide) dialogs
    1. When closed directly.
    2. When notebook removed.
    3. When window is closed.
    4. When Inkscape closes (also save configuration).
  5. Track dialog meta-preferences. (Are there any?)


Observations/Questions

  1. The main code is in "ui/dialog/dialog-manager.h" and ...cpp.
  2. Dialogs, once created are not deleted (just hidden). (Verify)
  3. "Behavior"
    1. Floating dialogs are those that cannot be docked. The Preference dialog is currently always floating.
    2. Docking dialogs are those that can be docked, either in an Inkscape Window or in a floating Dialog Window.
    3. There is a preference to set which to use.
    4. Using Gtk::Notebooks, we should support only "dock" dialogs. (And remove an unnecessary layer of abstraction.)
  4. 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.)
  5. 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.
  6. The "PanelDialog" class handles linking dialogs to documents. It shouldn't be necessary, as we have a new (simpler) method of doing that.