Ticket #86 (disable X11 from command line)

added option --no-x, -X for starting mc without X11 support.
    updated documentation: es, hu, it, en, pl, ru, sr.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit is contained in:
Ilia Maslakov 2011-10-28 16:09:44 +04:00
parent a4b838cb4d
commit 3e15b5af64
11 changed files with 33 additions and 1 deletions

View File

@ -112,6 +112,9 @@ Muestra la versión del programa.
Fuerza el modo xterm. Usado cuando se ejecuta en terminales con características de xterm (dos
modos de pantalla, y pueden enviar secuencias de escape de ratón).
.TP
.I \-X, \-\-no\-x
Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).

View File

@ -101,6 +101,9 @@ Megmutatja a program verziószámát.
Belép xterm módba. (Két képernyős módban használható, és az egér escape
szekvenciái is használhatóak).
.TP
.I \-X, \-\-no\-x
Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).

View File

@ -119,6 +119,9 @@ Forza la modalità xterm. Usata quando è in funzione su terminali
abilitati\-xterm (due modalità video e in grado di spedire sequenze
mouse di escape).
.TP
.I \-X, \-\-no\-x
Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).

View File

@ -160,6 +160,9 @@ Display the version of the program.
Force xterm mode. Used when running on xterm\-capable terminals (two
screen modes, and able to send mouse escape sequences).
.TP
.I \-X, \-\-no\-x
Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).

View File

@ -104,6 +104,9 @@ Wyświetla wersję programu.
Wymusza włączenie trybu xterm. Używane kiedy działa się na terminalach wyposażonych
w opcje xterm (dwa tryby ekranu i możliwość wysyłania myszą sygnałów wyjścia).
.TP
.I \-X, \-\-no\-x
Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).

View File

@ -140,6 +140,9 @@ terminfo: в этом случае Midnight Commander использует зн
формировать экранирующие последовательности с помощью мыши) (two screen
modes, and able to send mouse escape sequences).
.TP
.I \-X, \-\-no\-x
Не использовать X11 для получения состояния модификаторов Alt, Ctrl, Shift.
.TP
.I \-g, \-\-oldmouse
Принудительно устанавливает режим мыши "normal tracking". В xterm-совместимых
терминалах (например, tmux/screen).

View File

@ -99,6 +99,9 @@ termcap/terminfo. Корисно је само на ХП\-овим термин
терминалима који имају подршку за Икс терминале (два екранска режима,
и могућност слања мишјих комбинација избегавања).
.TP
.I \-X, \-\-no\-x
Do not use X11 to get the state of modifiers Alt, Ctrl, Shift
.TP
.I \-g, \-\-oldmouse
Force a "normal tracking" mouse mode. Used when running on
xterm\-capable terminals (tmux/screen).

View File

@ -98,6 +98,7 @@ mc_global_t mc_global = {
.winch_flag = FALSE,
.command_line_colors = NULL,
.xterm_flag = FALSE,
.disable_x11 = FALSE,
.slow_terminal = FALSE,
.disable_colors = FALSE,
.ugly_line_drawing = FALSE,

View File

@ -247,6 +247,9 @@ typedef struct
/* It is used by function view_other_cmd() */
gboolean xterm_flag;
/* disable x11 support */
gboolean disable_x11;
/* For slow terminals */
/* If true lines are shown by spaces */
gboolean slow_terminal;

View File

@ -667,7 +667,7 @@ static void
init_key_x11 (void)
{
#ifdef HAVE_TEXTMODE_X11_SUPPORT
if (getenv ("DISPLAY") != NULL)
if (getenv ("DISPLAY") != NULL && !mc_global.tty.disable_x11)
{
x11_display = mc_XOpenDisplay (0);

View File

@ -202,6 +202,13 @@ static const GOptionEntry argument_terminal_table[] = {
NULL
},
{
"no-x11", 'X', ARGS_TERM_OPTIONS, G_OPTION_ARG_NONE,
&mc_global.tty.disable_x11,
N_("Disable X11 support"),
NULL
},
{
"oldmouse", 'g', ARGS_TERM_OPTIONS, G_OPTION_ARG_NONE,
&mc_global.tty.old_mouse,