Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions doc/man/mcedit.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,17 @@ file .\e*\e\e.c C\esProgram\esFile (#include|/\e\e\e*)
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_

# default colors
define comment brown
define comment yellow
context default
keyword whole if yellow
keyword whole else yellow
keyword whole for yellow
keyword whole while yellow
keyword whole do yellow
keyword whole switch yellow
keyword whole case yellow
keyword whole static yellow
keyword whole extern yellow
keyword whole if brightyellow
keyword whole else brightyellow
keyword whole for brightyellow
keyword whole while brightyellow
keyword whole do brightyellow
keyword whole switch brightyellow
keyword whole case brightyellow
keyword whole static brightyellow
keyword whole extern brightyellow
keyword { brightcyan
keyword } brightcyan
keyword '*' green
Expand Down Expand Up @@ -416,9 +416,9 @@ delimiters, this keyword prevents the context from ending at the end of
the lines that end in a backslash, thus allowing C preprocessor
directive to continue across multiple lines.
.PP
The possible colors are: black, gray, red, brightred, green,
brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta,
cyan, brightcyan, lightgray and white. The special keyword "default" means
The possible colors are: black, brightblack, red, brightred, green,
brightgreen, yellow, brightyellow, blue, brightblue, magenta, brightmagenta,
cyan, brightcyan, white and brightwhite. The special keyword "default" means
the terminal's default. Another special keyword "base" means mc's main
colors, it is useful as a placeholder if you want to specify attributes
without modifying the background color. When 256 colors are available,
Expand Down
24 changes: 12 additions & 12 deletions doc/man/sr/mcedit.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,17 @@ file .\e*\e\e.c C\esProgram\esFile (#include|/\e\e\e*)
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_

# подразумеване боје
define comment brown
define comment yellow
context default
keyword whole if yellow
keyword whole else yellow
keyword whole for yellow
keyword whole while yellow
keyword whole do yellow
keyword whole switch yellow
keyword whole case yellow
keyword whole static yellow
keyword whole extern yellow
keyword whole if brightyellow
keyword whole else brightyellow
keyword whole for brightyellow
keyword whole while brightyellow
keyword whole do brightyellow
keyword whole switch brightyellow
keyword whole case brightyellow
keyword whole static brightyellow
keyword whole extern brightyellow
keyword { brightcyan
keyword } brightcyan
keyword '*' green
Expand Down Expand Up @@ -396,8 +396,8 @@ tab\-ове и размаке преко секвенци \et и \es. Знако
дозвољавајући претпроцесорској директиви C\-а да се простире преко неколико
линија.
.PP
Могуће боје су: black, gray, red, brightred, green, brightgreen, brown, yellow,
blue, brightblue, magenta, brightmagenta, cyan, brightcyan, lightgray и white.
Могуће боје су: black, brightblack, red, brightred, green, brightgreen, yellow, brightyellow,
blue, brightblue, magenta, brightmagenta, cyan, brightcyan, white и brightwhite.
Посебна кључна реч „default“ значи подразумевану боју терминала. Друга посебна
кључна реч „base“ значи основну боју ПН\-а, и корисна је као заузимач места ако
желите да задате атрибуте без измене позадинске боје. Када је доступно 256 боја,
Expand Down
5 changes: 0 additions & 5 deletions lib/skin/lines.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@ skin_get_char (mc_skin_t *mc_skin, const char *name, gunichar def, mc_tty_char_t
char *value_utf8;

value_utf8 = mc_config_get_string_raw (mc_skin->config, "lines", name, NULL);
if (value_utf8 == NULL)
{
// it was called "Lines" (uppercase L) in mc <= 4.8.33, accept that for compatibility
value_utf8 = mc_config_get_string_raw (mc_skin->config, "Lines", name, NULL);
}
if (value_utf8 != NULL)
{
c = g_utf8_get_char_validated (value_utf8, -1);
Expand Down
37 changes: 5 additions & 32 deletions lib/tty/color-internal.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,21 @@ typedef struct mc_tty_color_table_struct

static mc_tty_color_table_t const color_table[] = {
{ "black", COLOR_BLACK },
{ "gray", COLOR_BLACK + COLOR_INTENSITY },
{ "brightblack", COLOR_BLACK + COLOR_INTENSITY },
{ "red", COLOR_RED },
{ "brightred", COLOR_RED + COLOR_INTENSITY },
{ "green", COLOR_GREEN },
{ "brightgreen", COLOR_GREEN + COLOR_INTENSITY },
{ "brown", COLOR_YELLOW },
{ "yellow", COLOR_YELLOW + COLOR_INTENSITY },
{ "yellow", COLOR_YELLOW },
{ "brightyellow", COLOR_YELLOW + COLOR_INTENSITY },
{ "blue", COLOR_BLUE },
{ "brightblue", COLOR_BLUE + COLOR_INTENSITY },
{ "magenta", COLOR_MAGENTA },
{ "brightmagenta", COLOR_MAGENTA + COLOR_INTENSITY },
{ "cyan", COLOR_CYAN },
{ "brightcyan", COLOR_CYAN + COLOR_INTENSITY },
{ "lightgray", COLOR_WHITE },
{ "white", COLOR_WHITE + COLOR_INTENSITY },
{ "white", COLOR_WHITE },
{ "brightwhite", COLOR_WHITE + COLOR_INTENSITY },
{ "default", -1 }, // default color of the terminal
// End of list
{ NULL, 0 },
Expand Down Expand Up @@ -161,33 +161,6 @@ parse_256_or_true_color_name (const char *color_name)
/*** public functions ****************************************************************************/
/* --------------------------------------------------------------------------------------------- */

const char *
tty_color_get_name_by_index (int idx)
{
int i;

// Find the real English name of the first 16 colors,
// as well as the A_* special values.
for (i = 0; color_table[i].name != NULL; i++)
if (idx == color_table[i].value)
return color_table[i].name;

// Create and return the strings in "colorNNN" or "#rrggbb" format.
if ((idx >= 16 && idx < 256) || (idx & FLAG_TRUECOLOR) != 0)
{
char name[9];

if (idx < 256)
g_snprintf (name, sizeof (name), "color%d", idx);
else
g_snprintf (name, sizeof (name), "#%06X", (unsigned int) idx & 0xFFFFFF);
return g_intern_string (name);
}
return "default";
}

/* --------------------------------------------------------------------------------------------- */

int
tty_color_get_index_by_name (const char *color_name)
{
Expand Down
1 change: 0 additions & 1 deletion lib/tty/color-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ extern gboolean need_convert_256color;

/*** declarations of public functions ************************************************************/

const char *tty_color_get_name_by_index (int idx);
int tty_color_get_index_by_name (const char *color_name);
int tty_attr_get_bits (const char *attrs);
int convert_256color_to_truecolor (int color);
Expand Down
18 changes: 18 additions & 0 deletions lib/tty/color-slang.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,24 @@ tty_color_deinit_lib (void)

/* --------------------------------------------------------------------------------------------- */

static const char *
tty_color_get_name_by_index (int idx)
{
if (idx >= 0 && (idx < 256 || (idx & FLAG_TRUECOLOR) != 0))
{
char name[9];

if (idx < 256)
g_snprintf (name, sizeof (name), "color%d", idx);
else
g_snprintf (name, sizeof (name), "#%06X", (unsigned int) idx & 0xFFFFFF);
return g_intern_string (name);
}
return "default";
}

/* --------------------------------------------------------------------------------------------- */

void
tty_color_try_alloc_lib_pair (tty_color_lib_pair_t *mc_color_pair)
{
Expand Down
6 changes: 3 additions & 3 deletions misc/skins/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ your skin to the standard 16 colors (in addition to the terminal's defaults).
These colors each have two names: the preferred human-friendly one, and a
technical one referring to their color index.

black = color0 gray = color8
black = color0 brightblack = color8
red = color1 brightred = color9
green = color2 brightgreen = color10
brown = color3 yellow = color11
yellow = color3 brightyellow = color11
blue = color4 brightblue = color12
magenta = color5 brightmagenta = color13
cyan = color6 brightcyan = color14
lightgray = color7 white = color15
white = color7 brightwhite = color15

With 8 color terminal settings (such as TERM=linux or TERM=xterm), bright
foreground colors (second column) are emulated in mc by enabling the bold
Expand Down
118 changes: 59 additions & 59 deletions misc/skins/dark.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,119 +25,119 @@
drightmiddle = ┤

[core]
_default_ = lightgray;black
_default_ = white;black
selected = black;cyan
marked = yellow;black
markselect = yellow;cyan
gauge = white;black
marked = brightyellow;black
markselect = brightyellow;cyan
gauge = brightwhite;black
input = black;cyan
inputunchanged = gray;cyan
inputunchanged = brightblack;cyan
inputmark = cyan;black
disabled = gray;blue
reverse = black;lightgray
commandlinemark = black;lightgray
header = yellow;black
disabled = brightblack;blue
reverse = black;white
commandlinemark = black;white
header = brightyellow;black
inputhistory =
commandhistory =
shadow = gray;black
frame = lightgray;black
shadow = brightblack;black
frame = white;black

[dialog]
_default_ = brightcyan;blue
dfocus = blue;cyan
dhotnormal = white;
dhotfocus = white;cyan
dhotnormal = brightwhite;
dhotfocus = brightwhite;cyan
dselnormal = blue;cyan
dselfocus = white;cyan
dtitle = white;
dselfocus = brightwhite;cyan
dtitle = brightwhite;
dframe = brightcyan;blue

[error]
_default_ = white;red
errdfocus = black;lightgray
errdhotnormal = yellow;red
errdhotfocus = yellow;lightgray
errdtitle = yellow;red
errdframe = white;red
_default_ = brightwhite;red
errdfocus = black;white
errdhotnormal = brightyellow;red
errdhotfocus = brightyellow;white
errdtitle = brightyellow;red
errdframe = brightwhite;red

[filehighlight]
_default_ =
directory = white;
directory = brightwhite;
executable = brightmagenta;
symlink = lightgray;
symlink = white;
hardlink =
stalelink = brightred;
device = brightmagenta;
special = brightblue;
core = red;
temp = gray;
temp = brightblack;
archive = brightgreen;
doc = brown;
doc = yellow;
source = cyan;
media = green;
graph = brightcyan;
database = brightred;

[menu]
_default_ = lightgray;blue
_default_ = white;blue
menusel = black;cyan
menuhot = white;blue
menuhotsel = white;cyan
menuinactive = black;lightgray
menuframe = lightgray;blue
menuhot = brightwhite;blue
menuhotsel = brightwhite;cyan
menuinactive = black;white
menuframe = white;blue

[popupmenu]
_default_ = lightgray;blue
_default_ = white;blue
menusel = black;cyan
menutitle = lightgray;blue
menuframe = lightgray;blue
menutitle = white;blue
menuframe = white;blue

[buttonbar]
hotkey = red;lightgray
button = black;lightgray
hotkey = red;white
button = black;white

[statusbar]
_default_ = black;lightgray
_default_ = black;white

[help]
_default_ = black;lightgray
helpitalic = red;lightgray
helpbold = blue;lightgray
_default_ = black;white
helpitalic = red;white
helpbold = blue;white
helplink = black;cyan
helpslink = yellow;blue
helptitle = blue;lightgray
helpframe = black;lightgray
helpslink = brightyellow;blue
helptitle = blue;white
helpframe = black;white

[editor]
_default_ = lightgray;black
editbold = yellow;green
editmarked = black;lightgray
_default_ = white;black
editbold = brightyellow;green
editmarked = black;white
editwhitespace = brightblue;black
editnonprintable = ;black
editlinestate = white;cyan
bookmark = white;red
editlinestate = brightwhite;cyan
bookmark = brightwhite;red
bookmarkfound = black;green
editrightmargin = white;blue
editrightmargin = brightwhite;blue
# editbg =
editframe = gray;
editframeactive = lightgray;
editframe = brightblack;
editframeactive = white;
editframedrag = red;

[viewer]
_default_ = lightgray;black
viewbold = yellow;black
_default_ = white;black
viewbold = brightyellow;black
viewunderline = brightred;black
viewboldunderline = yellow;black
viewselected = yellow;cyan
viewframe = lightgray;black
viewboldunderline = brightyellow;black
viewselected = brightyellow;cyan
viewframe = white;black

[diffviewer]
added = white;green
added = brightwhite;green
changedline = blue;cyan
changednew = red;cyan
changed = white;cyan
removed = white;red
error = red;lightgray
changed = brightwhite;cyan
removed = brightwhite;red
error = red;white

[widget-panel]
sort-up-char = ↑
Expand Down
Loading
Loading