From a54e7ce62f4e1669070a1399960a012fc2e0d5d6 Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Sat, 5 Jan 2002 16:13:27 +0000 Subject: [w3m-dev 02781] Re: Bug#127883: w3m tries to use xv as default From: Fumitoshi UKAI --- ChangeLog | 13 ++++++++++++- config.h.dist | 4 ++++ configure | 11 ++++++++++- mailcap.c | 6 +++--- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3b10fe..bbf7dca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-01-06 Fumitoshi UKAI + + * [w3m-dev 02781] Re: Bug#127883: w3m tries to use xv as default + * config.h.dist (DEF_IMAGE_VIEWER): added + * config.h.dist (DEF_AUDIO_PLAYER): added + * configure (def_image_viewer): added + * configure (def_audio_player): added + * configure (DEF_IMAGE_VIEWER): added + * configure (DEF_AUDIO_PLAYER): added + * mailcap.c (DefaultMailcap): use DEF_IMAGE_VIEWER, DEF_AUDIO_PLAYER + 2002-01-05 Hironori Sakamoto * [w3m-dev 02779] `;' is valid in URL @@ -1760,4 +1771,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.197 2002/01/04 19:14:35 ukai Exp $ +$Id: ChangeLog,v 1.198 2002/01/05 16:13:27 ukai Exp $ diff --git a/config.h.dist b/config.h.dist index f539069..a55d00f 100644 --- a/config.h.dist +++ b/config.h.dist @@ -124,6 +124,10 @@ MODEL=Linux.i686-monster-ja #define DEF_MAILER "/bin/mail" #define DEF_EXT_BROWSER "/usr/bin/netscape" +/* fallback viewer. mailcap override these configuration */ +#define DEF_IMAGE_VIEWER "xv" +#define DEF_AUDIO_PLAYER "showaudio" + #define LIB_DIR "/usr/local/lib/w3m" #define HELP_DIR "/usr/local/lib/w3m" #define ETC_DIR "/usr/local/etc/w3m" diff --git a/configure b/configure index 3fb9e46..0106625 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: configure,v 1.46 2001/12/22 10:02:04 ukai Exp $ +# $Id: configure,v 1.47 2002/01/05 16:13:27 ukai Exp $ # Configuration. # @@ -770,6 +770,11 @@ readdir "$dbrowser" brz=$_dir echo "dbrowser='$brz'" >> config.param +def_image_viewer=${def_image_viewer-xv} +echo "def_image_viewer='$def_image_viewer'" >> config.param +def_audio_player=${def_audio_player-showaudio} +echo "def_audio_player='$def_audio_player'" >> config.param + if [ -z "$dcc" ]; then if [ -n "$CC" ]; then dcc="$CC" @@ -2048,6 +2053,10 @@ $def_use_help_cgi #define DEF_MAILER "$mailer" #define DEF_EXT_BROWSER "$brz" +/* fallback viewer. mailcap override these configuration */ +#define DEF_IMAGE_VIEWER "$def_image_viewer" +#define DEF_AUDIO_PLAYER "$def_audio_player" + #define LIB_DIR "$libdir" #define HELP_DIR "$helpdir" #define ETC_DIR "$sysconfdir" diff --git a/mailcap.c b/mailcap.c index 8c7b07c..e4ff7a3 100644 --- a/mailcap.c +++ b/mailcap.c @@ -1,4 +1,4 @@ -/* $Id: mailcap.c,v 1.9 2001/11/30 10:00:06 ukai Exp $ */ +/* $Id: mailcap.c,v 1.10 2002/01/05 16:13:27 ukai Exp $ */ #include "fm.h" #include "myctype.h" #include @@ -7,8 +7,8 @@ #include "local.h" static struct mailcap DefaultMailcap[] = { - {"image/*", "xv %s", 0, NULL, NULL, NULL}, /* */ - {"audio/basic", "showaudio %s", 0, NULL, NULL, NULL}, + {"image/*", DEF_IMAGE_VIEWER " %s", 0, NULL, NULL, NULL}, /* */ + {"audio/basic", DEF_AUDIO_PLAYER " %s", 0, NULL, NULL, NULL}, {NULL, NULL, 0, NULL, NULL, NULL} }; -- cgit v1.2.3