Revert 8bedf25bf8. Different versions
of ELinks call the Python goto_url_hook with different arguments:
- goto_url_hook(current) in 0.11.0, 0.11.1, and 0.11.2.
- goto_url_hook(new, current) in 0.11.2.GIT since 2007-11-27, commit
8bedf25bf8 which I'm now reverting.
No released version of ELinks has used this variant.
- goto_url_hook(new) in 0.12.GIT since 2007-01-01, commit
26473f72f5. The hook can call
elinks.current_url() if desired.
I think it will be less confusing to users if we drop the middle
variant and make the rest of the stable 0.11 branch call the hook in
the same way as 0.11.2 did. The difference will then be only between
the 0.11 and 0.12 branches.
These parts of contrib/python/README.Python are not accurate for
ELinks 0.11.2.GIT:
- It suggests using --with-python=/usr/local, but configure.in treats
that as equivalent to --without-python and contains a comment:
# FIXME: If withval is a valid directory append it to PATH
# so that you can specify one of several Python installations.
- It suggests creating a libpython.so symbolic link, but as of commit
421d04093a, the configure script no
longer tries to link with a bare -lpython but rather always appends
a version number.
Before this patch, init_python would crash trying to set up the
PYTHONPATH environment variable. Now it omits the home directory
from the variable in that case.
[ Related to commit 78bd416dc0 in ELinks
0.12.GIT but quite different internally. --KON ]
Create and immediately destroy a context when initialising the SMJS
document scripting module, because SMJS crashes on exit if there has
been no context created since it started, which is the case if one does
not load any documents.
[ From commit d7a964efaf in ELinks
0.12.GIT. --KON ]
Only call get_parent_ptr for resize events so that the menu isn't moved
to the cursor position for normal redraw events.
Without this change, if ui.leds.enable and ui.clock.enable are 1 and
the user opens the tab menu, it first appears near the tab bar and
almost immediately jumps near the cursor. With this change, the tab
menu stays near the tab bar. However, if the user presses Ctrl+L,
then the menu still jumps; but that is less annoying than having it
jump on its own.
[ From commit 1a89589b13 in ELinks
0.12.GIT. --KON ]
[ From commit 315f4e0342 in ELinks
0.12.GIT. This commit adds a string that perhaps won't be
translated in time for the 0.11.3 release, but I think it is
better to display a correct description in the wrong language
than a misleading description in the right language. --KON ]
Normally, the success msgbox is shown only if the ui.success_msgbox
option is set as 1, and clicking "Do not show anymore" would then
toggle the option to 0, and no more such msgboxes would appear.
However, if there already are two success msgboxes being displayed
(most likely in different terminals), then clicking "Do not show
anymore" in the first of them would reset the option to 0, but doing
the same in the second of them would toggle the option back to 1.
Rename toggle_success_msgbox to disable_success_msgbox, and make it
always reset the option to 0, regardless of the previous value.
[ From commit 7185e926e6 in ELinks
0.12.GIT. This I think does not deserve a NEWS entry. --KON ]
It will grab at the first fragment of the cache entry and try to detect the
content-type by looking for valid HTML. It is very stupid for now, simply
searching for "<html>", which may be bogus in certain circumstances. And I
am not sure if this is better left out and up to the scripting backends,
e.g. SMJS can now modify the cache entry.
A feable fix for bug 396.
[ From commit 3ea73da7df in ELinks
0.12.GIT. --KON ]
Delete the FREE_LIST flag from mi_no_ext so that free_menu_items doesn't
try to free static memory.
This fixes a crash reproducible by deleting every entry under Setup -> File
extensions, opening said menu, and then closing said menu.
[ From commit b41c7d4055 in ELinks
0.12.GIT. --KON ]
Simplify do_move_bookmarks (from a readability perspective) by replacing
the destb and desti parameters with a new insert_as_child flag. Inspired
by Kalle Olavi Niemitalo.
[ Backported from commit 32ec5d1db3 in
ELinks 0.12.GIT. This change is not required for fixing bug 760, but
the bookmark code in ELinks 0.12.GIT has been tested more with the
change than without it, so I think applying it is safest. --KON ]
do_move_bookmark was only updating the selection in the bookmarks manager
window in which the Move button was pressed. Now all windows are updated.
This patch also prevents a crash when the first item that was displayed
in a box was the last child of a folder and was being moved (the comment
removed in this patch was incorrect in assuming that bm->box->next must
be valid because it neglected to account for non-root children).
This change required that I move the definition of struct
hierbox_dialog_list_item from src/bfu/hierbox.c to src/bfu/hierbox.h.
Thanks to Kalle Olavi Niemitalo for finding both the update problem
and the crash.
[ Backported from commit 6f98f5fd96 in
ELinks 0.12.GIT. --KON ]
When tables were rendered first time html_format_part was called with
document==NULL. <meta http-equiv=Refresh.../> was inside a table,
so document was NULL. Second time the table knew its dimensions
and document was not NULL.
[ From commit e01785e462 in ELinks
0.12.GIT. --KON ]
src/bfu/menu.c (scroll_menu): Let neither menu->selected nor pos
become -2.
src/bfu/menu.c (menu_mouse_handler): Call set_menu_selection directly
rather than via scroll_menu, as sel is already known to be selectable.
(Not required for fixing the bug.)
src/bfu/menu.c (menu_search_handler): Break infinite loops also if
menu->selected is -1 initially.
src/bfu/menu.c (menu_handler): Instead of tweaking menu->selected
directly, let scroll_menu do it.
[ From commit 0a8633d07e in ELinks
0.12.GIT. --KON ]
The bug was that menu_search_handler gave scroll_menu an incorrect
count because it didn't know that scroll_menu skips unselectable
items.
[ From commit 9fa5ae374f in ELinks
0.12.GIT. --KON ]
Old versions of add_string_to_string returned the target string
unmodified if from->source pointed to a null character, which usually
meant that the source string was empty. That was changed in commit
5e18576391f75ad84e04f9c8a30b93d08f0b92ab on 2004-11-03 so that
add_string_to_string instead returned NULL in that situation. The
change seems to have been inadvertent.
I'm now reverting that change and also making add_string_to_string
check the emptiness of the source string based on the stored length
only, rather than on any null characters. So the function can now
also be used with non-C strings containing embedded null characters.
Note that the previous version did not completely prevent embedded
null characters either, because it checked only the first character.
[ From commit 4a23d7fd82 in ELinks
0.12.GIT. --KON ]