1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-12 00:34:47 -04:00
Commit Graph

82 Commits

Author SHA1 Message Date
Kalle Olavi Niemitalo
92cb452a9e Rename CONFIG_UTF_8 to CONFIG_UTF8.
The configure script no longer recognizes "CONFIG_UTF_8=yes" lines
in custom features.conf files.  They will have to be changed to
"CONFIG_UTF8=yes".  This incompatibility was deemed acceptable
because no released version of ELinks supports CONFIG_UTF_8.

The --enable-utf-8 option was not renamed.
2006-09-17 16:12:47 +03:00
Kalle Olavi Niemitalo
e8462980e5 Change "utf_8" to "utf8" in most identifiers.
Suggested by Miciah on #elinks.

What was renamed:
  add_utf_8                      => add_utf8
  cp2utf_8                       => cp2utf8
  encode_utf_8                   => encode_utf8
  get_translation_table_to_utf_8 => get_translation_table_to_utf8
  goto invalid_utf_8_start_byte  => goto invalid_utf8_start_byte
  goto utf_8                     => goto utf8
  goto utf_8_select              => goto utf8_select
  terminal_interlink.utf_8       => terminal_interlink.utf8
  utf_8_to_unicode               => utf8_to_unicode

What was not renamed:
  terminal._template_.utf_8_io option, TERM_OPT_UTF_8_IO
    Compatibility with existing elinks.conf files would require an alias.
  --enable-utf-8
    Because the name of the charset is UTF-8, --enable-utf-8 looks better
    than --enable-utf8.
  CONFIG_UTF_8
    Will be renamed in a later commit.
  Unicode/utf_8.cp, table_utf_8, aliases_utf_8
    Will be renamed in a later commit.
2006-09-17 16:06:22 +03:00
Kalle Olavi Niemitalo
cc6939b9f8 UTF-8: Don't update form_state.state_cell if it is not used.
FC_TEXT, FC_PASSWORD, and FC_FILE do not use state_cell.
FC_TEXTAREA does use it.
2006-09-02 23:16:32 +03:00
Kalle Olavi Niemitalo
8d77387f6f UTF-8: Fix scrolling of input fields.
form_state.state_cell is no longer used for FC_TEXT, FC_PASSWORD, nor FC_FILE.
Instead, get_link_cursor_offset() computes the cell with utf8_ptr2chars
(a new function) or utf8_ptr2cells.  This shouldn't slow down ELinks too
much, as it's done only for the selected link and only once per redraw.

The left side of a scrolled input field is always aligned at a
character boundary.  The right side might not be.
2006-09-02 23:03:45 +03:00
Kalle Olavi Niemitalo
a9da075eb5 terminal UTF-8: term_event_keyboard.key is UCS-4, #ifdef CONFIG_UTF_8.
Form fields and BFU text-input widgets then convert from UCS-4 to UTF-8.
If not all UTF-8 bytes fit, they don't insert anything.  Thus it is no
longer possible to get invalid UTF-8 by hitting the length limit.

It is unclear to me which charset is supposed to be used for strings
in internal buffers.  I made BFU insert UTF-8 whenever CONFIG_UTF_8,
but form fields use the charset of the terminal; that may have to be
changed.

As a side effect, this change should solve bug 782, because
term_send_ucs no longer encodes in UTF-8 if CONFIG_UTF_8 is defined.
I think the UTF-8 and codepage encoding calls I added are safe, too.
A similar bug may still surface somewhere else, but 782 could be
closed for now.

This change also lays the foundation for binding actions to non-ASCII
keys, but the keystroke name parser doesn't yet support that.
The CONFIG_UTF_8 mode does not currently support non-ASCII characters
in hot keys, either.
2006-08-06 20:02:43 +00:00
Kalle Olavi Niemitalo
7dcc6c9a19 viewer UTF-8: Correctly position cursor for ACT_EDIT_LEFT in text input field.
To reproduce the bug before this patch:
Enable CONFIG_UTF_8, UTF-8 I/O, and UTF-8 charset.
Go to www.google.com and type "abc" in the text input field.
Then press Left.  The cursor jumps to "a" when it should go to "c".
2006-07-31 21:46:36 +02:00
Laurent MONIN
1136aefb71 Trim trailing whitespaces. 2006-07-27 09:51:10 +02:00
Witold Filipczyk
4263af97a9 The missing code, I suppose. Fixed moving right in textareas in UTF-8 mode.
First move was by two cells.
2006-07-23 15:23:19 +02:00
Witold Filipczyk
2a6125e3d0 Merge with utf8. src/document/plain/renderer.c replaced by utf8 version 2006-07-21 13:12:06 +02:00
Miciah Dashiel Butler Masters
29ffe71bc1 New actions: kill-word-back, move-backward-word, move-forward-word 2006-06-23 04:07:52 +00:00
Laurent MONIN
5acb5e6663 Trim trailing whitespaces. 2006-05-31 19:34:49 +02:00
Pavol Babincak
c0d20d8420 UTF-8 support for html form textarea. Changed displaying of textarea.
Including double-width glyph support.

Note: textarea is now drawn with blank collumn at end of lines. It seems
that this is more intuitive for users. It behaves similar as textareas in
graphical interfaces. I hope it will hold your interest.

+----+         +----+         +----+
|aaA | [right] |aaa_| [right] |aaa |
|aaa |         |aaa |         |Aaa |
|bb  |         |bb  |         |bb  |
+----+         +----+         +----+
+----+         +----+         +----+
|Aaa |  [end]  |aaa_|   [c]   |aaa |
|aaa |         |aaa |         |Caa |
|bb  |         |bb  |         |abb |
+----+         +----+         +----+
A, _, C - cursor positions.
[right] - right arrow
[end]   - ACT_END (End button)
[c]     - Letter c.

Now this code:
<textarea rows="3" cols="3">aaaaaabb</textarea>
represents textarea with 3x3 positions for chars.

Before this texteare behaved some kind of weirdly. That code above was
rendered like this:
+----+
|aaaa|
|aabb|
|_   |
+----+
2006-05-07 00:51:26 +02:00
Pavol Babincak
aedc5459ef UTF-8 support for html form elements: text, password, select and file.
Including double-width glyphs. Without support for textarea.
2006-05-07 00:51:26 +02:00
Pavol Babincak
f515f14e08 Renamed variables utf8_pos to state_cell and char_cnt to chars_cells. 2006-05-07 00:51:24 +02:00
Witold Filipczyk
9f69170c2a fixup_select_state was unnecessary 2006-05-02 12:56:05 +02:00
Witold Filipczyk
cdd86d3c20 Ecmascript: write to the variable selectedIndex. Not tested 2006-05-02 11:28:41 +02:00
Pavol Babincak
81778bc5d7 Correct computing of cursor position in UTF-8 textarea. 2006-02-18 20:28:00 +01:00
Pavol Babincak
f9d67aeb73 Added configure option --enable-utf-8
For enabling better UTF-8 support by Witek and Scrool.
2006-02-18 20:28:00 +01:00
Pavol Babincak
3ffa7cac91 Bug fix: formating error in UTF-8 textarea
When textarea contains UTF-8 characters they are not correctly wrapped.
2006-02-18 20:27:52 +01:00
Witold Filipczyk
44a1aa9c87 Witekfl's UTF-8 patch v5. 2006-02-18 20:27:46 +01:00
Miciah Dashiel Butler Masters
190259ca22 mem_alloc_align: drop the obj type parameter
Instead use the object itself, i.e., replace typeof(obj) with
typeof(**ptr).
2006-02-17 17:32:59 +00:00
Miciah Dashiel Butler Masters
e6b9093f87 find_form_state: use mem_align_alloc to save some code 2006-02-17 16:52:38 +00:00
witekfl
6fe1a431f1 Sometimes scripts submit forms using buttons 2006-02-09 22:53:00 +01:00
9cc9db4e24 Handling onsubmit 2006-01-28 11:17:22 +01:00
Jonas Fonseca
cef160d630 No need to have link_form_menu() be a menu function when it has an action 2005-12-26 22:28:38 +01:00
Miciah Dashiel Butler Masters
eeb51bffea Refresh the view after selecting a new form item with the form menu. 2005-12-26 11:31:05 +00:00
Miciah Dashiel Butler Masters
bcdc69e86a Use intdup for the new form menu because you can't just put an int in
a void * and expect it to work everywhere.
2005-12-26 11:25:03 +00:00
Jonas Fonseca
26b82953ce Add a "Form fields" entry to the link menu (if it is a form field)
The menu shows a list of all fields of a form, with the possibility to jump
right to that form field when selecting an entry. The menu text is the
basic form field label "Radio button", "Text field", etc. with the form
field name or alt text as the right menu text.

It introduces a new main action called link-form-menu with no default
binding.

Requested by Klaus Knopper, as a mean to improve accessibility for complex,
overloaded pages like ebay.com.
2005-12-26 01:27:44 +01:00
Laurent MONIN
1ca88c9147 encode_multipart(): move @rd to inner scope. 2005-12-13 17:04:24 +01:00
Laurent MONIN
10aa67fb32 sort_submitted_values(): move @change abd @next to inner scope. 2005-12-13 17:01:45 +01:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Petr Baudis
0f6d4310ad Initial commit of the HEAD branch of the ELinks CVS repository, as of
Thu Sep 15 15:57:07 CEST 2005. The previous history can be added to this
by grafting.
2005-09-15 15:58:31 +02:00