Commit Graph

3016 Commits

Author SHA1 Message Date
Andrew Borodin
28580ca023 done_screen() is moved from src/layout.c to src/main.c. 2009-08-12 21:23:13 +04:00
Andrew Borodin
16a15c0ee2 New functions.
tty_noecho() is used instead of noecho() function or macro.
tty_flush_input() is used instead of flushinp() function or macro.
tty_reset_screen() is used instead of endwin() function or macro.
tty_shutdown() is based on slang_shutdown(). Also implemented for
NCurses as wrapper for endwin().
2009-08-12 21:23:12 +04:00
Andrew Borodin
55e626726c For NCurses, always call doupdate() in tty_refresh(). 2009-08-12 21:23:12 +04:00
Andrew Borodin
86f77f3cb2 New functions.
tty_touch_screen() is used instead of touchwin() function or macro.
tty_set_normal_attrs() is used instead of standend() function or macro.
tty_set_alt_charset() is used instead of acs() and noacs()
functions or macros.
tty_baudrate() is used instead of baudrate() function or macro.
2009-08-12 21:23:12 +04:00
Andrew Borodin
2b7a991fde New functions.
tty_keypad() is used instead of keypad() function or macro.
tty_nodelay() is used instead of nodelay() function or macro.
tty_reset_prog_mode() is used instead of reset_prog_mode() function or macro.
tty_reset_shell_mode() is used instead of reset_shell_mode()
function or macro.
tty_beep() is used instead of beep() function or macro.
2009-08-12 21:23:12 +04:00
Andrew Borodin
c4dc0b22b0 Set dialogs colors is moved from TTY layer to MC core. 2009-08-12 21:23:12 +04:00
Andrew Borodin
b0ce68a79b TTY: don't check use_colors twice.
start_color() is NCurses function. Don't call it in S-Lang TTY layer. Define
is removed.
2009-08-12 21:23:12 +04:00
Andrew Borodin
1b1f082123 Restored fix of default terminal colors usage for NCurses. 2009-08-12 21:23:12 +04:00
Andrew Borodin
fe1adb5f27 tty_print_char() function is used instead of addch() one.
Modified tty_print_char() function for S-Lang library to use it
instead of addch().
2009-08-12 21:23:12 +04:00
Andrew Borodin
26631548d8 Fixed TTY sublayer after rebase to current master. 2009-08-12 21:23:12 +04:00
Andrew Borodin
f1670d735e Fixed commnets about #include's. 2009-08-12 21:23:12 +04:00
Andrew Borodin
e68c67554b TTY: created tty_fill_region() function.
src/tty/tty.h:
src/tty/tty-slang.c:
src/tty/tty-ncurses.c: new tty_fill_region() function.

src/dialog.c (widget_erase, dlg_erase): tty_fill_region() function
is applied to erase area of widget and dialog.
2009-08-12 21:23:12 +04:00
Andrew Borodin
f1d526d84d Keys handling.
src/tty/key.c (keyboard_key_timeout): make static.
src/tty/key.h: removed unsed irix_fn_keys variable.
Moved declaration of mou_auto_repeat variable here...
src/main.h: ...from here.
2009-08-12 21:23:12 +04:00
Andrew Borodin
5a5a8bd3c0 Reorganization of key and window management functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
d91122a172 Reorganization of TTY raw/noraw mode setting functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
fb51cb8241 Use TTY function names instead of #define's. 2009-08-12 21:23:12 +04:00
Andrew Borodin
3720285612 Reorganization of is_abort_char() function.
src/tty/key.h: cleanup. Changed returned type of is_abort_char()
function from int to gboolean.

src/tty/key.c: moved is_abort_char() function here...

src/tty/win.h: ...from here.

src/dialog.c (dialog_handle_key): is_abort_char() function is used.
Changed order of dialog key handling. Formatting.
2009-08-12 21:23:12 +04:00
Andrew Borodin
c12ddff69b Reorganization of TTY color functions. 2009-08-12 21:23:12 +04:00
Andrew Borodin
bcc6a40486 Reorganization of TTY initalization and line drawing.
Created some TTY functions instead of MC core global variables.
Moved init_layer() function from MC core to TTY layer.
Renamed slang_init() to init_slang().
Added required #include's in TTY layer.
Moved S-Lang color and attribute definitions from src/tty/tty-slang.h
to colors-slang.h.
2009-08-12 21:23:12 +04:00
Andrew Borodin
7a75f8723d Replaced addstr() call to tty_print_string() one. 2009-08-12 21:23:12 +04:00
Andrew Borodin
069aab9ebc Renamed mc_refresh() to tty_refresh(). 2009-08-12 21:22:17 +04:00
Andrew Borodin
7ed7c83e8d Replaced addstr(str_term_form(...)) to tty_print_string(...). 2009-08-12 21:22:17 +04:00
Andrew Borodin
62cdac4d1f The tty_draw_box() function has been created and used. 2009-08-12 21:19:20 +04:00
Andrew Borodin
ebbf6fbcdc Replaced functions.
attrset() -> tty_setcolor()
move() -> tty_gotoyx()
getyx() -> tty_getyx()
2009-08-12 21:19:20 +04:00
Andrew Borodin
ea0cb38b9e Initial step to split NCurses- and SLang-based TTY layers. 2009-08-12 21:19:20 +04:00
Andrew Borodin
389e5bf613 Moved rxvt.c, win.[ch] and x11con.[ch] from src to src/tty directory.
Fixed includes.
Fixed library order in src/Makefile.am due to --as-needed linking option.
2009-08-12 21:19:20 +04:00
Andrew Borodin
f3730bdc41 Initial step to move TTY layer of MC to separate library. 2009-08-12 21:19:20 +04:00
Slava Zanko
0dc26a14d4 Changed types in structure 'mc_search_struct' from 'gsize' to 'otff_t'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-12 15:04:37 +03:00
dborca
02132ecaea Ticket #1520: Uninitialized event.x in find.c#check_find_events()
Fixed uninitialised member of structure.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-12 15:01:51 +03:00
dborca
688d80cdb1 Ticket #1521: ctrl-z (aka suspend) does not work
Fix issue:
execute.c is missing #include <signal.h> and therefore #ifdef SIGTSTP fails miserably.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-12 14:37:22 +03:00
Andrew Borodin
8a1c364ff0 Ticket #330: show dropped down menu is screen has been resized.
Now works for both values of "menuBar visible" option.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-10 15:30:29 +04:00
Andrew Borodin
54b6991a9c Find file: fixed missing runtime i18n of "First Hit" label.
Thanks to David Martin <dmartina at excite dot com>

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-08 15:51:27 +04:00
Andrew Borodin
ef699b94be Find file: fixed search for first hit.
Stop search file content if first hit found.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-08 15:51:27 +04:00
Andrew Borodin
fbd042889a Find file: refactoring.
Type accuracy.
Used gboolean instead of int for some dual-value variables.
Used static buffer for search result instead of dynamically
allocaled and freed memory.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-08 15:51:27 +04:00
Daniel Borca
670d11fc73 Ticket #1499 (mcview: Search backwards is broken)
fix: src/view.c backward searck is broken

    Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-08 08:42:50 +00:00
Denys Vlasenko
4586834cb9 Ticket #414 (shell patterns in copy dialog)
Handle asterisks into replace template string.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-07 14:47:26 +03:00
Andrew Borodin
11cc7a7009 Ticket 1461: missing line feeds in Info panel.
Thanks to Denis Briand.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-07 11:38:28 +04:00
Mikhail S. Pobolovets
1692e737c4 Ticket #1475: warningis fix
view.c:3237: format not a string literal and no
    format arguments

    utilunix.c:171, utilunix.c:173:
    assignment discards qualifiers from pointer target type

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-08-06 16:20:28 +03:00
Slava Zanko
a525546de2 Ticket #1435 (Editor search options i18n)
* Fix runtime translation of search types array;
 * reworked function mc_search_get_types_strings_array.

Thanks to dmartina for bugreport.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-06 10:33:04 +03:00
Ilia Maslakov
99c8f6a680 Ticket #1460 (shared search history)
* The sample of the containing text by file search;
    * The sample of search in file mcview;
    * The sample of search in mcedit (search operation);
    * The substituting text in mceditor (replacement operation).

    Author: Alexey Korop

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

    Editor: search will continue from last search string if SHIFT+F7 hotkey pressed
    at first time (without pressed F7 key).

    Signed-off-by: Slava Zanko <slavazanko@gmail.com>

    add const MC_HISTORY_SHARED_SEARCH into history.h

    Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-08-05 14:30:08 +00:00
Andrew Borodin
595c261fa8 Added "First hit" checkbox to "Find File" dialog.
The new "First hit" checkbox stops search in the file
if the first entry was found in that file
(thanks to Dominus (sergey.zaveruha at gmail dot com)).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-05 16:20:58 +04:00
Andrew Borodin
958246efd2 Ticket #1457: add "First hit" checkbox to "Find File" dialog.
src/find.c: code refactoring.

  + Unification of variable names.
  + Some static variables was moved out from functions to remember
    find options between find sesions.
  + Do not keep i18n results if find dialog was destroyed.
  + Type accuracy.
  + Indentation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-05 16:20:58 +04:00
Mikhail S. Pobolovets
ac2edf225e Ticket #1392: regression in .tar support
Regression was introduced in lzma support
(a5ba278729)

All the heuristics stuff has been removed, only
LZMA utils 4.32.1 and later formats are supported.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-08-05 14:20:23 +03:00
Slava Zanko
d268dcd5f3 Merge branch '1425_spaces_in_EDITOR'
* 1425_spaces_in_EDITOR:
  Ticket #1425 (External editor won't open if there are spaces in EDITOR variable)
2009-08-04 16:09:13 +03:00
Slava Zanko
4a5f02698e Ticket #1425 (External editor won't open if there are spaces in EDITOR variable)
Fix issue: in function src/utillinux.c:my_system() added code for splitting
command line by spaces, use just first token as argument to function execlp()

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-04 14:55:41 +03:00
Andrew Borodin
c6812961cc Ticket #1404: Ctrl-C kills mc.
If MC built with --without-subshell option is run with -d option,
the Ctrl-C key combination closes MC. Such behaviour was introduced
in 66332a4fb1 commit.

This commit actually restores the SIGINT signal handling which was
before 66332a4fb1 commit.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-04 15:29:37 +04:00
Andrew Borodin
ff31f67d6b Ticket #1410: Cycle moving in WListbox.
Don't jump over start and end of list in page scrolling.
Small optimization.
Text formatting.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-04 13:36:52 +03:00
Mikhail S. Pobolovets
7a30974d9e Ticket #1410: Cycle moving in WListbox
* listbox_select_first has been introduced
    * listbox_select_last has been reworked

    Now when you press KEY_UP staying on the first
    entry, you will get to the entry and vice versa
    with KEY_DOWN staying at the last entry.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-08-04 13:36:52 +03:00
Mikhail S. Pobolovets
05b590d225 Ticket #1415: Directory hotlist incorrect drawing fix
src/hotlist.c: buffer clean up has been added
    original author: E.L.K.

Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
2009-08-04 10:03:38 +03:00
Stan. S. Krupoderov
d044d20480 Merge branch '007_show_directory_sizes_shortcut'
* 007_show_directory_sizes_shortcut:
  Ticket #7: change shortcut C-space processing to calculate multi-directory size
2009-08-04 09:39:36 +04:00