Opened 13 years ago

Closed 6 years ago

#7 closed defect (fixed)

Change text .ini to .cfg files

Reported by: Andreas Schnellbacher Owned by: Andreas Schnellbacher
Priority: major Milestone: 2.0 beta
Component: Other Version: 1.14
Keywords: Cc:

Description

The ini format doesn't allows for spaces left from the equal char.
Therefore the .ini extension should not be used for these files.

Esp. the Colors.ini file needs alignment to keep readability.

Applies to: colors.ini, alias.ini, objects.ini.

In order not to mess up user's config it's important to change it
before an official release.

Change History (8)

comment:1 by Andreas Schnellbacher, 13 years ago

Status: newaccepted

comment:2 by Andreas Schnellbacher, 11 years ago

In order to lower the number of config files, all these settings will be
combined to one .cfg file called NEPMD.CFG or USER.CFG. The layout will
be changed from text .ini style to settings_path = value style without
.ini sections.

The default values for it can be specified in DEFAULTS.DAT. It will be
renamed to DEFAULTS.CFG.

The contents of these two files were written to NEPMD.INI. Later a user
can add persistant settings to his NEPMD.CFG or USER.CFG that will be
written to NEPMD.INI every startup. The mechanism is similar to Mozilla
apps and prefs.js/user.js.

comment:3 by Andreas Schnellbacher, 11 years ago

Status: acceptedassigned

comment:4 by Andreas Schnellbacher, 7 years ago

The first step was made with the release of 1.18: The import of %NEPMD_USERDIR%\bin\USER.CFG works and both files DEFAULTS.CFG and USER.CFG were automatically imported on the next EPM start if they were changed.

Adding the content of COLORS.CFG and OBJECTS.CFG to DEFAULTS.CFG also adds another requirement: A possible import process of these settings would only give usable results if settings were deleted before import.

In r2975, a function was added for that. This has to be tested and should be triggered by a pseudo setting in DEFAULTS.CFG, e.g.:

\NEPMD\User = DELETE:

When this works, the color and object settings can be moved to DEFAULTS.CFG.

Last edited 7 years ago by Andreas Schnellbacher (previous) (diff)

comment:5 by Andreas Schnellbacher, 7 years ago

In r3008, the last remaining .CFG file, COLORS.CFG, was moved to DEFAULTS.CFG.

Additionally to the delete-before-import option for USER.CFG, a new NEPMD.INI key has to be set on import: Install -> UserCfgJustImported = 1. This is required for the automatic sync. in COLORS.ERX to handle sync. after import different (Cfg. to Pal.) from all other situations (Pal. to Reg.).

Version 1, edited 7 years ago by Andreas Schnellbacher (previous) (next) (diff)

comment:6 by Andreas Schnellbacher, 7 years ago

Install -> UserCfgJustImported = 1 was added with r3010.

comment:7 by Andreas Schnellbacher, 7 years ago

The deletion of keys had a severe bug. r3011 fixes that. r3012 adds \NEPMD\User = DELETE: on export.

What remains is to add a menu item for import of a *.cfg file to the preferences popup menu and to add the code for that.

Last edited 7 years ago by Andreas Schnellbacher (previous) (diff)

comment:8 by Andreas Schnellbacher, 6 years ago

Resolution: fixed
Status: assignedclosed

Added with r3026 and before.

Note: See TracTickets for help on using tickets.