Formerly, each widget loaded its history self in its constructor.
Thus, history file was read as many times as many widgets with history
are in dialog.
Now all widget histories are read from ${XDG_CACHE_HOME}/mc/history
file at one time after dialog initialization.
The ev_history_load_save_t event is apllied to load histories.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Formerly, each widget saved its history self in WIDGET_DESTROY stage.
Thus, history file was read and written as many times as many widgets
with history are in dialog.
Now all widget histories are written to ${XDG_CACHE_HOME}/mc/history
file at one time before dialog destruction.
An ev_history_load_save_t event type is created to use new event engine
to save histories.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to some in-memory created config without write it to file.
(history_put): now uses history_save().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>