Commit Graph

14940 Commits

Author SHA1 Message Date
Andreas Mohr
57f5ab7c23 Add break before empty default in switch.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
3d4d6dbb41 (advanced_chown_refresh): constify atgument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:47 +03:00
Andrew Borodin
819e0908f6 src/filemanager/ext.c: minor refactoring.
(exec_get_export_variables): return GString.
(exec_make_shell_string): likewise.
(exec_extension): exec_get_export_variables() and
exec_make_shell_string() retur GString now.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andreas Mohr
a13c0a5e42 (hotlist_run_cmd): fix fallthrough annotation warning.
fallthrough annotation does not directly precede switch label.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
9040cc3476 Fix typos. 2020-12-31 16:26:46 +03:00
Andrew Borodin
a358c8037d src/filemanager/mountlist.c: recognize more file system types as remote.
Sync with gnulib dd1fc46be12d671c1a9d9dc5a6fa8c766e99aa2f.

Sync "remote" file systems from stat.c in coreutils.
Note we only consider file systems that do not use host:resource
mount source.  I.e. those that don't generally use a colon when
mounting, as that case is already considered.  Searching for
"<fstype> /etc/fstab" was informative for identifying these.
The full list of "remote" file systems in coreutils is currently:
  acfs afs ceph cifs coda fhgfs fuseblk fusectl
  gfs gfs2 gpfs ibrix k-afs lustre novell nfs nfsd
  ocfs2 panfs prl_fs smb smb2 snfs vboxsf vmhgfs vxfs
Note also we do not include virtual machine file systems,
as even though they're remote to the current kernel,
they are generally not distributed to separate hosts.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
4fd2706f47 lib/dialog.h: include "lib/keybind.h" (due to global_keymap_t).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
cc470c615a (tty_clear_screen): rename from clr_scr and move to lib/tty.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
247ce0928d src/filemanager/find.c: get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
adb252c93e (single_dirsize_cmd): don't use global variable current_panel.
(dirsize_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
59070e8313 (change_panel): return current_panel.
(chdir_other_panel): use result of change_panel() instead of global
variable current_panel.  (chdir_to_readlink): likewise.
(tree_chdir_sel): likewise.
(quick_view_cmd): mark that we don't use the result of change_panel().
(midnight_execute_cmd): likewise.
(panel_mouse_callback): likewise.
(tree_mouse_callback): likewise.
(mcview_mouse_callback): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
be14894455 (panel_select_ext_cmd): get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
84e1bfcbd7 (panel_sync_other): get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
0e272b9e90 (do_cd): get rid of global variable current_panel usage...
...and related changes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
952933d0a7 src/filemanager/file.c: fix comments.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
33b1a58e24 (delete_cmd): get rid of global variable current_panel usage.
(delete_cmd_local): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
ab4345510b (copy_cmd): get rid of global variable current_panel usage.
(copy_cmd_local): likewise.
(rename_cmd): likewise.
(rename_cmd_local): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
11d862c9ec (smart_dirsize_cmd): get rid of global variable current_panel usage.
(single_dirsize_cmd): likewise.
(dirsizes_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
482218216f (edit_cmd) : get rid of global variable current_panel usage.
(edit_cmd_force_internal): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
759b568810 (do_view_cmd): get rid of global variable current_panel usage.
(view_cmd): likewise.
(view_file_cmd): likewise.
(view_raw_cmd): likewise.
(view_filtered_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
51d3a39d19 (mkdir_cmd): get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
4bae23495a (cd_box): get rid of global variable current_panel usage.
(quick_cd_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
7fefe1874a src/filemanager/hotlist.c: get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
2e8846163b src/filemanager/chattr.c: get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
0c00ead1b0 src/filemanager/chown.c: get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
54642d315f src/filemanager/chmod.c: get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
e801b62d73 src/filemanager/achown.c: get rid of global variable current_panel usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
41a35b9b8a Rename files:
src/filemanager/midnight.[ch] -> src/filemanager/filemanager.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Andrew Borodin
1869dffd14 Ticket #4103: code cleanup before 4.8.26 release.
Initial step: rename keymap sections:
  main -> filemanager
  main:xmap -> filemanager:xmap

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-31 16:26:46 +03:00
Marco Ciampa
18a300e64f Fixed reference to Yabasic sintax file 2020-12-28 11:58:15 +01:00
Andrew Borodin
bcb9e25d97 doc/FAQ: updates and fixups.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-26 15:50:59 +03:00
Andrew Borodin
427937f97e build-glib2.sh: fix URLs. 2020-12-26 15:50:04 +03:00
Milan Voves
e6315c1c75 Swift syntax
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-24 16:34:43 +03:00
Andrew Borodin
61bf152181 Merge branch '4155_copy_preserve_0000_mode'
* 4155_copy_preserve_0000_mode:
  Ticket #4155: preserve 0000 permissions on copy/move.
2020-12-23 15:34:15 +03:00
Andrew Borodin
861f89e4eb Ticket #4155: preserve 0000 permissions on copy/move.
(copy_file_file): remove hack for Windows NT ftp server.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-23 15:33:44 +03:00
Andrew Borodin
840fc0a49b Merge branch '4152_input_keep_first'
* 4152_input_keep_first:
  Ticket #4152: WInput: keep "first" state...
2020-12-23 15:26:45 +03:00
Andrew Borodin
f8d73e7a95 Ticket #4152: WInput: keep "first" state...
if history or completion window was cancelled.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-23 15:25:55 +03:00
Dmitry Solomennikov
f815e3593f Ticket #4158: make modarcon16 skin consistent with whitespaces.
Whitespaces (i.e. tabs and trailing spaces) are not consistent with
other parts of skin, they're bright on blue. Makes them green on black
background.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-20 17:55:09 +03:00
Andrew Borodin
662754c6f8 Filehighlight fodg, fodp, fods, fodt, odg as documents.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-20 17:48:49 +03:00
RALOVICH, Kristof
9db7573de9 Ticket #4157: add support for OpenDocument flax xml formats.
Support fodt, fods, fodp, fodg files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-20 17:44:54 +03:00
Andrew Borodin
08dd7db86a Merge branch '4149_more_terminals'
* 4149_more_terminals:
  Ticket #4149: add 'alacritty', 'tmux', 'tmux-256color' as xterm aliases
2020-12-13 20:19:59 +03:00
Sergei Trofimovich
bad1523378 Ticket #4149: add 'alacritty', 'tmux', 'tmux-256color' as xterm aliases
'alacritty', 'tmux' and 'tmux-256color' all implement Shift+F<N> keys
in an xterm-compatible way. Without this change Shift+F<N> are handled
as F<N-2> key presses.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-13 20:18:48 +03:00
Andrew Borodin
52be505d69 Merge branch '3987_smb_dir_content'
* 3987_smb_dir_content:
  Ticket #3987: implement a workaround if readdir() system call returns with EINTR.
2020-12-13 20:12:58 +03:00
Andrij Abyzov
27de03754f Ticket #3987: implement a workaround if readdir() system call returns with EINTR.
On Linux >= 5.1, MC sometimes shows empty directpries on mounted CIFS
shares. Rereading directory restores the directory content.

(local_opendir): reopen directory, if first readdir() returns NULL and
errno == EINTR.

Signed-off-by: Andrij Abyzov <aabyzov@slb.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-13 20:12:14 +03:00
Andrew Borodin
446a031350 Merge branch '4147_vfs_timeout'
* 4147_vfs_timeout:
  Drop mc_timer. Use g_get_real_time() instead.
  Ticket #4147: VFS timestamps: use g_get_real_time().
2020-12-12 20:39:40 +03:00
Andrew Borodin
78893d85b8 Drop mc_timer. Use g_get_real_time() instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-12 20:39:01 +03:00
Andrew Borodin
4a83daacc4 Ticket #4147: VFS timestamps: use g_get_real_time().
In the function vfs_expire(), curr_time and exp_time are declared
guint64. curr_time is initialised with a timestamp and exp_time
with this timestamp minus vfs_timeout seconds. Later there is if
(stamping->time <= exp_time). Prior to commit
a94dd7d2de curr_time was initialised with
a value larger than vfs_timeout seconds, so everything was fine. This
commit changed the initialisation to a timer starting when mc is
started. So for the first vfs_timeout seconds, the result of the
subtraction is negative, but it is a guint64, so we just get a VERY
large unsigned value and the if (stamping->time <= exp_time) is always
true. So mc thinks the vfs hasn't been used recently and goes into an
infinite loop.

If one opens a .rpm file with mc and goes into the CONTENTS.cpio and
then tries to go into the .tar.gz there (this is the usual structure of
a .rpm) after waiting vfs_timeout seconds, everything is fine. However,
before vfs_timeout seconds, mc hangs.

Solution: use g_get_real_time() instead of mc_timer_elapsed().

Thanks nvwarr at hotmail.com for finding out the reason for this bug.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-12 20:39:01 +03:00
Andrew Borodin
f0a3794b0e Merge branch '4145_long_file_names'
* 4145_long_file_names:
  WTree: get rid of file name limitation in quick search.
  WPanel: get rid of file name limitation in quick search.
  (mc_g_string_copy): new API that extends GString one.
  (string_file_name): get rid of file name length limitation.
  Ticket #4145: file names longer than 255 bytes are not supported.
2020-12-12 20:26:03 +03:00
Andrew Borodin
9ed9f45eac WTree: get rid of file name limitation in quick search.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-12 20:23:05 +03:00
Andrew Borodin
4eb1fcd6b7 WPanel: get rid of file name limitation in quick search.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2020-12-12 20:23:05 +03:00