aboutsummaryrefslogtreecommitdiffstats
path: root/rc.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2021-02-06 04:07:40 +0000
committerGitHub <noreply@github.com>2021-02-06 04:07:40 +0000
commite66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e (patch)
tree759d7d3bd2023845ab491d0f1810c8f278c6b150 /rc.c
parentUpdate ChangeLog (diff)
parentClarify inline image setting's wording (diff)
downloadw3m-e66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e.tar.gz
w3m-e66ca9fa4ee8eb9e9370bba0bfa4d2084a300a3e.zip
Merge pull request #161 from bptato/master
Improved inline image protocol support
Diffstat (limited to 'rc.c')
-rw-r--r--rc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/rc.c b/rc.c
index 423e008..a265fdc 100644
--- a/rc.c
+++ b/rc.c
@@ -86,6 +86,7 @@ static int OptionEncode = FALSE;
#define CMT_IMAGE_SCALE N_("Scale of image (%)")
#define CMT_IMGDISPLAY N_("External command to display image")
#define CMT_IMAGE_MAP_LIST N_("Use link list of image map")
+#define CMT_INLINE_IMG_PROTOCOL N_("Inline image display method")
#endif
#define CMT_MULTICOL N_("Display file names in multi-column format")
#define CMT_ALT_ENTITY N_("Use ASCII equivalents to display entities")
@@ -363,6 +364,16 @@ static struct sel_c graphic_char_str[] = {
{0, NULL, NULL}
};
+#ifdef USE_IMAGE
+static struct sel_c inlineimgstr[] = {
+ {N_S(INLINE_IMG_NONE), N_("external command")},
+ {N_S(INLINE_IMG_OSC5379), N_("mlterm")},
+ {N_S(INLINE_IMG_SIXEL), N_("sixel")},
+ {N_S(INLINE_IMG_ITERM2), N_("iterm2")},
+ {0, NULL, NULL}
+};
+#endif /* USE_IMAGE */
+
struct param_ptr params1[] = {
{"tabstop", P_NZINT, PI_TEXT, (void *)&Tabstop, CMT_TABSTOP, NULL},
{"indent_incr", P_NZINT, PI_TEXT, (void *)&IndentIncr, CMT_INDENT_INCR,
@@ -424,6 +435,8 @@ struct param_ptr params1[] = {
CMT_EXT_IMAGE_VIEWER, NULL},
{"image_scale", P_SCALE, PI_TEXT, (void *)&image_scale, CMT_IMAGE_SCALE,
NULL},
+ {"inline_img_protocol", P_INT, PI_SEL_C, (void *)&enable_inline_image,
+ CMT_INLINE_IMG_PROTOCOL, (void *)inlineimgstr},
{"imgdisplay", P_STRING, PI_TEXT, (void *)&Imgdisplay, CMT_IMGDISPLAY,
NULL},
{"image_map_list", P_INT, PI_ONOFF, (void *)&image_map_list,
@@ -1223,7 +1236,7 @@ sync_with_option(void)
init_migemo();
#endif
#ifdef USE_IMAGE
- if (fmInitialized && displayImage)
+ if (fmInitialized && (displayImage || enable_inline_image))
initImage();
#else
displayImage = FALSE; /* XXX */