Now history is not saved if it was not modified and content of input
line is equal to history top entry. Thanks Francesco Cosoleto
<cosoleto at gmail dot com> for the original patch.
Also fixed a regression introduced in cff5925598:
after CK_HistoryNext and CK_HistoryPrev actions in input line,
the input line content is not put to the top of history.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(hist_next): get rid of direct access to the next histroy item.
(history_show): remove redundant check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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>
* moved from lib/vfs/mc-vfs to lib/vfs;
* split by directories for VFS-plugins and moved to src/vfs;
* lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Most of keybind names are changed to unify that names.
Details see in doc/keybind-migration.txt file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Instead of hardcoded (via MC_USERCONF_DIR) path mc mc now used
dynamic directories specified by environment variables:
* XDG_CONFIG_HOME - dir for config files . By default is ~/.config/mc
* XDG_DATA_HOME - dir for some data, such as user defuned Syntax file, menu etc By default is ~/.local/share/mc
* XDG_CACHE_HOME - dir for temp files, such as cooledit.clip etc. By default is ~/.cache/mc
This is mainstream standard already adopted by many projects.
Old settings will be migrated at first time from ~/.mc to these dirs.
See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html for more info.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
All file panels related stuff was moved to midnight.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>