Commit Graph

7692 Commits

Author SHA1 Message Date
Slava Zanko
722496dd9e patches by Rostislav Beneš: mc-21-hotlist
replace name_trunc, strlen width str_trunc, str_term_width1, add growing string
from strutil.
2009-01-26 12:10:09 +02:00
Slava Zanko
77d6ba8a36 patches by Rostislav Beneš: mc-12-menu
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.

now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 12:09:23 +02:00
Slava Zanko
d6d99fe6e5 patches by Rostislav Beneš: mc-11-panels
like in input, added multibytes characters buffer for search in panel (ctrl+s)
drawing is simplier, because alignment do directly str_fit_to_term function
from strutil, changed time functions in util to work correctly in utf-8
2009-01-26 12:07:27 +02:00
Slava Zanko
327e8ffe90 patches by Rostislav Beneš: mc-05-check
very similar to button, for text used hotkey_t and changed drawning and
handling hotkey
2009-01-26 12:06:41 +02:00
Slava Zanko
5d626982b0 patches by Rostislav Beneš: mc-40-ncursesw-old
Added support of old ncursesw library
2009-01-26 12:05:43 +02:00
Slava Zanko
8d94909d0f patches by Rostislav Beneš: mc-40-ncurses
Extende support of ncurses
2009-01-26 12:05:43 +02:00
Slava Zanko
b7b74c2f03 patches by Rostislav Beneš: mc-30-view
experimental patch, completely different reading file, new cache structure,
shall view text in every encodings (remaped ctrl + t, new dialog need
localization).

1. to avoid backward reading, viewer keeps four following characters from
    file: next, actual and two previous. This is enough to handle new lines
    and nroff fortmatin correctly.
2. cache_line structure, that presents one line in file. cache_line stores,
    where line starts and ends in file,number of line and width of line. Width
    is at most equal to screen width, so longer lines are cached in more
    cache_lines. This makes wrapping text very easy. Cache_lines are stored
    in a linked list. file is loaded into cache_lines sequential, not whole at once.
    It only provides navigation in file.

I found two problems in this solution:
    1. slow first move to end in large files, because can not read files
        backward. (loading in background may help)
    2. it is slow with multibyte characters. I tried to eliminate calling iconv
        to two, but it did not help (iconv is called on every byte). I think
        caching some parts of file will be needed.
2009-01-26 12:05:43 +02:00
Slava Zanko
1efbe4a18a patches by Rostislav Beneš: mc-29-vfs
add support for filesystem, that use others encodings than mc (vfs). Now can be
encoding set only manually, but automatic detection is possible. Filename is
converted in mc_readdir and other function translate it back by vfs_translate
added menu etries encodnig in left and rigth menu (localization will be neede)
modified subshell.c to put subshell correct working directoy,
modified ext.c and execute.c to translate filename before running command
there could be one problem, vfs_translate_path does not use something like
path_magic function
2009-01-26 12:04:07 +02:00
Slava Zanko
75cf62902d patches by Rostislav Beneš: mc-28-fix
rest of fixes in files cmc.c, main.c (xterm title), panelize.c, subshell.c,
tree.c, tty.c, user.c, util.c, win.c

now, basic mc's function should work well, editor and view are still broken.
2009-01-26 12:04:07 +02:00
Slava Zanko
753f65c242 patches by Rostislav Beneš: mc-27-hint
Convert all hint files to UTF-8.
2009-01-26 12:00:33 +02:00
Slava Zanko
c121370f94 patches by Rostislav Beneš: mc-27-hint
similar problem like help, similiar solution
2009-01-26 11:54:54 +02:00
Slava Zanko
bcdb5b5ef5 patches by Rostislav Beneš: mc-26-help
Help files are stored in different encodings and that is problem.
All help files converted now in UTF-8.
2009-01-26 11:54:30 +02:00
Slava Zanko
bd1bc71732 patches by Rostislav Beneš: mc-26-help
Help was modified to convert help file into terminal encoding
changes in drawing and reading help file
2009-01-26 11:49:00 +02:00
Slava Zanko
bc41b5e7fa patches by Rostislav Beneš: mc-25-key
defensive edits, handle only ascii keys
2009-01-26 11:48:11 +02:00
Slava Zanko
1b34b52cb6 patches by Rostislav Beneš: mc-24-achown
added str_term_width1, str_trunc to all chmod / chown dialogs
2009-01-26 11:48:11 +02:00
Slava Zanko
87a8b257ae patches by Rostislav Beneš: mc-23-profile
g_casecmp replaced width str_casecmp
2009-01-26 11:48:11 +02:00
Slava Zanko
018ead6651 patches by Rostislav Beneš: mc-22-info
changes in drawing panel info view
2009-01-26 11:48:11 +02:00
Slava Zanko
779e0e6d40 patches by Rostislav Beneš: mc-21-hotlist
replace name_trunc, strlen width str_trunc, str_term_width1, add growing string
from strutil.
2009-01-26 11:48:10 +02:00
Slava Zanko
26f6eeed8b patches by Rostislav Beneš: mc-20-dir
changes in sorting strings (name, extension), for comparing are created keys
from strings and than their are compared instead of primary strings. (in
reality, keys are created only for case insensitive comparing, case
sensitive compare original strings). In utf-8 shall by keys faster than
compare strings directly. But this need ediding declaration of all sorts
functions.
2009-01-26 11:47:42 +02:00
Slava Zanko
e57e297ffe patches by Rostislav Beneš: mc-19-find
case insensitive search function used from strutil, search only valid filenames
2009-01-26 11:47:42 +02:00
Slava Zanko
eaa2fd4e20 patches by Rostislav Beneš: mc-18-option
Correctly calculate length of utf-8 strings.
2009-01-26 11:47:42 +02:00
Slava Zanko
511fddabb9 patches by Rostislav Beneš: mc-17-layout
Change layout for correct display.
2009-01-26 11:47:42 +02:00
Slava Zanko
f79ea0e917 patches by Rostislav Beneš: mc-16-boxes
Some changes for correct display of boxes.
2009-01-26 11:47:42 +02:00
Slava Zanko
2423fabcf4 patches by Rostislav Beneš: mc-15-dialog
changes in handlig keys,
if key is ascii characters, is clear what to do. But when key is between 0x80 and
0xff, it is impossible say, if is valid, alpha, number, ...
I think, that will be better support multibytes characters directly in message
handler, but is not necessary and my patch do not do that.
2009-01-26 11:47:42 +02:00
Slava Zanko
6accfeae28 patches by Rostislav Beneš: mc-14-wtools
modified wtools.c
2009-01-26 11:47:41 +02:00
Slava Zanko
502b812f0a patches by Rostislav Beneš: mc-13-file
modified move/copy/delete dialogs to work correctly with utf-8
2009-01-26 11:47:41 +02:00
Slava Zanko
4f00496233 patches by Rostislav Beneš: mc-12-menu
like buttons use menu entries hotkey_t. But menus are staticly defined, so this
change is much bigger. All menu declaration must be edited. follow standard
changes in drawing and handling hotkeys.

now basic mc's functions works in utf-8, remain correct calculation of controls
width in dialogs, replace functions like tolower, toupper,isspace, ... width
functions from strutil or g_ascii variant.
2009-01-26 11:47:41 +02:00
Slava Zanko
564c518415 patches by Rostislav Beneš: mc-11-panels
like in input, added multibytes characters buffer for search in panel (ctrl+s)
drawing is simplier, because alignment do directly str_fit_to_term function
from strutil, changed time functions in util to work correctly in utf-8
2009-01-26 11:47:41 +02:00
Slava Zanko
882826b446 patches by Rostislav Beneš: mc-10-buttonbar
change in drawing, buttons now better use whole width of screen
2009-01-26 11:46:32 +02:00
Slava Zanko
e68c648af9 patches by Rostislav Beneš: mc-09-groupbox
change drawing to be safer
2009-01-26 11:46:32 +02:00
Slava Zanko
8c673585ec patches by Rostislav Beneš: mc-08-listbox
realy simple change in drawing
2009-01-26 11:46:31 +02:00
Slava Zanko
9c9ef5f3e8 patches by Rostislav Beneš: mc-07-label
change only in drawing
2009-01-26 11:46:31 +02:00
Slava Zanko
7f71be0d63 patches by Rostislav Beneš: mc-06-input
in input widget I made a lot of changes:
    1. rename some members in WInput to reflect more their functions
       (field_len -> field_width, ...)
    2. buffer for reading multibytes characters - charbuf, (taken from UTF-8
       patch)
    3. modified insert_char to accept mulstibytes characters, drawing changed
    4. works only with valid strings, str_fix_string used to assure that
       input->buffer is valid

changes in complete.c:
    - some iteration strings with ++/-- replaced with str_next_char,
    str_prev_char, where was needed. ++ was offset oriented, but str_next_char
    use directly referecne (char *), so result is not extra beatiful in every
     cases
    - other buffer for multibytes characters
    - complete only valid filenames
2009-01-26 11:46:31 +02:00
Slava Zanko
9450950fd4 patches by Rostislav Beneš: mc-05-check
very similar to button, for text used hotkey_t and changed drawning and
handling hotkey
2009-01-26 11:46:31 +02:00
Slava Zanko
8d6efd4cd0 patches by Rostislav Beneš: mc-04-radio
all options of radio box are stored in an array of hotkey_t, so radio box has own
copy of options now (in original mc has only a reference to options), changed
drawing and handling hotkey
2009-01-26 11:46:31 +02:00
Slava Zanko
9810380e9a patches by Rostislav Beneš: mc-03-button
text of button stored in hotkey_t instead of char*, modified achown.c, because
access directly button text, change in drawing button adn handling hotkey
2009-01-26 11:46:31 +02:00
Slava Zanko
55be4b67cb patches by Rostislav Beneš: mc-02-hotkey
add new structure hotkey_t for storings caption with hotkey in buttons, menus,...
contains three strings - start, hotkey, end. So hotkey could be any characters,
but mc's message handles works correct only with ascii characters.
for me is working with hotkey_t easier than how are stored hotkeys in original
mc.
2009-01-26 11:46:31 +02:00
Slava Zanko
2678e889b1 patches by Rostislav Beneš: mc-01-api
add functions for working with strings
some functions are implemented directlu in strutil.c, others have ascii, 8bit
or utf-8 variant. (8bit means singlebyte encodings, where all characters have
width one). Mc autodetects terminal encoding at start and chooses right
variant. If does not know terminal encoding, chooses ascii variant.

contains functions:
    1. for translation strings and growing strings
    2. for working with characters (next char, prev char, length in
       characters, isspace, isalnum, ...)
    3. prepeare for display, replace invalid characters with questionmark,
       unprintable with dot, left / right / center align
    4. comparing strings

in future all string function from util should be moved into strutil, some
function from util have new variant in strutil.
2009-01-26 11:46:30 +02:00
Slava Zanko
1d3ffb0e29 patches by Rostislav Beneš: mc-00-slang.patch
Check if libslang support UTF-8
2009-01-26 11:46:30 +02:00
Patrick Winnertz
481b0a34ea Merge branch 'mc-4.6' 2009-01-25 16:23:43 +01:00
Patrick Winnertz
da74735548 Merge branch '35_view_dir_update' into mc-4.6
Conflicts:
	ChangeLog
2009-01-25 16:23:26 +01:00
Patrick Winnertz
998cfd9f5c Merge branch 'mc-4.6' 2009-01-25 11:19:08 +01:00
Patrick Winnertz
b84f9451df Add Changelog entry about the history section name break. 2009-01-25 11:18:11 +01:00
Enrico Weigelt, metux IT service
7cef5b112e Merge commit 'origin/50_history_sections.metux' 2009-01-25 07:00:32 +01:00
Enrico Weigelt, metux IT service
9ac56b58ac fixed missing history.h include 2009-01-24 21:59:58 +01:00
Enrico Weigelt, metux IT service
0dcb057459 separated out history section names to history.h 2009-01-24 21:51:29 +01:00
Enrico Weigelt, metux IT service
b9b09436c4 Merge commit 'origin/50_history_section_names' into 50_history_sections.metux 2009-01-24 21:26:41 +01:00
Enrico Weigelt, metux IT service
b1d848b786 fixed #35 2009-01-24 21:06:15 +01:00
Enrico Weigelt, metux IT service
a1a873fae4 fixed changelog on mc-4.6 merge 2009-01-24 20:28:10 +01:00
Enrico Weigelt, metux IT service
7fae75c0d6 merged git 174_4.6_mandriva_pty_closeonexec 2009-01-24 20:26:40 +01:00