Ticket #3169: mc-3169-appearance-options-v1.patch

File mc-3169-appearance-options-v1.patch, 25.7 KB (added by egmont, 8 years ago)

v1: add Double lines and Underlined hotkeys options

  • lib/skin.h

    diff --git a/lib/skin.h b/lib/skin.h
    index 904266b..a85f70c 100644
    a b typedef struct mc_skin_struct 
    125125 
    126126extern int mc_skin_color__cache[]; 
    127127extern mc_skin_t mc_skin__default; 
     128extern gboolean underline_hotkeys; 
    128129 
    129130/*** declarations of public functions ************************************************************/ 
    130131 
    int mc_skin_color_get (const gchar *, const gchar *); 
    135136 
    136137void mc_skin_lines_parse_ini_file (mc_skin_t *); 
    137138 
     139void mc_skin_color_cache_init (void); 
     140 
    138141gchar *mc_skin_get (const gchar *, const gchar *, const gchar *); 
    139142 
    140143GPtrArray *mc_skin_list (void); 
  • lib/skin/colors.c

    diff --git a/lib/skin/colors.c b/lib/skin/colors.c
    index 7ca9d47..da152ed 100644
    a b  
    3636/*** global variables ****************************************************************************/ 
    3737 
    3838int mc_skin_color__cache[MC_SKIN_COLOR_CACHE_COUNT]; 
     39gboolean underline_hotkeys = FALSE; 
    3940 
    4041/*** file scope macro definitions ****************************************************************/ 
    4142 
    mc_skin_color_set_default_for_terminal (mc_skin_t * mc_skin) 
    180181/* --------------------------------------------------------------------------------------------- */ 
    181182 
    182183static void 
     184mc_skin_color_copy_add_attributes (mc_skin_t * mc_skin, const gchar * group, 
     185                                   const gchar * key_old, const gchar * key_new, 
     186                                   const gchar * attrs) 
     187{ 
     188    mc_skin_color_t *mc_skin_color_old, *mc_skin_color_new; 
     189    mc_skin_color_old = mc_skin_color_get_from_hash (mc_skin, group, key_old); 
     190    if (mc_skin_color_old != NULL) { 
     191        mc_skin_color_new = g_try_new0 (mc_skin_color_t, 1); 
     192        if (mc_skin_color_new != NULL) { 
     193            mc_skin_color_new->fgcolor = g_strdup (mc_skin_color_old->fgcolor); 
     194            mc_skin_color_new->bgcolor = g_strdup (mc_skin_color_old->bgcolor); 
     195            if (mc_skin_color_old->attrs == NULL) 
     196                mc_skin_color_new->attrs = g_strdup (attrs); 
     197            else 
     198                mc_skin_color_new->attrs = g_strconcat (mc_skin_color_old->attrs, "+", attrs, NULL); 
     199            mc_skin_color_new->pair_index = 
     200                tty_try_alloc_color_pair2 (mc_skin_color_new->fgcolor, mc_skin_color_new->bgcolor, 
     201                                           mc_skin_color_new->attrs, FALSE); 
     202            mc_skin_color_add_to_hash (mc_skin, group, key_new, mc_skin_color_new); 
     203        } 
     204    } 
     205} 
     206 
     207/* --------------------------------------------------------------------------------------------- */ 
     208 
     209static gboolean 
     210mc_skin_color_check_inisection (const gchar * group) 
     211{ 
     212    return !((strcasecmp ("skin", group) == 0) 
     213             || (strcasecmp ("lines", group) == 0) || (strncasecmp ("widget-", group, 7) == 0)); 
     214} 
     215 
     216/* --------------------------------------------------------------------------------------------- */ 
     217 
     218static void 
     219mc_skin_color_check_bw_mode (mc_skin_t * mc_skin) 
     220{ 
     221    gchar **groups, **orig_groups; 
     222 
     223    if (tty_use_colors () && !mc_global.tty.disable_colors) 
     224        return; 
     225 
     226    orig_groups = groups = mc_config_get_groups (mc_skin->config, NULL); 
     227 
     228    if (groups == NULL) 
     229        return; 
     230 
     231    for (; *groups != NULL; groups++) 
     232    { 
     233        if (mc_skin_color_check_inisection (*groups)) 
     234            mc_config_del_group (mc_skin->config, *groups); 
     235    } 
     236    g_strfreev (orig_groups); 
     237    mc_skin_hardcoded_blackwhite_colors (mc_skin); 
     238} 
     239 
     240/* --------------------------------------------------------------------------------------------- */ 
     241/*** public functions ****************************************************************************/ 
     242/* --------------------------------------------------------------------------------------------- */ 
     243 
     244void 
    183245mc_skin_color_cache_init (void) 
    184246{ 
    185247    DEFAULT_COLOR = mc_skin_color_get ("skin", "terminal_default_color"); 
    mc_skin_color_cache_init (void) 
    194256 
    195257    COLOR_NORMAL = mc_skin_color_get ("dialog", "_default_"); 
    196258    COLOR_FOCUS = mc_skin_color_get ("dialog", "dfocus"); 
    197     COLOR_HOT_NORMAL = mc_skin_color_get ("dialog", "dhotnormal"); 
    198     COLOR_HOT_FOCUS = mc_skin_color_get ("dialog", "dhotfocus"); 
     259    COLOR_HOT_NORMAL = mc_skin_color_get ("dialog", underline_hotkeys ? "dulinormal" : "dhotnormal"); 
     260    COLOR_HOT_FOCUS = mc_skin_color_get ("dialog", underline_hotkeys ? "dulifocus" : "dhotfocus"); 
    199261    COLOR_TITLE = mc_skin_color_get ("dialog", "dtitle"); 
    200262 
    201263    ERROR_COLOR = mc_skin_color_get ("error", "_default_"); 
    202264    ERROR_FOCUS = mc_skin_color_get ("error", "errdfocus"); 
    203     ERROR_HOT_NORMAL = mc_skin_color_get ("error", "errdhotnormal"); 
    204     ERROR_HOT_FOCUS = mc_skin_color_get ("error", "errdhotfocus"); 
     265    ERROR_HOT_NORMAL = mc_skin_color_get ("error", underline_hotkeys ? "errdulinormal" : "errdhotnormal"); 
     266    ERROR_HOT_FOCUS = mc_skin_color_get ("error", underline_hotkeys ? "errdulifocus" : "errdhotfocus"); 
    205267    ERROR_TITLE = mc_skin_color_get ("error", "errdtitle"); 
    206268 
    207269    MENU_ENTRY_COLOR = mc_skin_color_get ("menu", "_default_"); 
    208270    MENU_SELECTED_COLOR = mc_skin_color_get ("menu", "menusel"); 
    209     MENU_HOT_COLOR = mc_skin_color_get ("menu", "menuhot"); 
    210     MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", "menuhotsel"); 
     271    MENU_HOT_COLOR = mc_skin_color_get ("menu", underline_hotkeys ? "menuuli" : "menuhot"); 
     272    MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", underline_hotkeys ? "menuulisel" : "menuhotsel"); 
    211273    MENU_INACTIVE_COLOR = mc_skin_color_get ("menu", "menuinactive"); 
    212274 
    213275    PMENU_ENTRY_COLOR = mc_skin_color_get ("popupmenu", "_default_"); 
    mc_skin_color_cache_init (void) 
    261323 
    262324/* --------------------------------------------------------------------------------------------- */ 
    263325 
    264 static gboolean 
    265 mc_skin_color_check_inisection (const gchar * group) 
    266 { 
    267     return !((strcasecmp ("skin", group) == 0) 
    268              || (strcasecmp ("lines", group) == 0) || (strncasecmp ("widget-", group, 7) == 0)); 
    269 } 
    270  
    271 /* --------------------------------------------------------------------------------------------- */ 
    272  
    273 static void 
    274 mc_skin_color_check_bw_mode (mc_skin_t * mc_skin) 
    275 { 
    276     gchar **groups, **orig_groups; 
    277  
    278     if (tty_use_colors () && !mc_global.tty.disable_colors) 
    279         return; 
    280  
    281     orig_groups = groups = mc_config_get_groups (mc_skin->config, NULL); 
    282  
    283     if (groups == NULL) 
    284         return; 
    285  
    286     for (; *groups != NULL; groups++) 
    287     { 
    288         if (mc_skin_color_check_inisection (*groups)) 
    289             mc_config_del_group (mc_skin->config, *groups); 
    290     } 
    291     g_strfreev (orig_groups); 
    292     mc_skin_hardcoded_blackwhite_colors (mc_skin); 
    293 } 
    294  
    295 /* --------------------------------------------------------------------------------------------- */ 
    296 /*** public functions ****************************************************************************/ 
    297 /* --------------------------------------------------------------------------------------------- */ 
    298  
    299326gboolean 
    300327mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) 
    301328{ 
    mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) 
    341368    } 
    342369    g_strfreev (orig_groups); 
    343370 
     371    /* create underlined hotkey variants */ 
     372    mc_skin_color_copy_add_attributes (mc_skin, "dialog", "_default_", "dulinormal",    "underline"); 
     373    mc_skin_color_copy_add_attributes (mc_skin, "dialog", "dfocus",    "dulifocus",     "underline"); 
     374    mc_skin_color_copy_add_attributes (mc_skin, "error",  "_default_", "errdulinormal", "underline"); 
     375    mc_skin_color_copy_add_attributes (mc_skin, "error",  "errdfocus", "errdulifocus",  "underline"); 
     376    mc_skin_color_copy_add_attributes (mc_skin, "menu",   "_default_", "menuuli",       "underline"); 
     377    mc_skin_color_copy_add_attributes (mc_skin, "menu",   "menusel",   "menuulisel",    "underline"); 
     378 
    344379    mc_skin_color_cache_init (); 
    345380    return TRUE; 
    346381} 
  • lib/tty/tty-ncurses.c

    diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
    index 8c385ea..f82ce11 100644
    a b tty_print_anychar (int c) 
    569569void 
    570570tty_print_alt_char (int c, gboolean single) 
    571571{ 
     572    if (!double_lines) 
     573        single = TRUE; 
    572574    if (yx_in_screen (mc_curs_row, mc_curs_col)) 
    573575    { 
    574576        if ((chtype) c == ACS_VLINE) 
  • lib/tty/tty-slang.c

    diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c
    index 0b16614..381c1db 100644
    a b tty_print_char (int c) 
    630630void 
    631631tty_print_alt_char (int c, gboolean single) 
    632632{ 
     633    if (!double_lines) 
     634        single = TRUE; 
    633635#define DRAW(x, y) (x == y) \ 
    634636       ? SLsmg_draw_object (SLsmg_get_row(), SLsmg_get_column(), x) \ 
    635637       : SLsmg_write_char ((unsigned int) y) 
  • lib/tty/tty.c

    diff --git a/lib/tty/tty.c b/lib/tty/tty.c
    index 5fa758b..8bfaa11 100644
    a b int reset_hp_softkeys = 0; 
    5757 
    5858int mc_tty_frm[MC_TTY_FRM_MAX]; 
    5959 
     60gboolean double_lines = FALSE; 
     61 
    6062/*** file scope macro definitions ****************************************************************/ 
    6163 
    6264/*** file scope type declarations ****************************************************************/ 
    tty_draw_box (int y, int x, int ys, int xs, gboolean single) 
    199201    y2 = y + ys; 
    200202    x2 = x + xs; 
    201203 
     204    if (!double_lines) 
     205        single = TRUE; 
    202206    tty_draw_vline (y, x, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys); 
    203207    tty_draw_vline (y, x2, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys); 
    204208    tty_draw_hline (y, x, mc_tty_frm[single ? MC_TTY_FRM_HORIZ : MC_TTY_FRM_DHORIZ], xs); 
  • lib/tty/tty.h

    diff --git a/lib/tty/tty.h b/lib/tty/tty.h
    index 0450208..a68fdb1 100644
    a b extern int mc_tty_frm[]; 
    6565 
    6666extern char *tty_tgetstr (const char *name); 
    6767 
     68extern gboolean double_lines; 
     69 
    6870/* {{{ Input }}} */ 
    6971 
    7072extern int reset_hp_softkeys; 
  • misc/skins/Makefile.am

    diff --git a/misc/skins/Makefile.am b/misc/skins/Makefile.am
    index 3cf0bdf..5e04e09 100644
    a b skindir = $(pkgdatadir)/skins 
    22 
    33skin_DATA = \ 
    44        dark.ini \ 
    5         darkfar.ini \ 
    65        default.ini \ 
    7         double-lines.ini \ 
    86        featured.ini \ 
    97        gotar.ini \ 
    108        mc46.ini \ 
  • misc/skins/dark.ini

    diff --git a/misc/skins/dark.ini b/misc/skins/dark.ini
    index f586b84..4e7a084 100644
    a b  
    1313    leftmiddle = ├ 
    1414    rightmiddle = ┤ 
    1515    cross = ┼ 
    16     dhoriz =  
    17     dvert =  
    18     dlefttop =  
    19     drighttop =  
    20     dleftbottom =  
    21     drightbottom =  
    22     dtopmiddle =  
    23     dbottommiddle =  
    24     dleftmiddle =  
    25     drightmiddle =  
     16    dhoriz =  
     17    dvert =  
     18    dlefttop =  
     19    drighttop =  
     20    dleftbottom =  
     21    drightbottom =  
     22    dtopmiddle =  
     23    dbottommiddle =  
     24    dleftmiddle =  
     25    drightmiddle =  
    2626 
    2727[core] 
    2828    _default_ = lightgray;black 
  • deleted file misc/skins/darkfar.ini

    diff --git a/misc/skins/darkfar.ini b/misc/skins/darkfar.ini
    deleted file mode 100644
    index 1f05f6b..0000000
    + -  
    1 [skin] 
    2     description = Dark Far skin 
    3  
    4 [Lines] 
    5     horiz = ─ 
    6     vert = │ 
    7     lefttop = ┌ 
    8     righttop = ┐ 
    9     leftbottom = └ 
    10     rightbottom = ┘ 
    11     topmiddle = ┬ 
    12     bottommiddle = ┴ 
    13     leftmiddle = ├ 
    14     rightmiddle = ┤ 
    15     cross = ┼ 
    16     dhoriz = ═ 
    17     dvert = ║ 
    18     dlefttop = ╔ 
    19     drighttop = ╗ 
    20     dleftbottom = ╚ 
    21     drightbottom = ╝ 
    22     dtopmiddle = ╤ 
    23     dbottommiddle = ╧ 
    24     dleftmiddle = ╟ 
    25     drightmiddle = ╢ 
    26  
    27 [core] 
    28     _default_ = lightgray;black 
    29     selected = black;cyan 
    30     marked = yellow;black 
    31     markselect = yellow;cyan 
    32     gauge = white;black 
    33     input = black;cyan 
    34     inputunchanged = gray;cyan 
    35     inputmark = cyan;black 
    36     disabled = gray;blue 
    37     reverse = black;lightgray 
    38     commandlinemark = black;lightgray 
    39     header = yellow;black 
    40     inputhistory = 
    41     commandhistory = 
    42  
    43 [dialog] 
    44     _default_ = brightcyan;blue 
    45     dfocus = blue;cyan 
    46     dhotnormal = white; 
    47     dhotfocus = white;cyan 
    48     dtitle = white; 
    49  
    50 [error] 
    51     _default_ = white;red 
    52     errdfocus = black;lightgray 
    53     errdhotnormal = yellow;red 
    54     errdhotfocus = yellow;lightgray 
    55     errdtitle = yellow;red 
    56  
    57 [filehighlight] 
    58     directory = white; 
    59     executable = brightmagenta; 
    60     symlink = lightgray; 
    61     hardlink = 
    62     stalelink = brightred; 
    63     device = brightmagenta; 
    64     special = brightblue; 
    65     core = red; 
    66     temp = gray; 
    67     archive = brightgreen; 
    68     doc = brown; 
    69     source = cyan; 
    70     media = green; 
    71     graph = brightcyan; 
    72     database = brightred; 
    73  
    74 [menu] 
    75     _default_ = lightgray;blue 
    76     menusel = black;cyan 
    77     menuhot = white;blue 
    78     menuhotsel = white;cyan 
    79     menuinactive = black;lightgray 
    80  
    81 [popupmenu] 
    82     _default_ = lightgray;blue 
    83     menusel = black;cyan 
    84     menutitle = lightgray;blue 
    85  
    86 [buttonbar] 
    87     hotkey = red;lightgray 
    88     button = black;lightgray 
    89  
    90 [statusbar] 
    91     _default_ = black;lightgray 
    92  
    93 [help] 
    94     _default_ = black;lightgray 
    95     helpitalic = red;lightgray 
    96     helpbold = blue;lightgray 
    97     helplink = black;cyan 
    98     helpslink = yellow;blue 
    99     helptitle = blue;lightgray 
    100  
    101 [editor] 
    102     _default_ = lightgray;black 
    103     editbold = yellow;green 
    104     editmarked = black;lightgray 
    105     editwhitespace = brightblue;black 
    106     editlinestate = white;cyan 
    107     bookmark = white;red 
    108     bookmarkfound = black;green 
    109     editrightmargin = white;blue 
    110 #    editbg = 
    111     editframe = gray; 
    112     editframeactive = lightgray; 
    113     editframedrag = white; 
    114     window-state-char = ↕ 
    115     window-close-char = × 
    116  
    117 [viewer] 
    118     viewbold = yellow;black 
    119     viewunderline = brightred;black 
    120     viewselected = yellow;cyan 
    121  
    122 [diffviewer] 
    123     added = white;green 
    124     changedline = blue;cyan 
    125     changednew = red;cyan 
    126     changed = white;cyan 
    127     removed = white;red 
    128     error = red; 
    129  
    130 [widget-common] 
    131     sort-sign-up = ↑ 
    132     sort-sign-down = ↓ 
    133  
    134 [widget-panel] 
    135     hiddenfiles-sign-show = • 
    136     hiddenfiles-sign-hide = ○ 
    137     history-prev-item-sign = ← 
    138     history-next-item-sign = → 
    139     history-show-list-sign = ↓ 
    140     filename-scroll-left-char = « 
    141     filename-scroll-right-char = » 
    142  
    143 [widget-scollbar] 
    144     first-vert-char = ↑ 
    145     last-vert-char = ↓ 
    146     first-horiz-char = « 
    147     last-horiz-char = » 
    148     current-char = ■ 
    149     background-char = ▒ 
  • misc/skins/default.ini

    diff --git a/misc/skins/default.ini b/misc/skins/default.ini
    index 117b4db..4806c85 100644
    a b  
    1313    leftmiddle = ├ 
    1414    rightmiddle = ┤ 
    1515    cross = ┼ 
    16     dhoriz =  
    17     dvert =  
    18     dlefttop =  
    19     drighttop =  
    20     dleftbottom =  
    21     drightbottom =  
    22     dtopmiddle =  
    23     dbottommiddle =  
    24     dleftmiddle =  
    25     drightmiddle =  
     16    dhoriz =  
     17    dvert =  
     18    dlefttop =  
     19    drighttop =  
     20    dleftbottom =  
     21    drightbottom =  
     22    dtopmiddle =  
     23    dbottommiddle =  
     24    dleftmiddle =  
     25    drightmiddle =  
    2626 
    2727[core] 
    2828    _default_ = lightgray;blue 
  • deleted file misc/skins/double-lines.ini

    diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini
    deleted file mode 100644
    index 7a2f7c9..0000000
    + -  
    1 [skin] 
    2     description = Far-like skin 
    3  
    4 [Lines] 
    5     horiz = ─ 
    6     vert = │ 
    7     lefttop = ┌ 
    8     righttop = ┐ 
    9     leftbottom = └ 
    10     rightbottom = ┘ 
    11     topmiddle = ┬ 
    12     bottommiddle = ┴ 
    13     leftmiddle = ├ 
    14     rightmiddle = ┤ 
    15     cross = ┼ 
    16     dhoriz = ═ 
    17     dvert = ║ 
    18     dlefttop = ╔ 
    19     drighttop = ╗ 
    20     dleftbottom = ╚ 
    21     drightbottom = ╝ 
    22     dtopmiddle = ╤ 
    23     dbottommiddle = ╧ 
    24     dleftmiddle = ╟ 
    25     drightmiddle = ╢ 
    26  
    27 [core] 
    28     _default_ = lightgray;blue 
    29     selected = black;cyan 
    30     marked = yellow;blue 
    31     markselect = yellow;cyan 
    32     gauge = white;black 
    33     input = black;cyan 
    34     inputunchanged = gray;cyan 
    35     inputmark = cyan;black 
    36     commandlinemark = black;lightgray 
    37     disabled = gray;lightgray 
    38     reverse = black;lightgray 
    39     header = yellow;blue 
    40     inputhistory = 
    41     commandhistory = 
    42  
    43 [dialog] 
    44     _default_ = black;lightgray 
    45     dfocus = black;cyan 
    46     dhotnormal = blue;lightgray 
    47     dhotfocus = blue;cyan 
    48     dtitle = blue;lightgray 
    49  
    50 [error] 
    51     _default_ = white;red 
    52     errdfocus = black;lightgray 
    53     errdhotnormal = yellow;red 
    54     errdhotfocus = yellow;lightgray 
    55     errdtitle = yellow;red 
    56  
    57 [filehighlight] 
    58     directory = white; 
    59     executable = brightgreen; 
    60     symlink = lightgray; 
    61     hardlink = 
    62     stalelink = brightred; 
    63     device = brightmagenta; 
    64     special = black; 
    65     core = red; 
    66     temp = gray; 
    67     archive = brightmagenta; 
    68     doc = brown; 
    69     source = cyan; 
    70     media = green; 
    71     graph = brightcyan; 
    72     database = brightred; 
    73  
    74 [menu] 
    75     _default_ = white;cyan 
    76     menusel = white;black 
    77     menuhot = yellow;cyan 
    78     menuhotsel = yellow;black 
    79     menuinactive = lightgray;blue 
    80  
    81 [popupmenu] 
    82     _default_ = white;cyan 
    83     menusel = white;black 
    84     menutitle = white;cyan 
    85  
    86 [buttonbar] 
    87     hotkey = lightgray;blue 
    88     button = lightgray;blue 
    89  
    90 [statusbar] 
    91     _default_ = black;cyan 
    92  
    93 [help] 
    94     _default_ = black;lightgray 
    95     helpitalic = red;lightgray 
    96     helpbold = blue;lightgray 
    97     helplink = black;cyan 
    98     helpslink = yellow;blue 
    99     helptitle = blue;lightgray 
    100  
    101 [editor] 
    102     _default_ = lightgray;blue 
    103     editbold = yellow;green 
    104     editmarked = black;cyan 
    105     editwhitespace = brightblue;blue 
    106     editlinestate = white;cyan 
    107     bookmark = white;red 
    108     bookmarkfound = black;green 
    109     editrightmargin = brightblue;black 
    110 #    editbg = 
    111 #    editframe = 
    112     editframeactive = white; 
    113     editframedrag = green; 
    114     window-state-char = * 
    115     window-close-char = X 
    116  
    117 [viewer] 
    118     viewbold = yellow;blue 
    119     viewunderline = brightred;blue 
    120     viewselected = yellow;cyan 
    121  
    122 [diffviewer] 
    123     added = white;green 
    124     changedline = blue;cyan 
    125     changednew = red;cyan 
    126     changed = white;cyan 
    127     removed = white;red 
    128     error = red;lightgray 
    129  
    130 [widget-common] 
    131     sort-sign-up = ' 
    132     sort-sign-down = . 
    133  
    134 [widget-panel] 
    135     filename-scroll-left-char = { 
    136     filename-scroll-right-char = } 
  • misc/skins/gotar.ini

    diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini
    index c0aa35b..3feb1eb 100644
    a b  
    1313    leftmiddle = ├ 
    1414    rightmiddle = ┤ 
    1515    cross = ┼ 
    16     dhoriz =  
    17     dvert =  
    18     dlefttop =  
    19     drighttop =  
    20     dleftbottom =  
    21     drightbottom =  
    22     dtopmiddle =  
    23     dbottommiddle =  
    24     dleftmiddle =  
    25     drightmiddle =  
     16    dhoriz =  
     17    dvert =  
     18    dlefttop =  
     19    drighttop =  
     20    dleftbottom =  
     21    drightbottom =  
     22    dtopmiddle =  
     23    dbottommiddle =  
     24    dleftmiddle =  
     25    drightmiddle =  
    2626 
    2727[core] 
    2828    _default_ = lightgray;black 
  • misc/skins/mc46.ini

    diff --git a/misc/skins/mc46.ini b/misc/skins/mc46.ini
    index ed80535..cd9f1e0 100644
    a b  
    1313    leftmiddle = ├ 
    1414    rightmiddle = ┤ 
    1515    cross = ┼ 
    16     dhoriz =  
    17     dvert =  
    18     dlefttop =  
    19     drighttop =  
    20     dleftbottom =  
    21     drightbottom =  
    22     dtopmiddle =  
    23     dbottommiddle =  
    24     dleftmiddle =  
    25     drightmiddle =  
     16    dhoriz =  
     17    dvert =  
     18    dlefttop =  
     19    drighttop =  
     20    dleftbottom =  
     21    drightbottom =  
     22    dtopmiddle =  
     23    dbottommiddle =  
     24    dleftmiddle =  
     25    drightmiddle =  
    2626 
    2727[core] 
    2828    _default_ = lightgray;blue 
  • misc/skins/nicedark.ini

    diff --git a/misc/skins/nicedark.ini b/misc/skins/nicedark.ini
    index 22a60fa..2c324eb 100644
    a b  
    1313    leftmiddle = ├ 
    1414    rightmiddle = ┤ 
    1515    cross = ┼ 
    16     dhoriz =  
    17     dvert =  
    18     dlefttop =  
    19     drighttop =  
    20     dleftbottom =  
    21     drightbottom =  
    22     dtopmiddle =  
    23     dbottommiddle =  
    24     dleftmiddle =  
    25     drightmiddle =  
     16    dhoriz =  
     17    dvert =  
     18    dlefttop =  
     19    drighttop =  
     20    dleftbottom =  
     21    drightbottom =  
     22    dtopmiddle =  
     23    dbottommiddle =  
     24    dleftmiddle =  
     25    drightmiddle =  
    2626 
    2727[core] 
    2828    _default_ = lightgray;black 
  • misc/skins/sand256.ini

    diff --git a/misc/skins/sand256.ini b/misc/skins/sand256.ini
    index 456f7c8..6c3e253 100644
    a b  
    6767    leftmiddle = ├ 
    6868    rightmiddle = ┤ 
    6969    cross = ┼ 
    70     dhoriz =  
    71     dvert =  
    72     dlefttop =  
    73     drighttop =  
    74     dleftbottom =  
    75     drightbottom =  
    76     dtopmiddle =  
    77     dbottommiddle =  
    78     dleftmiddle =  
    79     drightmiddle =  
     70    dhoriz =  
     71    dvert =  
     72    dlefttop =  
     73    drighttop =  
     74    dleftbottom =  
     75    drightbottom =  
     76    dtopmiddle =  
     77    dbottommiddle =  
     78    dleftmiddle =  
     79    drightmiddle =  
    8080 
    8181[core] 
    8282    _default_ = black;rgb554 
     
    9595[dialog] 
    9696    _default_ = black;rgb553 
    9797    dfocus = ;rgb452 
    98     dhotnormal = ;;underline 
    99     dhotfocus = ;rgb452;underline 
     98    dhotnormal = red; 
     99    dhotfocus = red;rgb452 
    100100    dtitle = ;;underline 
    101101 
    102102[error] 
    103103    _default_ = rgb554;rgb320;bold 
    104104    errdfocus = black;rgb452;bold 
    105     errdhotnormal = ;;bold+underline 
    106     errdhotfocus = black;rgb452;bold+underline 
     105    errdhotnormal = rgb341;;bold 
     106    errdhotfocus = red;rgb452;bold 
    107107    errdtitle = ;;bold+underline 
    108108 
    109109[filehighlight] 
     
    127127[menu] 
    128128    _default_ = black;rgb452 
    129129    menusel = ;rgb551 
    130     menuhot = ;;underline 
    131     menuhotsel = ;rgb551;underline 
     130    menuhot = red; 
     131    menuhotsel = red;rgb551 
    132132    menuinactive = 
    133133 
    134134[popupmenu] 
  • misc/skins/xoria256.ini

    diff --git a/misc/skins/xoria256.ini b/misc/skins/xoria256.ini
    index 656f996..1442070 100644
    a b  
    1616    description = Xoria256 
    1717    256colors = true 
    1818 
    19 # [Lines] 
    20 #     horiz = ─ 
    21 #     vert = │ 
    22 #     lefttop = ┌ 
    23 #     righttop = ┐ 
    24 #     leftbottom = └ 
    25 #     rightbottom = ┘ 
    26 #     topmiddle = ┬ 
    27 #     bottommiddle = ┴ 
    28 #     leftmiddle = ├ 
    29 #     rightmiddle = ┤ 
    30 #     cross = ┼ 
    31 #     dhoriz = ─ 
    32 #     dvert = │ 
    33 #     dlefttop = ┌ 
    34 #     drighttop = ┐ 
    35 #     dleftbottom = └ 
    36 #     drightbottom = ┘ 
    37 #     dtopmiddle = ┬ 
    38 #     dbottommiddle = ┴ 
    39 #     dleftmiddle = ├ 
    40 #     drightmiddle = ┤ 
    41  
    4219[Lines] 
    4320    horiz = ─ 
    4421    vert = │ 
  • src/filemanager/boxes.c

    diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
    index 026f5b3..f5111f1 100644
    a b  
    9494/*** file scope variables ************************************************************************/ 
    9595 
    9696unsigned long configure_old_esc_mode_id, configure_time_out_id; 
     97unsigned long configure_double_lines_id, configure_underline_hotkeys_id; 
    9798 
    9899/* Index in list_types[] for "user defined" */ 
    99100static const int panel_listing_user_idx = 3; 
    sel_skin_button (WButton * button, int action) 
    614615 
    615616/* --------------------------------------------------------------------------------------------- */ 
    616617 
     618static cb_ret_t 
     619appearance_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
     620{ 
     621    switch (msg) 
     622    { 
     623    case MSG_ACTION: 
     624        /* message from checkbuttons */ 
     625        if (sender != NULL) 
     626        { 
     627            if (sender->id == configure_double_lines_id) { 
     628                double_lines = CHECK (sender)->state & C_BOOL; 
     629            } else if (sender->id == configure_underline_hotkeys_id) { 
     630                underline_hotkeys = CHECK (sender)->state & C_BOOL; 
     631                mc_skin_color_cache_init (); 
     632                dlg_set_default_colors (); 
     633            } 
     634            repaint_screen (); 
     635            return MSG_HANDLED; 
     636        } 
     637        return MSG_NOT_HANDLED; 
     638 
     639    default: 
     640        return dlg_default_callback (w, sender, msg, parm, data); 
     641    } 
     642} 
     643 
     644/* --------------------------------------------------------------------------------------------- */ 
     645 
    617646void 
    618647appearance_box (void) 
    619648{ 
     649    gboolean old_double_lines = double_lines; 
     650    gboolean old_underline_hotkeys = underline_hotkeys; 
     651 
    620652    current_skin_name = g_strdup (mc_skin__default.name); 
    621653    skin_names = mc_skin_list (); 
    622654 
    appearance_box (void) 
    629661                QUICK_BUTTON (str_fit_to_term (skin_name_to_label (current_skin_name), 20, J_LEFT_FIT), 
    630662                              B_USER, sel_skin_button, &skin_name_id), 
    631663            QUICK_STOP_COLUMNS, 
     664            QUICK_SEPARATOR (TRUE), 
     665            QUICK_CHECKBOX (N_("&Double lines"), &double_lines, &configure_double_lines_id), 
     666            QUICK_CHECKBOX (N_("&Underlined hotkeys"), &underline_hotkeys, &configure_underline_hotkeys_id), 
    632667            QUICK_BUTTONS_OK_CANCEL, 
    633668            QUICK_END 
    634669            /* *INDENT-ON* */ 
    appearance_box (void) 
    637672        quick_dialog_t qdlg = { 
    638673            -1, -1, 54, 
    639674            N_("Appearance"), "[Appearance]", 
    640             quick_widgets, dlg_default_callback, NULL 
     675            quick_widgets, appearance_callback, NULL 
    641676        }; 
    642677 
    643         if (quick_dialog (&qdlg) == B_ENTER) 
     678        if (quick_dialog (&qdlg) == B_ENTER) { 
    644679            mc_config_set_string (mc_main_config, CONFIG_APP_SECTION, "skin", current_skin_name); 
    645         else 
     680        } else { 
     681            double_lines = old_double_lines; 
     682            underline_hotkeys = old_underline_hotkeys; 
    646683            skin_apply (NULL); 
     684        } 
    647685    } 
    648686 
    649687    g_free (current_skin_name); 
  • src/setup.c

    diff --git a/src/setup.c b/src/setup.c
    index 5cd58b3..4edb537 100644
    a b  
    3838#include "lib/tty/key.h" 
    3939#include "lib/mcconfig.h" 
    4040#include "lib/fileloc.h" 
     41#include "lib/skin.h" 
    4142#include "lib/timefmt.h" 
    4243#include "lib/util.h" 
    4344#include "lib/widget.h" 
    static const struct 
    363364    { "auto_fill_mkdir_name", &auto_fill_mkdir_name }, 
    364365    { "copymove_persistent_attr", &setup_copymove_persistent_attr }, 
    365366    { "select_flags", &select_flags }, 
     367    { "double_lines", &double_lines }, 
     368    { "underline_hotkeys", &underline_hotkeys }, 
    366369    { NULL, NULL } 
    367370}; 
    368371