aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--ChangeLog22
-rw-r--r--NEWS3
-rw-r--r--fm.h5
-rw-r--r--main.c19
-rw-r--r--menu.c3
-rw-r--r--rc.c29
-rw-r--r--terms.h3
7 files changed, 72 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f83cb2d..46d8935 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2002-11-12 AIDA Shinra <aida-s@jcom.home.ne.jp>
+
+ * [w3m-dev 03408] fix Bug#87472
+ MOUSE_SCROLL_LINE should be a run-time option
+ * fm.h (relative_wheel_scroll): added
+ (fixed_wheel_scroll_count): added
+ (relative_wheel_scroll_ratio): added
+ * main.c (mouse_scroll_line): added
+ (process_mouse): s/MOUSE_SCROLL_LINE/mouse_scroll_line()/
+ * menu.c (MOUSE_SCROLL_LINE): deleted
+ * terms.h (MOUSE_SCROLL_LINE): deleted
+ * rc.c (CMT_RELATIVE_WHEEL_SCROLL): added
+ (CMT_RELATIVE_WHEEL_SCROLL_RATIO): added
+ (CMT_FIXED_WHEEL_SCROLL_COUNT): added
+ (wheelmode): added
+ (params3): add relative_wheel_scroll,
+ relative_wheel_scroll_ratio,
+ fixed_wheel_scroll_count
+ * NEWS: updated
+
2002-11-12 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
* [w3m-dev 03407] char GlobalKeymap -> unsigned char GlobalKeymap
@@ -4516,4 +4536,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.496 2002/11/11 15:22:37 ukai Exp $
+$Id: ChangeLog,v 1.497 2002/11/11 15:33:28 ukai Exp $
diff --git a/NEWS b/NEWS
index 8bc2c03..fec0d88 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
w3m 0.3.3 or 0.4?
+* rc: relative_wheel_scroll
+* rc: relative_wheel_scroll_ratio
+* rc: fixed_wheel_scroll_count
* separate auxbindir and libdir (local-CGI, file:///$LIB/)
* configure: -auxbindir
* rc: disable_secret_security_check (for windows?)
diff --git a/fm.h b/fm.h
index cf70343..305a632 100644
--- a/fm.h
+++ b/fm.h
@@ -1,4 +1,4 @@
-/* $Id: fm.h,v 1.74 2002/11/11 15:22:39 ukai Exp $ */
+/* $Id: fm.h,v 1.75 2002/11/11 15:33:35 ukai Exp $ */
/*
* w3m: WWW wo Miru utility
*
@@ -964,6 +964,9 @@ global int rc_dir_is_tmp init(FALSE);
global int use_mouse init(TRUE);
extern int mouseActive;
global int reverse_mouse init(FALSE);
+global int relative_wheel_scroll init(FALSE);
+global int fixed_wheel_scroll_count init(5);
+global int relative_wheel_scroll_ratio init(30);
#endif /* USE_MOUSE */
#ifdef USE_COOKIE
diff --git a/main.c b/main.c
index 1bff1a8..e63ccba 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.126 2002/11/11 15:16:38 ukai Exp $ */
+/* $Id: main.c,v 1.127 2002/11/11 15:33:36 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -4656,6 +4656,15 @@ stopI(void)
#ifdef USE_MOUSE
+static int
+mouse_scroll_line(void)
+{
+ if (relative_wheel_scroll)
+ return (relative_wheel_scroll_ratio * LASTLINE + 99) / 100;
+ else
+ return fixed_wheel_scroll_count;
+}
+
static TabBuffer *
posTab(int x, int y)
{
@@ -4814,21 +4823,21 @@ process_mouse(int btn, int x, int y)
#endif /* USE_MENU */
break;
case MOUSE_BTN4_DOWN_RXVT:
- for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+ for (i = 0; i < mouse_scroll_line(); i++)
ldown1();
break;
case MOUSE_BTN5_DOWN_RXVT:
- for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+ for (i = 0; i < mouse_scroll_line(); i++)
lup1();
break;
}
}
else if (btn == MOUSE_BTN4_DOWN_XTERM) {
- for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+ for (i = 0; i < mouse_scroll_line(); i++)
ldown1();
}
else if (btn == MOUSE_BTN5_DOWN_XTERM) {
- for (i = 0; i < MOUSE_SCROLL_LINE; i++)
+ for (i = 0; i < mouse_scroll_line(); i++)
lup1();
}
diff --git a/menu.c b/menu.c
index b3c3a97..fb1c414 100644
--- a/menu.c
+++ b/menu.c
@@ -1,4 +1,4 @@
-/* $Id: menu.c,v 1.16 2002/11/05 17:10:07 ukai Exp $ */
+/* $Id: menu.c,v 1.17 2002/11/11 15:33:38 ukai Exp $ */
/*
* w3m menu.c
*/
@@ -1085,7 +1085,6 @@ mSrchP(char c)
#define MOUSE_BTN5_DOWN_XTERM 65
#define MOUSE_BTN_UP 3
#define MOUSE_BTN_RESET -1
-#define MOUSE_SCROLL_LINE 5
static int
process_mMouse(int btn, int x, int y)
diff --git a/rc.c b/rc.c
index 4cc0444..cee4643 100644
--- a/rc.c
+++ b/rc.c
@@ -1,4 +1,4 @@
-/* $Id: rc.c,v 1.60 2002/11/09 21:55:24 ukai Exp $ */
+/* $Id: rc.c,v 1.61 2002/11/11 15:33:39 ukai Exp $ */
/*
* Initialization file etc.
*/
@@ -164,6 +164,9 @@ static char *config_file = NULL;
#ifdef USE_MOUSE
#define CMT_MOUSE "マウスを使う"
#define CMT_REVERSE_MOUSE "マウスのドラッグ動作を逆にする"
+#define CMT_RELATIVE_WHEEL_SCROLL "ホイールでのスクロール速度の扱い"
+#define CMT_RELATIVE_WHEEL_SCROLL_RATIO "(Aのみ)画面の何%スクロールするか"
+#define CMT_FIXED_WHEEL_SCROLL_COUNT "(Bのみ)スクロールする行数"
#endif /* USE_MOUSE */
#define CMT_CLEAR_BUF "表示されていないバッファのメモリを開放する"
#define CMT_NOSENDREFERER "Referer: を送らないようにする"
@@ -310,6 +313,9 @@ static char *config_file = NULL;
#ifdef USE_MOUSE
#define CMT_MOUSE "Enable mouse"
#define CMT_REVERSE_MOUSE "Scroll in reverse direction of mouse drag"
+#define CMT_RELATIVE_WHEEL_SCROLL "Behavior of wheel scroll speed"
+#define CMT_RELATIVE_WHEEL_SCROLL_RATIO "(A only)Scroll by # % of screen"
+#define CMT_FIXED_WHEEL_SCROLL_COUNT "(B only)Scroll by # lines"
#endif /* USE_MOUSE */
#define CMT_CLEAR_BUF "Free memory of undisplayed buffers"
#define CMT_NOSENDREFERER "Suppress `Referer:' header"
@@ -433,6 +439,21 @@ static struct sel_c defaulturls[] = {
#endif
{0, NULL, NULL}
};
+#ifdef USE_MOUSE
+static struct sel_c wheelmode[] =
+{
+#if LANG == JA
+ {TRUE, "1", "A:画面サイズに比例"},
+ {FALSE, "0", "B:一定の行数"},
+ {0, NULL, NULL}
+#else /* LANG != JA */
+ {TRUE, "1", "A:relative to screen height"},
+ {FALSE, "0", "B:fixed speed"},
+ {0, NULL, NULL}
+#endif /* LANG != JA */
+};
+#endif /* MOUSE */
+
#ifdef INET6
static struct sel_c dnsorders[] = {
{N_S(DNS_ORDER_UNSPEC), "unspecified"},
@@ -589,6 +610,12 @@ struct param_ptr params3[] = {
{"use_mouse", P_INT, PI_ONOFF, (void *)&use_mouse, CMT_MOUSE, NULL},
{"reverse_mouse", P_INT, PI_ONOFF, (void *)&reverse_mouse,
CMT_REVERSE_MOUSE, NULL},
+ {"relative_wheel_scroll", P_INT, PI_SEL_C, (void *) &relative_wheel_scroll,
+ CMT_RELATIVE_WHEEL_SCROLL, wheelmode},
+ {"relative_wheel_scroll_ratio", P_INT, PI_TEXT, (void *) &relative_wheel_scroll_ratio,
+ CMT_RELATIVE_WHEEL_SCROLL_RATIO, NULL},
+ {"fixed_wheel_scroll_count", P_INT, PI_TEXT, (void *) &fixed_wheel_scroll_count,
+ CMT_FIXED_WHEEL_SCROLL_COUNT, NULL},
#endif /* USE_MOUSE */
{"clear_buffer", P_INT, PI_ONOFF, (void *)&clear_buffer, CMT_CLEAR_BUF,
NULL},
diff --git a/terms.h b/terms.h
index ca7bce7..05ebc39 100644
--- a/terms.h
+++ b/terms.h
@@ -1,4 +1,4 @@
-/* $Id: terms.h,v 1.5 2001/12/12 17:04:21 ukai Exp $ */
+/* $Id: terms.h,v 1.6 2002/11/11 15:33:40 ukai Exp $ */
#ifndef TERMS_H
#define TERMS_H
@@ -37,7 +37,6 @@ extern int LINES, COLS;
#define MOUSE_BTN5_DOWN_XTERM 65
#define MOUSE_BTN_UP 3
#define MOUSE_BTN_RESET -1
-#define MOUSE_SCROLL_LINE 5
#ifdef __CYGWIN__
extern int is_xterm;