1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-02 03:46:21 -04:00
Commit Graph

57 Commits

Author SHA1 Message Date
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