1
1
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
Slava Zanko 2009-09-08 18:07:51 +03:00
родитель 981fe001d1
Коммит d0457bbe9f
8 изменённых файлов: 155 добавлений и 48 удалений

Просмотреть файл

@ -18,16 +18,15 @@
[core]
_default_=lightgray;blue
selected=black;cyan;A_REVERSE
marked=yellow;blue;A_BOLD
markselect=yellow;cyan; A_REVERSE|A_BOLD
reverse=black;lightgray;A_REVERSE
selected=black;cyan
marked=yellow;blue
markselect=yellow;cyan;
gauge=white;black
input=black;cyan
[dialog]
_default_=black;lightgray;A_REVERSE
focus=black;cyan;A_BOLD
_default_=black;lightgray
focus=black;cyan
hotnormal=blue;lightgray
hotfocus=blue;cyan
@ -50,28 +49,28 @@
[menu]
_default_=white;cyan
entry=white;cyan;A_REVERSE
entry=white;cyan
hot=yellow;cyan
selected=white;black;A_BOLD
selected=white;black
hotselected=yellow;black
[help]
_default_=black;lightgray;A_REVERSE
italic=red;lightgray;A_REVERSE
bold=blue;lightgray;A_REVERSE
_default_=black;lightgray
italic=red;lightgray
bold=blue;lightgray
link=black;cyan
slink=yellow;blue;A_BOLD
slink=yellow;blue
[editor]
bold=yellow;blue;A_BOLD
marked=black;cyan;A_REVERSE
bold=yellow;blue
marked=black;cyan
whitespace=brightblue;blue
linestate=white;cyan
[viewer]
underline=brightred;blue;A_UNDERLINE
underline=brightred;blue
[error]
_default_=white;red;A_BOLD
_default_=white;red
hotnormal=yellow;red
hotfocus=yellow;lightgray

Просмотреть файл

@ -18,16 +18,15 @@
[core]
_default_=lightgray;blue
selected=black;cyan;A_REVERSE
marked=yellow;blue;A_BOLD
markselect=yellow;cyan; A_REVERSE|A_BOLD
reverse=black;lightgray;A_REVERSE
selected=black;cyan
marked=yellow;blue
markselect=yellow;cyan;
gauge=white;black
input=black;cyan
[dialog]
_default_=black;lightgray;A_REVERSE
focus=black;cyan;A_BOLD
_default_=black;lightgray
focus=black;cyan
hotnormal=blue;lightgray
hotfocus=blue;cyan
@ -50,28 +49,28 @@
[menu]
_default_=white;cyan
entry=white;cyan;A_REVERSE
entry=white;cyan
hot=yellow;cyan
selected=white;black;A_BOLD
selected=white;black
hotselected=yellow;black
[help]
_default_=black;lightgray;A_REVERSE
italic=red;lightgray;A_REVERSE
bold=blue;lightgray;A_REVERSE
_default_=black;lightgray
italic=red;lightgray
bold=blue;lightgray
link=black;cyan
slink=yellow;blue;A_BOLD
slink=yellow;blue
[editor]
bold=yellow;blue;A_BOLD
marked=black;cyan;A_REVERSE
bold=yellow;blue
marked=black;cyan
whitespace=brightblue;blue
linestate=white;cyan
[viewer]
underline=brightred;blue;A_UNDERLINE
underline=brightred;blue
[error]
_default_=white;red;A_BOLD
_default_=white;red
hotnormal=yellow;red
hotfocus=yellow;lightgray

Просмотреть файл

@ -4,6 +4,7 @@ libmcskin_la_SOURCES = \
colors.c \
colors-old.c \
common.c \
hc-skins.c \
ini-file.c \
skin.h \
internal.h

Просмотреть файл

@ -52,6 +52,7 @@ static gboolean mc_skin_is_init = FALSE;
static void
mc_skin_hash_destroy_key (gpointer data)
{
g_free(data);
}
/* --------------------------------------------------------------------------------------------- */

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");
#define set_lines(x,y) mc_config_set_string(mc_skin->config, "Lines", x, y)
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", "|");
#undef set_lines
mc_config_set_string(mc_skin->config, "core", "_default_", "white;black;");
mc_skin_hardcoded_ugly_lines(mc_skin);
mc_skin_hardcoded_blackwhite_colors(mc_skin);
}
/* --------------------------------------------------------------------------------------------- */

Просмотреть файл

@ -28,4 +28,9 @@ void mc_skin_set_hardcoded_skin(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

Просмотреть файл

@ -62,6 +62,7 @@ static int mc_tty_color__count = 0;
static void
mc_tty_color_hash_destroy_key (gpointer data)
{
g_free(data);
}
/* --------------------------------------------------------------------------------------------- */