Ticket #3169: mc-3169-appearance-options-v1.patch
File mc-3169-appearance-options-v1.patch, 25.7 KB (added by egmont, 11 years ago) |
---|
-
lib/skin.h
diff --git a/lib/skin.h b/lib/skin.h index 904266b..a85f70c 100644
a b typedef struct mc_skin_struct 125 125 126 126 extern int mc_skin_color__cache[]; 127 127 extern mc_skin_t mc_skin__default; 128 extern gboolean underline_hotkeys; 128 129 129 130 /*** declarations of public functions ************************************************************/ 130 131 … … int mc_skin_color_get (const gchar *, const gchar *); 135 136 136 137 void mc_skin_lines_parse_ini_file (mc_skin_t *); 137 138 139 void mc_skin_color_cache_init (void); 140 138 141 gchar *mc_skin_get (const gchar *, const gchar *, const gchar *); 139 142 140 143 GPtrArray *mc_skin_list (void); -
lib/skin/colors.c
diff --git a/lib/skin/colors.c b/lib/skin/colors.c index 7ca9d47..da152ed 100644
a b 36 36 /*** global variables ****************************************************************************/ 37 37 38 38 int mc_skin_color__cache[MC_SKIN_COLOR_CACHE_COUNT]; 39 gboolean underline_hotkeys = FALSE; 39 40 40 41 /*** file scope macro definitions ****************************************************************/ 41 42 … … mc_skin_color_set_default_for_terminal (mc_skin_t * mc_skin) 180 181 /* --------------------------------------------------------------------------------------------- */ 181 182 182 183 static void 184 mc_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 209 static gboolean 210 mc_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 218 static void 219 mc_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 244 void 183 245 mc_skin_color_cache_init (void) 184 246 { 185 247 DEFAULT_COLOR = mc_skin_color_get ("skin", "terminal_default_color"); … … mc_skin_color_cache_init (void) 194 256 195 257 COLOR_NORMAL = mc_skin_color_get ("dialog", "_default_"); 196 258 COLOR_FOCUS = mc_skin_color_get ("dialog", "dfocus"); 197 COLOR_HOT_NORMAL = mc_skin_color_get ("dialog", "dhotnormal");198 COLOR_HOT_FOCUS = mc_skin_color_get ("dialog", "dhotfocus");259 COLOR_HOT_NORMAL = mc_skin_color_get ("dialog", underline_hotkeys ? "dulinormal" : "dhotnormal"); 260 COLOR_HOT_FOCUS = mc_skin_color_get ("dialog", underline_hotkeys ? "dulifocus" : "dhotfocus"); 199 261 COLOR_TITLE = mc_skin_color_get ("dialog", "dtitle"); 200 262 201 263 ERROR_COLOR = mc_skin_color_get ("error", "_default_"); 202 264 ERROR_FOCUS = mc_skin_color_get ("error", "errdfocus"); 203 ERROR_HOT_NORMAL = mc_skin_color_get ("error", "errdhotnormal");204 ERROR_HOT_FOCUS = mc_skin_color_get ("error", "errdhotfocus");265 ERROR_HOT_NORMAL = mc_skin_color_get ("error", underline_hotkeys ? "errdulinormal" : "errdhotnormal"); 266 ERROR_HOT_FOCUS = mc_skin_color_get ("error", underline_hotkeys ? "errdulifocus" : "errdhotfocus"); 205 267 ERROR_TITLE = mc_skin_color_get ("error", "errdtitle"); 206 268 207 269 MENU_ENTRY_COLOR = mc_skin_color_get ("menu", "_default_"); 208 270 MENU_SELECTED_COLOR = mc_skin_color_get ("menu", "menusel"); 209 MENU_HOT_COLOR = mc_skin_color_get ("menu", "menuhot");210 MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", "menuhotsel");271 MENU_HOT_COLOR = mc_skin_color_get ("menu", underline_hotkeys ? "menuuli" : "menuhot"); 272 MENU_HOTSEL_COLOR = mc_skin_color_get ("menu", underline_hotkeys ? "menuulisel" : "menuhotsel"); 211 273 MENU_INACTIVE_COLOR = mc_skin_color_get ("menu", "menuinactive"); 212 274 213 275 PMENU_ENTRY_COLOR = mc_skin_color_get ("popupmenu", "_default_"); … … mc_skin_color_cache_init (void) 261 323 262 324 /* --------------------------------------------------------------------------------------------- */ 263 325 264 static gboolean265 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 void274 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 299 326 gboolean 300 327 mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) 301 328 { … … mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) 341 368 } 342 369 g_strfreev (orig_groups); 343 370 371 /* create underlined hotkey variants */ 372 mc_skin_color_copy_add_attributes (mc_skin, "dialog", "_default_", "dulinormal", "underline"); 373 mc_skin_color_copy_add_attributes (mc_skin, "dialog", "dfocus", "dulifocus", "underline"); 374 mc_skin_color_copy_add_attributes (mc_skin, "error", "_default_", "errdulinormal", "underline"); 375 mc_skin_color_copy_add_attributes (mc_skin, "error", "errdfocus", "errdulifocus", "underline"); 376 mc_skin_color_copy_add_attributes (mc_skin, "menu", "_default_", "menuuli", "underline"); 377 mc_skin_color_copy_add_attributes (mc_skin, "menu", "menusel", "menuulisel", "underline"); 378 344 379 mc_skin_color_cache_init (); 345 380 return TRUE; 346 381 } -
lib/tty/tty-ncurses.c
diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c index 8c385ea..f82ce11 100644
a b tty_print_anychar (int c) 569 569 void 570 570 tty_print_alt_char (int c, gboolean single) 571 571 { 572 if (!double_lines) 573 single = TRUE; 572 574 if (yx_in_screen (mc_curs_row, mc_curs_col)) 573 575 { 574 576 if ((chtype) c == ACS_VLINE) -
lib/tty/tty-slang.c
diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c index 0b16614..381c1db 100644
a b tty_print_char (int c) 630 630 void 631 631 tty_print_alt_char (int c, gboolean single) 632 632 { 633 if (!double_lines) 634 single = TRUE; 633 635 #define DRAW(x, y) (x == y) \ 634 636 ? SLsmg_draw_object (SLsmg_get_row(), SLsmg_get_column(), x) \ 635 637 : SLsmg_write_char ((unsigned int) y) -
lib/tty/tty.c
diff --git a/lib/tty/tty.c b/lib/tty/tty.c index 5fa758b..8bfaa11 100644
a b int reset_hp_softkeys = 0; 57 57 58 58 int mc_tty_frm[MC_TTY_FRM_MAX]; 59 59 60 gboolean double_lines = FALSE; 61 60 62 /*** file scope macro definitions ****************************************************************/ 61 63 62 64 /*** file scope type declarations ****************************************************************/ … … tty_draw_box (int y, int x, int ys, int xs, gboolean single) 199 201 y2 = y + ys; 200 202 x2 = x + xs; 201 203 204 if (!double_lines) 205 single = TRUE; 202 206 tty_draw_vline (y, x, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys); 203 207 tty_draw_vline (y, x2, mc_tty_frm[single ? MC_TTY_FRM_VERT : MC_TTY_FRM_DVERT], ys); 204 208 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[]; 65 65 66 66 extern char *tty_tgetstr (const char *name); 67 67 68 extern gboolean double_lines; 69 68 70 /* {{{ Input }}} */ 69 71 70 72 extern int reset_hp_softkeys; -
misc/skins/Makefile.am
diff --git a/misc/skins/Makefile.am b/misc/skins/Makefile.am index 3cf0bdf..5e04e09 100644
a b skindir = $(pkgdatadir)/skins 2 2 3 3 skin_DATA = \ 4 4 dark.ini \ 5 darkfar.ini \6 5 default.ini \ 7 double-lines.ini \8 6 featured.ini \ 9 7 gotar.ini \ 10 8 mc46.ini \ -
misc/skins/dark.ini
diff --git a/misc/skins/dark.ini b/misc/skins/dark.ini index f586b84..4e7a084 100644
a b 13 13 leftmiddle = ├ 14 14 rightmiddle = ┤ 15 15 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 = ╢ 26 26 27 27 [core] 28 28 _default_ = lightgray;black -
deleted file misc/skins/darkfar.ini
diff --git a/misc/skins/darkfar.ini b/misc/skins/darkfar.ini deleted file mode 100644 index 1f05f6b..0000000
+ - 1 [skin]2 description = Dark Far skin3 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;black29 selected = black;cyan30 marked = yellow;black31 markselect = yellow;cyan32 gauge = white;black33 input = black;cyan34 inputunchanged = gray;cyan35 inputmark = cyan;black36 disabled = gray;blue37 reverse = black;lightgray38 commandlinemark = black;lightgray39 header = yellow;black40 inputhistory =41 commandhistory =42 43 [dialog]44 _default_ = brightcyan;blue45 dfocus = blue;cyan46 dhotnormal = white;47 dhotfocus = white;cyan48 dtitle = white;49 50 [error]51 _default_ = white;red52 errdfocus = black;lightgray53 errdhotnormal = yellow;red54 errdhotfocus = yellow;lightgray55 errdtitle = yellow;red56 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;blue76 menusel = black;cyan77 menuhot = white;blue78 menuhotsel = white;cyan79 menuinactive = black;lightgray80 81 [popupmenu]82 _default_ = lightgray;blue83 menusel = black;cyan84 menutitle = lightgray;blue85 86 [buttonbar]87 hotkey = red;lightgray88 button = black;lightgray89 90 [statusbar]91 _default_ = black;lightgray92 93 [help]94 _default_ = black;lightgray95 helpitalic = red;lightgray96 helpbold = blue;lightgray97 helplink = black;cyan98 helpslink = yellow;blue99 helptitle = blue;lightgray100 101 [editor]102 _default_ = lightgray;black103 editbold = yellow;green104 editmarked = black;lightgray105 editwhitespace = brightblue;black106 editlinestate = white;cyan107 bookmark = white;red108 bookmarkfound = black;green109 editrightmargin = white;blue110 # editbg =111 editframe = gray;112 editframeactive = lightgray;113 editframedrag = white;114 window-state-char = ↕115 window-close-char = ×116 117 [viewer]118 viewbold = yellow;black119 viewunderline = brightred;black120 viewselected = yellow;cyan121 122 [diffviewer]123 added = white;green124 changedline = blue;cyan125 changednew = red;cyan126 changed = white;cyan127 removed = white;red128 error = red;129 130 [widget-common]131 sort-sign-up = ↑132 sort-sign-down = ↓133 134 [widget-panel]135 hiddenfiles-sign-show = •136 hiddenfiles-sign-hide = ○137 history-prev-item-sign = ←138 history-next-item-sign = →139 history-show-list-sign = ↓140 filename-scroll-left-char = «141 filename-scroll-right-char = »142 143 [widget-scollbar]144 first-vert-char = ↑145 last-vert-char = ↓146 first-horiz-char = «147 last-horiz-char = »148 current-char = ■149 background-char = ▒ -
misc/skins/default.ini
diff --git a/misc/skins/default.ini b/misc/skins/default.ini index 117b4db..4806c85 100644
a b 13 13 leftmiddle = ├ 14 14 rightmiddle = ┤ 15 15 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 = ╢ 26 26 27 27 [core] 28 28 _default_ = lightgray;blue -
deleted file misc/skins/double-lines.ini
diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini deleted file mode 100644 index 7a2f7c9..0000000
+ - 1 [skin]2 description = Far-like skin3 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;blue29 selected = black;cyan30 marked = yellow;blue31 markselect = yellow;cyan32 gauge = white;black33 input = black;cyan34 inputunchanged = gray;cyan35 inputmark = cyan;black36 commandlinemark = black;lightgray37 disabled = gray;lightgray38 reverse = black;lightgray39 header = yellow;blue40 inputhistory =41 commandhistory =42 43 [dialog]44 _default_ = black;lightgray45 dfocus = black;cyan46 dhotnormal = blue;lightgray47 dhotfocus = blue;cyan48 dtitle = blue;lightgray49 50 [error]51 _default_ = white;red52 errdfocus = black;lightgray53 errdhotnormal = yellow;red54 errdhotfocus = yellow;lightgray55 errdtitle = yellow;red56 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;cyan76 menusel = white;black77 menuhot = yellow;cyan78 menuhotsel = yellow;black79 menuinactive = lightgray;blue80 81 [popupmenu]82 _default_ = white;cyan83 menusel = white;black84 menutitle = white;cyan85 86 [buttonbar]87 hotkey = lightgray;blue88 button = lightgray;blue89 90 [statusbar]91 _default_ = black;cyan92 93 [help]94 _default_ = black;lightgray95 helpitalic = red;lightgray96 helpbold = blue;lightgray97 helplink = black;cyan98 helpslink = yellow;blue99 helptitle = blue;lightgray100 101 [editor]102 _default_ = lightgray;blue103 editbold = yellow;green104 editmarked = black;cyan105 editwhitespace = brightblue;blue106 editlinestate = white;cyan107 bookmark = white;red108 bookmarkfound = black;green109 editrightmargin = brightblue;black110 # editbg =111 # editframe =112 editframeactive = white;113 editframedrag = green;114 window-state-char = *115 window-close-char = X116 117 [viewer]118 viewbold = yellow;blue119 viewunderline = brightred;blue120 viewselected = yellow;cyan121 122 [diffviewer]123 added = white;green124 changedline = blue;cyan125 changednew = red;cyan126 changed = white;cyan127 removed = white;red128 error = red;lightgray129 130 [widget-common]131 sort-sign-up = '132 sort-sign-down = .133 134 [widget-panel]135 filename-scroll-left-char = {136 filename-scroll-right-char = } -
misc/skins/gotar.ini
diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini index c0aa35b..3feb1eb 100644
a b 13 13 leftmiddle = ├ 14 14 rightmiddle = ┤ 15 15 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 = ╢ 26 26 27 27 [core] 28 28 _default_ = lightgray;black -
misc/skins/mc46.ini
diff --git a/misc/skins/mc46.ini b/misc/skins/mc46.ini index ed80535..cd9f1e0 100644
a b 13 13 leftmiddle = ├ 14 14 rightmiddle = ┤ 15 15 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 = ╢ 26 26 27 27 [core] 28 28 _default_ = lightgray;blue -
misc/skins/nicedark.ini
diff --git a/misc/skins/nicedark.ini b/misc/skins/nicedark.ini index 22a60fa..2c324eb 100644
a b 13 13 leftmiddle = ├ 14 14 rightmiddle = ┤ 15 15 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 = ╢ 26 26 27 27 [core] 28 28 _default_ = lightgray;black -
misc/skins/sand256.ini
diff --git a/misc/skins/sand256.ini b/misc/skins/sand256.ini index 456f7c8..6c3e253 100644
a b 67 67 leftmiddle = ├ 68 68 rightmiddle = ┤ 69 69 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 = ╢ 80 80 81 81 [core] 82 82 _default_ = black;rgb554 … … 95 95 [dialog] 96 96 _default_ = black;rgb553 97 97 dfocus = ;rgb452 98 dhotnormal = ;;underline99 dhotfocus = ;rgb452;underline98 dhotnormal = red; 99 dhotfocus = red;rgb452 100 100 dtitle = ;;underline 101 101 102 102 [error] 103 103 _default_ = rgb554;rgb320;bold 104 104 errdfocus = black;rgb452;bold 105 errdhotnormal = ;;bold+underline106 errdhotfocus = black;rgb452;bold+underline105 errdhotnormal = rgb341;;bold 106 errdhotfocus = red;rgb452;bold 107 107 errdtitle = ;;bold+underline 108 108 109 109 [filehighlight] … … 127 127 [menu] 128 128 _default_ = black;rgb452 129 129 menusel = ;rgb551 130 menuhot = ;;underline131 menuhotsel = ;rgb551;underline130 menuhot = red; 131 menuhotsel = red;rgb551 132 132 menuinactive = 133 133 134 134 [popupmenu] -
misc/skins/xoria256.ini
diff --git a/misc/skins/xoria256.ini b/misc/skins/xoria256.ini index 656f996..1442070 100644
a b 16 16 description = Xoria256 17 17 256colors = true 18 18 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 42 19 [Lines] 43 20 horiz = ─ 44 21 vert = │ -
src/filemanager/boxes.c
diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c index 026f5b3..f5111f1 100644
a b 94 94 /*** file scope variables ************************************************************************/ 95 95 96 96 unsigned long configure_old_esc_mode_id, configure_time_out_id; 97 unsigned long configure_double_lines_id, configure_underline_hotkeys_id; 97 98 98 99 /* Index in list_types[] for "user defined" */ 99 100 static const int panel_listing_user_idx = 3; … … sel_skin_button (WButton * button, int action) 614 615 615 616 /* --------------------------------------------------------------------------------------------- */ 616 617 618 static cb_ret_t 619 appearance_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void *data) 620 { 621 switch (msg) 622 { 623 case MSG_ACTION: 624 /* message from checkbuttons */ 625 if (sender != NULL) 626 { 627 if (sender->id == configure_double_lines_id) { 628 double_lines = CHECK (sender)->state & C_BOOL; 629 } else if (sender->id == configure_underline_hotkeys_id) { 630 underline_hotkeys = CHECK (sender)->state & C_BOOL; 631 mc_skin_color_cache_init (); 632 dlg_set_default_colors (); 633 } 634 repaint_screen (); 635 return MSG_HANDLED; 636 } 637 return MSG_NOT_HANDLED; 638 639 default: 640 return dlg_default_callback (w, sender, msg, parm, data); 641 } 642 } 643 644 /* --------------------------------------------------------------------------------------------- */ 645 617 646 void 618 647 appearance_box (void) 619 648 { 649 gboolean old_double_lines = double_lines; 650 gboolean old_underline_hotkeys = underline_hotkeys; 651 620 652 current_skin_name = g_strdup (mc_skin__default.name); 621 653 skin_names = mc_skin_list (); 622 654 … … appearance_box (void) 629 661 QUICK_BUTTON (str_fit_to_term (skin_name_to_label (current_skin_name), 20, J_LEFT_FIT), 630 662 B_USER, sel_skin_button, &skin_name_id), 631 663 QUICK_STOP_COLUMNS, 664 QUICK_SEPARATOR (TRUE), 665 QUICK_CHECKBOX (N_("&Double lines"), &double_lines, &configure_double_lines_id), 666 QUICK_CHECKBOX (N_("&Underlined hotkeys"), &underline_hotkeys, &configure_underline_hotkeys_id), 632 667 QUICK_BUTTONS_OK_CANCEL, 633 668 QUICK_END 634 669 /* *INDENT-ON* */ … … appearance_box (void) 637 672 quick_dialog_t qdlg = { 638 673 -1, -1, 54, 639 674 N_("Appearance"), "[Appearance]", 640 quick_widgets, dlg_default_callback, NULL675 quick_widgets, appearance_callback, NULL 641 676 }; 642 677 643 if (quick_dialog (&qdlg) == B_ENTER) 678 if (quick_dialog (&qdlg) == B_ENTER) { 644 679 mc_config_set_string (mc_main_config, CONFIG_APP_SECTION, "skin", current_skin_name); 645 else 680 } else { 681 double_lines = old_double_lines; 682 underline_hotkeys = old_underline_hotkeys; 646 683 skin_apply (NULL); 684 } 647 685 } 648 686 649 687 g_free (current_skin_name); -
src/setup.c
diff --git a/src/setup.c b/src/setup.c index 5cd58b3..4edb537 100644
a b 38 38 #include "lib/tty/key.h" 39 39 #include "lib/mcconfig.h" 40 40 #include "lib/fileloc.h" 41 #include "lib/skin.h" 41 42 #include "lib/timefmt.h" 42 43 #include "lib/util.h" 43 44 #include "lib/widget.h" … … static const struct 363 364 { "auto_fill_mkdir_name", &auto_fill_mkdir_name }, 364 365 { "copymove_persistent_attr", &setup_copymove_persistent_attr }, 365 366 { "select_flags", &select_flags }, 367 { "double_lines", &double_lines }, 368 { "underline_hotkeys", &underline_hotkeys }, 366 369 { NULL, NULL } 367 370 }; 368 371