[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev patch (was: keypad mode changes not fully effective (bug))
From: |
Leonid Pauzner |
Subject: |
lynx-dev patch (was: keypad mode changes not fully effective (bug)) |
Date: |
Fri, 23 Jul 1999 14:49:40 +0400 (MSD) |
17-Jul-99 14:14 Kim DeVaughn wrote:
> While checking keypad keys for proper functionality (as part of looking
> into the recent "arrow key problem" in dev.4), I stumbled back into a
> problem that has been around for quite awhile ... at least since I did
> the TEXTAREA external editing work.
> Seems that when I go from the "links and form fields are numbered" mode,
> to the "numbers act as arrows" mode (or vice versa), the numeric [tag]
> gets turned off (or on) when the "Accept Changes" submit button is acti-
> vated, BUT the function of the keypad keys themselves does not change,
> but continue to initiate a "follow/goto link number" operation (or going
> the other way, they continue to activate the HOME/END/arrow/etc functions).
> In order to have the keypad keys change their functionality, the o(ptions)
> need to be "saved to disk", AND lynx needs to be exited/restarted.
> This is using the new-style o(ption) page ... I dunno if the old-style
> o(ption) menu is working this way also.
This only affect forms options menu. Patch attached (just few lines).
IMHO, it should be added for 2.8.2rel1-fixes.
> Before I go digging, I'm wondering if other folks see this behavior, or
> if it might be config/platform dependent.
> Feedback ...?
> /kim
* When keypad_mode was changed from forms options menu
set_numbers_as_arrows()/reset_numbers_as_arrows() was not reinitialized
(reported by KED). - LP
* SOURCE_CACHE: add one more parse setting member (keypad_mode)
to HText structure -LP
diff -u old/lyoption.c ./lyoption.c
--- old/lyoption.c Wed Jul 14 09:25:26 1999
+++ ./lyoption.c Fri Jul 23 14:16:26 1999
@@ -3663,6 +3663,11 @@
&& keypad_mode != newval) {
keypad_mode = newval;
need_reload = TRUE;
+ if (keypad_mode == NUMBERS_AS_ARROWS) {
+ set_numbers_as_arrows();
+ } else {
+ reset_numbers_as_arrows();
+ }
}
}
diff -u old/gridtext.c ./gridtext.c
--- old/gridtext.c Wed Jul 14 09:25:26 1999
+++ ./gridtext.c Fri Jul 23 14:30:18 1999
@@ -210,6 +210,7 @@
BOOLEAN minimal_comments;
BOOLEAN soft_dquotes;
BOOLEAN old_dtd;
+ int keypad_mode;
int lines; /* Screen size */
int cols;
#endif
@@ -595,6 +596,7 @@
self->minimal_comments = minimal_comments;
self->soft_dquotes = soft_dquotes;
self->old_dtd = Old_DTD;
+ self->keypad_mode = keypad_mode;
self->lines = LYlines;
self->cols = LYcols;
#endif
@@ -6936,6 +6938,8 @@
trace_setting_change("SOFT_DQUOTES",
HTMainText->soft_dquotes, soft_dquotes);
trace_setting_change("OLD_DTD", HTMainText->old_dtd, Old_DTD);
+ trace_setting_change("KEYPAD_MODE",
+ HTMainText->keypad_mode, keypad_mode);
if (HTMainText->lines != LYlines || HTMainText->cols != LYcols)
CTRACE(tfp,
"HTdocument_settings_changed: Screen size has changed (was
%dx%d, now %dx%d)\n",
@@ -6950,6 +6954,7 @@
HTMainText->minimal_comments != minimal_comments ||
HTMainText->soft_dquotes != soft_dquotes ||
HTMainText->old_dtd != Old_DTD ||
+ HTMainText->keypad_mode != keypad_mode ||
HTMainText->lines != LYlines ||
HTMainText->cols != LYcols);
}