Joined: 08 Feb 2008
Location: British Columbia, Canada
|Posted: Fri Jan 16, 2009 7:16 am Post subject: Problem with Options/Settings
|I believe a confusion exists with Options/Settings.
Each document in MDI, or each instance of AkelPad in SDI can have its own settings, such as color, font, tab size, etc. (in source code kept in "struct _WNDFRAMEA" and "struct _WNDFRAMEW"). This is very convenient for editing, since each document might require different settings.
BUT - settings are ALWAYS saved to Registry (or INI file) when:
- MDI - AkelPad is closed, settings saved are for the LAST document closed
- SDI - last instance of AkelPad is closed, settings are for that instance.
PROBLEM is that:
MDI - tabs might be re-arranged (for convenience) or all documents might be closed at once. User is not sure of which settings are actually be saved to Registry (only 1 document's settings will be used!)
SDI - user "might" have 5 different instances running, and close then in a "random" order. Same problem - user doesn't know which settings are being saved.
Result of confusion is that when AkelPad is opened next, user might get settings that are not what he wants - "left over" from last saved document.
- Modify Settings dialog like this:
New checkbox to the left should default to unchecked at program startup, and only be changed by the user manually.
- "IniSaveOptionsA" and
functions in Edit.cpp to test for checked box ("Save as default") and ONLY write to Registry or INI file if box is checked. That way, settings do NOT get saved unless user wants to, but settings can still be changed for each open document.