Problem with Options/Settings

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 147
Joined: Fri Feb 08, 2008 6:41 pm
Location: British Columbia, Canada

Problem with Options/Settings

Post by Surveyor »

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.

SOLUTION:
  1. Modify Settings dialog like this:
    Image
    New checkbox to the left should default to unchecked at program startup, and only be changed by the user manually.
  2. Modify
    • "RegSaveOptionsA",
    • "RegSaveOptionsW",
    • "IniSaveOptionsA" and
    • "IniSaveOptionsW"
    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.
Comments?

- Surveyor

Offline
Posts: 40
Joined: Sat Sep 06, 2008 1:39 am

Post by ravenlaughs »

That is a good idea!
Post Reply