From d2e6ca7b6e1aca1ecfef20f2678586fff2332559 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sat, 19 Sep 2009 18:31:22 +0400 Subject: [PATCH] Trinvial refactoring: changed order of color definitions. Signed-off-by: Andrew Borodin --- src/skin/colors-old.c | 16 ++++++++-------- src/skin/colors.c | 28 ++++++++++++---------------- src/skin/hc-skins.c | 4 ++-- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/src/skin/colors-old.c b/src/skin/colors-old.c index f7b4f038d..8bcceebff 100644 --- a/src/skin/colors-old.c +++ b/src/skin/colors-old.c @@ -52,34 +52,34 @@ typedef struct mc_skin_colors_old_struct { mc_skin_colors_old_t old_colors[] = { {"normal", "core", "_default_"}, - {"selected", "core", "selected"}, {"marked", "core", "marked"}, + {"selected", "core", "selected"}, {"markselect", "core", "markselect"}, - {"errors", "error", "_default_"}, - {"menu", "menu", "_default_"}, {"reverse", "core", "reverse"}, {"dnormal", "dialog", "_default_"}, {"dfocus", "dialog", "dfocus"}, {"dhotnormal", "dialog", "dhotnormal"}, {"dhotfocus", "dialog", "dhotfocus"}, - {"viewunderline", "viewer", "viewunderline"}, + {"errors", "error", "_default_"}, + {"errdhotnormal", "error", "errdhotnormal"}, + {"errdhotfocus", "error", "errdhotfocus"}, + {"menu", "menu", "_default_"}, {"menuhot", "menu", "menuhot"}, {"menusel", "menu", "menusel"}, {"menuhotsel", "menu", "menuhotsel"}, + {"gauge", "core", "gauge"}, + {"input", "core", "input"}, {"helpnormal", "help", "_default_"}, {"helpitalic", "help", "helpitalic"}, {"helpbold", "help", "helpbold"}, {"helplink", "help", "helplink"}, {"helpslink", "help", "helpslink"}, - {"gauge", "core", "gauge"}, - {"input", "core", "input"}, + {"viewunderline", "viewer", "viewunderline"}, {"editnormal", "editor", "_default_"}, {"editbold", "editor", "editbold"}, {"editmarked", "editor", "editmarked"}, {"editwhitespace", "editor", "editwhitespace"}, {"editlinestate", "editor", "linestate"}, - {"errdhotnormal", "error", "errdhotnormal"}, - {"errdhotfocus", "error", "errdhotfocus"}, {NULL, NULL, NULL} }; diff --git a/src/skin/colors.c b/src/skin/colors.c index 40d02a4f4..638fb1f94 100644 --- a/src/skin/colors.c +++ b/src/skin/colors.c @@ -195,40 +195,39 @@ mc_skin_color_cache_init (void) NORMAL_COLOR = mc_skin_color_get ("core", "_default_"); MARKED_COLOR = mc_skin_color_get ("core", "marked"); SELECTED_COLOR = mc_skin_color_get ("core", "selected"); - REVERSE_COLOR = mc_skin_color_get ("core", "reverse"); MARKED_SELECTED_COLOR = mc_skin_color_get ("core", "markselect"); - ERROR_COLOR = mc_skin_color_get ("error", "_default_"); - MENU_ENTRY_COLOR = mc_skin_color_get ("menu", "_default_"); + REVERSE_COLOR = mc_skin_color_get ("core", "reverse"); COLOR_NORMAL = mc_skin_color_get ("dialog", "_default_"); COLOR_FOCUS = mc_skin_color_get ("dialog", "dfocus"); COLOR_HOT_NORMAL = mc_skin_color_get ("dialog", "dhotnormal"); COLOR_HOT_FOCUS = mc_skin_color_get ("dialog", "dhotfocus"); - VIEW_UNDERLINED_COLOR = mc_skin_color_get ("viewer", "viewunderline"); + ERROR_COLOR = mc_skin_color_get ("error", "_default_"); + ERROR_HOT_NORMAL = mc_skin_color_get ("error", "errdhotnormal"); + ERROR_HOT_FOCUS = mc_skin_color_get ("error", "errdhotfocus"); + + MENU_ENTRY_COLOR = mc_skin_color_get ("menu", "_default_"); MENU_SELECTED_COLOR = mc_skin_color_get ("menu", "menusel"); MENU_HOT_COLOR = mc_skin_color_get ("menu", "menuhot"); MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", "menuhotsel"); + GAUGE_COLOR = mc_skin_color_get ("core", "gauge"); + INPUT_COLOR = mc_skin_color_get ("core", "input"); + HELP_NORMAL_COLOR = mc_skin_color_get ("help", "_default_"); HELP_ITALIC_COLOR = mc_skin_color_get ("help", "helpitalic"); HELP_BOLD_COLOR = mc_skin_color_get ("help", "helpbold"); HELP_LINK_COLOR = mc_skin_color_get ("help", "helplink"); HELP_SLINK_COLOR = mc_skin_color_get ("help", "helpslink"); - GAUGE_COLOR = mc_skin_color_get ("core", "gauge"); - INPUT_COLOR = mc_skin_color_get ("core", "input"); + VIEW_UNDERLINED_COLOR = mc_skin_color_get ("viewer", "viewunderline"); EDITOR_NORMAL_COLOR = mc_skin_color_get ("editor", "_default_"); 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"); - - ERROR_HOT_NORMAL = mc_skin_color_get ("error", "errdhotnormal"); - ERROR_HOT_FOCUS = mc_skin_color_get ("error", "errdhotfocus"); - LINE_STATE_COLOR = mc_skin_color_get ("editor", "linestate"); - } /* --------------------------------------------------------------------------------------------- */ @@ -236,11 +235,8 @@ mc_skin_color_cache_init (void) static gboolean mc_skin_color_check_inisection (const gchar * group) { - if ((strcasecmp ("skin", group) == 0) - || (strcasecmp ("lines", group) == 0)) - return FALSE; - - return TRUE; + return !((strcasecmp ("skin", group) == 0) + || (strcasecmp ("lines", group) == 0)); } /* --------------------------------------------------------------------------------------------- */ diff --git a/src/skin/hc-skins.c b/src/skin/hc-skins.c index 139c286fe..8e49195c4 100644 --- a/src/skin/hc-skins.c +++ b/src/skin/hc-skins.c @@ -61,6 +61,7 @@ mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin) mc_config_set_string (mc_skin->config, "dialog", "dfocus", "A_BOLD"); mc_config_set_string (mc_skin->config, "dialog", "dhotnormal", "A_UNDERLINE"); mc_config_set_string (mc_skin->config, "dialog", "dhotfocus", "A_UNDERLINE"); + mc_config_set_string (mc_skin->config, "error", "_default_", "A_BOLD"); mc_config_set_string (mc_skin->config, "menu", "_default_", "default"); mc_config_set_string (mc_skin->config, "menu", "menuhot", "A_UNDERLINE"); mc_config_set_string (mc_skin->config, "menu", "menusel", "A_REVERSE"); @@ -69,10 +70,9 @@ mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin) mc_config_set_string (mc_skin->config, "help", "helpitalic", "A_REVERSE"); mc_config_set_string (mc_skin->config, "help", "helpbold", "A_REVERSE"); mc_config_set_string (mc_skin->config, "help", "helpslink", "A_BOLD"); + mc_config_set_string (mc_skin->config, "viewer", "viewunderline", "A_UNDERLINE"); mc_config_set_string (mc_skin->config, "editor", "editbold", "A_BOLD"); mc_config_set_string (mc_skin->config, "editor", "editmarked", "A_REVERSE"); - mc_config_set_string (mc_skin->config, "viewer", "viewunderline", "A_UNDERLINE"); - mc_config_set_string (mc_skin->config, "error", "_default_", "A_BOLD"); } /* --------------------------------------------------------------------------------------------- */