Commit Graph

15527 Commits

Author SHA1 Message Date
Andrew Borodin
63e870867e Handle CK_Filter command in the file panel level.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-04-10 17:43:44 +03:00
Andrew Borodin
450993fff6 Add macros for select/unselect histories.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-04-10 17:43:44 +03:00
Andrew Borodin
45073a9d29 (panel_select_unselect_files_dialog): show error message if pattern is malformed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-04-10 17:43:42 +03:00
Andrew Borodin
0222169206 (mc_search_prepare): cache result.
mc_search_struct: add new member prepared.result to keep the result of
the mc_search_prepare() first call. It can be used to check a regexp
before call of mc_search_run() in a loop.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-04-10 17:42:43 +03:00
Andrew Borodin
975bf17d3b mc_search_struct: rename member: conditions -> prepared_conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-04-10 17:42:43 +03:00
Andrew Borodin
733f7ce54b Ticket #1373: add more options to "Filter" dialog window.
The main idea is apply same options for file filter as for file
selection and use the same dialog window.

Initial commit: refactoring: move creation of the file selection dialog
to the separate function.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-04-10 17:42:39 +03:00
Yury V. Zaytsev
55124be9bb Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2022-03-27 13:54:06 +02:00
Yury V. Zaytsev
26ea72d519 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2022-03-27 13:44:59 +02:00
Andrew Borodin
e246196c76 Update Russian translation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-27 13:50:47 +03:00
Andrew Borodin
3055d0054f Synchronize LINGUAS with the current state of the repository.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-27 13:25:30 +03:00
Yury V. Zaytsev
fa7cd003af Update doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2022-03-20 12:21:21 +01:00
Yury V. Zaytsev
f0c36b6958 Update hints translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2022-03-20 12:14:32 +01:00
Yury V. Zaytsev
93f6e4df43 Update translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2022-03-20 11:49:13 +01:00
Zoltan Puskas
9bb705aaba Ticket #4351: file highlighting: add Markdown.
Add markdown into the document highlighting extensions list, since
it's quite popular in many places.

While there are many suggested extensions for the file type[1], this
commit only adds `.md` and `.markdown` as they are the recommended ones
in RFC7763[2] and by the creator themselves[3]. The rest is a hit and
miss anyway, with support highly dependant on the underlying system or
application, and are used infrequently.

[1]https://superuser.com/questions/249436/file-extension-for-markdown-files
[2]https://datatracker.ietf.org/doc/html/rfc7763
[3]https://daringfireball.net/linked/2014/01/08/markdown-extension

Signed-off-by: Zoltan Puskas <zoltan@sinustrom.info>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-19 21:04:58 +03:00
Andrew Borodin
7fe3f4c898 Merge branch '4270_cleanup'
* 4270_cleanup: (28 commits)
  Update po/*.po files.
  (mc_setup_by_args): reduce variable scope into #ifdef to fix coverity finding.
  (translate_file): refactoring.
  (get_random_hint): refactoring.
  Fix coding style.
  (dir_list_load): rename argument: fltr -> filter.
  (show_version): display version of libssh2.
  (sftpfs_read_known_hosts): clarify displayed value of unknown host key type.
  filevercmp: fix several unexpected results.
  tests/lib/strutil/filevercmp.c: use _GL_CMP() to get sign.
  tests/lib/strutil/filevercmp.c: minor improvements.
  Tests: clarification of boolean values tests.
  Tests clean up.
  (file_mask_dialog): refactoring: get rid of goto.
  (file_mask_dialog): NULLify variables before use in next iteration.
  (_str_convert): fix memory leak.
  Include <stddef.h> where ptrdiff_t is used.
  Ticket #4330: doc/INSTALL clean up.
  Update copyright years.
  Add script to update copyright years.
  ...
2022-03-13 13:37:09 +03:00
Andrew Borodin
037e04682c Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:36:45 +03:00
Andreas Mohr
1bdf814052 (mc_setup_by_args): reduce variable scope into #ifdef to fix coverity finding.
Found by Coverity.
Coverity id #331837

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
5b4ec9b033 (translate_file): refactoring.
Allocate buffer only if charset converter is created successfully.
g_string_free() returns NULL if second argument is TRUE. Use that to get
rig of 'if' statement.
Reduce variable scope.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
a6c142ed48 (get_random_hint): refactoring.
g_string_free() returns NULL if second argument is TRUE. Use that to get
rig of 'if' statement.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
c83f989a11 Fix coding style.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
4518885f93 (dir_list_load): rename argument: fltr -> filter.
(dir_list_reload): likewise.
(handle_dirent): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
2101026d4c (show_version): display version of libssh2.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
bb42ed706c (sftpfs_read_known_hosts): clarify displayed value of unknown host key type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
7408272361 filevercmp: fix several unexpected results.
Sync with gnulib 9f48fb992a3d7e96610c4ce8be969cff2d61a01b.
Problems reported by Michael Debertol in <https://bugs.gnu.org/49239>.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
d00a1c22b9 tests/lib/strutil/filevercmp.c: use _GL_CMP() to get sign.
tests/lib/strutil/str_verscmp.c: likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
39e7a048f7 tests/lib/strutil/filevercmp.c: minor improvements.
Use ck_assert_int_lt() and ck_assert_int_gt() to check integer values.

Increase minimal version of Check up to 0.9.10.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
4f22598c9a Tests: clarification of boolean values tests.
Use mctest_assert_true and mctest_assert_false macros to check boolean
values.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
f411d44fea Tests clean up.
Remove mc-specific macros mctest_assert_int_eq and mctest_assert_int_ne.
Use ck_assert_int_eq() and ck_assert_int_ne() functions respectively.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
f0924b954d (file_mask_dialog): refactoring: get rid of goto.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andreas Mohr
2087ede32d (file_mask_dialog): NULLify variables before use in next iteration.
Found by Coverity.
Coverity id #331828
Coverity id #331850

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:27 +03:00
Andrew Borodin
09de50d3a1 (_str_convert): fix memory leak.
Found by Coverity.
Coverity id #348334.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:26 +03:00
Andrew Borodin
9f53bf5617 Include <stddef.h> where ptrdiff_t is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:26 +03:00
Andrew Borodin
185c80ffb7 Ticket #4330: doc/INSTALL clean up.
Removed description of S-Lang related options that were removed
in 0a26014ca4.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:26 +03:00
Andrew Borodin
2c205c5928 Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:26 +03:00
Andrew Borodin
67542c64b2 Add script to update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:24 +03:00
Andreas Mohr
9489b5edc4 Remove unused macros.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andreas Mohr
1bc8abd79f configure.ac: replace obsolete AC_PROG_CC_STDC macro.
Since release 2.70 of GNU Autoconf

> *** AC_PROG_CC_STDC, AC_PROG_CC_C89, AC_PROG_CC_C99 are now obsolete.
>  Applications should use AC_PROG_CC.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
dc7888ca97 doc/man/ru/mc.1.in: fix stale links.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
ca24b1d136 (ftpfs_check_proxy): read mc.no_proxy file once only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
76555ad40d man: much use of directory macros.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
d07abec4c3 (swap_panels): swap panel sort modes too.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
98932f51f4 lib/filehighlight/get-color.c: remove extra parenthesis.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
c70658ee55 Ticket #4270: code clean up before 4.8.28 release.
lib/filehighlight/get-color.c: constify function arguments.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-03-13 13:17:23 +03:00
Andrew Borodin
cbcda8a284 file highlighting: add PSD graphical format.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-01-16 21:23:31 +03:00
Andrew Borodin
e672a0e72d Ticket #4328: file highlighting: add more graphical formats.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-01-16 16:49:48 +03:00
Andrew Borodin
25e7c080a0 Merge branch '4326_isoinfo'
* 4326_isoinfo:
  Ticket #4326: iso9660: fix isoinfo check.
2022-01-16 16:45:50 +03:00
Andrew Borodin
d8b9589224 Ticket #4326: iso9660: fix isoinfo check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-01-09 18:17:24 +03:00
Alexandros Diamantidis
9bf247805a Ticket #4325: support Shift+Fn keys for KiTTY.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2022-01-05 16:01:01 +03:00
Andrew Borodin
f7c52474fb Merge branch '4323-info_segfault'
* 4323-info_segfault:
  Ticket #4323: fix segfault on change panel mode.
2022-01-05 15:53:14 +03:00
Andrew Borodin
13df437ba1 Ticket #4323: fix segfault on change panel mode.
How to reproduce:
1. Set left panel to list mode.
2. Make left panel active.
3. Change left panel to info mode.
Result: segmentation fault.

(widget_replace): fix search of the next focusable widget.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2021-12-24 16:36:38 +03:00