Commit Graph

753 Commits

Author SHA1 Message Date
Andrew Borodin
ce1249f052 Added percent sign to key names.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
cef8eb5cc4 (mc_refresh): moved from lib/widget/wtools.[ch] to lib/widget/dialog-switch.[ch]
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6273917e33 (size_trunc_len): fixed potential integer overflow if SI is used.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6dabcb5f55 VFS small optimization
(vfs_class_data_find_by_handle, vfs_class_find_by_handle): move same
code to the separate function vfs_get_openfile().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
8f4b9e32f1 Remove extra screen update after show help.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
79023b26a4 (mc_build_filename): incorrect processing of first element of path.
If first element is relative, the result path should be also relative
not absolute.

If first element is empty, the result path is relative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b63eea10cb (mc_build_filename): fixed incorrect processing of empty paths.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b61e0fc6a9 (_vfs_get_cwd): fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
1c0e5a4773 Fix potential segfault in term_trim() functions
...if requested width is negative.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko
a1e34b8dfa Code cleanup after runing splint on src/main.c file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-17 13:30:03 +03:00
Andrew Borodin
f68b35b475 (try_complete): fixed warinig:
input_complete.c:874:26:  warning: use of logical && with constant
operand; switch to  bitwise & or remove constant
[-Wconstant-logical-operand]
    if (q && q[1] == '(' && INPUT_COMPLETE_COMMANDS)
                         ^  ~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
6c5a679b85 Use ESC_STR macro instead of hardcoded "\033".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
b982f70d4b Value accuracy of mouse_enabled global variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
cd1e5fb76d Nice location of red (warning and error) dialogs.
Now warning/error dialog overlaps the previous status dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
bb8babce1e (dlg_find_by_id): use the GLib way to find widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
db2fa05e27 (menubar_arrange): fixed typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
ba86de945c Optimization of walking in dialog widgets.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:55 +03:00
Slava Zanko
12dfe1bd55 VFS ftpfs: fixed broken filenames in unaligned 'ls' command output
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko
20c4694ee5 Ticket #2594: ftp failures - leading white space in file name
Code cleanup: move 'ls' output parser (and functions-satellites) to
new file parse_ls_vga.c

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko
372cf39a4f Fixed regexp error if current codepage isn't equal to UTF-8 in UTF-8 environment
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
20a79d52ab Ticket #2595: Broken panels recode in current master
Fixed path recoding

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
70ff1dc3aa Removed mc_global.args structure.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Ilia Maslakov
67c35a20a6 Added -g, --oldmouse option to support of NORMAL/BUTTON_EVENT mouse type.
Required for some terminals (screen/tmux) to force needed mouse type
(BUTTON_EVENT by default).

Normal tracking mode sends an escape sequence on both button press and release.
Mouse highlight tracking notifies a program of a button press, receives a range of
lines from the program, highlights the region covered by the mouse within that
range until button release, and then sends the program the release coordinates.
It is enabled by specifying parameter 1001 to DECSET.

Button-event tracking is essentially the same as normal tracking, but xterm also
reports button-motion events. Motion events are reported only if the mouse pointer
has moved to a different character cell. It is enabled by specifying parameter 1002 to DECSET.
On button press or release, xterm sends the same codes used by normal tracking mode.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

changed mc.1.in, added description of command line options -g, --oldmouse.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
bfbe9b94ae Removed global variable slow_tty
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
9d9935d290 Removed global variable ugly_line_drawing
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
8d44ed297b Moved xterm_flag global variable to mc_global.tty.xterm_flag
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Andrew Borodin
387bad2c7e Move SIGWINCH handler initialization to tty_init()
... and rename tty_low_level_change_screen_size() to
tty_change_screen_size().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:11:51 +04:00
Andrew Borodin
ad0a5015d3 Fix of mouse and ca capabilities check.
Based on patch from Andrey V. Malyshev <amal krasn ru>
http://mail.gnome.org/archives/mc-devel/2005-November/msg00052.html

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:58 +04:00
Andrew Borodin
09123c9fc9 Refactoring of TTY layer shutdown.
Unification of tty_shutdown() function as for S-Lang as for NCurses.
Added do_exit_ca_mode() call to the NCurses-based tty_shutdown().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:58 +04:00
Andrew Borodin
68468a25ac Ticket #2601: incorrect TTY layer initialization.
The xterm_flag variable was initialized in setup_mc() but used
first time in init_key() and in tty_init() (in do_enter_ca_mode())
before setup_mc() call.

Now xterm initialized in early step of mc start up process and
xterm support and mouse are initialized in tty_init().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:51 +04:00
Andrew Borodin
fc3bb20f09 (size_trunc): added ability to show size in [G|g]bytes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Andrew Borodin
12c893c73e (size_trunc_len): process full range of uintmax_t type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Andrew Borodin
3ec8721f47 (mc_search__hex_translate_to_regex): optimization and cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-19 12:45:10 +04:00
Andrew Borodin
efb4206883 Ticket #2579: incorrect length usage in hexadecimal search.
(mc_search__hex_translate_to_regex): don't use length of original string
after leading whitespace trim.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-19 12:34:11 +04:00
Slava Zanko
1940e8f5dd Fixed broken search results highlighting
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-19 09:51:08 +03:00
Andrew Borodin
c4b95bcd32 Ticket #2576: fix of symbols duplication.
dialog_map, input_map and listbox_map variabels are declared and defined twice.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-14 21:46:59 +04:00
Slava Zanko
d3bb9de01f Ticket 2570: Code cleanup
Moved tests from lib/tests to tests/lib directory

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 20:23:44 +03:00
Slava Zanko
4e56efafe6 Ticket #81: savannah: can't access files on ftp starting with space
files starting with space can't be acessed by mc through ftp - it
shows the file as not having the leading space and attempts to
access it produce 'permission denied' errors.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 19:50:32 +03:00
Andrew Borodin
17033652ee Revert "Ticket #2453: aggressive screen repaint"
This reverts commit f809e6cf7a.

While navigating in main menu (from one submenu to another one)
or after closing a dialog, the screen is blinking.
2011-07-09 20:39:46 +04:00
Slava Zanko
63c0f34dce Direct commit: Fixed double memory free in input histoey list.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-09 11:55:30 +03:00
Andrew Borodin
f3fefa67f6 (push_history): fixed memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Andrew Borodin
630bcae4d4 (input_destroy): optimization: don't do useless actions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Andrew Borodin
de5fac8d0a Ticket #2545: fixup of saving WInput history.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Slava Zanko
e1edfd7c93 Remove replace_prepare_t type and use defined constants for use just one type (int) in functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:28:07 +03:00
Vitaliy Filippov
fb7b01eeb9 Despite of the fact that algorithm now ignores the absence of closing curly
brace '}' (which probably isn't 100% correct), this should be checked in tests
for replace_handle_esc_seq function, not process_escape_sequence - it is the
replace_handle_esq_seq who decides whether it is an escape sequence or not.

Also, \x{4344} is usually a code for wide character (UTF-8), and not for "CD".
So we can either ignore the higher bits, or generate wide character codes...
The second would be convenient, but would also introduce a hard-coded UTF-8 charset.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 17:28:07 +03:00
Slava Zanko
3ced63361b added tests for mc_search_regex__replace_handle_esc_seq() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:28:07 +03:00
Slava Zanko
6cec807140 str_isutf8() function now returns gboolean value
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:26:31 +03:00
Vitaliy Filippov
aa2d0b07ed Ticket #1882: PCRE search: escape sequence support in replacements, UTF8 support (just a flag for libPCRE)
Enables use of escape sequences inside regex replace strings,
Enables UTF-8 caseless search in PCRE.
Supported escape sequences: \DEC, \xHEX, \0OCT, \n, \t, \v,
\b, \r, \f, \a. Any of them could be enclosed into \{}.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:26:30 +03:00
Slava Zanko
bb12a1296f Direct commit: fixed broken build
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 13:49:56 +03:00
Andrew Borodin
f809e6cf7a Ticket #2453: aggressive screen repaint
... to avoid artefacts after printing of non-printable symbols.

(tty_touch_lines): new function to mark modified lines of screen.
(do_refresh): mark lines as modified before redraw of non-fullscreen dialog
and clear entire screen before redraw of fullscreen dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 13:51:41 +04:00