1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-01 02:05:33 +00:00
Commit Graph

289 Commits

Author SHA1 Message Date
Miciah Dashiel Butler Masters
a001cfda17 Rewrite the description for document.cache.revalidation_interval again 2006-11-04 02:23:22 +00:00
Petr Baudis
cd197170d7 Fix wrongly placed -1 ;-) 2006-11-03 20:19:43 +01:00
Petr Baudis
c7863324e0 Support for document.cache.interval (set it to -1) and rename it
...to document.cache.revalidation_interval. Moreover, -1 is the default
now.
2006-11-03 19:56:55 +01:00
Witold Filipczyk
c9ce4260e5 elinks -remote 'ping' says:
ELinks: No remote session to connect to.
but should say:
ELinks: No running ELinks found.
2006-10-26 21:01:01 +02:00
Witold Filipczyk
4bf3e2693b "If-Modified-Since" second approach.
Added document.cache.interval option. When time elapsed since previous access
to the document is less than interval then the document is taken from
the cache. Otherwise the request with filled "If-Modified-Since" and/or
"If-None-Match" header field is sent. By default interval is set to 10 minutes.
This requires the correct time to be set on your machine.
2006-10-26 11:53:30 +02:00
Miciah Dashiel Butler Masters
8957379319 tree_dup: call object_nolock on the cloned children of the new tree 2006-10-20 23:10:33 +00:00
Kalle Olavi Niemitalo
359b131c6b Bug 810: Add a few comments pointing to the bug. 2006-09-24 00:21:03 +03:00
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
b42f0ba153 Bug 772: Recognize ESC [ Z as Shift-Tab, and bind it like Alt-Tab by default. 2006-09-17 12:38:23 +03:00
Kalle Olavi Niemitalo
86c9cb01ba add_accesskey_to_string: Add the Alt modifier to the string, too.
The link information window will now display e.g. "(Alt-f)" rather
than just "(f)", becoming easier to understand.
2006-09-03 00:12:34 +03:00
Kalle Olavi Niemitalo
2d19e5ed94 Change elinks.or.cz to elinks.cz and one i.e. to e.g. in option docs.
Some other instances of elinks.or.cz still remain in the tree.
2006-09-02 17:50:53 +03:00
Witold Filipczyk
9d4b68a26b Adjusted max values for true color dumps. 2006-08-26 20:03:30 +02:00
Witold Filipczyk
7a84967453 Unification. Removed trailing '\n' from last line. 2006-08-26 19:34:14 +02:00
Kalle Olavi Niemitalo
245c8cb020 parse_keystroke: Fold the case of Ctrl-letter after read_key(), not before. 2006-08-20 13:07:57 +03:00
Kalle Olavi Niemitalo
35290f92e9 parse_keystroke: Fold the case of Ctrl-letter only if the letter is ASCII. 2006-08-20 13:05:47 +03:00
Kalle Olavi Niemitalo
e054a15960 Change the description of the connection.try_ipv4 option.
Use "e.g." rather than "i.e." because the syntax cannot be deduced
from the preceding text.
2006-08-20 13:04:00 +03:00
Witold Filipczyk
4f78b0dda1 True color mode. See new konsole.
TODO: dump
2006-08-19 23:39:40 +02:00
Kalle Olavi Niemitalo
dd22535b8c config: Change an error message in the keybinding manager.
The message appears when the user has selected e.g. "Main mapping"
rather than an action inside it.  Because the main mapping is a keymap,
ELinks must not tell the user to select a keymap.
2006-08-19 10:40:30 +03:00
Jonas Fonseca
abc66da432 really_add_keybinding: Indent msg_text arguments 2006-08-13 14:50:45 +02:00
Kalle Olavi Niemitalo
1837a55444 really_add_keybinding: Remove unneeded initialization.
According to Jonas Fonseca, if init_string(&canonical) fails, then it
anyway sets canonical.source = NULL and makes done_string(&canonical)
safe, even if canonical was previously uninitialized.
2006-08-13 15:45:13 +03:00
Kalle Olavi Niemitalo
c79ecefe73 doc: Document parse_keystroke(). 2006-08-13 15:41:34 +03:00
Kalle Olavi Niemitalo
de93359a5a Support Ctrl-Alt-letter key combinations.
Actions can now be bound to e.g. Ctrl-Alt-A.  The keybinding code also
supports other combinations of modifiers, like Shift-Ctrl-Up, but the
escape sequence decoder doesn't yet.

Don't let Ctrl-Alt-letter combinations open menus.
2006-08-13 15:32:06 +03:00
Kalle Olavi Niemitalo
2eeb14f95c Key name strings are const in read_key() and in its (indirect) callers. 2006-08-13 14:44:01 +03:00
Kalle Olavi Niemitalo
aba0bc77a8 parse_keystroke: Never write back to the input string.
This fixes a bug: in the previous version, l_bind_key() modified the
buffer whose address lua_tostring() returned, even though that is not
allowed according to Lua documentation <http://www.lua.org/pil/24.2.2.html>.

The change affects the user interface: previously, if the user typed
"ctrl+cokebottle" in the "Add keybinding" dialog box, ELinks would
change the text in the widget to "Ctrl-cokebottle" before complaining
that the keystroke is invalid.  Now, it leaves the widget unchanged.

This commit does not yet add const to parameters of parse_keystroke()
and related functions.
2006-08-13 14:24:28 +03:00
Kalle Olavi Niemitalo
93ef5e02f5 really_add_keybinding: Display the canonical name of the keystroke.
Before really_add_keybinding() is called, check_keystroke() calls
parse_keystroke(), which converts the modifier prefix to canonical
form: for example, "alt+f9" becomes "Alt-f9".  This commit makes
really_add_keybinding() normally ignore that string and generate a
brand new one, e.g. "Alt-F9" (note the upper-case F), for its
"Keystroke already used" warning.  Likewise, " " turns to "Space".

After this commit, it should be possible to change parse_keystroke()
to never write back into its input string.

If really_add_keybinding() cannot generate the string for some reason
(out of memory?), then it will use whatever parse_keystroke() has left
in the buffer.  The alternatives would be to omit the keystroke name
from the warning or to reject the keybinding entirely; it isn't clear
what the best solution is here, but the one I implemented is closest
to the previous behaviour.
2006-08-13 14:04:17 +03:00
Miciah Dashiel Butler Masters
75e292efe6 Mark the prompt for a key when adding a binding as translatable
Thanks to Kalle Olavi Niemitalo for noticing this omission.
2006-08-13 07:34:25 +00:00
Kalle Olavi Niemitalo
8be5ed9749 add_accesskey_to_string: Use KBD_MOD_NONE, rather than plain 0. 2006-08-12 14:53:28 +03:00
Kalle Olavi Niemitalo
f3b04b8645 terminal: Introduce term_event_key_T. 2006-08-12 14:48:08 +03:00
Kalle Olavi Niemitalo
e101f5f537 UTF-8 doc: Clarify FIXME in add_accesskey_to_string. 2006-08-12 12:37:37 +03:00
Kalle Olavi Niemitalo
c4acdb6d3c config: Do not treat all negative key values like KBD_UNDEF. 2006-08-06 20:02:40 +00:00
Miciah Dashiel Butler Masters
5b260ad69d Add a missing blank line between check_option_name and push_add_button 2006-08-05 19:46:09 +00:00
Miciah Dashiel Butler Masters
b5b285b5df Mark check_keystroke and new_hop_from static. 2006-08-05 19:42:20 +00:00
Laurent MONIN
1136aefb71 Trim trailing whitespaces. 2006-07-27 09:51:10 +02:00
Laurent MONIN
1ec1dc43be LONG/INT: fix compilation under AMD64, reported by Miciah. 2006-07-05 15:11:53 +02:00
Witold Filipczyk
7934d3c7d6 STRING_DIR_SEP in config/* 2006-07-02 08:53:33 +02:00
Laurent MONIN
9412cc77f0 INT/LONG: introduce long_wr() and long_set() and use them instead of
num_wr() and num_set() for options of type OPT_LONG.
2006-06-27 14:13:04 +02:00
Laurent MONIN
2454ceffb7 config/options: use struct option big_number field instead of number
field where OPT_LONG is used.
2006-06-26 17:49:59 +02:00
Laurent MONIN
cde9db3d70 config/options: add_opt() casts value to long then store in int... see
bug 764. Micro step to a fix.
2006-06-26 17:37:10 +02:00
Laurent MONIN
6637272c5a config/options: arrange add_opt() to use only mem_free() instead of
delete_option() in case of allocation failure.
2006-06-26 17:33:00 +02:00
Laurent MONIN
c3cf5b9474 config/options: add_opt() @min and @max parameters have to be long to
match struct option.
2006-06-26 17:28:45 +02:00
Miciah Dashiel Butler Masters
7a9b9f8171 Fix focus issue with the 'Toggle display' button in the keybindings manager
Don't call clear_dialog, which sets the focus to the listbox.  Neither the
button widget nor the listbox widget has a clear callback, and the only
other thing that clear_dialog does is focus the first widget and redraw, so
call redraw_dialog instead.

Thanks to Kalle Olavi Niemitalo for noticing the issue.
2006-06-24 08:22:24 +00: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
Miciah Dashiel Butler Masters
5dcac5c32d Modularise config/kbdbind 2006-05-20 15:01:22 +00:00
Miciah Dashiel Butler Masters
8adb976885 Add backspace-prefix to the main map, to backspace the last entered
digit of the prefix.
2006-04-14 21:55:42 +00:00
Witold Filipczyk
d50de58af9 s/dump-color_mode/dump-color-mode/ . Made name consistent with other options 2006-04-04 15:27:14 +02:00
Kalle Olavi Niemitalo
7927fb737a 1. If neither CONFIG_88_COLORS nor CONFIG_256_COLORS is defined,
then dump_to_file_256 is defined in dump.c but not used.
   If configure --enable-debug was used, then gcc warns about
   the unused function, and the warning stops the build.

2. The description of document.dump.color_mode ends with a
   newline, provoking a runtime warning from check_description
   in src/config/options.c.

3. options.inc has preprocessor directives inside macro arguments.
   That is not portable C.  xgettext (GNU gettext-tools) 0.14.3 is
   not smart enough to figure out the possible combinations, and
   copies an incorrect string to elinks.pot.
2006-03-13 19:06:02 +01:00
witekfl
b08514c7e9 Color mode in dumps. To get color set appropriately document.dump.color or
--dump-color_mode. Background isn't set in 256 color mode. I don't know
why.
2006-03-04 14:33:28 +01:00
witekfl
3f01c3d2fe Display optionally tabs bar at top like other browser do.
TODO: input_line_layouter, ACT_MAIN_TAB_MENU
2006-03-04 10:24:37 +01:00
witekfl
a802f0fb3e Someone, sometime ago wanted always visible menu bar. This is attempt to
handle it. I have no idea where to make initialisation call to
activate_bfu_technology.
2006-03-03 19:01:15 +01:00
Kalle Olavi Niemitalo
0066214b47 Merge with http://elinks.cz/elinks.git 2006-02-10 09:15:12 +02:00
Jonas Fonseca
ac1231ef2f Describe the document.uri_passing option in more depth
Mention the *-external-command actions.
2006-02-07 01:03:13 +01:00
Kalle Olavi Niemitalo
b1f8756c59 Merge with http://elinks.cz/elinks.git 2006-02-05 17:48:43 +02:00
Jonas Fonseca
2748d043f9 Autogenerate .vimrc files and put the master in config/vimrc
This changes the init target to be idempotent: most importantly it will now
never overwrite a Makefile if it exists. Additionally 'make init' will
generate the .vimrc files. Yay, no more stupid 'added fairies' commits! ;)
2006-01-15 18:38:58 +01:00
Kalle Olavi Niemitalo
89fe822f70 Merge with 6a9ea02f3a
(via http://elinks.cz/elinks.git)
2006-01-14 21:30:12 +02:00
Laurent MONIN
b8e64a5ee0 Simplify secure_open() call, make it a wrapper around secure_open_umask(). 2006-01-10 23:49:35 +01:00
Laurent MONIN
9b88da873a Use mode_t and mode macros everywhere. 2006-01-10 23:35:22 +01:00
Kalle Olavi Niemitalo
93714a3e35 Merge with http://elinks.cz/elinks.git 2006-01-06 02:13:11 +02:00
Jonas Fonseca
638e0406f1 Drop empty lines from option descriptions; doc/tools/help2doc don't like em 2006-01-03 15:15:36 +01:00
Kalle Olavi Niemitalo
345ba7afcd Merge with http://elinks.cz/elinks.git 2006-01-01 19:05:44 +02:00
Kalle Olavi Niemitalo
4c2831677a Here is a framework that detects cases where a PO file assigns
the same accelerator key to multiple buttons in a dialog box or
to multiple items in a menu.  ELinks already has some support for
this but it requires the translator to run ELinks and manually
scan through all menus and dialogs.  The attached changes make it
possible to quickly detect and list any conflicts, including ones
that can only occur on operating systems or configurations that
the translator is not currently using.

The changes have no immediate effect on the elinks executable or
the MO files.  PO files become larger, however.

The scheme works like this:

- Like before, accelerator keys in translatable strings are
  tagged with the tilde (~) character.

- Whenever a C source file defines an accelerator key, it must
  assign one or more named "contexts" to it.  The translations in
  the PO files inherit these contexts.  If multiple strings use
  the same accelerator (case insensitive) in the same context,
  that's a conflict and can be detected automatically.

- The contexts are defined with "gettext_accelerator_context"
  comments in source files.  These comments delimit regions where
  all translatable strings containing tildes are given the same
  contexts.  There must be one special comment at the top of the
  region; it lists the contexts assigned to that region.  The
  region automatically ends at the end of the function (found
  with regexp /^\}/), but it can also be closed explicitly with
  another special comment.  The comments are formatted like this:

    /* [gettext_accelerator_context(foo, bar, baz)]
         begins a region that uses the contexts "foo", "bar", and "baz".
         The comma is the delimiter; whitespace is optional.

       [gettext_accelerator_context()]
         ends the region.  */

  The scripts don't currently check whether this syntax occurs
  inside or outside comments.

- The names of contexts consist of C identifiers delimited with
  periods.  I typically used the name of a function that sets
  up a dialog, or the name of an array where the items of a
  menu are listed.  There is a special feature for static
  functions: if the name begins with a period, then the period
  will be replaced with the name of the source file and a colon.

- If a menu is programmatically generated from multiple parts,
  of which some are never used together, so that it is safe to
  use the same accelerators in them, then it is necessary to
  define multiple contexts for the same menu.  link_menu() in
  src/viewer/text/link.c is the most complex example of this.

- During make update-po:

  - A Perl script (po/gather-accelerator-contexts.pl) reads
    po/elinks.pot, scans the source files listed in it for
    "gettext_accelerator_context" comments, and rewrites
    po/elinks.pot with "accelerator_context" comments that
    indicate the contexts of each msgid: the union of all
    contexts of all of its uses in the source files.  It also
    removes any "gettext_accelerator_context" comments that
    xgettext --add-comments has copied to elinks.pot.

  - If po/gather-accelerator-contexts.pl does not find any
    contexts for some use of an msgid that seems to contain an
    accelerator (because it contains a tilde), it warns.  If the
    tilde refers to e.g. "~/.elinks" and does not actually mark
    an accelerator, the warning can be silenced by specifying the
    special context "IGNORE", which the script otherwise ignores.

  - msgmerge copies the "accelerator_context" comments from
    po/elinks.pot to po/*.po.  Translators do not edit those
    comments.

- During make check-po:

  - Another Perl script (po/check-accelerator-contexts.pl) reads
    po/*.po and keeps track of which accelerators have been bound
    in each context.  It warns about any conflicts it finds.
    This script does not access the C source files; thus it does
    not matter if the line numbers in "#:" lines are out of date.

This implementation is not perfect and I am not proposing to
add it to the main source tree at this time.  Specifically:

- It introduces compile-time dependencies on Perl and Locale::PO.
  There should be a configure-time or compile-time check so that
  the new features are skipped if the prerequisites are missing.

- When the scripts include msgstr strings in warnings, they
  should transcode them from the charset of the PO file to the
  one specified by the user's locale.

- It is not adequately documented (well, except perhaps here).

- po/check-accelerator-contexts.pl reports the same conflict
  multiple times if it occurs in multiple contexts.

- The warning messages should include line numbers, so that users
  of Emacs could conveniently edit the conflicting part of the PO
  file.  This is not feasible with the current version of
  Locale::PO.

- Locale::PO does not understand #~ lines and spews warnings
  about them.  There is an ugly hack to hide these warnings.

- Jonas Fonseca suggested the script could propose accelerators
  that are still available.  This has not been implemented.

There are three files attached:

- po/gather-accelerator-contexts.pl: Augments elinks.pot with
  context information.

- po/check-accelerator-contexts.pl: Checks conflicts.

- accelerator-contexts.diff: Makes po/Makefile run the scripts,
  and adds special comments to source files.
2006-01-01 18:55:18 +02:00
Miciah Dashiel Butler Masters
290a03787b Redo a small comment. 2006-01-01 08:07:14 +00:00
Jonas Fonseca
b82a38ab28 Introduce ACTION_REQUIRE_FORM and use it for link-form-menu
... since it asserts it is dealing with a link.
2005-12-26 22:22:03 +01: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
Miciah Dashiel Butler Masters
80a5467b8d Introduce get_action_from_keystroke and get_action_name_from_keystroke.
Introduce smjs_init_keybinding_interface, which creates elinks.keymaps.<map>
for <map> in "main", "edit", and "menu". elinks.keymaps.<map> is a hash
indexed by string representations of keystrokes, and can be used to get the
current action for a key and to set the action either to an internal ELinks
action or to an ECMAScript function.
2005-12-24 06:54:01 +00:00
Miciah Dashiel Butler Masters
5714a8b54e Factor kbd_stroke_lookup out of bind_act. 2005-12-24 05:40:40 +00:00
Jonas Fonseca
5dffe2e8ac Fix various sparse warnings
Mostly non-ANSI function declarations, using 0 as NULL and inline
function prototypes. Also removed unused S_HTTP_100 network state
enum type, which text message contained unknown escape sequence: '\?'.
2005-11-24 15:38:47 +01:00
Jonas Fonseca
acf2ec806b Remove empty lines in start of header files
A left over from the CVS Id removal. Also, for a few files, normalize the
order in which things are declared in headers.
2005-11-15 11:33:27 +01:00
Miciah Dashiel Butler Masters
5d39d90909 Add some whitespace in bad_punct. 2005-11-11 06:17:50 +00:00
Laurent MONIN
b374d9f407 Options i18n debug code: accept > as ending char, it is used for tags. 2005-10-30 17:42:58 +01:00
Miciah Dashiel Butler Masters
811f458ef4 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2005-10-26 09:41:31 +00:00
Miciah Dashiel Butler Masters
c313b2877a In change_hook_html, instead of redrawing the current tab,
set the resize flag on all tabs so that they will all be redrawn
to reflect the new setting.
2005-10-26 09:40:52 +00:00
Jonas Fonseca
a317dd71fb Print the invalid option value 2005-10-25 19:10:30 +02:00
Laurent MONIN
df065ead80 Remove now useless $Id: lines. 2005-10-21 09:14:07 +02:00
Jonas Fonseca
c88afeb1c2 path_to_top -> top_builddir 2005-10-20 04:00:35 +02:00
Jonas Fonseca
e39a4342d6 Include $(top_srcdir)/Makefile.lib instead of $(path_to_top)/Makefile.lib
A step towards out of tree builds ...
2005-10-20 01:11:47 +02:00
Jonas Fonseca
c6f6717a79 Re-commit the rest of the changes which was reverted in the recent 'funny merge' 2005-10-17 23:20:53 +02:00
Jonas Fonseca
1efab31581 Simplify building of and linking with directories
Ditch the building of an archive (.a) in favour of linking all objects in a
directory into a lib.o file. This makes it easy to link in subdirectories
and more importantly keeps the build logic in the local subdirectories.

Note: after updating you will have to rm **/*.a if you do not make clean
before updating.
2005-09-27 21:38:58 +02:00
Jonas Fonseca
b30064c0d0 Rename targets: *-l -> *-local 2005-09-27 21:11:28 +02:00
Petr Baudis
204bbe5d2c Fix starting a build from a subdirectory ELBuild-wise
Now all the submakefiles contain informationa buot where in the directory
hierarchy they stay.
2005-09-16 02:07:36 +02:00
Petr Baudis
32fe41fae7 ELBuild: Use 'include' instead of '-include'
We _do_ want to error on when including .config and .lib failed.
2005-09-16 01:09:42 +02:00
Petr Baudis
fffc573769 Use all-l,install-l,clean-l targets in individual makefiles and let
Makefile.lib multiplex the real ones. That's so that the -recursive
ones always come first.
2005-09-16 00:52:54 +02:00
Petr Baudis
833770a5f7 Implicit recursiveness and clean rule
All objects defining $(OBJS) will get them and *.a deleted during
make clean.

The all, clean and install rules now implicitly imply their -recursive
counterparts - those will just do nothing in case of $(SUBDIRS) not
defined, so that's ok.
2005-09-15 23:28:56 +02:00
Jonas Fonseca
0cc70f57a1 Merge with git+ssh://pasky.or.cz/srv/git/elinks.git 2005-09-15 21:05:25 +02:00
Petr Baudis
06ea255a22 Convert part of the build to the new build system
The root makefile is converted as well as some leaf Makefiles. This
also brings in the required infrastructure and adjusts configure.in
appropriately.

I converted only makefiles containing no configurable stuff, since
that'll require more consideration yet.
2005-09-15 21:03:56 +02:00
Jonas Fonseca
21387bc966 Remove double 'black' from ensure_contrast option description. 2005-09-15 20:47:06 +02:00
Jonas Fonseca
921c59ce07 Fix --remote commands: popUp() -> infoBox(), it was renamed shortly
after entering and I forgot this part.
2005-09-15 20:24:24 +02:00
Jonas Fonseca
7462f22635 Remove now obsolete .cvsignore files. 2005-09-15 18:33:20 +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