Add hardcoded skins.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
родитель
981fe001d1
Коммит
d0457bbe9f
@ -18,16 +18,15 @@
|
|||||||
|
|
||||||
[core]
|
[core]
|
||||||
_default_=lightgray;blue
|
_default_=lightgray;blue
|
||||||
selected=black;cyan;A_REVERSE
|
selected=black;cyan
|
||||||
marked=yellow;blue;A_BOLD
|
marked=yellow;blue
|
||||||
markselect=yellow;cyan; A_REVERSE|A_BOLD
|
markselect=yellow;cyan;
|
||||||
reverse=black;lightgray;A_REVERSE
|
|
||||||
gauge=white;black
|
gauge=white;black
|
||||||
input=black;cyan
|
input=black;cyan
|
||||||
|
|
||||||
[dialog]
|
[dialog]
|
||||||
_default_=black;lightgray;A_REVERSE
|
_default_=black;lightgray
|
||||||
focus=black;cyan;A_BOLD
|
focus=black;cyan
|
||||||
hotnormal=blue;lightgray
|
hotnormal=blue;lightgray
|
||||||
hotfocus=blue;cyan
|
hotfocus=blue;cyan
|
||||||
|
|
||||||
@ -50,28 +49,28 @@
|
|||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
_default_=white;cyan
|
_default_=white;cyan
|
||||||
entry=white;cyan;A_REVERSE
|
entry=white;cyan
|
||||||
hot=yellow;cyan
|
hot=yellow;cyan
|
||||||
selected=white;black;A_BOLD
|
selected=white;black
|
||||||
hotselected=yellow;black
|
hotselected=yellow;black
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
_default_=black;lightgray;A_REVERSE
|
_default_=black;lightgray
|
||||||
italic=red;lightgray;A_REVERSE
|
italic=red;lightgray
|
||||||
bold=blue;lightgray;A_REVERSE
|
bold=blue;lightgray
|
||||||
link=black;cyan
|
link=black;cyan
|
||||||
slink=yellow;blue;A_BOLD
|
slink=yellow;blue
|
||||||
|
|
||||||
[editor]
|
[editor]
|
||||||
bold=yellow;blue;A_BOLD
|
bold=yellow;blue
|
||||||
marked=black;cyan;A_REVERSE
|
marked=black;cyan
|
||||||
whitespace=brightblue;blue
|
whitespace=brightblue;blue
|
||||||
linestate=white;cyan
|
linestate=white;cyan
|
||||||
|
|
||||||
[viewer]
|
[viewer]
|
||||||
underline=brightred;blue;A_UNDERLINE
|
underline=brightred;blue
|
||||||
|
|
||||||
[error]
|
[error]
|
||||||
_default_=white;red;A_BOLD
|
_default_=white;red
|
||||||
hotnormal=yellow;red
|
hotnormal=yellow;red
|
||||||
hotfocus=yellow;lightgray
|
hotfocus=yellow;lightgray
|
||||||
|
@ -18,16 +18,15 @@
|
|||||||
|
|
||||||
[core]
|
[core]
|
||||||
_default_=lightgray;blue
|
_default_=lightgray;blue
|
||||||
selected=black;cyan;A_REVERSE
|
selected=black;cyan
|
||||||
marked=yellow;blue;A_BOLD
|
marked=yellow;blue
|
||||||
markselect=yellow;cyan; A_REVERSE|A_BOLD
|
markselect=yellow;cyan;
|
||||||
reverse=black;lightgray;A_REVERSE
|
|
||||||
gauge=white;black
|
gauge=white;black
|
||||||
input=black;cyan
|
input=black;cyan
|
||||||
|
|
||||||
[dialog]
|
[dialog]
|
||||||
_default_=black;lightgray;A_REVERSE
|
_default_=black;lightgray
|
||||||
focus=black;cyan;A_BOLD
|
focus=black;cyan
|
||||||
hotnormal=blue;lightgray
|
hotnormal=blue;lightgray
|
||||||
hotfocus=blue;cyan
|
hotfocus=blue;cyan
|
||||||
|
|
||||||
@ -50,28 +49,28 @@
|
|||||||
|
|
||||||
[menu]
|
[menu]
|
||||||
_default_=white;cyan
|
_default_=white;cyan
|
||||||
entry=white;cyan;A_REVERSE
|
entry=white;cyan
|
||||||
hot=yellow;cyan
|
hot=yellow;cyan
|
||||||
selected=white;black;A_BOLD
|
selected=white;black
|
||||||
hotselected=yellow;black
|
hotselected=yellow;black
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
_default_=black;lightgray;A_REVERSE
|
_default_=black;lightgray
|
||||||
italic=red;lightgray;A_REVERSE
|
italic=red;lightgray
|
||||||
bold=blue;lightgray;A_REVERSE
|
bold=blue;lightgray
|
||||||
link=black;cyan
|
link=black;cyan
|
||||||
slink=yellow;blue;A_BOLD
|
slink=yellow;blue
|
||||||
|
|
||||||
[editor]
|
[editor]
|
||||||
bold=yellow;blue;A_BOLD
|
bold=yellow;blue
|
||||||
marked=black;cyan;A_REVERSE
|
marked=black;cyan
|
||||||
whitespace=brightblue;blue
|
whitespace=brightblue;blue
|
||||||
linestate=white;cyan
|
linestate=white;cyan
|
||||||
|
|
||||||
[viewer]
|
[viewer]
|
||||||
underline=brightred;blue;A_UNDERLINE
|
underline=brightred;blue
|
||||||
|
|
||||||
[error]
|
[error]
|
||||||
_default_=white;red;A_BOLD
|
_default_=white;red
|
||||||
hotnormal=yellow;red
|
hotnormal=yellow;red
|
||||||
hotfocus=yellow;lightgray
|
hotfocus=yellow;lightgray
|
||||||
|
@ -4,6 +4,7 @@ libmcskin_la_SOURCES = \
|
|||||||
colors.c \
|
colors.c \
|
||||||
colors-old.c \
|
colors-old.c \
|
||||||
common.c \
|
common.c \
|
||||||
|
hc-skins.c \
|
||||||
ini-file.c \
|
ini-file.c \
|
||||||
skin.h \
|
skin.h \
|
||||||
internal.h
|
internal.h
|
||||||
|
@ -52,6 +52,7 @@ static gboolean mc_skin_is_init = FALSE;
|
|||||||
static void
|
static void
|
||||||
mc_skin_hash_destroy_key (gpointer data)
|
mc_skin_hash_destroy_key (gpointer data)
|
||||||
{
|
{
|
||||||
|
g_free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
115
src/skin/hc-skins.c
Обычный файл
115
src/skin/hc-skins.c
Обычный файл
@ -0,0 +1,115 @@
|
|||||||
|
/*
|
||||||
|
Skins engine.
|
||||||
|
Set of hardcoded skins
|
||||||
|
|
||||||
|
Copyright (C) 2009 The Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Written by:
|
||||||
|
Slava Zanko <slavazanko@gmail.com>, 2009.
|
||||||
|
|
||||||
|
This file is part of the Midnight Commander.
|
||||||
|
|
||||||
|
The Midnight Commander is free software; you can redistribute it
|
||||||
|
and/or modify it under the terms of the GNU General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of the
|
||||||
|
License, or (at your option) any later version.
|
||||||
|
|
||||||
|
The Midnight Commander is distributed in the hope that it will be
|
||||||
|
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||||
|
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
MA 02110-1301, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <config.h>
|
||||||
|
#include "../src/global.h"
|
||||||
|
|
||||||
|
#include "skin.h"
|
||||||
|
#include "internal.h"
|
||||||
|
|
||||||
|
|
||||||
|
/*** global variables ****************************************************************************/
|
||||||
|
|
||||||
|
/*** file scope macro definitions ****************************************************************/
|
||||||
|
|
||||||
|
#define set_lines(x,y) mc_config_set_string(mc_skin->config, "Lines", x, y)
|
||||||
|
|
||||||
|
/*** file scope type declarations ****************************************************************/
|
||||||
|
|
||||||
|
/*** file scope variables ************************************************************************/
|
||||||
|
|
||||||
|
/*** file scope functions ************************************************************************/
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
/*** public functions ****************************************************************************/
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void
|
||||||
|
mc_skin_hardcoded_blackwhite_colors(mc_skin_t *mc_skin)
|
||||||
|
{
|
||||||
|
mc_config_set_string(mc_skin->config, "core", "_default_", "default;default");
|
||||||
|
mc_config_set_string(mc_skin->config, "core", "selected", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "core", "marked", "A_BOLD");
|
||||||
|
mc_config_set_string(mc_skin->config, "core", "markselect", "A_BOLD_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "core", "reverse", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "dialog", "_default_", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "dialog", "focus", "A_BOLD");
|
||||||
|
mc_config_set_string(mc_skin->config, "menu", "entry", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "menu", "selected", "A_BOLD");
|
||||||
|
mc_config_set_string(mc_skin->config, "help", "_default_", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "help", "italic", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "help", "bold", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "help", "slink", "A_BOLD");
|
||||||
|
mc_config_set_string(mc_skin->config, "editor", "bold", "A_BOLD");
|
||||||
|
mc_config_set_string(mc_skin->config, "editor", "marked", "A_REVERSE");
|
||||||
|
mc_config_set_string(mc_skin->config, "viewer", "underline", "A_UNDERLINE");
|
||||||
|
mc_config_set_string(mc_skin->config, "error", "_default_", "A_BOLD");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void
|
||||||
|
mc_skin_hardcoded_space_lines(mc_skin_t *mc_skin)
|
||||||
|
{
|
||||||
|
set_lines("lefttop", " ");
|
||||||
|
set_lines("righttop", " ");
|
||||||
|
set_lines("centertop", " ");
|
||||||
|
set_lines("centerbottom", " ");
|
||||||
|
set_lines("leftbottom", " ");
|
||||||
|
set_lines("rightbottom", " ");
|
||||||
|
set_lines("leftmiddle", " ");
|
||||||
|
set_lines("rightmiddle", " ");
|
||||||
|
set_lines("centermiddle", " ");
|
||||||
|
set_lines("horiz", " ");
|
||||||
|
set_lines("vert", " ");
|
||||||
|
set_lines("thinhoriz", " ");
|
||||||
|
set_lines("thinvert", " ");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
void
|
||||||
|
mc_skin_hardcoded_ugly_lines(mc_skin_t *mc_skin)
|
||||||
|
{
|
||||||
|
set_lines("lefttop", "+");
|
||||||
|
set_lines("righttop", "+");
|
||||||
|
set_lines("centertop", "-");
|
||||||
|
set_lines("centerbottom", "-");
|
||||||
|
set_lines("leftbottom", "+");
|
||||||
|
set_lines("rightbottom", "+");
|
||||||
|
set_lines("leftmiddle", "|");
|
||||||
|
set_lines("rightmiddle", "|");
|
||||||
|
set_lines("centermiddle", "+");
|
||||||
|
set_lines("horiz", "-");
|
||||||
|
set_lines("vert", "-");
|
||||||
|
set_lines("thinhoriz", "-");
|
||||||
|
set_lines("thinvert", "|");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
@ -135,22 +135,8 @@ mc_skin_set_hardcoded_skin(mc_skin_t *mc_skin)
|
|||||||
|
|
||||||
mc_config_set_string(mc_skin->config, "skin", "description", "hardcoded skin");
|
mc_config_set_string(mc_skin->config, "skin", "description", "hardcoded skin");
|
||||||
|
|
||||||
#define set_lines(x,y) mc_config_set_string(mc_skin->config, "Lines", x, y)
|
mc_skin_hardcoded_ugly_lines(mc_skin);
|
||||||
set_lines("lefttop", "+");
|
mc_skin_hardcoded_blackwhite_colors(mc_skin);
|
||||||
set_lines("righttop", "+");
|
|
||||||
set_lines("centertop", "-");
|
|
||||||
set_lines("centerbottom", "-");
|
|
||||||
set_lines("leftbottom", "+");
|
|
||||||
set_lines("rightbottom", "+");
|
|
||||||
set_lines("leftmiddle", "|");
|
|
||||||
set_lines("rightmiddle", "|");
|
|
||||||
set_lines("centermiddle", "+");
|
|
||||||
set_lines("horiz", "-");
|
|
||||||
set_lines("vert", "-");
|
|
||||||
set_lines("thinhoriz", "-");
|
|
||||||
set_lines("thinvert", "|");
|
|
||||||
#undef set_lines
|
|
||||||
mc_config_set_string(mc_skin->config, "core", "_default_", "white;black;");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
@ -28,4 +28,9 @@ void mc_skin_set_hardcoded_skin(mc_skin_t *);
|
|||||||
|
|
||||||
gboolean mc_skin_ini_file_parce_colors(mc_skin_t *);
|
gboolean mc_skin_ini_file_parce_colors(mc_skin_t *);
|
||||||
|
|
||||||
|
|
||||||
|
void mc_skin_hardcoded_ugly_lines(mc_skin_t *);
|
||||||
|
void mc_skin_hardcoded_space_lines(mc_skin_t *);
|
||||||
|
void mc_skin_hardcoded_blackwhite_colors(mc_skin_t *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -62,6 +62,7 @@ static int mc_tty_color__count = 0;
|
|||||||
static void
|
static void
|
||||||
mc_tty_color_hash_destroy_key (gpointer data)
|
mc_tty_color_hash_destroy_key (gpointer data)
|
||||||
{
|
{
|
||||||
|
g_free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user