1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00
Commit Graph

2057 Commits

Author SHA1 Message Date
Laurent MONIN
ef37161070 distribute_rows_or_cols(): merge two loops. 2006-06-06 23:10:29 +02:00
Laurent MONIN
824b4374fa distribute_rows_or_cols(): simplify code. 2006-06-06 23:09:19 +02:00
Jonas Fonseca
7a42d2f41d Clean out some unused variables 2006-06-06 16:33:16 +02:00
Jonas Fonseca
4433438f92 SMJS: Add execute method to the elinks object
It is similar to lua's execute and let's you run a command line in
'non-blocking' mode. Example:

	elinks.keymaps.main["F"] = function () {
		elinks.execute("firefox " + elinks.location);
	};
2006-06-06 16:30:24 +02:00
Jonas Fonseca
97f9b90e27 Fix a typo 2006-06-06 16:26:45 +02:00
Laurent MONIN
9eb8a7aea1 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-06-06 15:35:19 +02:00
Laurent MONIN
39265fea37 French translation was updated. 2006-06-06 15:25:59 +02:00
Jonas Fonseca
9f3456c872 Add support for parsing space separated CSS class attribute values
Sequentially apply style for stuff like class="class1 class2".
2006-06-06 15:21:56 +02:00
Miciah Dashiel Butler Masters
fde874ad35 Remove a useless comment
The comment was added in commit 0a44083e7b63cf51c7347a289c6d953cb7c15bcd.
2006-06-06 05:18:40 +00:00
Miciah Dashiel Butler Masters
819ea129af Bookmarks: Avoid a dangling pointer on malloc failure
In memorize_last_searched_bookmark, when malloc of bm_last_searched_url
fails, set bm_last_searched_title to NULL after freeing it.
2006-06-06 05:18:39 +00:00
Miciah Dashiel Butler Masters
9d6ec1ee59 Remove a superfluous check.
This thoroughly ridiculous check was added in commit
bfa309e192caf6f1dd1f1bc112490b2f3dad1ebb.
2006-06-06 05:18:39 +00:00
Miciah Dashiel Butler Masters
d3bc3eb7e9 Drop an unnecessary prototype (it is in the header file). 2006-06-06 05:18:38 +00:00
Miciah Dashiel Butler Masters
1a3c8734d4 Utilise mem_free_set. 2006-06-06 05:18:38 +00:00
Miciah Dashiel Butler Masters
551ff4587a Drop a stale comment.
The return value to delete_bookmark was changed to void in commit
7f47389e41a1bd2d9a0e05b74df49c26cd8e155a.
2006-06-06 02:43:00 +00:00
Miciah Dashiel Butler Masters
938d9c860b Drop an unnecessary prototype (it is in the header file). 2006-06-06 02:41:09 +00:00
Jonas Fonseca
0c2ce62459 When prompting a program for copiousoutput don't show the block checkbox
Since (I hope) it has no effect. Instead, inform the user that the output will
be displayed in the current tab.
2006-06-06 01:32:03 +02:00
Jonas Fonseca
ae58ab8fd7 Fix to the new internal copiousoutput handling 2006-06-06 01:15:07 +02:00
Kalle Olavi Niemitalo
ab23505519 cookies: New function init_cookie has a monopoly.
All cookies are now constructed with the new function init_cookie.
Requested by Miciah Dashiel Butler Masters.

This also fixes a bug where the "Add cookie" button left cookie->path == NULL,
causing a crash later when deciding whether to send the cookie to the server.
2006-06-05 20:22:55 +00:00
Kalle Olavi Niemitalo
e8233fa06a cookies: Use strrchr instead of ad-hoc loop.
The size and speed of the object code probably don't change much,
but the source becomes easier to read.
2006-06-05 20:22:54 +00:00
Kalle Olavi Niemitalo
3e32131469 cookies: A feeble attempt to support 16-bit int.
There are probably other places where it doesn't work, but this one
caught my eye.
2006-06-05 20:22:54 +00:00
Kalle Olavi Niemitalo
23a9a17827 cookies: Check return values of parse_header_param.
Mostly this makes set_cookie more complex, as it now distinguishes
between HEADER_PARAM_NOT_FOUND and HEADER_PARAM_OUT_OF_MEMORY, and kills the cookie in the
latter case.  However, the cookie->secure check became simpler.
2006-06-05 20:22:54 +00:00
Kalle Olavi Niemitalo
819b6fab80 parse_header_param stores the string via a pointer parameter.
Its return value is now an enum that lets callers know whether an
error occurred.  However, this commit changes the callers only
minimally, so they do not yet check the return value.
2006-06-05 20:22:53 +00:00
Kalle Olavi Niemitalo
e5ed5bce80 bookmarks: CONFIG_SMALL elides explanations of why Move failed.
(I added them in commit 3090e3a25077a19a7b2d5361543e28ca19cc7b84.)
2006-06-02 21:16:57 +00:00
Kalle Olavi Niemitalo
403a4ac2a2 bookmarks: Turn tree_node::attrs into a struct list_head.
Previously, it was a pointer to a separately allocated struct attributes,
of which only the LIST_HEAD members were actually used.
All init_list calls now operate on struct list_head.
This change may also reduce memory usage for reading bookmarks.
2006-06-02 19:14:59 +00:00
Miciah Dashiel Butler Masters
d6d72a6ff5 Relabel the auth module
As noted by Jonas Fonseca, the auth module is used by FTP as well as HTTP,
so take 'HTTP' out of the name.
2006-06-02 19:08:09 +00:00
Kalle Olavi Niemitalo
2c0edf6c44 cookies: Reject empty name in "Add server".
Also, add the server in the done_handler_T of the "OK" button,
rather than in the widget_handler_T of the "Server name" field
(which check_dialog calls).  This change implies that the dialog
is closed even if an error occurs while adding the server, but
that seems to be customary elsewhere in ELinks too.
2006-06-02 19:08:09 +00:00
Kalle Olavi Niemitalo
96391c17b4 cookies: "Add Server" ignores "cookies.accept_policy".
src/cookies/dialogs.c (set_server): Set up a struct cookie and pass it
to accept_cookie, instead of calling set_cookie which might ask the user
to confirm.  (This change also removes a dubious use of struct uri.)

src/cookies/cookies.c (get_cookie_server): No longer static.

src/cookies/cookies.h (get_cookie_server): Declare.
2006-06-02 19:08:09 +00:00
Kalle Olavi Niemitalo
d10a489a14 BFU: Mark format strings in struct listbox_ops_messages.
With regular comments in the definition of the structure itself,
and with xgettext:c-format comments in constants of that type,
if xgettext would otherwise guess wrong; so that translators
will know they'll have to double any percent signs they add.
I didn't regenerate PO files, though.
2006-06-02 19:08:09 +00:00
Witold Filipczyk
966d965c11 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2006-06-02 19:53:36 +02:00
Witold Filipczyk
53890a9a95 The label ng moved one line down 2006-06-02 19:51:32 +02:00
Laurent MONIN
8cba76541b Code simplification and tidy up. 2006-06-02 18:54:03 +02:00
Miciah Dashiel Butler Masters
6712baaee0 Comment html_context->position 2006-06-02 06:13:31 +00:00
Miciah Dashiel Butler Masters
b1a7f3f19e Add a comment to html_context->put_chars_f explaining not to use it 2006-06-02 05:53:49 +00:00
Miciah Dashiel Butler Masters
77f5585125 Use put_chrs instead of html_context->put_chars_f in element handlers
In html_subscript, html_subscript_close, html_superscript, html_quote, and
html_quote_close, use put_chrs instead of html_context->put_chars_f.
Element handlers should use put_chrs so that it can correctly handle
whitespace and stuff.
2006-06-02 05:51:24 +00:00
Miciah Dashiel Butler Masters
f271a06487 Factor deselect_mainmenu out of select_menu_item, do_mainmenu,
mainmenu_mouse_handler, and mainmenu_kbd_handler
2006-06-02 03:57:53 +00:00
Miciah Dashiel Butler Masters
cdcc8c8415 do_mainmenu: get the menu's window via menu->win instead of using a
silly foreach loop
2006-06-02 03:54:54 +00:00
Miciah Dashiel Butler Masters
c330ae9b9c do_mainmenu: use add_to_list instead of add_at_pos 2006-06-02 03:27:55 +00:00
Laurent MONIN
5acb5e6663 Trim trailing whitespaces. 2006-05-31 19:34:49 +02:00
Laurent MONIN
1d3656a317 Pass a pointer to a hash pointer to free_hash() to ensure hash pointer
is NULL on return.
2006-05-31 19:33:36 +02:00
Laurent MONIN
54099f5286 Do not export init_hash(),strhash() and hash_size() anymore, use a
wrapper named init_hash8() instead.
2006-05-31 19:17:01 +02:00
Laurent MONIN
4c5d4bcf34 Revert d19dcaa3e7 patch that breaks table
rendering.
2006-05-31 18:50:15 +02:00
Jonas Fonseca
77d9e40fbc Merge with git+ssh://pasky/srv/git/elinks.git 2006-05-28 03:22:09 +02:00
Miciah Dashiel Butler Masters
c91c763d49 Eliminate link_bg
Instead of saving the old link colours when selecting a link and using that
to restore them when unselecting it, just copy the data from the document.

 - Eliminate struct link_bg and the .link_bg and .link_bg_n members
   of struct document_view.

 - Eliminate the free_link routine and don't call it from draw_doc,
   clear_link, or detach_formatted.

 - Add a .old_current_link member to struct view_state and initialise it in
   init_vs.

 - Don't save link_bg in draw_current_link.

 - Rewrite clear_link to use the document data instead of link_bg.

 - Modify init_link_drawing not to allocate ling_bg and to return a pointer
   to a static variable for the template character.
2006-05-28 01:08:46 +00:00
Miciah Dashiel Butler Masters
36e7044948 DOM: Factor get_doctype out of render_dom_document. 2006-05-28 00:39:58 +00:00
Miciah Dashiel Butler Masters
f925adbfc9 DOM: Factor done_dom_renderer out of render_dom_document. 2006-05-28 00:39:54 +00:00
Miciah Dashiel Butler Masters
3272290189 Better <q> support
Patch by Jonas Koelker, Jonas Fonseca, and me.
2006-05-28 00:37:12 +00:00
Miciah Dashiel Butler Masters
4398613413 Use listbox_sel instead of focus_bookmark and delete focus_bookmark 2006-05-28 00:12:08 +00:00
Miciah Dashiel Butler Masters
ca3fc4f7ac Mark line_break and put_chars static 2006-05-28 00:10:14 +00:00
Miciah Dashiel Butler Masters
65016cdca4 Fix superscript and subscript support
Introduce html_subscript_close callback. Draw opening and closing brackets
and carets for subscript and superscript text directly in the element
handlers rather than performing weirdness in the renderer. This both
improves readability and fixes bug 284, misplaced brackets with subscripts.
2006-05-28 00:10:13 +00:00
Miciah Dashiel Butler Masters
6947902b57 Replace special handling in end_element with callbacks
Add close callbacks html_html_close, html_style_close, and
html_xmp_close. end_element now calls the element close callback instead
of performing special handling for certain tags.
2006-05-28 00:10:13 +00:00