* 4357_cleanup: (39 commits)
Update po/*.po files.
src/filemanager/dir.c: minor sort optimization.
lib/util.h: fix typo.
(edit_sort_cmd): clarify hint for Sort command.
(query_default_callback): clarify widget position.
(mc_config_get_string): use mc_config_get_string_raw()
(ftpfs_setup_active): clarify handling of getnameinfo() errors.
(ftpfs_initconn): clarify errno setup.
ftpfs.c: variable ftpfs_errno is assigned but never used.
(ftpfs_dir_load): fix building of remote path.
(vfs_s_subclass::dir_load): constify argument.
Minor refactoring of path canonicalization.
(mc_chdir): clarufy setup of errno.
(vfs_path_get_by_index): set errno, update description.
Fix ENOTSUP usage.
mceditor: minor refactoring of file load.
(edit_init): change argument for coordinates.
(edit_add_window): change argument for coordinates.
(widget_adjust_position): change argument for coordinates.
(group_init): change argument for coordinates.
...
Get rid of sort condition double check.
Condition
ad == bd || panels_options.mix_all_files
was checked twice: first in sort_xxx(), then in sort_name() called in
sort_xxx().
Now this condition is checked in sort_xxx() only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If dialog should be placed too high (in the upper half of the screen
closer to the screen top), show it centered.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Handle errors of bind(), getsockname(), and listen() calls.
Return if one of these functions fails and setup errno to indicate the
cause of the error.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Call of mc_build_filename(remote_path, ".") is pointless
because the path canonicalization is performed and trailing
"/." is removed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Remove E_NOTSUPP define. Use ENOTSUP directly where required.
(vfs_clone_file): use ENOTSUP instead of EOPNOTSUPP.
(mc_open): likewize. Fix sign.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(edit_load_file_from_filename): make public, use it as main function to
load file and create editor window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to pass given WRect object directly to widget callback withowt
constuction/deconstuction of intermediate WRect object.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Rename to input_push_history().
Use input's buffer.
Don't duplicate an empty string, use current one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(filevercmp_test5): rename variables. START_TEST macro uses the variable
name _i, so GCC complains about redefining it with a different type
here.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
filevercmp: don't treat entire filename as suffix.
Sync with gnulib 1ba2b66ea45f9bc43cdc0f6f93efa59157d2b2ba.
(file_prefixlen): When stripping (\.[A-Za-z~][A-Za-z0-9~]*)*$ suffixes,
do not strip the entire file name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
(ftpfs_init_data_socket): handle return value of
getpeername()/getsockname() and try to reconnect to FTP server
for 10 attempts in case of error.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
How to reproduce:
start mc (with fish as your shell);
resize mc window;
type any command in the command prompt, for example, "ls";
result: nothing happens;
type the same command again;
it works now, the second time.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to prevent leaving wal/shm files after viewing sqlite database.
The problem I often had with viewing .sqlite files with mc is that
exiting the view mode mid-way may leave .wal/.shm files in the database
directory.
This never caused any actual issues, but a bit annoying, since leftover
.wal files are often a sign that the program working with the database
exited ungracefully.
This effectively reproduces mc's behaviour:
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "/tmp/testsqlite/db file.sqlite" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
'db file.sqlite-shm'
'db file.sqlite-wal'
After the change -- no shm/wal files
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "file:/tmp/testsqlite/db file.sqlite?immutable=1" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
You can find the docs on immutable mode here:
https://www.sqlite.org/uri.html#uriimmutable
Immutable mode has been supported in sqlite since 2014:
https://www.sqlite.org/changes.html#version_3_8_5
In case user's sqlite installation is older, the mode is just quietly
ignored, so the change is backwards compatible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 1373_more_filter_options:
Update po/*.po files.
Document new filter options.
Load and save filter parameters.
Implement more option for panel filter:
Rename panel_select_flags_t -> select_flags_t.
Handle CK_Filter command in the file panel level.
Add macros for select/unselect histories.
(panel_select_unselect_files_dialog): show error message if pattern is malformed.
(mc_search_prepare): cache result.
mc_search_struct: rename member: conditions -> prepared_conditions.
Ticket #1373: add more options to "Filter" dialog window.