mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 04:22:34 +03:00
Ticket #4433: skins: add color for non-printable characters in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
ea6bd1866e
commit
1b3684e0e1
@ -3405,8 +3405,8 @@ de error: errdfocus, errdhotnormal, errdhotfocus, errdtitle; los colores
|
||||
de la ayuda: helpnormal, helpitalic, helpbold, helplink, helpslink,
|
||||
helptitle; los colores del visor: viewnormal, viewbold, viewunderline,
|
||||
viewselected; loc colores del editor: editnormal, editbold, editmarked,
|
||||
editwhitespace, editlinestate; los colores de los menús desplegables:
|
||||
pmenunormal, pmenusel, pmenutitle.
|
||||
editwhitespace, editnonprintable, editlinestate; los colores de los menús
|
||||
desplegables: pmenunormal, pmenusel, pmenutitle.
|
||||
.PP
|
||||
.I header
|
||||
determina el color del encabezado de los paneles, la línea con los
|
||||
|
@ -2869,7 +2869,7 @@ dhotnormal, dhotfocus; Súgó színek: helpnormal, helpitalic, helpbold,
|
||||
helplink, helpslink; Fájlnéző színek: viewunderline; Speciális kijelölés
|
||||
színei: executable, directory, link, stalelink, device, special, core;
|
||||
Viewer colors are: viewnormal, viewbold, viewunderline, viewselected.
|
||||
Szerkesztő színei: editnormal, editbold, editmarked.
|
||||
Szerkesztő színei: editnormal, editbold, editmarked, editnonprintable.
|
||||
.PP
|
||||
.I input
|
||||
maghatározza a beviteli sorok színét a dialogus ablakora vonatkozóan.
|
||||
|
@ -2881,7 +2881,7 @@ Il colore del visualizzatore è: viewunderline.
|
||||
Colori speciali di evidenziazione: executable, directory, link, device,
|
||||
special, core.
|
||||
I colori dell'viewer sono: viewnormal, viewbold, viewunderline, viewselected.
|
||||
I colori dell'editor sono: editnormal, editbold, editmarked.
|
||||
I colori dell'editor sono: editnormal, editbold, editmarked, editnonprintable.
|
||||
.PP
|
||||
.I input
|
||||
determina il colore delle righe di input usate delle finestre di dialogo.
|
||||
|
@ -3513,8 +3513,8 @@ dhotnormal, dhotfocus, dtitle. Error dialog colors are: errdfocus, errdhotnormal
|
||||
errdhotfocus, errdtitle. Help colors are: helpnormal, helpitalic, helpbold,
|
||||
helplink, helpslink, helptitle. Viewer colors are: viewnormal, viewbold,
|
||||
viewunderline, viewselected. Editor colors are: editnormal, editbold, editmarked,
|
||||
editwhitespace, editlinestate. Popup menu colors are: pmenunormal, pmenusel,
|
||||
pmenutitle.
|
||||
editwhitespace, editnonprintable, editlinestate. Popup menu colors are: pmenunormal,
|
||||
pmenusel, pmenutitle.
|
||||
.PP
|
||||
.I header
|
||||
determines the color of panel header, the line that contains column titles
|
||||
|
@ -2542,8 +2542,8 @@ dhotfocus; Kolory pomocy: helpnormal, helpitalic, helpbold, helplink,
|
||||
helpslink; Kolory podglądu: viewunderline; Specjalne tryby podświetlenia:
|
||||
executable, directory, link, device, special. Viewer colors are: viewnormal,
|
||||
viewbold, viewunderline, viewselected. Editor colors are: editnormal, editbold,
|
||||
editmarked, editwhitespace, editlinestate. Popup menu colors are: pmenunormal,
|
||||
pmenusel, pmenutitle.
|
||||
editmarked, editwhitespace, editnonprintable, editlinestate. Popup menu colors
|
||||
are: pmenunormal, pmenusel, pmenutitle.
|
||||
[nie tłumaczyłem nazw z racji tego, że trzeba je stosować w ich angielskim
|
||||
brzmieniu \- jeśli jesteś aż tak zaawansowany, użyj słownika].
|
||||
.PP
|
||||
|
@ -4019,7 +4019,8 @@ bbarhotkey, bbarbutton.
|
||||
Цвета в диалоге\-сообщении об ошибке: errdfocus, errdhotnormal, errdhotfocus, errdtitle.
|
||||
Цвета в окне встроенной помощи: helpnormal, helpitalic, helpbold, helplink, helpslink.
|
||||
Цвета в окне программы просмотра: viewnormal, viewbold, viewunderline, viewselected.
|
||||
Цвета в редакторе: editnormal, editbold, editmarked, editwhitespace, editlinestate.
|
||||
Цвета в редакторе: editnormal, editbold, editmarked, editwhitespace, editnonprintable,
|
||||
editlinestate.
|
||||
Цвета окна всплывающего меню: pmenunormal, pmenusel, pmenutitle.
|
||||
.PP
|
||||
Цвета задавать не обязательно. Цвет какого именно поля определяется
|
||||
|
@ -2865,7 +2865,7 @@ dnormal, dfocus, dhotnormal, dhotfocus. Боје помоћи су: helpnormal,
|
||||
helpbold, helplink, helpslink. Боја прегледача је: viewunderline.
|
||||
Посебне боје за истицање су: executable, directory, link, stalelink,
|
||||
device, special, core. Viewer colors are: viewnormal, viewbold, viewunderline,
|
||||
viewselected. Боје уређивача су: editnormal, editbold, editmarked.
|
||||
viewselected. Боје уређивача су: editnormal, editbold, editmarked, editnonprintable.
|
||||
.PP
|
||||
.I input
|
||||
одређује боју редова за унос који се користе у дијалозима упита.
|
||||
|
37
lib/skin.h
37
lib/skin.h
@ -87,28 +87,29 @@
|
||||
* Last is defined to view color.
|
||||
*/
|
||||
#define EDITOR_NORMAL_COLOR mc_skin_color__cache[49]
|
||||
#define EDITOR_BOLD_COLOR mc_skin_color__cache[50]
|
||||
#define EDITOR_MARKED_COLOR mc_skin_color__cache[51]
|
||||
#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[52]
|
||||
#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[53]
|
||||
#define EDITOR_BACKGROUND mc_skin_color__cache[54]
|
||||
#define EDITOR_FRAME mc_skin_color__cache[55]
|
||||
#define EDITOR_FRAME_ACTIVE mc_skin_color__cache[56]
|
||||
#define EDITOR_FRAME_DRAG mc_skin_color__cache[57]
|
||||
#define EDITOR_NONPRINTABLE_COLOR mc_skin_color__cache[50]
|
||||
#define EDITOR_BOLD_COLOR mc_skin_color__cache[51]
|
||||
#define EDITOR_MARKED_COLOR mc_skin_color__cache[52]
|
||||
#define EDITOR_WHITESPACE_COLOR mc_skin_color__cache[53]
|
||||
#define EDITOR_RIGHT_MARGIN_COLOR mc_skin_color__cache[54]
|
||||
#define EDITOR_BACKGROUND mc_skin_color__cache[55]
|
||||
#define EDITOR_FRAME mc_skin_color__cache[56]
|
||||
#define EDITOR_FRAME_ACTIVE mc_skin_color__cache[57]
|
||||
#define EDITOR_FRAME_DRAG mc_skin_color__cache[58]
|
||||
/* color of left 8 char status per line */
|
||||
#define LINE_STATE_COLOR mc_skin_color__cache[58]
|
||||
#define BOOK_MARK_COLOR mc_skin_color__cache[59]
|
||||
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[60]
|
||||
#define LINE_STATE_COLOR mc_skin_color__cache[59]
|
||||
#define BOOK_MARK_COLOR mc_skin_color__cache[60]
|
||||
#define BOOK_MARK_FOUND_COLOR mc_skin_color__cache[61]
|
||||
|
||||
/* Diff colors */
|
||||
#define DFF_ADD_COLOR mc_skin_color__cache[61]
|
||||
#define DFF_CHG_COLOR mc_skin_color__cache[62]
|
||||
#define DFF_CHH_COLOR mc_skin_color__cache[63]
|
||||
#define DFF_CHD_COLOR mc_skin_color__cache[64]
|
||||
#define DFF_DEL_COLOR mc_skin_color__cache[65]
|
||||
#define DFF_ERROR_COLOR mc_skin_color__cache[66]
|
||||
#define DFF_ADD_COLOR mc_skin_color__cache[62]
|
||||
#define DFF_CHG_COLOR mc_skin_color__cache[63]
|
||||
#define DFF_CHH_COLOR mc_skin_color__cache[64]
|
||||
#define DFF_CHD_COLOR mc_skin_color__cache[65]
|
||||
#define DFF_DEL_COLOR mc_skin_color__cache[66]
|
||||
#define DFF_ERROR_COLOR mc_skin_color__cache[67]
|
||||
|
||||
#define MC_SKIN_COLOR_CACHE_COUNT 67
|
||||
#define MC_SKIN_COLOR_CACHE_COUNT 68
|
||||
|
||||
/*** enums ***************************************************************************************/
|
||||
|
||||
|
@ -69,6 +69,7 @@ static const mc_skin_colors_old_t old_colors[] = {
|
||||
{"editframedrag", "editor", "editframedrag"},
|
||||
{"editlinestate", "editor", "editlinestate"},
|
||||
{"editmarked", "editor", "editmarked"},
|
||||
{"editnonprintable", "editor", "editnonprintable"},
|
||||
{"editnormal", "editor", "_default_"},
|
||||
{"editwhitespace", "editor", "editwhitespace"},
|
||||
{"errdhotfocus", "error", "errdhotfocus"},
|
||||
|
@ -302,6 +302,7 @@ mc_skin_color_cache_init (void)
|
||||
EDITOR_BOLD_COLOR = mc_skin_color_get ("editor", "editbold");
|
||||
EDITOR_MARKED_COLOR = mc_skin_color_get ("editor", "editmarked");
|
||||
EDITOR_WHITESPACE_COLOR = mc_skin_color_get ("editor", "editwhitespace");
|
||||
EDITOR_NONPRINTABLE_COLOR = mc_skin_color_get ("editor", "editnonprintable");
|
||||
EDITOR_RIGHT_MARGIN_COLOR = mc_skin_color_get ("editor", "editrightmargin");
|
||||
LINE_STATE_COLOR = mc_skin_color_get ("editor", "editlinestate");
|
||||
EDITOR_BACKGROUND = mc_skin_color_get ("editor", "editbg");
|
||||
|
@ -104,6 +104,7 @@
|
||||
editbold = yellow;green
|
||||
editmarked = black;lightgray
|
||||
editwhitespace = brightblue;black
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -104,6 +104,7 @@
|
||||
editbold = yellow;green
|
||||
editmarked = black;lightgray
|
||||
editwhitespace = brightblue;black
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -104,6 +104,7 @@
|
||||
editbold = yellow;green
|
||||
editmarked = black;cyan
|
||||
editwhitespace = brightblue;blue
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -104,6 +104,7 @@
|
||||
editbold = yellow;green
|
||||
editmarked = black;cyan
|
||||
editwhitespace = brightblue;blue
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -106,6 +106,7 @@
|
||||
editbold = yellow;green
|
||||
editmarked = black;cyan
|
||||
editwhitespace = brightblue;blue
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -107,6 +107,7 @@
|
||||
editmarked = black;cyan
|
||||
editwhitespace = brightblue;blue
|
||||
editlinestate = white;cyan
|
||||
editnonprintable = ;black
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
editrightmargin = brightblue;black
|
||||
|
@ -101,6 +101,7 @@
|
||||
editbold = yellow;blue
|
||||
editmarked = brightgreen;red
|
||||
editwhitespace = brightblue;blue
|
||||
editnonprintable = ;black
|
||||
editlinestate = brightgreen
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -111,6 +111,7 @@
|
||||
editbold = rgb400
|
||||
editmarked = ;main1
|
||||
editwhitespace = rgb400;bgdarker
|
||||
editnonprintable = ;black
|
||||
editlinestate = ;bgdarker
|
||||
bookmark = ;rgb531
|
||||
bookmarkfound = ;main2
|
||||
|
@ -111,6 +111,7 @@
|
||||
editbold = rgb400
|
||||
editmarked = ;main1
|
||||
editwhitespace = rgb400;bgdarker
|
||||
editnonprintable = ;black
|
||||
editlinestate = ;bgdarker
|
||||
bookmark = ;rgb531
|
||||
bookmarkfound = ;main2
|
||||
|
@ -107,6 +107,7 @@
|
||||
editbold = yellow;green
|
||||
editmarked = black;lightgray
|
||||
editwhitespace = brightblue;black
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -95,6 +95,7 @@
|
||||
editbold = yellow;
|
||||
editmarked = black;cyan
|
||||
editwhitespace = brightblue;blue
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color15;;bold
|
||||
editmarked = color11;color2;bold
|
||||
editwhitespace = color12;color4
|
||||
editnonprintable = ;black
|
||||
editlinestate = color2;color0
|
||||
bookmark = color0;color7
|
||||
bookmarkfound = color0;color7
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color15;;bold
|
||||
editmarked = color11;color2;bold
|
||||
editwhitespace = color2;color0
|
||||
editnonprintable = ;black
|
||||
editlinestate = color2;color0
|
||||
bookmark = color0;color7
|
||||
bookmarkfound = color0;color7
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color15;;bold
|
||||
editmarked = color11;color1;bold
|
||||
editwhitespace = color12;color4
|
||||
editnonprintable = ;black
|
||||
editlinestate = color1;color0
|
||||
bookmark = color0;color7
|
||||
bookmarkfound = color0;color7
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color15;;bold
|
||||
editmarked = color11;color1;bold
|
||||
editwhitespace = color12;color4
|
||||
editnonprintable = ;black
|
||||
editlinestate = color1;color0
|
||||
bookmark = color0;color7
|
||||
bookmarkfound = color0;color7
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color228;;bold
|
||||
editmarked = color228;color23;bold
|
||||
editwhitespace = color56;color234
|
||||
editnonprintable = ;black
|
||||
editlinestate = color66;color235
|
||||
bookmark = ;color239
|
||||
bookmarkfound = ;color239;bold
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color228;;bold
|
||||
editmarked = color228;color23;bold
|
||||
editwhitespace = color56;color234
|
||||
editnonprintable = ;black
|
||||
editlinestate = color66;color235
|
||||
bookmark = ;color239
|
||||
bookmarkfound = ;color239;bold
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color228;;bold
|
||||
editmarked = color228;color88;bold
|
||||
editwhitespace = color56;color234
|
||||
editnonprintable = ;black
|
||||
editlinestate = color95;color235
|
||||
bookmark = ;color239
|
||||
bookmarkfound = ;color239;bold
|
||||
|
@ -146,6 +146,7 @@
|
||||
editbold = color228;;bold
|
||||
editmarked = color228;color88;bold
|
||||
editwhitespace = color56;color234
|
||||
editnonprintable = ;black
|
||||
editlinestate = color95;color235
|
||||
bookmark = ;color239
|
||||
bookmarkfound = ;color239;bold
|
||||
|
@ -104,6 +104,7 @@
|
||||
editbold = brown;blue
|
||||
editmarked = black;cyan
|
||||
editwhitespace = brightblue;blue
|
||||
editnonprintable = ;black
|
||||
editlinestate = white;cyan
|
||||
bookmark = white;red
|
||||
bookmarkfound = black;green
|
||||
|
@ -161,6 +161,7 @@
|
||||
editbold = rgb400
|
||||
editmarked = ;rgb452;italic
|
||||
editwhitespace = rgb400;rgb553
|
||||
editnonprintable = ;black
|
||||
editlinestate = ;rgb553
|
||||
bookmark = ;rgb551
|
||||
bookmarkfound = ;rgb530
|
||||
|
@ -171,6 +171,7 @@
|
||||
editbold = MarkedFg;;bold
|
||||
editmarked = ;Selected
|
||||
editwhitespace = ;EditorWhitespace
|
||||
editnonprintable = ;black
|
||||
editlinestate = #000;EditorLineNumber
|
||||
bookmark = #000;EditorBookmark
|
||||
bookmarkfound = #000;EditorFindAll
|
||||
|
@ -171,6 +171,7 @@
|
||||
editbold = MarkedFg;;bold
|
||||
editmarked = ;Selected
|
||||
editwhitespace = ;EditorWhitespace
|
||||
editnonprintable = ;black
|
||||
editlinestate = #000;EditorLineNumber
|
||||
bookmark = #000;EditorBookmark
|
||||
bookmarkfound = #000;EditorFindAll
|
||||
|
@ -171,6 +171,7 @@
|
||||
editbold = MarkedFg;;bold
|
||||
editmarked = ;Selected
|
||||
editwhitespace = ;EditorWhitespace
|
||||
editnonprintable = ;black
|
||||
editlinestate = #000;EditorLineNumber
|
||||
bookmark = #000;EditorBookmark
|
||||
bookmarkfound = #000;EditorFindAll
|
||||
|
@ -171,6 +171,7 @@
|
||||
editbold = MarkedFg;;bold
|
||||
editmarked = ;Selected
|
||||
editwhitespace = ;EditorWhitespace
|
||||
editnonprintable = ;black
|
||||
editlinestate = #000;EditorLineNumber
|
||||
bookmark = #000;EditorBookmark
|
||||
bookmarkfound = #000;EditorFindAll
|
||||
|
@ -147,6 +147,7 @@
|
||||
editbold = ;;bold
|
||||
editmarked = ;color60
|
||||
editwhitespace = color236;color234
|
||||
editnonprintable = ;black
|
||||
editlinestate = ;color235
|
||||
bookmark = ;color239;
|
||||
bookmarkfound = ;color239;bold
|
||||
|
@ -113,6 +113,7 @@
|
||||
editbold = color228;;bold
|
||||
editmarked = color228;blue;bold
|
||||
editwhitespace = color56;color234
|
||||
editnonprintable = ;black
|
||||
editlinestate = color66;color235
|
||||
bookmark = ;color239
|
||||
bookmarkfound = ;color239;bold
|
||||
|
@ -112,6 +112,7 @@
|
||||
editbold = color228;;bold
|
||||
editmarked = color228;blue;bold
|
||||
editwhitespace = color56;color234
|
||||
editnonprintable = ;black
|
||||
editlinestate = color66;color235
|
||||
bookmark = ;color239
|
||||
bookmarkfound = ;color239;bold
|
||||
|
@ -345,7 +345,7 @@ mc_args_new_color_group (void)
|
||||
" errdhotfocus\n"
|
||||
" Menus: menunormal, menuhot, menusel, menuhotsel, menuinactive\n"
|
||||
" Popup menus: pmenunormal, pmenusel, pmenutitle\n"
|
||||
" Editor: editnormal, editbold, editmarked, editwhitespace,\n"
|
||||
" Editor: editnormal, editbold, editmarked, editwhitespace, editnonprintable,\n"
|
||||
" editlinestate, editbg, editframe, editframeactive\n"
|
||||
" editframedrag\n"
|
||||
" Viewer: viewnormal,viewbold, viewunderline, viewselected\n"
|
||||
|
@ -448,7 +448,6 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real,
|
||||
{
|
||||
int style;
|
||||
unsigned int textchar;
|
||||
int color;
|
||||
|
||||
if (cols_to_skip != 0)
|
||||
{
|
||||
@ -458,8 +457,6 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real,
|
||||
|
||||
style = p->style & 0xFF00;
|
||||
textchar = p->ch;
|
||||
/* If non-printable - use black background */
|
||||
color = (style & MOD_ABNORMAL) != 0 ? 0 : p->style >> 16;
|
||||
|
||||
if ((style & MOD_WHITESPACE) != 0)
|
||||
{
|
||||
@ -475,8 +472,10 @@ print_to_widget (WEdit * edit, long row, int start_col, int start_col_real,
|
||||
tty_setcolor (EDITOR_BOLD_COLOR);
|
||||
else if ((style & MOD_MARKED) != 0)
|
||||
tty_setcolor (EDITOR_MARKED_COLOR);
|
||||
else if ((style & MOD_ABNORMAL) != 0)
|
||||
tty_setcolor (EDITOR_NONPRINTABLE_COLOR);
|
||||
else
|
||||
tty_lowlevel_setcolor (color);
|
||||
tty_lowlevel_setcolor (p->style >> 16);
|
||||
|
||||
if (edit_options.show_right_margin)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user