From 0701bca6e362dca6e5c62f2c05778d25b6b5ce95 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Tue, 29 Nov 2016 10:25:32 +0300 Subject: [PATCH] Ticket #3710: don't parse "window-state-char" and "window-close-char" as colors. The bug: in skin files, the "[editor]" section's "window-state-char" and "window-close-char" (whose values, as the name implies, are single characters) are parsed as color fg+bg+attr, and an ncurses/slang colorpair is allocated for each. The bug fix: move "window-state-char" and "window-close-char" keys from "[editor]" section to "[widget-editor]" one. Signed-off-by: Andrew Borodin --- misc/skins/dark.ini | 5 +++-- misc/skins/darkfar.ini | 6 ++++-- misc/skins/default.ini | 6 ++++-- misc/skins/double-lines.ini | 6 ++++-- misc/skins/featured.ini | 5 +++-- misc/skins/gotar.ini | 6 ++++-- misc/skins/gray-green-purple256.ini | 6 ++++-- misc/skins/gray-orange-blue256.ini | 6 ++++-- misc/skins/mc46.ini | 6 ++++-- misc/skins/modarcon16-defbg.ini | 4 ++++ misc/skins/modarcon16.ini | 4 ++++ misc/skins/modarcon16root-defbg.ini | 4 ++++ misc/skins/modarcon16root.ini | 4 ++++ misc/skins/modarin256-defbg.ini | 4 ++++ misc/skins/modarin256.ini | 4 ++++ misc/skins/modarin256root-defbg.ini | 4 ++++ misc/skins/modarin256root.ini | 4 ++++ misc/skins/nicedark.ini | 5 +++-- misc/skins/sand256.ini | 5 +++-- misc/skins/xoria256.ini | 5 +++-- src/editor/editwidget.c | 4 ++-- 21 files changed, 77 insertions(+), 26 deletions(-) diff --git a/misc/skins/dark.ini b/misc/skins/dark.ini index d3717d5df..d6ad4ae9d 100644 --- a/misc/skins/dark.ini +++ b/misc/skins/dark.ini @@ -111,8 +111,6 @@ editframe = gray; editframeactive = lightgray; editframedrag = red; - window-state-char = ↕ - window-close-char = ✕ [viewer] _default_ = lightgray;black @@ -149,3 +147,6 @@ current-char = ■ background-char = ▒ +[widget-editor] + window-state-char = ↕ + window-close-char = ✕ diff --git a/misc/skins/darkfar.ini b/misc/skins/darkfar.ini index a34de677f..b4a8d3a49 100644 --- a/misc/skins/darkfar.ini +++ b/misc/skins/darkfar.ini @@ -111,8 +111,6 @@ editframe = gray; editframeactive = lightgray; editframedrag = white; - window-state-char = ↕ - window-close-char = × [viewer] _default_ = lightgray;black @@ -148,3 +146,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = ↕ + window-close-char = × diff --git a/misc/skins/default.ini b/misc/skins/default.ini index 625188e8e..e28e4df44 100644 --- a/misc/skins/default.ini +++ b/misc/skins/default.ini @@ -111,8 +111,6 @@ # editframe = lightgray; editframeactive = white; editframedrag = green; - window-state-char = * - window-close-char = X [viewer] _default_ = lightgray;blue @@ -135,3 +133,7 @@ [widget-panel] filename-scroll-left-char = { filename-scroll-right-char = } + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/double-lines.ini b/misc/skins/double-lines.ini index 172442e68..3afeb6846 100644 --- a/misc/skins/double-lines.ini +++ b/misc/skins/double-lines.ini @@ -111,8 +111,6 @@ # editframe = editframeactive = white; editframedrag = green; - window-state-char = * - window-close-char = X [viewer] _default_ = lightgray;blue @@ -135,3 +133,7 @@ [widget-panel] filename-scroll-left-char = { filename-scroll-right-char = } + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/featured.ini b/misc/skins/featured.ini index 47a1a23c2..bc1952f39 100644 --- a/misc/skins/featured.ini +++ b/misc/skins/featured.ini @@ -113,8 +113,6 @@ # editframe = editframeactive = lightgray; editframedrag = cyan; - window-state-char = ↕ - window-close-char = ✕ [viewer] _default_ = lightgray;blue @@ -154,3 +152,6 @@ rightmiddle = ┤ cross = ┼ +[widget-editor] + window-state-char = ↕ + window-close-char = ✕ diff --git a/misc/skins/gotar.ini b/misc/skins/gotar.ini index fc65bb2cf..b9b8aa093 100644 --- a/misc/skins/gotar.ini +++ b/misc/skins/gotar.ini @@ -108,8 +108,6 @@ # editframe = editframeactive = white; editframedrag = green; - window-state-char = * - window-close-char = X [viewer] _default_ = lightgray;black @@ -129,3 +127,7 @@ [widget-panel] filename-scroll-left-char = { filename-scroll-right-char = } + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/gray-green-purple256.ini b/misc/skins/gray-green-purple256.ini index f6ea39a94..bd7e57b1b 100644 --- a/misc/skins/gray-green-purple256.ini +++ b/misc/skins/gray-green-purple256.ini @@ -118,8 +118,6 @@ editframe = main2; editframeactive = black; editframedrag = rgb400; - window-state-char = ↕ - window-close-char = ✕ [viewer] _default_ = black;bgmain @@ -157,3 +155,7 @@ last-horiz-char = ▸ current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = ↕ + window-close-char = ✕ diff --git a/misc/skins/gray-orange-blue256.ini b/misc/skins/gray-orange-blue256.ini index 027b6792d..1e7e77a1e 100644 --- a/misc/skins/gray-orange-blue256.ini +++ b/misc/skins/gray-orange-blue256.ini @@ -118,8 +118,6 @@ editframe = main2; editframeactive = black; editframedrag = rgb400; - window-state-char = ↕ - window-close-char = ✕ [viewer] _default_ = black;bgmain @@ -157,3 +155,7 @@ last-horiz-char = ▸ current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = ↕ + window-close-char = ✕ diff --git a/misc/skins/mc46.ini b/misc/skins/mc46.ini index 39e436354..b94d6a2f1 100644 --- a/misc/skins/mc46.ini +++ b/misc/skins/mc46.ini @@ -102,8 +102,6 @@ # editframe = editframeactive = lightgray; editframedrag = cyan; - window-state-char = * - window-close-char = X [viewer] _default_ = lightgray;blue @@ -126,3 +124,7 @@ [widget-panel] filename-scroll-left-char = { filename-scroll-right-char = } + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarcon16-defbg.ini b/misc/skins/modarcon16-defbg.ini index b4b5b43ea..9dd4c66c6 100644 --- a/misc/skins/modarcon16-defbg.ini +++ b/misc/skins/modarcon16-defbg.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarcon16.ini b/misc/skins/modarcon16.ini index 9381d3761..faf8e0b79 100644 --- a/misc/skins/modarcon16.ini +++ b/misc/skins/modarcon16.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarcon16root-defbg.ini b/misc/skins/modarcon16root-defbg.ini index b910c8188..45be80c0b 100644 --- a/misc/skins/modarcon16root-defbg.ini +++ b/misc/skins/modarcon16root-defbg.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarcon16root.ini b/misc/skins/modarcon16root.ini index 498a40c10..e5988d247 100644 --- a/misc/skins/modarcon16root.ini +++ b/misc/skins/modarcon16root.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarin256-defbg.ini b/misc/skins/modarin256-defbg.ini index 4e86e62cf..b36544b8e 100644 --- a/misc/skins/modarin256-defbg.ini +++ b/misc/skins/modarin256-defbg.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarin256.ini b/misc/skins/modarin256.ini index 6d3415eed..31c84b7e9 100644 --- a/misc/skins/modarin256.ini +++ b/misc/skins/modarin256.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarin256root-defbg.ini b/misc/skins/modarin256root-defbg.ini index 6f32ca40f..ea4497d8b 100644 --- a/misc/skins/modarin256root-defbg.ini +++ b/misc/skins/modarin256root-defbg.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/modarin256root.ini b/misc/skins/modarin256root.ini index ef3696526..f760f1146 100644 --- a/misc/skins/modarin256root.ini +++ b/misc/skins/modarin256root.ini @@ -182,3 +182,7 @@ last-horiz-char = » current-char = ■ background-char = ▒ + +[widget-editor] + window-state-char = * + window-close-char = X diff --git a/misc/skins/nicedark.ini b/misc/skins/nicedark.ini index a40e561b1..e30df8636 100644 --- a/misc/skins/nicedark.ini +++ b/misc/skins/nicedark.ini @@ -111,8 +111,6 @@ editframe = gray; editframeactive = lightgray; editframedrag = brightblue; - window-state-char = ↕ - window-close-char = ✕ [viewer] _default_ = lightgray;black @@ -141,3 +139,6 @@ filename-scroll-left-char = « filename-scroll-right-char = » +[widget-editor] + window-state-char = ↕ + window-close-char = ✕ diff --git a/misc/skins/sand256.ini b/misc/skins/sand256.ini index 83af5d1b9..1a4e5f586 100644 --- a/misc/skins/sand256.ini +++ b/misc/skins/sand256.ini @@ -168,8 +168,6 @@ editframe = rgb530; editframeactive = black; editframedrag = rgb400; - window-state-char = ↕ - window-close-char = ✕ [viewer] _default_ = black;rgb554 @@ -207,3 +205,6 @@ current-char = ■ background-char = ▒ +[widget-editor] + window-state-char = ↕ + window-close-char = ✕ diff --git a/misc/skins/xoria256.ini b/misc/skins/xoria256.ini index 9a41a39c1..f1192d8c1 100644 --- a/misc/skins/xoria256.ini +++ b/misc/skins/xoria256.ini @@ -153,8 +153,6 @@ editframe = color244; editframeactive = color250; editframedrag = color73; - window-state-char = ↕ - window-close-char = ✕ [viewer] _default_ = color250;color234 @@ -191,3 +189,6 @@ current-char = ■ background-char = ▒ +[widget-editor] + window-state-char = ↕ + window-close-char = ✕ diff --git a/src/editor/editwidget.c b/src/editor/editwidget.c index 7745ceb2a..a9fa6e48b 100644 --- a/src/editor/editwidget.c +++ b/src/editor/editwidget.c @@ -97,8 +97,8 @@ edit_dlg_init (void) { if (edit_dlg_init_refcounter == 0) { - edit_window_state_char = mc_skin_get ("editor", "window-state-char", "*"); - edit_window_close_char = mc_skin_get ("editor", "window-close-char", "X"); + edit_window_state_char = mc_skin_get ("widget-editor", "window-state-char", "*"); + edit_window_close_char = mc_skin_get ("widget-editor", "window-close-char", "X"); #ifdef HAVE_ASPELL aspell_init ();