Ticket #2165: mc-skin-selector-beta3.patch

File mc-skin-selector-beta3.patch, 42.7 KB (added by egmont, 10 years ago)

beta3

  • lib/keybind.c

    diff --git a/lib/keybind.c b/lib/keybind.c
    index 9e101b3..f95cf0e 100644
    a b static name_keymap_t command_names[] = { 
    176176    {"Jobs", CK_Jobs}, 
    177177#endif 
    178178    {"OptionsLayout", CK_OptionsLayout}, 
     179    {"OptionsAppearance", CK_OptionsAppearance}, 
    179180    {"Link", CK_Link}, 
    180181    {"PanelListingChange", CK_PanelListingChange}, 
    181182    {"PanelListing", CK_PanelListing}, 
  • lib/keybind.h

    diff --git a/lib/keybind.h b/lib/keybind.h
    index 5bfb81b..d8ed810 100644
    a b enum 
    155155    CK_PanelInfo, 
    156156    CK_Jobs, 
    157157    CK_OptionsLayout, 
     158    CK_OptionsAppearance, 
    158159    CK_Link, 
    159160    CK_PanelListing, 
    160161    CK_ListMode, 
  • lib/skin.h

    diff --git a/lib/skin.h b/lib/skin.h
    index e67c49a..a3024f1 100644
    a b typedef struct mc_skin_struct 
    126126 
    127127extern int mc_skin_color__cache[]; 
    128128extern mc_skin_t mc_skin__default; 
     129extern gboolean underline_hotkeys; 
    129130 
    130131/*** declarations of public functions ************************************************************/ 
    131132 
    132 gboolean mc_skin_init (GError **); 
     133gboolean mc_skin_init (const gchar *, GError **); 
    133134void mc_skin_deinit (void); 
    134135 
    135136int mc_skin_color_get (const gchar *, const gchar *); 
    136137 
    137138void mc_skin_lines_parse_ini_file (mc_skin_t *); 
    138139 
     140void mc_skin_color_cache_init (void); 
     141 
    139142gchar *mc_skin_get (const gchar *, const gchar *, const gchar *); 
    140143 
     144GArray * mc_skin_list (void); 
     145 
    141146#endif /* MC_SKIN_H */ 
  • lib/skin/colors.c

    diff --git a/lib/skin/colors.c b/lib/skin/colors.c
    index 2802d09..fe76089 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) 
    178179} 
    179180 
    180181/* --------------------------------------------------------------------------------------------- */ 
     182 
     183static 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 
    181218static 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 
    182245mc_skin_color_cache_init (void) 
    183246{ 
    184247    DEFAULT_COLOR = mc_skin_color_get ("skin", "terminal_default_color"); 
    mc_skin_color_cache_init (void) 
    193256 
    194257    COLOR_NORMAL = mc_skin_color_get ("dialog", "_default_"); 
    195258    COLOR_FOCUS = mc_skin_color_get ("dialog", "dfocus"); 
    196     COLOR_HOT_NORMAL = mc_skin_color_get ("dialog", "dhotnormal"); 
    197     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"); 
    198261    COLOR_TITLE = mc_skin_color_get ("dialog", "dtitle"); 
    199262 
    200263    ERROR_COLOR = mc_skin_color_get ("error", "_default_"); 
    201264    ERROR_FOCUS = mc_skin_color_get ("error", "errdfocus"); 
    202     ERROR_HOT_NORMAL = mc_skin_color_get ("error", "errdhotnormal"); 
    203     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"); 
    204267    ERROR_TITLE = mc_skin_color_get ("error", "errdtitle"); 
    205268 
    206269    MENU_ENTRY_COLOR = mc_skin_color_get ("menu", "_default_"); 
    207270    MENU_SELECTED_COLOR = mc_skin_color_get ("menu", "menusel"); 
    208     MENU_HOT_COLOR = mc_skin_color_get ("menu", "menuhot"); 
    209     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"); 
    210273    MENU_INACTIVE_COLOR = mc_skin_color_get ("menu", "menuinactive"); 
    211274 
    212275    PMENU_ENTRY_COLOR = mc_skin_color_get ("popupmenu", "_default_"); 
    mc_skin_color_cache_init (void) 
    261324 
    262325/* --------------------------------------------------------------------------------------------- */ 
    263326 
    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  
    299327gboolean 
    300328mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) 
    301329{ 
    mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) 
    341369    } 
    342370    g_strfreev (orig_groups); 
    343371 
     372    /* create underlined hotkey variants */ 
     373    mc_skin_color_copy_add_attributes (mc_skin, "dialog", "_default_", "dulinormal",    "underline"); 
     374    mc_skin_color_copy_add_attributes (mc_skin, "dialog", "dfocus",    "dulifocus",     "underline"); 
     375    mc_skin_color_copy_add_attributes (mc_skin, "error",  "_default_", "errdulinormal", "underline"); 
     376    mc_skin_color_copy_add_attributes (mc_skin, "error",  "errdfocus", "errdulifocus",  "underline"); 
     377    mc_skin_color_copy_add_attributes (mc_skin, "menu",   "_default_", "menuuli",       "underline"); 
     378    mc_skin_color_copy_add_attributes (mc_skin, "menu",   "menusel",   "menuulisel",    "underline"); 
     379 
    344380    mc_skin_color_cache_init (); 
    345381    return TRUE; 
    346382} 
  • lib/skin/common.c

    diff --git a/lib/skin/common.c b/lib/skin/common.c
    index 1737a4b..8e738ae 100644
    a b mc_skin_try_to_load_default (void) 
    110110/* --------------------------------------------------------------------------------------------- */ 
    111111 
    112112gboolean 
    113 mc_skin_init (GError ** error) 
     113mc_skin_init (const gchar *skin_override, GError ** error) 
    114114{ 
    115115    gboolean is_good_init = TRUE; 
    116116 
    117117    mc_skin__default.have_256_colors = FALSE; 
    118118 
    119     mc_skin__default.name = mc_skin_get_default_name (); 
     119    mc_skin__default.name = 
     120        skin_override != NULL ? g_strdup(skin_override) : mc_skin_get_default_name (); 
    120121 
    121122    mc_skin__default.colors = g_hash_table_new_full (g_str_hash, g_str_equal, 
    122123                                                     g_free, mc_skin_hash_destroy_value); 
    mc_skin_init (GError ** error) 
    165166void 
    166167mc_skin_deinit (void) 
    167168{ 
     169    tty_color_free_all_tmp (); 
     170    tty_color_free_all_non_tmp (); 
     171 
    168172    g_free (mc_skin__default.name); 
    169173    mc_skin__default.name = NULL; 
    170174    g_hash_table_destroy (mc_skin__default.colors); 
  • lib/skin/ini-file.c

    diff --git a/lib/skin/ini-file.c b/lib/skin/ini-file.c
    index c4b5efa..5bad72c 100644
    a b  
    2727#include <config.h> 
    2828#include <string.h> 
    2929 
     30#include "lib/global.h"         /* <glib.h> */ 
     31 
    3032#include "internal.h" 
    3133#include "lib/fileloc.h" 
    3234#include "lib/util.h"           /* exist_file() */ 
     
    4345 
    4446/* --------------------------------------------------------------------------------------------- */ 
    4547 
     48static void 
     49mc_skin_get_list_from_dir (const gchar * base_dir, GArray * list) 
     50{ 
     51    unsigned int i; 
     52    char *dir_name; 
     53    DIR *dir; 
     54    gchar *name; 
     55 
     56    dir_name = g_build_filename (base_dir, MC_SKINS_SUBDIR, NULL); 
     57    dir = opendir (dir_name); 
     58    if (dir != NULL) { 
     59        struct dirent *de; 
     60        while ((de = readdir(dir)) != NULL) { 
     61            if (!strcmp(de->d_name, ".") || !strcmp(de->d_name, "..")) 
     62                continue; 
     63            if (strlen(de->d_name) > 4 && !strcmp(de->d_name + strlen(de->d_name) - 4, ".ini")) 
     64                de->d_name[strlen(de->d_name) - 4] = '\0'; 
     65            for (i = 0; i < list->len; i++) { 
     66                if (!strcmp(de->d_name, g_array_index(list, gchar *, i))) 
     67                    break; 
     68            } 
     69            if (i < list->len) 
     70                continue; 
     71            name = g_strdup(de->d_name); 
     72            g_array_append_val(list, name); 
     73        } 
     74        closedir(dir); 
     75    } 
     76    g_free(dir_name); 
     77} 
     78 
     79/* --------------------------------------------------------------------------------------------- */ 
     80 
     81static int string_array_comparator (gconstpointer a, gconstpointer b) 
     82{ 
     83    char *aa = *(char **) a; 
     84    char *bb = *(char **) b; 
     85    return strcmp(aa, bb); 
     86} 
     87 
     88/* --------------------------------------------------------------------------------------------- */ 
     89 
    4690static gboolean 
    4791mc_skin_ini_file_load_search_in_dir (mc_skin_t * mc_skin, const gchar * base_dir) 
    4892{ 
    mc_skin_ini_file_load_search_in_dir (mc_skin_t * mc_skin, const gchar * base_dir 
    75119/*** public functions ****************************************************************************/ 
    76120/* --------------------------------------------------------------------------------------------- */ 
    77121 
     122GArray * 
     123mc_skin_list (void) 
     124{ 
     125    GArray *list = g_array_new(FALSE, FALSE, sizeof(gchar *)); 
     126    mc_skin_get_list_from_dir(mc_config_get_data_path (), list); 
     127    mc_skin_get_list_from_dir(mc_global.sysconfig_dir, list); 
     128    mc_skin_get_list_from_dir(mc_global.share_data_dir, list); 
     129    g_array_sort(list, (GCompareFunc) string_array_comparator); 
     130    return list; 
     131} 
     132 
     133/* --------------------------------------------------------------------------------------------- */ 
     134 
    78135gboolean 
    79136mc_skin_ini_file_load (mc_skin_t * mc_skin) 
    80137{ 
  • lib/tty/tty-ncurses.c

    diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
    index e0b191d..91f778b 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 6e6f238..82b7c3c 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 13059fe..9575206 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; 
  • lib/widget/dialog.c

    diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c
    index 12e899f..f5c3f0e 100644
    a b  
    5151/* Color styles for normal and error dialogs */ 
    5252dlg_colors_t dialog_colors; 
    5353dlg_colors_t alarm_colors; 
     54dlg_colors_t listbox_colors; 
    5455 
    5556/* Primitive way to check if the the current dialog is our dialog */ 
    5657/* This is needed by async routines like load_prompt */ 
    dlg_create (gboolean modal, int y1, int x1, int lines, int cols, 
    780781 
    781782    new_d->state = DLG_CONSTRUCT; 
    782783    new_d->modal = modal; 
    783     if (colors != NULL) 
    784         memmove (new_d->color, colors, sizeof (dlg_colors_t)); 
     784    new_d->color = colors; 
    785785    new_d->help_ctx = help_ctx; 
    786786    new_d->flags = flags; 
    787787    new_d->data = NULL; 
    dlg_set_default_colors (void) 
    824824    alarm_colors[DLG_COLOR_HOT_NORMAL] = ERROR_HOT_NORMAL; 
    825825    alarm_colors[DLG_COLOR_HOT_FOCUS] = ERROR_HOT_FOCUS; 
    826826    alarm_colors[DLG_COLOR_TITLE] = ERROR_TITLE; 
     827 
     828    listbox_colors[DLG_COLOR_NORMAL] = PMENU_ENTRY_COLOR; 
     829    listbox_colors[DLG_COLOR_FOCUS] = PMENU_SELECTED_COLOR; 
     830    listbox_colors[DLG_COLOR_HOT_NORMAL] = PMENU_ENTRY_COLOR; 
     831    listbox_colors[DLG_COLOR_HOT_FOCUS] = PMENU_SELECTED_COLOR; 
     832    listbox_colors[DLG_COLOR_TITLE]= PMENU_TITLE_COLOR; 
    827833} 
    828834 
    829835/* --------------------------------------------------------------------------------------------- */ 
  • lib/widget/dialog.h

    diff --git a/lib/widget/dialog.h b/lib/widget/dialog.h
    index 20cb8b7..1135857 100644
    a b struct WDialog 
    8383    gboolean modal;             /* type of dialog: modal or not */ 
    8484    dlg_flags_t flags;          /* User flags */ 
    8585    const char *help_ctx;       /* Name of the help entry */ 
    86     dlg_colors_t color;         /* Color set. Unused in viewer and editor */ 
     86    const int *color;           /* Color set. Unused in viewer and editor */ 
    8787    char *title;                /* Title of the dialog */ 
    8888 
    8989    /* Set and received by the user */ 
    struct WDialog 
    111111/* Color styles for normal and error dialogs */ 
    112112extern dlg_colors_t dialog_colors; 
    113113extern dlg_colors_t alarm_colors; 
     114extern dlg_colors_t listbox_colors; 
    114115 
    115116extern GList *top_dlg; 
    116117 
  • lib/widget/listbox-window.c

    diff --git a/lib/widget/listbox-window.c b/lib/widget/listbox-window.c
    index 656e6bf..6ce460b 100644
    a b Listbox * 
    6060create_listbox_window_centered (int center_y, int center_x, int lines, int cols, 
    6161                                const char *title, const char *help) 
    6262{ 
    63     const dlg_colors_t listbox_colors = { 
    64         PMENU_ENTRY_COLOR, 
    65         PMENU_SELECTED_COLOR, 
    66         PMENU_ENTRY_COLOR, 
    67         PMENU_SELECTED_COLOR, 
    68         PMENU_TITLE_COLOR 
    69     }; 
    70  
    7163    const int space = 4; 
    7264 
    7365    int xpos, ypos; 
  • 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 1550d1a..f6ebcfe 100644
    a b  
    88    righttop=┐ 
    99    leftbottom=└ 
    1010    rightbottom=┘ 
    11     topmiddle= 
    12     bottommiddle= 
     11    topmiddle= 
     12    bottommiddle= 
    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 df2519d..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     menuhot=white;blue 
    77     menusel=black;cyan 
    78     menuhotsel=white;cyan 
    79     menuinactive=black;lightgray 
    80  
    81 [help] 
    82     _default_=black;lightgray 
    83     helpitalic=red;lightgray 
    84     helpbold=blue;lightgray 
    85     helplink=black;cyan 
    86     helpslink=yellow;blue 
    87     helptitle=blue;lightgray 
    88  
    89 [editor] 
    90     _default_=lightgray;black 
    91     editbold=yellow;green 
    92     editmarked=black;lightgray 
    93     editwhitespace=brightblue;black 
    94     editlinestate=white;cyan 
    95     bookmark=white;red 
    96     bookmarkfound=black;green 
    97     editrightmargin=white;blue 
    98 #    editbg= 
    99     editframe=gray; 
    100     editframeactive=lightgray; 
    101     editframedrag=white; 
    102     window-state-char = ↕ 
    103     window-close-char = × 
    104  
    105 [viewer] 
    106     viewbold=yellow;black 
    107     viewunderline=brightred;black 
    108     viewselected=yellow;cyan 
    109  
    110 [diffviewer] 
    111     added=white;green 
    112     changedline=blue;cyan 
    113     changednew=red;cyan 
    114     changed=white;cyan 
    115     removed=white;red 
    116     folder=blue;black 
    117     error=red; 
    118  
    119 [buttonbar] 
    120     hotkey=red;lightgray 
    121     button=black;lightgray 
    122  
    123 [statusbar] 
    124     _default_=black;lightgray 
    125  
    126 [popupmenu] 
    127     _default_=lightgray;blue 
    128     menusel=black;cyan 
    129     menutitle=lightgray;blue 
    130  
    131 [widget-common] 
    132     sort-sign-up=↑ 
    133     sort-sign-down=↓ 
    134  
    135 [widget-panel] 
    136     hiddenfiles-sign-show  = • 
    137     hiddenfiles-sign-hide  = ○ 
    138     history-prev-item-sign = ← 
    139     history-next-item-sign = → 
    140     history-show-list-sign = ↓ 
    141     filename-scroll-left-char = « 
    142     filename-scroll-right-char = » 
    143  
    144 [widget-scollbar] 
    145     first-vert-char=↑ 
    146     last-vert-char=↓ 
    147     first-horiz-char=« 
    148     last-horiz-char=» 
    149     current-char=■ 
    150     background-char=▒ 
  • misc/skins/default.ini

    diff --git a/misc/skins/default.ini b/misc/skins/default.ini
    index adcdef5..588b368 100644
    a b  
    88    righttop=┐ 
    99    leftbottom=└ 
    1010    rightbottom=┘ 
    11     topmiddle= 
    12     bottommiddle= 
     11    topmiddle= 
     12    bottommiddle= 
    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 690347e..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     menuhot=yellow;cyan 
    77     menusel=white;black 
    78     menuhotsel=yellow;black 
    79     menuinactive=lightgray;blue 
    80  
    81 [buttonbar] 
    82     hotkey=lightgray;blue 
    83     button=lightgray;blue 
    84  
    85 [statusbar] 
    86     _default_=black;cyan 
    87  
    88 [help] 
    89     _default_=black;lightgray 
    90     helpitalic=red;lightgray 
    91     helpbold=blue;lightgray 
    92     helplink=black;cyan 
    93     helpslink=yellow;blue 
    94     helptitle=blue;lightgray 
    95  
    96 [editor] 
    97     _default_=lightgray;blue 
    98     editbold=yellow;green 
    99     editmarked=black;cyan 
    100     editwhitespace=brightblue;blue 
    101     editlinestate=white;cyan 
    102     bookmark=white;red 
    103     bookmarkfound=black;green 
    104     editrightmargin=brightblue;black 
    105 #    editbg= 
    106 #    editframe= 
    107     editframeactive=white; 
    108     editframedrag=green; 
    109     window-state-char = * 
    110     window-close-char = X 
    111  
    112 [viewer] 
    113     viewbold=yellow;blue 
    114     viewunderline=brightred;blue 
    115     viewselected=yellow;cyan 
    116  
    117 [diffviewer] 
    118     added=white;green 
    119     changedline=blue;cyan 
    120     changednew=red;cyan 
    121     changed=white;cyan 
    122     removed=white;red 
    123     folder=blue;black 
    124     error=red;lightgray 
    125  
    126 [popupmenu] 
    127     _default_=white;cyan 
    128     menusel=white;black 
    129     menutitle=white;cyan 
    130  
    131 [widget-common] 
    132     sort-sign-up = ' 
    133     sort-sign-down = , 
    134  
    135 [widget-panel] 
    136     filename-scroll-left-char = { 
    137     filename-scroll-right-char = } 
  • misc/skins/featured.ini

    diff --git a/misc/skins/featured.ini b/misc/skins/featured.ini
    index 09957c3..f1b8302 100644
    a b  
    1010    righttop=┐ 
    1111    leftbottom=└ 
    1212    rightbottom=┘ 
    13     topmiddle= 
    14     bottommiddle= 
     13    topmiddle= 
     14    bottommiddle= 
    1515    leftmiddle=├ 
    1616    rightmiddle=┤ 
    1717    cross=┼ 
     
    148148    righttop=┐ 
    149149    leftbottom=└ 
    150150    rightbottom=┘ 
    151     topmiddle= 
    152     bottommiddle= 
     151    topmiddle= 
     152    bottommiddle= 
    153153    leftmiddle=├ 
    154154    rightmiddle=┤ 
    155155    cross=┼ 
  • misc/skins/gotar.ini

    diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini
    index ec4b64d..ac9e6b0 100644
    a b  
    88        righttop=┐ 
    99        leftbottom=└ 
    1010        rightbottom=┘ 
    11         topmiddle= 
    12         bottommiddle= 
     11        topmiddle= 
     12        bottommiddle= 
    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 c7c2576..5b7661b 100644
    a b  
    88        righttop=┐ 
    99        leftbottom=└ 
    1010        rightbottom=┘ 
    11         topmiddle= 
    12         bottommiddle= 
     11        topmiddle= 
     12        bottommiddle= 
    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/modarcon16-defbg.ini

    diff --git a/misc/skins/modarcon16-defbg.ini b/misc/skins/modarcon16-defbg.ini
    index ec06e9b..49252d3 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/modarcon16.ini

    diff --git a/misc/skins/modarcon16.ini b/misc/skins/modarcon16.ini
    index 6e9d061..6fb8a56 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/modarcon16root-defbg.ini

    diff --git a/misc/skins/modarcon16root-defbg.ini b/misc/skins/modarcon16root-defbg.ini
    index 14b8b01..fb8b5f8 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/modarcon16root.ini

    diff --git a/misc/skins/modarcon16root.ini b/misc/skins/modarcon16root.ini
    index 9acaeba..c5b2522 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/modarin256-defbg.ini

    diff --git a/misc/skins/modarin256-defbg.ini b/misc/skins/modarin256-defbg.ini
    index b3621cb..674334a 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/modarin256.ini

    diff --git a/misc/skins/modarin256.ini b/misc/skins/modarin256.ini
    index bae8118..1e9b84f 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/modarin256root-defbg.ini

    diff --git a/misc/skins/modarin256root-defbg.ini b/misc/skins/modarin256root-defbg.ini
    index 9b510fb..3df035d 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/modarin256root.ini

    diff --git a/misc/skins/modarin256root.ini b/misc/skins/modarin256root.ini
    index 6d6b5fd..009ba3a 100644
    a b  
    5050  righttop=┐ 
    5151  leftbottom=└ 
    5252  rightbottom=┘ 
    53   topmiddle= 
    54   bottommiddle= 
     53  topmiddle= 
     54  bottommiddle= 
    5555  leftmiddle=├ 
    5656  rightmiddle=┤ 
    5757  cross=┼ 
  • misc/skins/nicedark.ini

    diff --git a/misc/skins/nicedark.ini b/misc/skins/nicedark.ini
    index 6243e04..f87812e 100644
    a b  
    88    righttop=┐ 
    99    leftbottom=└ 
    1010    rightbottom=┘ 
    11     topmiddle= 
    12     bottommiddle= 
     11    topmiddle= 
     12    bottommiddle= 
    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 7f2a55c..31845ca 100644
    a b  
    6262    righttop=┐ 
    6363    leftbottom=└ 
    6464    rightbottom=┘ 
    65     topmiddle= 
    66     bottommiddle= 
     65    topmiddle= 
     66    bottommiddle= 
    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] 
     
    126126 
    127127[menu] 
    128128    _default_=black;rgb452 
    129     menuhot=;;underline 
     129    menuhot=red; 
    130130    menusel=;rgb551 
    131     menuhotsel=;rgb551;underline 
     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 e4f68dd..4411fd7 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=│ 
     
    4623    righttop=┐ 
    4724    leftbottom=└ 
    4825    rightbottom=┘ 
    49     topmiddle= 
    50     bottommiddle= 
     26    topmiddle= 
     27    bottommiddle= 
    5128    leftmiddle=├ 
    5229    rightmiddle=┤ 
    5330    cross=┼ 
  • src/filemanager/boxes.c

    diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
    index bd15ae9..5baf128 100644
    a b  
    9595/*** file scope variables ************************************************************************/ 
    9696 
    9797unsigned long configure_old_esc_mode_id, configure_time_out_id; 
     98unsigned long configure_double_lines_id, configure_underline_hotkeys_id; 
    9899 
    99100/* Index in list_types[] for "user defined" */ 
    100101static const int panel_listing_user_idx = 3; 
    static int listing_user_hotkey = 'u'; 
    104105static unsigned long panel_listing_types_id, panel_user_format_id; 
    105106static unsigned long mini_user_status_id, mini_user_format_id; 
    106107 
     108static unsigned long skin_name_id; 
     109 
    107110#ifdef HAVE_CHARSET 
    108111static int new_display_codepage; 
    109112static unsigned long disp_bits_name_id; 
    static unsigned long disp_bits_name_id; 
    113116static unsigned long ftpfs_always_use_proxy_id, ftpfs_proxy_host_id; 
    114117#endif /* ENABLE_VFS && ENABLE_VFS_FTP */ 
    115118 
     119GArray * skin_names; 
     120gchar * current_skin_name; 
     121 
    116122#ifdef ENABLE_BACKGROUND 
    117123static WListbox *bg_list = NULL; 
    118124#endif /* ENABLE_BACKGROUND */ 
    configure_box (void) 
    516522 
    517523/* --------------------------------------------------------------------------------------------- */ 
    518524 
     525static void 
     526skin_apply (const gchar *skin_override) 
     527{ 
     528    GError *error = NULL; 
     529    mc_skin_deinit (); 
     530    mc_skin_init (skin_override, &error); 
     531    mc_fhl_free (&mc_filehighlight); 
     532    mc_filehighlight = mc_fhl_new (TRUE); 
     533    dlg_set_default_colors (); 
     534    panel_deinit (); 
     535    panel_init (); 
     536    repaint_screen (); 
     537    if (error != NULL) 
     538    { 
     539        message (D_ERROR, _("Warning"), "%s", error->message); 
     540        g_error_free (error); 
     541    } 
     542} 
     543 
     544/* --------------------------------------------------------------------------------------------- */ 
     545 
     546static cb_ret_t 
     547skin_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
     548{ 
     549    return dlg_default_callback (w, sender, msg, parm, data); 
     550} 
     551 
     552/* --------------------------------------------------------------------------------------------- */ 
     553 
     554static int 
     555sel_skin_button (WButton * button, int action) 
     556{ 
     557    int result; 
     558    WListbox *skin_list; 
     559    WDialog *skin_dlg; 
     560    gchar *skin_name; 
     561    int lxx, lyy; 
     562    unsigned int i; 
     563 
     564    (void) action; 
     565 
     566    lxx = COLS / 2; 
     567    lyy = (LINES - 13) / 2; 
     568    skin_dlg = 
     569        dlg_create (TRUE, lyy, lxx, 13, 24, dialog_colors, skin_callback, NULL, 
     570                    "[Skins]", _("Skin"), DLG_COMPACT); 
     571 
     572    skin_list = listbox_new (1, 1, 11, 22, FALSE, NULL); 
     573    for (i = 0; i < skin_names->len; i++) { 
     574        skin_name = g_array_index(skin_names, gchar *, i); 
     575        listbox_add_item (skin_list, LISTBOX_APPEND_AT_END, 0, skin_name, NULL); 
     576        if (!strcmp(skin_name, current_skin_name)) 
     577            listbox_select_entry (skin_list, i); 
     578    } 
     579 
     580    add_widget (skin_dlg, skin_list); 
     581 
     582    result = dlg_run (skin_dlg); 
     583    if (result == B_ENTER) { 
     584        Widget *w; 
     585        listbox_get_current (skin_list, &skin_name, NULL); 
     586        g_free (current_skin_name); 
     587        current_skin_name = g_strdup(skin_name); 
     588        skin_apply (skin_name); 
     589        w = dlg_find_by_id (WIDGET (button)->owner, skin_name_id); 
     590        button_set_text (BUTTON (w), str_fit_to_term(skin_name, 20, J_LEFT_FIT)); 
     591    } 
     592    dlg_destroy (skin_dlg); 
     593    return 0; 
     594} 
     595 
     596/* --------------------------------------------------------------------------------------------- */ 
     597 
     598static cb_ret_t 
     599appearance_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
     600{ 
     601    switch (msg) 
     602    { 
     603    case MSG_ACTION: 
     604        /* message from checkbuttons */ 
     605        if (sender != NULL) 
     606        { 
     607            if (sender->id == configure_double_lines_id) { 
     608                double_lines = CHECK (sender)->state & C_BOOL; 
     609            } else if (sender->id == configure_underline_hotkeys_id) { 
     610                underline_hotkeys = CHECK (sender)->state & C_BOOL; 
     611                mc_skin_color_cache_init (); 
     612                dlg_set_default_colors (); 
     613            } 
     614            repaint_screen (); 
     615            return MSG_HANDLED; 
     616        } 
     617        return MSG_NOT_HANDLED; 
     618 
     619    default: 
     620        return dlg_default_callback (w, sender, msg, parm, data); 
     621    } 
     622} 
     623 
     624void 
     625appearance_box (void) 
     626{ 
     627    unsigned int i; 
     628    gboolean old_double_lines = double_lines; 
     629    gboolean old_underline_hotkeys = underline_hotkeys; 
     630 
     631    current_skin_name = g_strdup(mc_skin__default.name); 
     632    skin_names = mc_skin_list(); 
     633 
     634    { 
     635        quick_widget_t quick_widgets[] = { 
     636            /* *INDENT-OFF* */ 
     637            QUICK_START_COLUMNS, 
     638                QUICK_LABEL (N_("Skin:"), NULL), 
     639            QUICK_NEXT_COLUMN, 
     640                QUICK_BUTTON (str_fit_to_term(current_skin_name, 20, J_LEFT_FIT), 
     641                              B_USER, sel_skin_button, &skin_name_id), 
     642            QUICK_STOP_COLUMNS, 
     643            QUICK_SEPARATOR (TRUE), 
     644            QUICK_CHECKBOX (N_("&Double lines"), &double_lines, &configure_double_lines_id), 
     645            QUICK_CHECKBOX (N_("&Underlined hotkeys"), &underline_hotkeys, &configure_underline_hotkeys_id), 
     646            QUICK_BUTTONS_OK_CANCEL, 
     647            QUICK_END 
     648            /* *INDENT-ON* */ 
     649        }; 
     650 
     651        quick_dialog_t qdlg = { 
     652            -1, -1, 54, 
     653            _("Appearance"), "[Skins]", 
     654            quick_widgets, appearance_callback, NULL 
     655        }; 
     656 
     657        if (quick_dialog (&qdlg) == B_ENTER) { 
     658            mc_config_set_string (mc_main_config, CONFIG_APP_SECTION, "skin", current_skin_name); 
     659        } else { 
     660            double_lines = old_double_lines; 
     661            underline_hotkeys = old_underline_hotkeys; 
     662            skin_apply (NULL); 
     663        } 
     664    } 
     665 
     666    g_free (current_skin_name); 
     667    for (i = 0; i < skin_names->len; i++) 
     668        g_free (g_array_index (skin_names, gchar *, i)); 
     669    g_array_free (skin_names, TRUE); 
     670} 
     671 
     672/* --------------------------------------------------------------------------------------------- */ 
     673 
    519674void 
    520675panel_options_box (void) 
    521676{ 
  • src/filemanager/boxes.h

    diff --git a/src/filemanager/boxes.h b/src/filemanager/boxes.h
    index 08c86a3..9859a73 100644
    a b  
    1919/*** declarations of public functions ************************************************************/ 
    2020 
    2121void configure_box (void); 
     22void appearance_box (void); 
    2223void panel_options_box (void); 
    2324int panel_listing_box (WPanel * p, char **user, char **mini, int *use_msformat, int num); 
    2425const panel_field_t *sort_box (dir_sort_options_t * op, const panel_field_t * sort_field); 
  • src/filemanager/midnight.c

    diff --git a/src/filemanager/midnight.c b/src/filemanager/midnight.c
    index c1a59de..d601ccf 100644
    a b create_options_menu (void) 
    337337    entries = 
    338338        g_list_prepend (entries, menu_entry_create (_("C&onfirmation..."), CK_OptionsConfirm)); 
    339339    entries = 
     340        g_list_prepend (entries, menu_entry_create (_("&Appearance..."), CK_OptionsAppearance)); 
     341    entries = 
    340342        g_list_prepend (entries, menu_entry_create (_("&Display bits..."), CK_OptionsDisplayBits)); 
    341343    entries = g_list_prepend (entries, menu_entry_create (_("Learn &keys..."), CK_LearnKeys)); 
    342344#ifdef ENABLE_VFS 
    midnight_execute_cmd (Widget * sender, unsigned long command) 
    12501252    case CK_OptionsLayout: 
    12511253        layout_box (); 
    12521254        break; 
     1255    case CK_OptionsAppearance: 
     1256        appearance_box (); 
     1257        break; 
    12531258    case CK_LearnKeys: 
    12541259        learn_keys (); 
    12551260        break; 
    do_nc (void) 
    17431748{ 
    17441749    gboolean ret; 
    17451750 
    1746     dlg_colors_t midnight_colors; 
    1747  
    1748     midnight_colors[DLG_COLOR_NORMAL] = mc_skin_color_get ("dialog", "_default_"); 
    1749     midnight_colors[DLG_COLOR_FOCUS] = mc_skin_color_get ("dialog", "focus"); 
    1750     midnight_colors[DLG_COLOR_HOT_NORMAL] = mc_skin_color_get ("dialog", "hotnormal"); 
    1751     midnight_colors[DLG_COLOR_HOT_FOCUS] = mc_skin_color_get ("dialog", "hotfocus"); 
    1752     midnight_colors[DLG_COLOR_TITLE] = mc_skin_color_get ("dialog", "title"); 
    1753  
    17541751#ifdef USE_INTERNAL_EDIT 
    17551752    edit_stack_init (); 
    17561753#endif 
    17571754 
    1758     midnight_dlg = dlg_create (FALSE, 0, 0, LINES, COLS, midnight_colors, midnight_callback, 
     1755    midnight_dlg = dlg_create (FALSE, 0, 0, LINES, COLS, dialog_colors, midnight_callback, 
    17591756                               midnight_event, "[main]", NULL, DLG_NONE); 
    17601757 
    17611758    /* Check if we were invoked as an editor or file viewer */ 
  • src/main.c

    diff --git a/src/main.c b/src/main.c
    index f4005cc..742dc16 100644
    a b main (int argc, char *argv[]) 
    371371 
    372372    tty_init_colors (mc_global.tty.disable_colors, mc_args__force_colors); 
    373373 
    374     mc_skin_init (&error); 
     374    mc_skin_init (NULL, &error); 
     375    dlg_set_default_colors (); 
    375376    if (error != NULL) 
    376377    { 
    377378        message (D_ERROR, _("Warning"), "%s", error->message); 
    main (int argc, char *argv[]) 
    379380        error = NULL; 
    380381    } 
    381382 
    382     dlg_set_default_colors (); 
    383  
    384383#ifdef ENABLE_SUBSHELL 
    385384    /* Done here to ensure that the subshell doesn't  */ 
    386385    /* inherit the file descriptors opened below, etc */ 
  • src/setup.c

    diff --git a/src/setup.c b/src/setup.c
    index 20c7145..bafd076 100644
    a b  
    3939#include "lib/tty/key.h" 
    4040#include "lib/mcconfig.h" 
    4141#include "lib/fileloc.h" 
     42#include "lib/skin.h" 
    4243#include "lib/timefmt.h" 
    4344#include "lib/util.h" 
    4445#include "lib/widget.h" 
    static const struct 
    364365    { "auto_fill_mkdir_name", &auto_fill_mkdir_name }, 
    365366    { "copymove_persistent_attr", &setup_copymove_persistent_attr }, 
    366367    { "select_flags", &select_flags }, 
     368    { "double_lines", &double_lines }, 
     369    { "underline_hotkeys", &underline_hotkeys }, 
    367370    { NULL, NULL } 
    368371}; 
    369372