[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 From: AIDA Shinra <aida-s@jcom.home.ne.jp>
This commit is contained in:
@@ -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>
|
2002-11-12 Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
|
||||||
|
|
||||||
* [w3m-dev 03407] char GlobalKeymap -> unsigned char GlobalKeymap
|
* [w3m-dev 03407] char GlobalKeymap -> unsigned char GlobalKeymap
|
||||||
@@ -4516,4 +4536,4 @@ a * [w3m-dev 03276] compile error on EWS4800
|
|||||||
* release-0-2-1
|
* release-0-2-1
|
||||||
* import w3m-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 $
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
w3m 0.3.3 or 0.4?
|
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/)
|
* separate auxbindir and libdir (local-CGI, file:///$LIB/)
|
||||||
* configure: -auxbindir
|
* configure: -auxbindir
|
||||||
* rc: disable_secret_security_check (for windows?)
|
* rc: disable_secret_security_check (for windows?)
|
||||||
|
|||||||
@@ -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
|
* w3m: WWW wo Miru utility
|
||||||
*
|
*
|
||||||
@@ -964,6 +964,9 @@ global int rc_dir_is_tmp init(FALSE);
|
|||||||
global int use_mouse init(TRUE);
|
global int use_mouse init(TRUE);
|
||||||
extern int mouseActive;
|
extern int mouseActive;
|
||||||
global int reverse_mouse init(FALSE);
|
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 */
|
#endif /* USE_MOUSE */
|
||||||
|
|
||||||
#ifdef USE_COOKIE
|
#ifdef USE_COOKIE
|
||||||
|
|||||||
@@ -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
|
#define MAINPROGRAM
|
||||||
#include "fm.h"
|
#include "fm.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@@ -4656,6 +4656,15 @@ stopI(void)
|
|||||||
|
|
||||||
#ifdef USE_MOUSE
|
#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 *
|
static TabBuffer *
|
||||||
posTab(int x, int y)
|
posTab(int x, int y)
|
||||||
{
|
{
|
||||||
@@ -4814,21 +4823,21 @@ process_mouse(int btn, int x, int y)
|
|||||||
#endif /* USE_MENU */
|
#endif /* USE_MENU */
|
||||||
break;
|
break;
|
||||||
case MOUSE_BTN4_DOWN_RXVT:
|
case MOUSE_BTN4_DOWN_RXVT:
|
||||||
for (i = 0; i < MOUSE_SCROLL_LINE; i++)
|
for (i = 0; i < mouse_scroll_line(); i++)
|
||||||
ldown1();
|
ldown1();
|
||||||
break;
|
break;
|
||||||
case MOUSE_BTN5_DOWN_RXVT:
|
case MOUSE_BTN5_DOWN_RXVT:
|
||||||
for (i = 0; i < MOUSE_SCROLL_LINE; i++)
|
for (i = 0; i < mouse_scroll_line(); i++)
|
||||||
lup1();
|
lup1();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (btn == MOUSE_BTN4_DOWN_XTERM) {
|
else if (btn == MOUSE_BTN4_DOWN_XTERM) {
|
||||||
for (i = 0; i < MOUSE_SCROLL_LINE; i++)
|
for (i = 0; i < mouse_scroll_line(); i++)
|
||||||
ldown1();
|
ldown1();
|
||||||
}
|
}
|
||||||
else if (btn == MOUSE_BTN5_DOWN_XTERM) {
|
else if (btn == MOUSE_BTN5_DOWN_XTERM) {
|
||||||
for (i = 0; i < MOUSE_SCROLL_LINE; i++)
|
for (i = 0; i < mouse_scroll_line(); i++)
|
||||||
lup1();
|
lup1();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
* w3m menu.c
|
||||||
*/
|
*/
|
||||||
@@ -1085,7 +1085,6 @@ mSrchP(char c)
|
|||||||
#define MOUSE_BTN5_DOWN_XTERM 65
|
#define MOUSE_BTN5_DOWN_XTERM 65
|
||||||
#define MOUSE_BTN_UP 3
|
#define MOUSE_BTN_UP 3
|
||||||
#define MOUSE_BTN_RESET -1
|
#define MOUSE_BTN_RESET -1
|
||||||
#define MOUSE_SCROLL_LINE 5
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
process_mMouse(int btn, int x, int y)
|
process_mMouse(int btn, int x, int y)
|
||||||
|
|||||||
@@ -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.
|
* Initialization file etc.
|
||||||
*/
|
*/
|
||||||
@@ -164,6 +164,9 @@ static char *config_file = NULL;
|
|||||||
#ifdef USE_MOUSE
|
#ifdef USE_MOUSE
|
||||||
#define CMT_MOUSE "マウスを使う"
|
#define CMT_MOUSE "マウスを使う"
|
||||||
#define CMT_REVERSE_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 */
|
#endif /* USE_MOUSE */
|
||||||
#define CMT_CLEAR_BUF "表示されていないバッファのメモリを開放する"
|
#define CMT_CLEAR_BUF "表示されていないバッファのメモリを開放する"
|
||||||
#define CMT_NOSENDREFERER "Referer: を送らないようにする"
|
#define CMT_NOSENDREFERER "Referer: を送らないようにする"
|
||||||
@@ -310,6 +313,9 @@ static char *config_file = NULL;
|
|||||||
#ifdef USE_MOUSE
|
#ifdef USE_MOUSE
|
||||||
#define CMT_MOUSE "Enable mouse"
|
#define CMT_MOUSE "Enable mouse"
|
||||||
#define CMT_REVERSE_MOUSE "Scroll in reverse direction of mouse drag"
|
#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 */
|
#endif /* USE_MOUSE */
|
||||||
#define CMT_CLEAR_BUF "Free memory of undisplayed buffers"
|
#define CMT_CLEAR_BUF "Free memory of undisplayed buffers"
|
||||||
#define CMT_NOSENDREFERER "Suppress `Referer:' header"
|
#define CMT_NOSENDREFERER "Suppress `Referer:' header"
|
||||||
@@ -433,6 +439,21 @@ static struct sel_c defaulturls[] = {
|
|||||||
#endif
|
#endif
|
||||||
{0, NULL, NULL}
|
{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
|
#ifdef INET6
|
||||||
static struct sel_c dnsorders[] = {
|
static struct sel_c dnsorders[] = {
|
||||||
{N_S(DNS_ORDER_UNSPEC), "unspecified"},
|
{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},
|
{"use_mouse", P_INT, PI_ONOFF, (void *)&use_mouse, CMT_MOUSE, NULL},
|
||||||
{"reverse_mouse", P_INT, PI_ONOFF, (void *)&reverse_mouse,
|
{"reverse_mouse", P_INT, PI_ONOFF, (void *)&reverse_mouse,
|
||||||
CMT_REVERSE_MOUSE, NULL},
|
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 */
|
#endif /* USE_MOUSE */
|
||||||
{"clear_buffer", P_INT, PI_ONOFF, (void *)&clear_buffer, CMT_CLEAR_BUF,
|
{"clear_buffer", P_INT, PI_ONOFF, (void *)&clear_buffer, CMT_CLEAR_BUF,
|
||||||
NULL},
|
NULL},
|
||||||
|
|||||||
@@ -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
|
#ifndef TERMS_H
|
||||||
#define TERMS_H
|
#define TERMS_H
|
||||||
|
|
||||||
@@ -37,7 +37,6 @@ extern int LINES, COLS;
|
|||||||
#define MOUSE_BTN5_DOWN_XTERM 65
|
#define MOUSE_BTN5_DOWN_XTERM 65
|
||||||
#define MOUSE_BTN_UP 3
|
#define MOUSE_BTN_UP 3
|
||||||
#define MOUSE_BTN_RESET -1
|
#define MOUSE_BTN_RESET -1
|
||||||
#define MOUSE_SCROLL_LINE 5
|
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
#ifdef __CYGWIN__
|
||||||
extern int is_xterm;
|
extern int is_xterm;
|
||||||
|
|||||||
Reference in New Issue
Block a user