Just a little correction at the it.po file.
[midnight-commander.git] / src / text.c
blob725ea7550e9edcae53371fa214e12b84cad26cb9
1 /* Text edition support code.
3 Copyright (C) 2001-2002 Free Software Foundation
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 #include <config.h>
21 #include <stdio.h>
23 #define WANT_WIDGETS
24 #include "global.h"
25 #include "win.h"
26 #include "tty.h"
27 #include "key.h"
28 #include "widget.h"
29 #include "main.h"
30 #include "cons.saver.h"
31 #include "textconf.h"
33 char *default_edition_colors =
34 "normal=lightgray,blue:"
35 "selected=black,cyan:"
36 "marked=yellow,blue:"
37 "markselect=yellow,cyan:"
38 "errors=white,red:"
39 "menu=white,cyan:"
40 "reverse=black,lightgray:"
41 "dnormal=black,lightgray:"
42 "dfocus=black,cyan:"
43 "dhotnormal=blue,lightgray:"
44 "dhotfocus=yellow,cyan:"
45 "viewunderline=brightred,blue:"
46 "menuhot=yellow,cyan:"
47 "menusel=white,black:"
48 "menuhotsel=yellow,black:"
49 "helpnormal=black,lightgray:"
50 "helpitalic=red,lightgray:"
51 "helpbold=blue,lightgray:"
52 "helplink=black,cyan:"
53 "helpslink=yellow,blue:"
54 "gauge=white,black:"
55 "input=black,cyan:"
56 "directory=white,blue:"
57 "executable=brightgreen,blue:"
58 "link=lightgray,blue:"
59 "stalelink=brightred,blue:"
60 "device=brightmagenta,blue:"
61 "core=red,blue:"
62 "special=black,blue:"
63 "editnormal=lightgray,blue:"
64 "editbold=yellow,blue:"
65 "editmarked=black,cyan";
67 void
68 edition_post_exec (void)
70 do_enter_ca_mode ();
72 /* FIXME: Missing on slang endwin? */
73 reset_prog_mode ();
74 flushinp ();
76 keypad (stdscr, TRUE);
77 mc_raw_mode ();
78 channels_up ();
79 enable_mouse ();
80 if (alternate_plus_minus)
81 application_keypad_mode ();
84 void
85 edition_pre_exec (void)
87 if (clear_before_exec)
88 clr_scr ();
89 else {
90 if (!(console_flag || xterm_flag))
91 printf ("\n\n");
94 channels_down ();
95 disable_mouse ();
97 reset_shell_mode ();
98 keypad (stdscr, FALSE);
99 endwin ();
101 numeric_keypad_mode ();
103 /* on xterms: maybe endwin did not leave the terminal on the shell
104 * screen page: do it now.
106 * Do not move this before endwin: in some systems rmcup includes
107 * a call to clear screen, so it will end up clearing the shell screen.
109 do_exit_ca_mode ();
112 void
113 clr_scr (void)
115 standend ();
116 dlg_erase (midnight_dlg);
117 mc_refresh ();
118 doupdate ();