1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-29 08:17:18 -04:00
elinks/src/scripting/python
M. Levinson 26473f72f5 Python: Give goto_url_hook only one argument, like follow_url_hook.
On Dec 31, 2006, at 11:30am, Kalle Olavi Niemitalo writes:
>src/scripting/python/hooks.c (script_hook_url) calls hooks as
>goto_url_hook(new-url, current-url) and follow_url_hook(new-url).
>It has a comment saying that the current-url parameter exists
>only for compatibility and that the script can instead use
>elinks.current_url().  However, the current-url parameter was
>added in commit 87e27b9b3e and is
>not in ELinks 0.11.2, so any compatibility problems would only
>hit people who have been using 0.12.GIT snapshots.  Can we remove
>the second parameter now before releasing ELinks 0.12pre1?

The decision isn't up to me, but I think this is a good idea. Here's a
patch that would update the documentation and hooks.py, as well as hooks.c.

FYI, if this patch is applied then anyone who's still trying to use a
goto_url_hook that expects a second argument will get a "Browser scripting
error" dialog box that says:

	An error occurred while running a Python script:

	TypeError: goto_url_hook() takes exactly 2 arguments (1 given)
2007-01-01 17:45:36 +02:00
..
core.c Python: Don't complain if hooks.py does not exist. 2006-12-17 16:10:55 +02:00
core.h Additional functionality for Python backend. 2006-10-19 15:21:39 +02:00
dialogs.c Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
dialogs.h Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
document.c Use document->cached in the Python scripting backend 2006-12-30 11:20:30 +00:00
document.h Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
hooks.c Python: Give goto_url_hook only one argument, like follow_url_hook. 2007-01-01 17:45:36 +02:00
hooks.h Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
keybinding.c Reset PyObject pointers to NULL when deinitializing. 2006-12-13 18:33:54 +02:00
keybinding.h Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
load.c Another fix for Python backend. 2006-10-22 18:45:45 +02:00
load.h Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
Makefile Additional functionality for Python backend. 2006-10-19 15:21:39 +02:00
menu.c Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
menu.h Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
open.c Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
open.h Oh, sorry. I forgot about these. 2006-10-19 16:20:26 +02:00
python.c Additional functionality for Python backend. 2006-10-19 15:21:39 +02:00
python.h Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00