mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-08-02 07:27:49 +00:00
mc: use ticket 4200 patch for disabled widechar in ncurses
See https://midnight-commander.org/ticket/4200 Define NCURSES_WIDECHAR=0 ourself because of ncurses not installing its configuraton
This commit is contained in:
parent
b0b5a0c3e6
commit
92add05a48
@ -38,6 +38,7 @@ PKG_CONFIGURE_OPTS_TARGET=" \
|
|||||||
|
|
||||||
pre_configure_target() {
|
pre_configure_target() {
|
||||||
LDFLAGS+=" -lcrypto -lssl"
|
LDFLAGS+=" -lcrypto -lssl"
|
||||||
|
CFLAGS+=' -DNCURSES_WIDECHAR=0'
|
||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
|
@ -0,0 +1,71 @@
|
|||||||
|
See https://midnight-commander.org/ticket/4200
|
||||||
|
|
||||||
|
diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
|
||||||
|
index 5cddf5059..2c117ef4b 100644
|
||||||
|
--- a/lib/tty/tty-ncurses.c
|
||||||
|
+++ b/lib/tty/tty-ncurses.c
|
||||||
|
@@ -560,6 +560,7 @@ tty_fill_region (int y, int x, int rows, int cols, unsigned char ch)
|
||||||
|
void
|
||||||
|
tty_colorize_area (int y, int x, int rows, int cols, int color)
|
||||||
|
{
|
||||||
|
+#ifdef ENABLE_SHADOWS
|
||||||
|
cchar_t *ctext;
|
||||||
|
wchar_t wch[10]; /* TODO not sure if the length is correct */
|
||||||
|
attr_t attrs;
|
||||||
|
@@ -585,6 +586,13 @@ tty_colorize_area (int y, int x, int rows, int cols, int color)
|
||||||
|
}
|
||||||
|
|
||||||
|
g_free (ctext);
|
||||||
|
+#else
|
||||||
|
+ (void) y;
|
||||||
|
+ (void) x;
|
||||||
|
+ (void) rows;
|
||||||
|
+ (void) cols;
|
||||||
|
+ (void) color;
|
||||||
|
+#endif /* ENABLE_SHADOWS */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
diff --git a/lib/tty/tty-ncurses.h b/lib/tty/tty-ncurses.h
|
||||||
|
index d75df9533..8feb17ccd 100644
|
||||||
|
--- a/lib/tty/tty-ncurses.h
|
||||||
|
+++ b/lib/tty/tty-ncurses.h
|
||||||
|
@@ -30,6 +30,11 @@
|
||||||
|
#define NCURSES_CONST const
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/* do not draw shadows if NCurses is built with --disable-widec */
|
||||||
|
+#if defined(NCURSES_WIDECHAR) && NCURSES_WIDECHAR
|
||||||
|
+#define ENABLE_SHADOWS 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*** typedefs(not structures) and defined constants **********************************************/
|
||||||
|
|
||||||
|
/*** enums ***************************************************************************************/
|
||||||
|
diff --git a/lib/tty/tty-slang.h b/lib/tty/tty-slang.h
|
||||||
|
index c36785ffc..15fd00a94 100644
|
||||||
|
--- a/lib/tty/tty-slang.h
|
||||||
|
+++ b/lib/tty/tty-slang.h
|
||||||
|
@@ -27,6 +27,8 @@
|
||||||
|
#define COLS SLtt_Screen_Cols
|
||||||
|
#define LINES SLtt_Screen_Rows
|
||||||
|
|
||||||
|
+#define ENABLE_SHADOWS 1
|
||||||
|
+
|
||||||
|
/*** enums ***************************************************************************************/
|
||||||
|
|
||||||
|
enum
|
||||||
|
diff --git a/src/filemanager/boxes.c b/src/filemanager/boxes.c
|
||||||
|
index ed16d04dd..4c1f5ba84 100644
|
||||||
|
--- a/src/filemanager/boxes.c
|
||||||
|
+++ b/src/filemanager/boxes.c
|
||||||
|
@@ -280,7 +280,9 @@ appearance_box_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm
|
||||||
|
switch (msg)
|
||||||
|
{
|
||||||
|
case MSG_INIT:
|
||||||
|
+#ifdef ENABLE_SHADOWS
|
||||||
|
if (!tty_use_colors ())
|
||||||
|
+#endif
|
||||||
|
{
|
||||||
|
Widget *shadow;
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user