Commit Graph

13904 Commits

Author SHA1 Message Date
Andrew Borodin
adc6bd83d6 (dlg_adjust_position): refactoring. 2016-09-11 11:11:01 +03:00
Andrew Borodin
fb4f4674c7 Ticket #3641: code cleanup before 4.8.18 release.
(dlg_adjust_position): don't change origin of non-centered dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-09-11 11:11:01 +03:00
Sergey Sharybin
834c09a283 Ticket #3683: initial support of GLSL syntax highlighting.
This is an initial support of GLSL syntax highlight for mcedit.
Keyword and and built-in function lists are based on glsl-mode.el
from emacs (which is originally written by Xavier Decoret and
Jim Hourihan).

Supports GLSL 4.5.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-08-31 11:06:28 +03:00
Andrew Borodin
03742623de Merge branch '3668_mcedit_load_bookmarks'
* 3668_mcedit_load_bookmarks:
  Ticket #3669: mcedit: don't kill bookmarks when open file from "Find File" dialog.
2016-08-26 15:07:46 +03:00
Andrew Borodin
f2a76c2961 Ticket #3669: mcedit: don't kill bookmarks when open file from "Find File" dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-08-26 15:07:13 +03:00
Andrew Borodin
e60cc8f029 Merge branch '3669_load_passive_panel'
* 3669_load_passive_panel:
  Ticket #3669: cannot change directory in the active panel
2016-08-16 14:28:45 +03:00
Andrew Borodin
5475e35378 Ticket #3669: cannot change directory in the active panel
...after changing VFS in the passive one.

Steps to reproduce:
1. Make left panel active.
2. Press F9 to open menu, select 'Right', then 'FTP link...'
3. Insert a valid FTP URL and press OK (or Enter). Wait for finish of FTP
directory reading.
4. Left panel is still active. Try to change CWD here by pressing Enter
or using command line.

Result: error messages 'ftpfs: CWD failed' and 'Cannot change directory'
or 'Cannot chdir to...'.

The problem: when VFS is changed in the passive panel, VFS CWD is
changed accordingly. Then active panel tries use the new VFS CWD.

The solution: restore VFS CWD after changing VFS in the passive panel.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-08-10 10:45:41 +03:00
Andrew Borodin
c47f112fb8 Merge branch '3075_x_enter_bind'
* 3075_x_enter_bind:
  Ticket #3075: (midnight_callback): make alt-enter, ctrl-enter, ctrl-shift-enter bindable.
2016-08-04 10:28:23 +03:00
Mooffie
4a0f265d95 Ticket #3075: (midnight_callback): make alt-enter, ctrl-enter, ctrl-shift-enter bindable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-08-04 10:23:29 +03:00
Andrew Borodin
5313f3917a doc/man/ru/mc.1.in: add missing line break. 2016-08-04 09:54:52 +03:00
Andrew Borodin
7767762dce Merge branch '3641_cleanup'
* 3641_cleanup: (23 commits)
  Cleanup unused macros.
  (mc_search__translate_replace_glob_to_regex): cleanup compile warning.
  mcedit: syntax: associate node executables with JavaScript syntax.
  (mc_ctl): join conditions.
  (vfs_strip_suffix_from_filename): refactoring.
  lib/tty/key.h: remove declaration of unimplemented function.
  Fix default shortcut for "HotList" command.
  (vfs_setup_cwd): move directory test to separate function.
  (setup_panels): clarify panel size caclulation.
  (panel_update_cols): move from panel.c to layout.c.
  (tree_move): support VFS.
  (check_callback): clean unneeded type casting.
  Refactoring of widget's position and size calculation.
  Refactoring of dialog's position and size calculation.
  Ticket #3562: fix Glib-critical asserts in empty WListbox.
  (mc_search_set_error): cleanup compile warning on older gcc compilers:
  Find file: fix directory search order to be depth-first again.
  (variable_completion_function): cleanup Wconditional-uninitialized warning.
  Minor refactoring of mc shutdown.
  (make_symlink): trivial refactoring.
  ...
2016-07-29 09:33:22 +03:00
Andreas Mohr
b36cec44e3 Cleanup unused macros.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andreas Mohr
d013592eb4 (mc_search__translate_replace_glob_to_regex): cleanup compile warning.
glob.c:143:21: warning: implicit conversion loses integer precision: 'int' to 'char' [-Wconversion]
                c = ++cnt;
                  ~ ^~~~~
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Mooffie
b218a28a45 mcedit: syntax: associate node executables with JavaScript syntax.
Some distros name the binary 'nodejs', some 'node'.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
28e4dfd059 (mc_ctl): join conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
e2c62afcc7 (vfs_strip_suffix_from_filename): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
b808dc564f lib/tty/key.h: remove declaration of unimplemented function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
b862c05221 Fix default shortcut for "HotList" command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
9f606a6668 (vfs_setup_cwd): move directory test to separate function. 2016-07-29 09:32:04 +03:00
Andrew Borodin
2abb92d7e6 (setup_panels): clarify panel size caclulation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
6951d70c7c (panel_update_cols): move from panel.c to layout.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
2f8b1de05f (tree_move): support VFS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
e07408e8c7 (check_callback): clean unneeded type casting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:32:04 +03:00
Andrew Borodin
b0e3552847 Refactoring of widget's position and size calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
86fd77155e Refactoring of dialog's position and size calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
wwp
e629712197 Ticket #3562: fix Glib-critical asserts in empty WListbox.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andreas Mohr
e4badcf7bc (mc_search_set_error): cleanup compile warning on older gcc compilers:
search.c: In function 'mc_search_set_error':
search.c:497:36: error: declaration of 'mc_search' shadows a global declaration [-Werror=shadow]
search.c:419:1: error: shadowed declaration is here [-Werror=shadow]

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Oswald Buddenhagen
bb782ad8ef Find file: fix directory search order to be depth-first again.
This matches the pre-glib implementation, and is way more natural.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andreas Mohr
8710d2522f (variable_completion_function): cleanup Wconditional-uninitialized warning.
input_complete.c:383:42: error: variable 'p' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
        temp = g_string_new_len (*env_p, p - *env_p);
                                         ^

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
c343697407 Minor refactoring of mc shutdown.
Move calls of disable_mouse() and disable_bracketed_paste()
to main() because init_mouse() and enable_bracketed_paste()
are called here.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
47cee2d241 (make_symlink): trivial refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
996f23ac5d (make_symlink): apply coding guidelines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
3f1cd8d021 (make_symlink): join if statements.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
4d8e37b9dc Ticket #3641: code cleanup before 4.8.18 release.
(check_hardlinks): use g_try_new0() istead g_new0() because result is
checked.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:29:36 +03:00
Andrew Borodin
3265531907 Merge branch '3665_netbsd_curses'
* 3665_netbsd_curses:
  Ticket #3665: fix compatibility with netbsd curses.
2016-07-29 09:22:48 +03:00
rofl0r
38d4c655d3 Ticket #3665: fix compatibility with netbsd curses.
The code that manipulates the ncurses backend into changing
the key combination to generate SIGINT from CTRL-c to CTRL-g does
so by accessing undocumented internal ncurses data structures.
This breaks compilation with netbsd-curses[0], and could also break
when the ncurses author decides to change internal structures in a
future release.

Fix it by using a portable approach that works everywhere using libc
primitives instead.

[0] https://github.com/sabotage-linux/netbsd-curses

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-29 09:21:02 +03:00
Andrew Borodin
837a21009e Merge branch '3663_panelize_keep_marked'
* 3663_panelize_keep_marked:
  Ticket #3663: panelize: don't reset marks on marked files.
2016-07-16 09:56:51 +03:00
Mooffie
d6aa2ff924 Ticket #3663: panelize: don't reset marks on marked files. 2016-07-16 09:50:37 +03:00
Andrew Borodin
6b6d29e03c Merge branch '3660_view_archive'
* 3660_view_archive:
  Ticket #3660: unable to view archive content using F3.
2016-07-09 19:22:49 +03:00
Andrew Borodin
0c73ca195f Ticket #3660: unable to view archive content using F3.
(mc_popen): fix termination of command array.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-09 19:21:15 +03:00
Andrew Borodin
aa79525bb8 Merge branch '3661_panel_mouse_click'
* 3661_panel_mouse_click:
  (edit_dialog_command_execute): when switch to another window, do not select it twice.
  Set WOP_TOP_SELECT options for panel widgets: WPanel, WView and WTree.
  Ticket #3661: wrong handling of mouse clicks in long listing mode.
2016-07-09 19:15:01 +03:00
Seray Rosh
0f7d5cfcd1 (edit_dialog_command_execute): when switch to another window, do not select it twice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-09 19:13:20 +03:00
Andrew Borodin
cd90f2f98c Set WOP_TOP_SELECT options for panel widgets: WPanel, WView and WTree.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-09 19:13:20 +03:00
Andrew Borodin
7c74fd90f0 Ticket #3661: wrong handling of mouse clicks in long listing mode.
This occurs if the left panel is in long listing mode and the right
panel is in full listing mode:
When the left panel is active and you click on the right side of the
panel, the click event is directed to the (inactive) right panel instead
of the (active) left panel.

This occurs if the right panel is in long listing mode:
When the left panel is active and you click on the left panel, the click
event is always directed to the (inactive) right panel. It's impossible
to click anything on the left panel, if the right panel is in long
listing mode.

Thanks Seray Rosh <seray.rosh@web.de> for intial patch.

Initial commit: refactoring of widget selection.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-09 19:13:20 +03:00
Andrew Borodin
5848342bb2 Merge branch '3655_output_lines'
* 3655_output_lines:
  (layout_box): don't update dialog view after close.
  Ticket #3655: the "Output lines" option has no effect.
2016-07-04 09:03:35 +03:00
Andrew Borodin
87df81697a (layout_box): don't update dialog view after close.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-04 09:02:53 +03:00
Andrew Borodin
cf221f7f5f Ticket #3655: the "Output lines" option has no effect.
This bug was introduced in a8101d8403.

(layout_box): set up the output_lines value after close "Layout" dialog
box.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-07-04 09:02:53 +03:00
Andrew Borodin
36d00d03da doc/man/ru/mc.1.in: add midding line break. 2016-06-28 10:33:51 +03:00
Andrew Borodin
1f5e93efc9 Merge branch '3642_subshell_optional'
* 3642_subshell_optional:
  Ticket #3642: make --with-subshell=optional working again.
2016-06-28 09:40:54 +03:00
Andrew Borodin
76a4969b00 Ticket #3642: make --with-subshell=optional working again.
The bug was introduced in 83b02196c8.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-28 09:40:27 +03:00