mc/src/text.c
Norbert Warmuth ffb83af112 If someone experiences strange colors in the text edition
try "make clean; make".

Tue Dec 29 15:49:45 1998  Norbert Warmuth  <nwarmuth@privat.circular.de>

* doc/mc.sgml, mc1.in (Color section): minor polishing
(Layout section): documented Highlight...

* gnome/gmain.c: According to the man page the color keyword for executable
files 	is `executable' and not `execute' -- changed.

* file.c (progress_update_one): Ignore files in subdirectories
when panel totals haven't been computed.

(erase_dir, erase_file): update progress bar (i.e. make it work
for OP_DELETE).

(panel_operate_flags): Don't compute panel totals for OP_MOVE.
When moving files on the same filesystem computing totals might
last much longer than the actual move operation.

(various places): adpations for the above changes.

* slint.c (try_alloc_color_pair): Changed hardcoded values into
defines.

* color.c, text.c: Added color "stalledlink" which is used for
stalled symbolic links. Formerly "viewunderline" was used for
this (IMO bad because function and name didn't match).
According to the man page the color keyword for executable files
is `executable' and not `execute' -- changed.

* color.c, color.h: When using SLang some color indexes are not
freely choosable (DEFAULT_COLOR clashed with A_BOLD_REVERSE).
Solved by adding holes in color_map.

* find.c (do_search): fixed possible memory leak
1998-12-29 16:52:49 +00:00

114 lines
2.1 KiB
C

/*
* Text edition support code
*
*
*/
#include <config.h>
#ifdef HAVE_X
#error This file is for text-mode editions only.
#endif
#include <stdio.h>
#define WANT_WIDGETS
#include "win.h"
#include "tty.h"
#include "key.h"
#include "widget.h"
#include "main.h"
#include "cons.saver.h"
char *default_edition_colors =
"normal=lightgray,blue:"
"selected=black,cyan:"
"marked=yellow,blue:"
"markselect=yellow,cyan:"
"errors=white,red:"
"menu=white,cyan:"
"reverse=black,lightgray:"
"dnormal=black,lightgray:"
"dfocus=black,cyan:"
"dhotnormal=yellow,lightgray:"
"dhotfocus=yellow,cyan:"
"viewunderline=brightred,blue:"
"menuhot=yellow,cyan:"
"menusel=white,black:"
"menuhotsel=yellow,black:"
"helpnormal=black,lightgray:"
"helpitalic=red,lightgray:"
"helpbold=blue,lightgray:"
"helplink=black,cyan:"
"helpslink=yellow,blue:"
"gauge=white,black:"
"input=black,cyan:"
"directory=white,blue:"
"executable=brightgreen,blue:"
"link=lightgray,blue:"
"stalledlink=brightred,blue:"
"device=brightmagenta,blue:"
"core=red,blue:"
"special=black,blue:"
"editnormal=lightgray,blue:"
"editbold=yellow,blue:"
"editmarked=black,cyan";
void
edition_post_exec (void)
{
do_enter_ca_mode ();
/* FIXME: Missing on slang endwin? */
reset_prog_mode ();
flushinp ();
keypad (stdscr, TRUE);
mc_raw_mode ();
channels_up ();
if (use_mouse_p)
init_mouse ();
if (alternate_plus_minus)
application_keypad_mode ();
}
void
edition_pre_exec (void)
{
if (clear_before_exec)
clr_scr ();
else {
if (!(console_flag || xterm_flag))
printf ("\n\n");
}
channels_down ();
if (use_mouse_p)
shut_mouse ();
reset_shell_mode ();
keypad (stdscr, FALSE);
endwin ();
numeric_keypad_mode ();
/* on xterms: maybe endwin did not leave the terminal on the shell
* screen page: do it now.
*
* Do not move this before endwin: in some systems rmcup includes
* a call to clear screen, so it will end up clearing the sheel screen.
*/
if (!status_using_ncurses){
do_exit_ca_mode ();
}
}
void
clr_scr (void)
{
standend ();
dlg_erase (midnight_dlg);
mc_refresh ();
doupdate ();
}