Commit Graph

12584 Commits

Author SHA1 Message Date
Andrew Borodin
d8bb31c665 Ticket #3076: copy/move doesn't work if num_history_items_recorded=0.
How to reproduce:
1. Set num_history_items_recorded=0 in my $HOME/.config/mc/ini
2. Run mc.
3. Press F5 to copy and then enter.
Result: nothing happens.

Solution: refactoring of initial text usage in input line.
Use def_text to fill WInput:buffer when WInput is created.
Then overwrite WInput::buffer content from history if history usage
is enabled.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:53:53 +04:00
Andrew Borodin
f5f177e711 Fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-06 16:38:52 +04:00
Andrew Borodin
51769255b9 Merge branch '3050_bg_colors'
* 3050_bg_colors:
  Ticket #3050: don't use bright colors as background ones.
2013-11-06 16:12:14 +04:00
Andrew Borodin
e5e0a77bc9 Ticket #3050: don't use bright colors as background ones.
Only following colors can be used in 16-color skins:
black, red, green, brown, blue, magenta, cyan, lightgray.

Following colors are replaced in 16-color skins:

white -> lightgray
yellow -> brown
brightgreen -> green

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-17 09:28:19 +04:00
Andrew Borodin
535bc899ad Refresh all translations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:50:54 +04:00
Andrew Borodin
5a04c1ede2 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:27:24 +04:00
Andrew Borodin
f02dff7462 Merge branch '3051_cleanup'
* 3051_cleanup: (36 commits)
  Ticket #3092: fix some minor manual formatting errors.
  Ticket #3091: iso9660: fix truncated filenames.
  Ticket #3089: (load_panelize): drop deprecated "find -perm +xxx" syntax.
  Clarify usage of SA_RESTART.
  (check_file_access): return FALSE if Esc was pressed.
  NEWS: Fix wording, "ignorance" is inappropriate here.
  mc.1.in: Fix typo with clipboard_paste command.
  Remove input_set_origin(). Use widget_set_size() instead.
  (input_destroy): don't call input_free_completions() twice.
  More tests for canonicalize_pathname().
  Remove redundant checks for g_strdup().
  Use vfs_translate_path() to avoid extra string duplication.
  (vfs_translate_path): return const char *.
  src/vfs/extfs/helpers/urar.in: add comment.
  (extfs_get_path_int): fix memory leak.
  Directory size: rename variables for consistency.
  (do_compute_dir_count): display directory name only.
  Typo.
  (edit_ok_to_exit): get rid of file name string duplication.
  (widget_init): init pos_flags member to WPOS_KEEP_DEFAULT.
  ...
2013-10-04 09:16:07 +04:00
Egmont Koblinger
9c80a46095 Ticket #3092: fix some minor manual formatting errors.
* "OnDumbTerminals" appears as one word.
  * Unnecessary linebreak at "Vertical or Horizontal" (under Panel split).
  * Inconsistency: some dots missing.
  * Fix obsolete URL and e-mail address.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Oleksandr Natalenko
97d7bdfd77 Ticket #3091: iso9660: fix truncated filenames.
±1 problem results in truncating filenames in ISO file listing. This
commit fixes the issue.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Andrew Borodin
50734c0716 Ticket #3089: (load_panelize): drop deprecated "find -perm +xxx" syntax.
Use "find -perm /xxx" instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Andrew Borodin
6a05f30ecf Clarify usage of SA_RESTART.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Andrew Borodin
c26c3cc4fd (check_file_access): return FALSE if Esc was pressed.
edit_query_dialog2() returns (-1) in this case.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Paul Sokolovsky
c3d1cf74d1 NEWS: Fix wording, "ignorance" is inappropriate here.
Merriam-Webster dictioanry defines ignorance as "a lack of knowledge,
understanding, or education". It's quite different from "ignoring",
meaning "not considering".

Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Paul Sokolovsky
3145a40e08 mc.1.in: Fix typo with clipboard_paste command.
Signed-off-by: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Andrew Borodin
c058e92586 Remove input_set_origin(). Use widget_set_size() instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
b0a793c420 (input_destroy): don't call input_free_completions() twice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
61dc030772 More tests for canonicalize_pathname().
(custom_canonicalize_pathname): fix wrong condition. Remove redundant
break.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
e78b1fdf66 Remove redundant checks for g_strdup().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
20ab79ba00 Use vfs_translate_path() to avoid extra string duplication.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
034e973fbf (vfs_translate_path): return const char *.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
ae824a3622 src/vfs/extfs/helpers/urar.in: add comment.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
e4747a8c5d (extfs_get_path_int): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
0fb3e0a3c7 Directory size: rename variables for consistency.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
01d6801f4e (do_compute_dir_count): display directory name only.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
a6b3cc8f24 Typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
5d1d542da9 (edit_ok_to_exit): get rid of file name string duplication.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:07 +04:00
Andrew Borodin
200cb115ab (widget_init): init pos_flags member to WPOS_KEEP_DEFAULT.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:07 +04:00
Andrew Borodin
1b041ad484 (add2panelize_cmd): minor optimization and type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:07 +04:00
Andrew Borodin
5e81b4be89 (do_panelize_cd): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:07 +04:00
Andrew Borodin
0a784f4d2e (mc_search_regex__process_append_str): minor optimization and cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
fbdf3adfbf (mc_search__cond_struct_new_regex_accum_append): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
d119439a1c (mc_search__conditions_free): use g_ptr_array_foreach().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
00f6272364 (mc_search__cond_struct_new_regex_hex_add): refactoring to get rid of extra memory allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
bb2f5d35f3 (mc_search__run_regex): optimization
...for case where there is no MC_SEARCH_CB_INVALID or MC_SEARCH_CB_SKIP
return codes (for search from file manager), so we can copy line
at regex buffer all at once.

Thanks Sergey Naumov <sknaumov@gmail.com> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
9ea1ed08c6 mcedit: file loading speed up.
Apply direct line counting during file reading.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
13c8f5213b (load_panelize): replace while() by for() and fix potential memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
bb142bf47f (lookup_key): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
546e89f611 (vfs_path_tokens_get): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
f3bdcb186b (mc_skin_colors_old_configure_one): cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
9232bcb093 (edit_load_macro_cmd): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
26fbddf6f4 (vfs_path_tokens_count): refactoring: get rid of extra memory allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Marco Atzeri
87a5f11452 Ticket #3053: src/filemanager/filegui.c: fix preprocessor condition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Dmitry Smirnov
69de5b830f Ticket #3051: prepare to 4.8.11 release.
Ticket #3052: fix man page "macro `\' not defined" warnings.

man --warnings doc/man/mc.1 >/dev/null

reported the following warning:

3114: warning: macro `\' not defined".

and indeed man page didn't look correct at the line starting with "Apply
escaping".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
80c2318890 Merge branch '2978_tmux_keys'
* 2978_tmux_keys:
  Ticket #2978: fix for Home, End, Shift+Fn problems under screen/tmux.
2013-10-03 15:45:36 +04:00
Sergey Naumov
1f05e56b5c Ticket #2978: fix for Home, End, Shift+Fn problems under screen/tmux.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 15:45:16 +04:00
Andrew Borodin
466e5bc4c5 Merge branch '1588_rpm_enhancement'
* 1588_rpm_enhancement:
  Ticket #1588: rpm extfs enhancements:
2013-10-03 12:45:50 +04:00
Andrew Borodin
33896c610b Ticket #1588: rpm extfs enhancements:
* Improve support for EPOCH
  * Add support for PREINPROG/POSTINPROG/PREUNPROG/POSTUNPROG
  * Add support for VERIFYSCRIPTPROG
  * Add support for TRIGGERSCRIPTS/TRIGGERSCRIPTPROG

Thanks Arkadiusz Miśkiewicz <arekm@maven.pl> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 12:43:00 +04:00
Slava Zanko
836cff5863 Fix indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-10-03 10:57:03 +03:00
Andrew Borodin
c55b4808f6 Merge branch '2661_mcedit_paste'
* 2661_mcedit_paste:
  Handle newline and tab with shift/ctrl modifiers correctly.
  Support bracketed paste mode of xterm in mcedit.
  Ticket #2661: support enable bracketed paste of xterm.
2013-10-03 11:42:07 +04:00
Egmont Koblinger
930f683019 Handle newline and tab with shift/ctrl modifiers correctly.
MC already has its own half-ready trick: when pasting with Shift-Insert,
using the X11 extension, the newline ("Enter" as mc calls it) with the
Shift modifier pressed gets converted to a "Return", and in the editor
the Return character inserts a non-indenting newline. This makes pasting
better in terminals not supporting bracketed paste, however, it has some
problems that this commit addresses:

  * Shift+newline gets this special treatment, but Ctrl+newline gets
    dropped. Hence e.g. when pasting in Gnome-terminal with Ctrl+Shift+V
    all the newlines will be missing. This commit adds the same
    non-indenting newline behavior to Ctrl+Newline and Ctrl+Shift+Newline.

  * The code forgets about Tab that also needs special treatment:

    - Most terminals send \e[Z on Shift+Tab, this is not handled by MC
      at all, moreover it causes a hang for about a second. This commit
      teaches this sequence to MC. This is especially useful when no X11
      is available, because there Ctrl+Tab is identical to Tab, so the
      backwards tab feature is not available. With this commit Shift+Tab
      becomes a backwards tab too on all terminals that emit \e[Z.

    - When pasting to the editor, Shift+Tab, Ctrl+Tab and Ctrl+Shift+Tab
      should all insert a tab for the same reason mentioned at the newline.

    - It would look inconsistent in the keymap files to have logical code
      such as "backtab" instead of "shift-tab" and friends, hence get rid
      of KEY_BTAB and use KEY_M_SHIFT | '\t' instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00