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

File mc-skin-selector-beta2.patch, 34.1 KB (added by egmont, 6 years ago)

beta2

  • 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..08eaa77 100644
    a b extern mc_skin_t mc_skin__default; 
    129129 
    130130/*** declarations of public functions ************************************************************/ 
    131131 
    132 gboolean mc_skin_init (GError **); 
     132gboolean mc_skin_init (const gchar *, GError **); 
    133133void mc_skin_deinit (void); 
    134134 
    135135int mc_skin_color_get (const gchar *, const gchar *); 
    void mc_skin_lines_parse_ini_file (mc_skin_t *); 
    138138 
    139139gchar *mc_skin_get (const gchar *, const gchar *, const gchar *); 
    140140 
     141GArray * mc_skin_list (void); 
     142 
    141143#endif /* MC_SKIN_H */ 
  • 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..b0d0f20 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 
  • 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..e3cef8b 100644
    a b  
    9494 
    9595/*** file scope variables ************************************************************************/ 
    9696 
    97 unsigned long configure_old_esc_mode_id, configure_time_out_id; 
     97unsigned long configure_old_esc_mode_id, configure_time_out_id, configure_double_lines_id; 
    9898 
    9999/* Index in list_types[] for "user defined" */ 
    100100static const int panel_listing_user_idx = 3; 
    static int listing_user_hotkey = 'u'; 
    104104static unsigned long panel_listing_types_id, panel_user_format_id; 
    105105static unsigned long mini_user_status_id, mini_user_format_id; 
    106106 
     107static unsigned long skin_name_id; 
     108 
    107109#ifdef HAVE_CHARSET 
    108110static int new_display_codepage; 
    109111static unsigned long disp_bits_name_id; 
    static unsigned long disp_bits_name_id; 
    113115static unsigned long ftpfs_always_use_proxy_id, ftpfs_proxy_host_id; 
    114116#endif /* ENABLE_VFS && ENABLE_VFS_FTP */ 
    115117 
     118GArray * skin_names; 
     119gchar * current_skin_name; 
     120 
    116121#ifdef ENABLE_BACKGROUND 
    117122static WListbox *bg_list = NULL; 
    118123#endif /* ENABLE_BACKGROUND */ 
    configure_box (void) 
    516521 
    517522/* --------------------------------------------------------------------------------------------- */ 
    518523 
     524static void 
     525skin_apply (const gchar *skin_override) 
     526{ 
     527    GError *error = NULL; 
     528    mc_skin_deinit (); 
     529    mc_skin_init (skin_override, &error); 
     530    mc_fhl_free (&mc_filehighlight); 
     531    mc_filehighlight = mc_fhl_new (TRUE); 
     532    dlg_set_default_colors (); 
     533    panel_deinit (); 
     534    panel_init (); 
     535    repaint_screen (); 
     536    if (error != NULL) 
     537    { 
     538        message (D_ERROR, _("Warning"), "%s", error->message); 
     539        g_error_free (error); 
     540    } 
     541} 
     542 
     543/* --------------------------------------------------------------------------------------------- */ 
     544 
     545static cb_ret_t 
     546skin_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
     547{ 
     548    return dlg_default_callback (w, sender, msg, parm, data); 
     549} 
     550 
     551/* --------------------------------------------------------------------------------------------- */ 
     552 
     553static int 
     554sel_skin_button (WButton * button, int action) 
     555{ 
     556    int result; 
     557    WListbox *skin_list; 
     558    WDialog *skin_dlg; 
     559    gchar *skin_name; 
     560    int lxx, lyy; 
     561    unsigned int i; 
     562 
     563    (void) action; 
     564 
     565    lxx = COLS / 2; 
     566    lyy = (LINES - 13) / 2; 
     567    skin_dlg = 
     568        dlg_create (TRUE, lyy, lxx, 13, 24, dialog_colors, skin_callback, NULL, 
     569                    "[Skins]", _("Skin"), DLG_COMPACT); 
     570 
     571    skin_list = listbox_new (1, 1, 11, 22, FALSE, NULL); 
     572    for (i = 0; i < skin_names->len; i++) { 
     573        skin_name = g_array_index(skin_names, gchar *, i); 
     574        listbox_add_item (skin_list, LISTBOX_APPEND_AT_END, 0, skin_name, NULL); 
     575        if (!strcmp(skin_name, current_skin_name)) 
     576            listbox_select_entry (skin_list, i); 
     577    } 
     578 
     579    add_widget (skin_dlg, skin_list); 
     580 
     581    result = dlg_run (skin_dlg); 
     582    if (result == B_ENTER) { 
     583        Widget *w; 
     584        listbox_get_current (skin_list, &skin_name, NULL); 
     585        g_free (current_skin_name); 
     586        current_skin_name = g_strdup(skin_name); 
     587        skin_apply (skin_name); 
     588        w = dlg_find_by_id (WIDGET (button)->owner, skin_name_id); 
     589        button_set_text (BUTTON (w), str_fit_to_term(skin_name, 20, J_LEFT_FIT)); 
     590    } 
     591    dlg_destroy (skin_dlg); 
     592    return 0; 
     593} 
     594 
     595/* --------------------------------------------------------------------------------------------- */ 
     596 
     597static cb_ret_t 
     598appearance_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 
     599{ 
     600    switch (msg) 
     601    { 
     602    case MSG_ACTION: 
     603        /* message from "double lines" checkbutton */ 
     604        if (sender != NULL && sender->id == configure_double_lines_id) 
     605        { 
     606            double_lines = CHECK (sender)->state & C_BOOL; 
     607            repaint_screen (); 
     608            return MSG_HANDLED; 
     609        } 
     610        return MSG_NOT_HANDLED; 
     611 
     612    default: 
     613        return dlg_default_callback (w, sender, msg, parm, data); 
     614    } 
     615} 
     616 
     617void 
     618appearance_box (void) 
     619{ 
     620    unsigned int i; 
     621    gboolean old_double_lines = double_lines; 
     622 
     623    current_skin_name = g_strdup(mc_skin__default.name); 
     624    skin_names = mc_skin_list(); 
     625 
     626    { 
     627        quick_widget_t quick_widgets[] = { 
     628            /* *INDENT-OFF* */ 
     629            QUICK_START_COLUMNS, 
     630                QUICK_LABEL (N_("Skin:"), NULL), 
     631            QUICK_NEXT_COLUMN, 
     632                QUICK_BUTTON (str_fit_to_term(current_skin_name, 20, J_LEFT_FIT), 
     633                              B_USER, sel_skin_button, &skin_name_id), 
     634            QUICK_STOP_COLUMNS, 
     635            QUICK_CHECKBOX (N_("&Double lines"), &double_lines, &configure_double_lines_id), 
     636            QUICK_BUTTONS_OK_CANCEL, 
     637            QUICK_END 
     638            /* *INDENT-ON* */ 
     639        }; 
     640 
     641        quick_dialog_t qdlg = { 
     642            -1, -1, 54, 
     643            _("Appearance"), "[Skins]", 
     644            quick_widgets, appearance_callback, NULL 
     645        }; 
     646 
     647        if (quick_dialog (&qdlg) == B_ENTER) { 
     648            mc_config_set_string (mc_main_config, CONFIG_APP_SECTION, "skin", current_skin_name); 
     649        } else { 
     650            skin_apply (NULL); 
     651            double_lines = old_double_lines; 
     652        } 
     653    } 
     654 
     655    g_free (current_skin_name); 
     656    for (i = 0; i < skin_names->len; i++) 
     657        g_free (g_array_index (skin_names, gchar *, i)); 
     658    g_array_free (skin_names, TRUE); 
     659} 
     660 
     661/* --------------------------------------------------------------------------------------------- */ 
     662 
    519663void 
    520664panel_options_box (void) 
    521665{ 
  • 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..f9c150c 100644
    a b static const struct 
    364364    { "auto_fill_mkdir_name", &auto_fill_mkdir_name }, 
    365365    { "copymove_persistent_attr", &setup_copymove_persistent_attr }, 
    366366    { "select_flags", &select_flags }, 
     367    { "double_lines", &double_lines }, 
    367368    { NULL, NULL } 
    368369}; 
    369370