diff --git a/config/m4/iconv.m4 b/config/m4/iconv.m4 index 1ccc36b8..ac879e5f 100644 --- a/config/m4/iconv.m4 +++ b/config/m4/iconv.m4 @@ -7,10 +7,12 @@ AC_DEFUN([AM_ICONV], dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). + EL_SAVE_FLAGS + AC_ARG_WITH([libiconv], [ --with-libiconv=DIR search for libiconv in DIR/include and DIR/lib], [ for dir in `echo "$withval" | tr : ' '`; do - if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi + if test -d $dir/include; then CFLAGS="$CFLAGS -I$dir/include"; fi if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi done ]) @@ -64,5 +66,7 @@ size_t iconv(); LIBICONV= if test "$am_cv_lib_iconv" = yes; then LIBICONV="-liconv" + else + EL_RESTORE_FLAGS fi ]) diff --git a/configure.in b/configure.in index 7deaa6e2..cd577465 100644 --- a/configure.in +++ b/configure.in @@ -99,23 +99,9 @@ AC_SUBST(CONFIG_POD2HTML) AC_SUBST(CONFIG_XMLTO) AC_SUBST(CONFIG_JW) -EL_CONFIG_DEPENDS(CONFIG_DOC, [CONFIG_ASCIIDOC CONFIG_XMLTO CONFIG_JW CONFIG_POD2HTML], [Documentation]) - -if test "$CONFIG_ASCIIDOC" = yes && - test "$CONFIG_XMLTO" = yes && - test "$CONFIG_JW" = yes; then - EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_JW], [Manual Formats]) -fi - -if test "$CONFIG_ASCIIDOC" = yes && - test "$CONFIG_XMLTO" = yes; then - EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats]) -fi - -AC_SUBST(CONFIG_ASCIIDOC) -AC_SUBST(CONFIG_POD2HTML) -AC_SUBST(CONFIG_XMLTO) -AC_SUBST(CONFIG_JW) +EL_CONFIG_DEPENDS(CONFIG_DOC, [CONFIG_ASCIIDOC CONFIG_XMLTO CONFIG_JW CONFIG_POD2HTML], [Documentation Tools]) +EL_CONFIG_DEPENDS(CONFIG_MANUAL, [MANUAL_ASCIIDOC MANUAL_XMLTO MANUAL_JW], [Manual Formats]) +EL_CONFIG_DEPENDS(CONFIG_MANPAGE, [MAN_ASCIIDOC MAN_XMLTO], [Man Page Formats]) dnl gcc specific options (to be continued at the bottom of configure) if test "x$ac_cv_prog_gcc" = "xyes"; then diff --git a/contrib/python/hooks.py b/contrib/python/hooks.py index 4aa69090..03e4585e 100644 --- a/contrib/python/hooks.py +++ b/contrib/python/hooks.py @@ -36,6 +36,9 @@ def pre_format_html_hook(url, html): if re.search("cygwin\.com", url): html2 = re.sub("\n" "Language-Team: French \n" "MIME-Version: 1.0\n" @@ -35,7 +35,7 @@ msgstr "Pressez espace pour d #: src/dialogs/options.c:210 src/dialogs/options.c:290 src/mime/dialogs.c:129 #: src/protocol/auth/dialogs.c:110 src/protocol/protocol.c:234 #: src/scripting/lua/core.c:377 src/scripting/lua/core.c:457 -#: src/session/session.c:792 src/viewer/text/search.c:1593 +#: src/session/session.c:800 src/viewer/text/search.c:1593 msgid "~OK" msgstr "~OK" @@ -173,7 +173,7 @@ msgstr "Cha #: src/dialogs/options.c:291 src/mime/dialogs.c:130 #: src/protocol/auth/dialogs.c:111 src/protocol/bittorrent/dialogs.c:801 #: src/scripting/lua/core.c:378 src/scripting/lua/core.c:458 -#: src/session/download.c:544 src/session/download.c:1143 +#: src/session/download.c:543 src/session/download.c:1140 #: src/viewer/text/search.c:1594 msgid "~Cancel" msgstr "~Annuler" @@ -186,8 +186,8 @@ msgstr "Horloge" msgid "Digital clock in the status bar." msgstr "Horloge digitale dans la barre de status." -#: src/bfu/leds.c:77 src/bfu/leds.c:94 src/config/options.inc:1118 -#: src/config/options.inc:1125 src/ecmascript/ecmascript.c:41 +#: src/bfu/leds.c:77 src/bfu/leds.c:94 src/config/options.inc:1127 +#: src/config/options.inc:1134 src/ecmascript/ecmascript.c:41 #: src/globhist/globhist.c:63 src/mime/backend/mailcap.c:93 #: src/mime/backend/mimetypes.c:52 src/network/ssl/ssl.c:80 msgid "Enable" @@ -360,7 +360,7 @@ msgstr "" "\n" "Cette fonctionnalité requiert le support des signets." -#: src/bookmarks/dialogs.c:70 src/config/options.inc:970 +#: src/bookmarks/dialogs.c:70 src/config/options.inc:979 #: src/dialogs/document.c:145 src/globhist/dialogs.c:65 msgid "Title" msgstr "Titre" @@ -1768,7 +1768,7 @@ msgid "(expand by pressing space)" msgstr "(déployer en pressant espace)" #: src/config/dialogs.c:176 src/config/dialogs.c:358 -#: src/config/options.inc:779 +#: src/config/options.inc:788 msgid "Type" msgstr "Type" @@ -1797,7 +1797,7 @@ msgstr "Description" #: src/config/dialogs.c:320 src/protocol/bittorrent/dialogs.c:594 #: src/protocol/protocol.c:228 src/session/session.c:282 -#: src/session/session.c:954 src/viewer/text/textarea.c:331 +#: src/session/session.c:962 src/viewer/text/textarea.c:331 #: src/viewer/text/textarea.c:338 msgid "Error" msgstr "Erreur" @@ -1837,7 +1837,7 @@ msgstr "Impossible d'ajouter une option ici." #: src/config/dialogs.c:531 src/config/dialogs.c:943 src/cookies/dialogs.c:424 #: src/dialogs/options.c:212 src/formhist/dialogs.c:213 -#: src/protocol/bittorrent/dialogs.c:788 src/session/download.c:1127 +#: src/protocol/bittorrent/dialogs.c:788 src/session/download.c:1124 msgid "Sa~ve" msgstr "Enre~gistrer" @@ -1849,7 +1849,7 @@ msgstr "Gestionnaire d'options" msgid "Keystroke" msgstr "Touches" -#: src/config/dialogs.c:700 src/config/options.inc:1138 +#: src/config/dialogs.c:700 src/config/options.inc:1147 msgid "Action" msgstr "Action" @@ -2459,12 +2459,12 @@ msgid "Active link colors." msgstr "Couleurs du lien actif." #: src/config/options.inc:273 src/config/options.inc:538 -#: src/config/options.inc:864 +#: src/config/options.inc:873 msgid "Background color" msgstr "Couleur du fond" #: src/config/options.inc:275 src/config/options.inc:540 -#: src/config/options.inc:865 +#: src/config/options.inc:874 msgid "Default background color." msgstr "Couleur par défaut du fond." @@ -2477,12 +2477,12 @@ msgstr "Couleur par d #. The colors and mono tree should be similar but with different default #. * values of course so always use the macros below. #: src/config/options.inc:277 src/config/options.inc:534 -#: src/config/options.inc:862 +#: src/config/options.inc:871 msgid "Text color" msgstr "Couleur du texte" #: src/config/options.inc:279 src/config/options.inc:536 -#: src/config/options.inc:863 +#: src/config/options.inc:872 msgid "Default text color." msgstr "Couleur du texte par défaut." @@ -2516,7 +2516,7 @@ msgid "Invert the fore- and background color so the link stands out." msgstr "" "Inverser les couleurs de fond et de texte pour mettre le lien en évidence." -#: src/config/options.inc:295 src/config/options.inc:827 +#: src/config/options.inc:295 src/config/options.inc:836 #: src/dialogs/options.c:207 msgid "Underline" msgstr "Souligné" @@ -3151,7 +3151,7 @@ msgstr "Sortie (dump)" msgid "Dump output options." msgstr "Options de sortie (dump)." -#: src/config/options.inc:629 src/config/options.inc:831 +#: src/config/options.inc:629 src/config/options.inc:840 #: src/config/opttypes.c:394 src/dialogs/document.c:163 msgid "Codepage" msgstr "Jeu de caractères" @@ -3346,10 +3346,31 @@ msgid "URI passing" msgstr "Passage d'URI" #: src/config/options.inc:726 -msgid "Rules for passing URIs to external commands." -msgstr "Règles de passage d'URIs aux commandes externes." +msgid "" +"Rules for passing URIs to external commands. When one rule\n" +"is defined the link and tab menu will have a menu item that\n" +"makes it possible to pass the the link, frame or tab URI to\n" +"an external command. If several rules are defined the link and\n" +"tab menu will have a submenu of items for each rule. Note, this\n" +"is mostly useful for launching graphical viewers, since there\n" +"is not support for releasing the terminal while the command runs.\n" +"The action and submenus are also available by binding keys to\n" +"the frame-external-command, the link-external-command, and\n" +"the tab-external-command actions." +msgstr "" +"Règles pour passer les URIs à des commandes. Quand une règle\n" +"est définie, les menus lien et onglet sont enrichis d'un item\n" +"permettant le passage de l'URI du lien, du cadre ou de l'onglet\n" +"à une commande externe. Si plusieurs règles sont définies, des\n" +"sous-menus sont présentés. Notez que cette fonctionnalité est\n" +"surtout utile pour le lancement d'applications graphiques, car\n" +"il n'y a pas de support pour le relâchement du terminal quand la\n" +"commande s'exécute. L'action et les sous-menus sont aussi\n" +"accessibles en attachant des touches de clavier aux actions\n" +"frame-external-command, link-external-command,\n" +"et tab-external-command." -#: src/config/options.inc:730 +#: src/config/options.inc:739 msgid "" "A rule for passing URI to an external command.\n" "The format is:\n" @@ -3364,19 +3385,19 @@ msgstr "" "Ne mettez pas de simples ou doubles guillemets autour de %c." #. Keep options in alphabetical order. -#: src/config/options.inc:740 +#: src/config/options.inc:749 msgid "Information files" msgstr "Fichiers d'information" -#: src/config/options.inc:742 +#: src/config/options.inc:751 msgid "Options for information files in ~/.elinks." msgstr "Options concernant les fichiers d'information dans ~/.elinks." -#: src/config/options.inc:744 +#: src/config/options.inc:753 msgid "Save interval" msgstr "Intervalle pour la sauvegarde automatique" -#: src/config/options.inc:746 +#: src/config/options.inc:755 msgid "" "Interval at which to trigger information files in ~/.elinks\n" "to be saved to disk if they has changed (seconds; 0 to disable)" @@ -3384,11 +3405,11 @@ msgstr "" "Intervalle pour la sauvegarde des fichiers d'information dans ~/.elinks\n" "lorsque ceux-ci ont été modifiés (en secondes; 0 pour désactiver)" -#: src/config/options.inc:749 +#: src/config/options.inc:758 msgid "Use secure file saving" msgstr "Fiabiliser la sauvegarde des fichiers" -#: src/config/options.inc:751 +#: src/config/options.inc:760 msgid "" "First write data to unique temporary file, then rename this file\n" "upon successfully finishing this. Note that this relates only to\n" @@ -3411,11 +3432,11 @@ msgstr "" "destination n'existe pas au moment de l'appel à rename(3), cela casse\n" "l'atomicité de l'opération et réduit la fiabilité de cette fonctionnalité." -#: src/config/options.inc:760 +#: src/config/options.inc:769 msgid "Use fsync(3) with secure file saving" msgstr "Utiliser fsync(3) avec la sauvegarde fiable des fichiers" -#: src/config/options.inc:762 +#: src/config/options.inc:771 msgid "" "When using secure file saving, call fsync(3), if the OS\n" "supports it, to force the OS immediately to write the data\n" @@ -3429,21 +3450,21 @@ msgstr "" "éviter une utilisation excessive des entrées/sorties disque." #. Keep options in alphabetical order. -#: src/config/options.inc:771 +#: src/config/options.inc:780 msgid "Terminals" msgstr "Terminaux" -#: src/config/options.inc:773 +#: src/config/options.inc:782 msgid "Terminal options." msgstr "Options du terminal." -#: src/config/options.inc:777 +#: src/config/options.inc:786 msgid "Options specific to this terminal type (according to $TERM value)." msgstr "" "Options spécifiques à ce type de terminal (conformément à la valeur de " "$TERM)." -#: src/config/options.inc:781 +#: src/config/options.inc:790 msgid "" "Terminal type; matters mostly only when drawing frames and\n" "dialog box borders:\n" @@ -3460,11 +3481,11 @@ msgstr "" "3 KOI-8\n" "4 FreeBSD" -#: src/config/options.inc:789 src/dialogs/options.c:203 +#: src/config/options.inc:798 src/dialogs/options.c:203 msgid "Switch fonts for line drawing" msgstr "Echanger les fontes pour dessiner les lignes" -#: src/config/options.inc:791 +#: src/config/options.inc:800 msgid "" "Switch fonts when drawing lines, enabling both local characters\n" "and lines working at the same time. Makes sense only with linux\n" @@ -3473,11 +3494,11 @@ msgstr "" "Echanger les fontes de caractères pour le dessin des lignes, seulement\n" "intéressant avec le terminal de type linux." -#: src/config/options.inc:795 src/dialogs/options.c:208 +#: src/config/options.inc:804 src/dialogs/options.c:208 msgid "UTF-8 I/O" msgstr "E/S UTF-8" -#: src/config/options.inc:797 +#: src/config/options.inc:806 msgid "" "Enable I/O in UTF8 for Unicode terminals. Note that currently,\n" "only the subset of UTF8 according to terminal codepage is used." @@ -3487,11 +3508,11 @@ msgstr "" "seulement une partie de l'UTF8 est utilisée, en accord avec le jeu de " "caractères du terminal." -#: src/config/options.inc:800 src/dialogs/options.c:204 +#: src/config/options.inc:809 src/dialogs/options.c:204 msgid "Restrict frames in cp850/852" msgstr "Limiter les cadres dans cp850/852" -#: src/config/options.inc:802 +#: src/config/options.inc:811 msgid "" "Restrict the characters used when drawing lines. Makes sense\n" "only with linux terminals using the cp850/852 character sets." @@ -3500,11 +3521,11 @@ msgstr "" "N'a du sens que pour les terminaux linux utilisant les jeux de\n" "caractères cp850/852." -#: src/config/options.inc:805 src/dialogs/options.c:205 +#: src/config/options.inc:814 src/dialogs/options.c:205 msgid "Block cursor" msgstr "Bloquer le curseur" -#: src/config/options.inc:807 +#: src/config/options.inc:816 msgid "" "Move cursor to bottom right corner when done drawing.\n" "This is particularly useful when we have a block cursor,\n" @@ -3515,11 +3536,11 @@ msgstr "" "en forme de bloc est utilisé, ainsi le texte inversé\n" "est affiché correctement." -#: src/config/options.inc:811 +#: src/config/options.inc:820 msgid "Color mode" msgstr "Mode couleurs" -#: src/config/options.inc:813 +#: src/config/options.inc:822 msgid "" "The color mode controls what colors are used and how they are\n" "output to the terminal. The color modes are:\n" @@ -3533,11 +3554,11 @@ msgstr "" "1 mode 16 couleurs, les couleurs ANSI sont utilisées\n" "2 mode 256 couleurs, utilise les codes RGB d'XTerm" -#: src/config/options.inc:819 src/dialogs/options.c:206 +#: src/config/options.inc:828 src/dialogs/options.c:206 msgid "Transparency" msgstr "Transparence" -#: src/config/options.inc:821 +#: src/config/options.inc:830 msgid "" "If we should not set the background to black. This is particularly\n" "useful when we have a terminal (typically in some windowing\n" @@ -3548,11 +3569,11 @@ msgstr "" "Permet d'utiliser un fond image ou transparent au lieu d'un fond noir.\n" "Votre terminal doit supporter la transparence et les couleurs." -#: src/config/options.inc:829 +#: src/config/options.inc:838 msgid "If we should use underline or enhance the color instead." msgstr "Si nous devons utiliser le souligné ou modifier la couleur." -#: src/config/options.inc:833 +#: src/config/options.inc:842 msgid "" "Codepage of charset used for displaying content on terminal.\n" "'System' stands for a codepage determined by a selected locale." @@ -3562,374 +3583,374 @@ msgstr "" "sélectionnée." #. Keep options in alphabetical order. -#: src/config/options.inc:840 +#: src/config/options.inc:849 msgid "User interface" msgstr "Interface utilisateur" -#: src/config/options.inc:842 +#: src/config/options.inc:851 msgid "User interface options." msgstr "Options de l'interface utilisateur." -#: src/config/options.inc:846 +#: src/config/options.inc:855 msgid "Color settings" msgstr "Configuration des couleurs" -#: src/config/options.inc:848 +#: src/config/options.inc:857 msgid "Default user interface color settings." msgstr "Configuration des couleurs de l'interface utilisateur." -#: src/config/options.inc:875 +#: src/config/options.inc:884 msgid "Color terminals" msgstr "Terminaux couleur" -#: src/config/options.inc:877 +#: src/config/options.inc:886 msgid "Color settings for color terminal." msgstr "Configuration des couleurs des terminaux couleur." -#: src/config/options.inc:879 +#: src/config/options.inc:888 msgid "Non-color terminals" msgstr "Terminaux monochromes" -#: src/config/options.inc:881 +#: src/config/options.inc:890 msgid "Color settings for non-color terminal." msgstr "Configuration des couleurs pour les terminaux monochromes." #. FIXME: obsolete, how to alias them correctly ? --Zas -#: src/config/options.inc:884 +#: src/config/options.inc:893 msgid "Main menu bar" msgstr "Barre du menu principal" -#: src/config/options.inc:886 +#: src/config/options.inc:895 msgid "Main menu bar colors." msgstr "Couleurs de la barre du menu principal." -#: src/config/options.inc:888 +#: src/config/options.inc:897 msgid "Unselected main menu bar item" msgstr "Item non sélectionné de la barre de menu" -#: src/config/options.inc:890 +#: src/config/options.inc:899 msgid "Unselected main menu bar item colors." msgstr "Couleurs des items non sélectionnés de la barre de menu." -#: src/config/options.inc:892 +#: src/config/options.inc:901 msgid "Selected main menu bar item" msgstr "Item sélectionné de la barre de menu" -#: src/config/options.inc:894 +#: src/config/options.inc:903 msgid "Selected main menu bar item colors." msgstr "Couleurs de l'item sélectionné de la barre de menu." -#: src/config/options.inc:896 src/config/options.inc:925 +#: src/config/options.inc:905 src/config/options.inc:934 msgid "Hotkey" msgstr "Raccourci clavier" -#: src/config/options.inc:898 +#: src/config/options.inc:907 msgid "Main menu hotkey colors." msgstr "Couleurs des raccourcis de la barre du menu principal." -#: src/config/options.inc:900 src/config/options.inc:929 +#: src/config/options.inc:909 src/config/options.inc:938 msgid "Unselected hotkey" msgstr "Raccourci non sélectionné" -#: src/config/options.inc:902 +#: src/config/options.inc:911 msgid "Main menu unselected hotkey colors." msgstr "Couleurs des raccourcis non sélectionnés du menu principal." -#: src/config/options.inc:904 src/config/options.inc:933 +#: src/config/options.inc:913 src/config/options.inc:942 msgid "Selected hotkey" msgstr "Raccourci sélectionné" -#: src/config/options.inc:906 +#: src/config/options.inc:915 msgid "Main menu selected hotkey colors." msgstr "Couleurs des raccourcis sélectionnés du menu principal." -#: src/config/options.inc:909 +#: src/config/options.inc:918 msgid "Menu bar" msgstr "Barre de menu" -#: src/config/options.inc:911 +#: src/config/options.inc:920 msgid "Menu bar colors." msgstr "Couleurs de la barre de menu." -#: src/config/options.inc:913 +#: src/config/options.inc:922 msgid "Unselected menu item" msgstr "Item non sélectionné du menu" -#: src/config/options.inc:915 +#: src/config/options.inc:924 msgid "Unselected menu item colors." msgstr "Couleurs des items non sélectionnés du menu." -#: src/config/options.inc:917 +#: src/config/options.inc:926 msgid "Selected menu item" msgstr "Item sélectionné du menu" -#: src/config/options.inc:919 +#: src/config/options.inc:928 msgid "Selected menu item colors." msgstr "Couleurs de l'item sélectionnés du menu." -#: src/config/options.inc:921 +#: src/config/options.inc:930 msgid "Marked menu item" msgstr "Item de menu marqué" -#: src/config/options.inc:923 +#: src/config/options.inc:932 msgid "Marked menu item colors." msgstr "Couleurs de l'item du menu marqué." -#: src/config/options.inc:927 +#: src/config/options.inc:936 msgid "Menu item hotkey colors." msgstr "Couleurs des raccourcis dans les menus." -#: src/config/options.inc:931 +#: src/config/options.inc:940 msgid "Menu item unselected hotkey colors." msgstr "Couleurs des raccourcis non sélectionnés dans les menus." -#: src/config/options.inc:935 +#: src/config/options.inc:944 msgid "Menu item selected hotkey colors." msgstr "Couleurs des raccourcis sélectionnés dans les menus." -#: src/config/options.inc:937 +#: src/config/options.inc:946 msgid "Menu frame" msgstr "Bordure du menu" -#: src/config/options.inc:939 +#: src/config/options.inc:948 msgid "Menu frame colors." msgstr "Couleurs de la bordure du menu." -#: src/config/options.inc:942 +#: src/config/options.inc:951 msgid "Dialog" msgstr "Dialogue" -#: src/config/options.inc:944 +#: src/config/options.inc:953 msgid "Dialog colors." msgstr "Couleurs des dialogues." -#: src/config/options.inc:954 +#: src/config/options.inc:963 msgid "Generic" msgstr "Générique" -#: src/config/options.inc:956 +#: src/config/options.inc:965 msgid "Generic dialog colors." msgstr "Couleurs des dialogues génériques." -#: src/config/options.inc:958 +#: src/config/options.inc:967 msgid "Frame" msgstr "Bordure" -#: src/config/options.inc:960 +#: src/config/options.inc:969 msgid "Dialog frame colors." msgstr "Couleurs de la bordure des dialogues." -#: src/config/options.inc:962 +#: src/config/options.inc:971 msgid "Scrollbar" msgstr "Barre de défilement" -#: src/config/options.inc:964 +#: src/config/options.inc:973 msgid "Scrollbar colors." msgstr "Couleurs de la barre de défilement." -#: src/config/options.inc:966 +#: src/config/options.inc:975 msgid "Selected scrollbar" msgstr "Barre de défilement sélectionnée" -#: src/config/options.inc:968 +#: src/config/options.inc:977 msgid "Scrollbar selected colors." msgstr "Couleurs de la barre de défilement sélectionnée." -#: src/config/options.inc:972 +#: src/config/options.inc:981 msgid "Dialog title colors." msgstr "Couleurs du titre des dialogues." -#: src/config/options.inc:974 +#: src/config/options.inc:983 msgid "Text" msgstr "Texte" -#: src/config/options.inc:976 +#: src/config/options.inc:985 msgid "Dialog text colors." msgstr "Couleurs du texte des dialogues." -#: src/config/options.inc:978 src/viewer/text/form.c:1462 +#: src/config/options.inc:987 src/viewer/text/form.c:1462 msgid "Checkbox" msgstr "Case à cocher" -#: src/config/options.inc:980 +#: src/config/options.inc:989 msgid "Dialog checkbox colors." msgstr "Couleurs des cases à cocher dans les dialogues." -#: src/config/options.inc:982 +#: src/config/options.inc:991 msgid "Selected checkbox" msgstr "Case à cocher sélectionnée" -#: src/config/options.inc:984 +#: src/config/options.inc:993 msgid "Dialog selected checkbox colors." msgstr "Couleurs de la case à cocher sélectionnée dans les dialogues." -#: src/config/options.inc:986 +#: src/config/options.inc:995 msgid "Checkbox label" msgstr "Label de case à cocher" -#: src/config/options.inc:988 +#: src/config/options.inc:997 msgid "Dialog checkbox label colors." msgstr "Couleurs des labels des cases à cocher dans les dialogues." -#: src/config/options.inc:990 +#: src/config/options.inc:999 msgid "Button" msgstr "Bouton" -#: src/config/options.inc:992 src/config/options.inc:1000 +#: src/config/options.inc:1001 src/config/options.inc:1009 msgid "Dialog button colors." msgstr "Couleurs des boutons des dialogues." -#: src/config/options.inc:994 +#: src/config/options.inc:1003 msgid "Selected button" msgstr "Bouton sélectionné" -#: src/config/options.inc:996 src/config/options.inc:1004 +#: src/config/options.inc:1005 src/config/options.inc:1013 msgid "Dialog selected button colors." msgstr "Couleurs du bouton sélectionné dans les dialogues." -#: src/config/options.inc:998 +#: src/config/options.inc:1007 msgid "Button shortcut" msgstr "Raccourci du bouton" -#: src/config/options.inc:1002 +#: src/config/options.inc:1011 msgid "Selected button shortcut" msgstr "Raccourci du bouton sélectionné" -#: src/config/options.inc:1006 src/viewer/text/form.c:1466 +#: src/config/options.inc:1015 src/viewer/text/form.c:1466 msgid "Text field" msgstr "Champ texte" -#: src/config/options.inc:1008 +#: src/config/options.inc:1017 msgid "Dialog text field colors." msgstr "Couleurs des champs texte dans les dialogues." -#: src/config/options.inc:1010 +#: src/config/options.inc:1019 msgid "Text field text" msgstr "Texte des champs texte" -#: src/config/options.inc:1012 +#: src/config/options.inc:1021 msgid "Dialog field text colors." msgstr "Couleurs de texte des champs texte dans les dialogues." -#: src/config/options.inc:1014 +#: src/config/options.inc:1023 msgid "Meter" msgstr "Barre de progression" -#: src/config/options.inc:1016 +#: src/config/options.inc:1025 msgid "Dialog meter colors." msgstr "Couleurs des barres de progression." -#: src/config/options.inc:1018 +#: src/config/options.inc:1027 msgid "Shadow" msgstr "Ombrage" -#: src/config/options.inc:1020 +#: src/config/options.inc:1029 msgid "Dialog shadow colors (see ui.shadows option)." msgstr "Couleurs des ombres des dialogues (voir l'option ui.shadows)." -#: src/config/options.inc:1022 +#: src/config/options.inc:1031 msgid "Title bar" msgstr "Barre de titre" -#: src/config/options.inc:1024 +#: src/config/options.inc:1033 msgid "Title bar colors." msgstr "Couleurs de la barre de titre." -#: src/config/options.inc:1026 +#: src/config/options.inc:1035 msgid "Generic title bar" msgstr "Barre de titre générique" -#: src/config/options.inc:1028 +#: src/config/options.inc:1037 msgid "Generic title bar colors." msgstr "Couleurs de la barre de titre générique." -#: src/config/options.inc:1030 +#: src/config/options.inc:1039 msgid "Title bar text" msgstr "Texte de la barre de titre" -#: src/config/options.inc:1032 +#: src/config/options.inc:1041 msgid "Title bar text colors." msgstr "Couleurs du texte de la barre de titre." -#: src/config/options.inc:1035 +#: src/config/options.inc:1044 msgid "Status bar" msgstr "Barre d'état" -#: src/config/options.inc:1037 +#: src/config/options.inc:1046 msgid "Status bar colors." msgstr "Couleurs de la barre d'état." -#: src/config/options.inc:1039 +#: src/config/options.inc:1048 msgid "Generic status bar" msgstr "Barre d'état générique" -#: src/config/options.inc:1041 +#: src/config/options.inc:1050 msgid "Generic status bar colors." msgstr "Couleurs de la barre d'état générique." -#: src/config/options.inc:1043 +#: src/config/options.inc:1052 msgid "Status bar text" msgstr "Texte de la barre d'état" -#: src/config/options.inc:1045 +#: src/config/options.inc:1054 msgid "Status bar text colors." msgstr "Couleurs du texte de la barre d'état." -#: src/config/options.inc:1048 +#: src/config/options.inc:1057 msgid "Tabs bar" msgstr "Barre d'onglets" -#: src/config/options.inc:1050 +#: src/config/options.inc:1059 msgid "Tabs bar colors." msgstr "Couleurs de la barre d'onglets." -#: src/config/options.inc:1052 +#: src/config/options.inc:1061 msgid "Unvisited tab" msgstr "Onglet non visité" -#: src/config/options.inc:1054 +#: src/config/options.inc:1063 msgid "" "Tab colors for tabs that have not been\n" "selected since they completed loading." msgstr "Couleurs pour les onglets non encore visités depuis leur chargement." -#: src/config/options.inc:1057 +#: src/config/options.inc:1066 msgid "Unselected tab" msgstr "Onglet non sélectionné" -#: src/config/options.inc:1059 +#: src/config/options.inc:1068 msgid "Unselected tab colors." msgstr "Couleurs des onglets non sélectionnés." -#: src/config/options.inc:1061 +#: src/config/options.inc:1070 msgid "Loading tab" msgstr "Onglet en cours de chargement" -#: src/config/options.inc:1063 +#: src/config/options.inc:1072 msgid "Tab colors for tabs that are loading in the background." msgstr "Couleurs pour les onglets en cours de chargement." -#: src/config/options.inc:1065 +#: src/config/options.inc:1074 msgid "Selected tab" msgstr "Onglet sélectionné" -#: src/config/options.inc:1067 +#: src/config/options.inc:1076 msgid "Selected tab colors." msgstr "Couleurs de l'onglet sélectionné." -#: src/config/options.inc:1069 +#: src/config/options.inc:1078 msgid "Tab separator" msgstr "Séparateur d'onglets" -#: src/config/options.inc:1071 +#: src/config/options.inc:1080 msgid "Tab separator colors." msgstr "Couleurs du séparateur d'onglets." -#: src/config/options.inc:1074 +#: src/config/options.inc:1083 msgid "Searched strings" msgstr "Chaînes recherchées" -#: src/config/options.inc:1076 +#: src/config/options.inc:1085 msgid "Searched string highlight colors." msgstr "Couleurs de mise en évidence des chaînes recherchées." @@ -3937,19 +3958,19 @@ msgstr "Couleurs de mise en #. ============= BORING PART (colors) END =================== #. ========================================================== #. Keep options in alphabetical order. -#: src/config/options.inc:1085 +#: src/config/options.inc:1094 msgid "Dialog settings" msgstr "Configuration des dialogues" -#: src/config/options.inc:1087 +#: src/config/options.inc:1096 msgid "Dialogs-specific appearance and behaviour settings." msgstr "Configuration de l'apparence et du fonctionnement des dialogues." -#: src/config/options.inc:1090 +#: src/config/options.inc:1099 msgid "Minimal height of listbox widget" msgstr "Hauteur minimale des boîtes liste" -#: src/config/options.inc:1092 +#: src/config/options.inc:1101 msgid "" "Minimal height of the listbox widget (used e.g. for bookmarks\n" "or global history)." @@ -3957,11 +3978,11 @@ msgstr "" "Hauteur minimale des boîtes liste (utilisée par exemple pour les\n" "signets ou l'historique global)." -#: src/config/options.inc:1095 +#: src/config/options.inc:1104 msgid "Drop shadows" msgstr "Porter des ombres" -#: src/config/options.inc:1097 +#: src/config/options.inc:1106 msgid "" "Make dialogs drop shadows (the shadows are solid, you can\n" "adjust their color by ui.colors.*.dialog.shadow). You may\n" @@ -3971,11 +3992,11 @@ msgstr "" "ombres est définie par ui.colors.*.dialog.shadow). Vous pouvez\n" "réduire la largeur des bordures en éditant setup.h." -#: src/config/options.inc:1101 +#: src/config/options.inc:1110 msgid "Underline menu hotkeys" msgstr "Souligner les raccourcis des menus" -#: src/config/options.inc:1103 +#: src/config/options.inc:1112 msgid "" "Whether to underline hotkeys in menus to make them more\n" "visible. Requires the underlining is enabled for the terminal." @@ -3983,11 +4004,11 @@ msgstr "" "Souligner ou non les raccourcis des menus pour les rendre\n" "plus visibles. Le soulignement doit être activé pour le terminal." -#: src/config/options.inc:1106 +#: src/config/options.inc:1115 msgid "Underline button shortcuts" msgstr "Souligner les raccourcis des boutons" -#: src/config/options.inc:1108 +#: src/config/options.inc:1117 msgid "" "Whether to underline button shortcuts to make them more\n" "visible. Requires the underlining is enabled for the terminal." @@ -3995,11 +4016,11 @@ msgstr "" "Souligner ou non les raccourcis des boutons pour les rendre\n" "plus visibles. Le soulignement doit être activé pour le terminal." -#: src/config/options.inc:1112 +#: src/config/options.inc:1121 msgid "Timer options" msgstr "Options des timers" -#: src/config/options.inc:1114 +#: src/config/options.inc:1123 msgid "" "Timed action after certain interval of user inactivity. Someone can\n" "even find this useful, although you may not believe that." @@ -4007,7 +4028,7 @@ msgstr "" "Action après un certain temps d'inactivité de l'utilisateur. Certains\n" "peuvent trouver ceci utile ou non." -#: src/config/options.inc:1120 +#: src/config/options.inc:1129 msgid "" "Whether to enable the timer or not:\n" "0 is don't count down anything\n" @@ -4019,7 +4040,7 @@ msgstr "" "1 oui, mais ne pas montrer le timer\n" "2 oui et montrer le timer près des LEDs" -#: src/config/options.inc:1127 +#: src/config/options.inc:1136 msgid "" "Whether to enable the timer or not:\n" "0 is don't count down anything\n" @@ -4031,11 +4052,11 @@ msgstr "" "1 oui, mais ne pas montrer le timer\n" "2 oui et montrer le timer près des LEDs (DÉSACTIVÉ)" -#: src/config/options.inc:1133 +#: src/config/options.inc:1142 msgid "Duration" msgstr "Durée" -#: src/config/options.inc:1135 +#: src/config/options.inc:1144 msgid "" "Inactivity timeout in seconds. The maximum of one day\n" "should be enough for just everyone (TM)." @@ -4043,23 +4064,23 @@ msgstr "" "Délai d'inactivité en secondes. Une durée maximale\n" "d'un jour devrait suffire à tout le monde (TM)." -#: src/config/options.inc:1140 +#: src/config/options.inc:1149 msgid "Keybinding action to be triggered when timer reaches zero." msgstr "Action à déclencher lorsque le timer atteint zéro." -#: src/config/options.inc:1143 +#: src/config/options.inc:1152 msgid "Window tabs" msgstr "Onglets" -#: src/config/options.inc:1145 +#: src/config/options.inc:1154 msgid "Window tabs settings." msgstr "Configuration des onglets." -#: src/config/options.inc:1147 +#: src/config/options.inc:1156 msgid "Display tabs bar" msgstr "Afficher la barre d'onglets" -#: src/config/options.inc:1149 +#: src/config/options.inc:1158 msgid "" "Show tabs bar on the screen:\n" "0 means never\n" @@ -4071,11 +4092,11 @@ msgstr "" "1 seulement si deux onglets ou plus sont ouverts\n" "2 toujours" -#: src/config/options.inc:1154 +#: src/config/options.inc:1163 msgid "Wrap-around tabs cycling" msgstr "Navigation cyclique dans les onglets" -#: src/config/options.inc:1156 +#: src/config/options.inc:1165 msgid "" "When moving right from the last tab, jump at the first one, and\n" "vice versa." @@ -4083,20 +4104,20 @@ msgstr "" "En cas de déplacement à droite sur le dernier onglet, saute au premier\n" "et vice-versa." -#: src/config/options.inc:1159 +#: src/config/options.inc:1168 msgid "Confirm tab closing" msgstr "Confirmer la fermeture d'onglet" -#: src/config/options.inc:1161 +#: src/config/options.inc:1170 msgid "When closing a tab show confirmation dialog." msgstr "" "Lors de la fermeture d'un onglet, afficher un dialogue de confirmation." -#: src/config/options.inc:1165 src/config/opttypes.c:395 +#: src/config/options.inc:1174 src/config/opttypes.c:395 msgid "Language" msgstr "Langue" -#: src/config/options.inc:1167 +#: src/config/options.inc:1176 msgid "" "Language of user interface. 'System' means that the language will\n" "be extracted from the environment dynamically." @@ -4104,27 +4125,27 @@ msgstr "" "Langue de l'interface utilisateur. 'System' signifie que la langue\n" "sera dynamiquement extraite de l'environnement." -#: src/config/options.inc:1170 +#: src/config/options.inc:1179 msgid "Display status bar" msgstr "Afficher la barre d'état" -#: src/config/options.inc:1172 +#: src/config/options.inc:1181 msgid "Show status bar on the screen." msgstr "Montrer la barre d'état." -#: src/config/options.inc:1174 +#: src/config/options.inc:1183 msgid "Display title bar" msgstr "Afficher la barre de titre" -#: src/config/options.inc:1176 +#: src/config/options.inc:1185 msgid "Show title bar on the screen." msgstr "Montrer la barre de titre." -#: src/config/options.inc:1178 +#: src/config/options.inc:1187 msgid "Display goto dialog in new tabs" msgstr "Afficher le dialogue \"Atteindre l'URL\" dans les nouveaux onglets" -#: src/config/options.inc:1180 +#: src/config/options.inc:1189 msgid "" "Pop up goto dialog in newly created tabs when there's no homepage\n" "set. This means also showing goto dialog on startup." @@ -4133,11 +4154,11 @@ msgstr "" "quand aucune page d'accueil n'est configurée. Cela implique aussi de\n" "montrer le dialogue au démarrage." -#: src/config/options.inc:1183 +#: src/config/options.inc:1192 msgid "Show a message box when file is saved successfully" msgstr "Afficher un dialogue quand le fichier a été sauvé avec succès" -#: src/config/options.inc:1185 +#: src/config/options.inc:1194 msgid "" "When you pressed a [ Save ] button in some manager, this option\n" "will make sure that a box confirming success of the operation will\n" @@ -4147,27 +4168,27 @@ msgstr "" "option active un dialogue qui confirme que l'opération s'est déroulée\n" "correctement." -#: src/config/options.inc:1190 +#: src/config/options.inc:1199 msgid "Sessions" msgstr "Sessions" -#: src/config/options.inc:1192 +#: src/config/options.inc:1201 msgid "Sessions settings." msgstr "Configuration des sessions." -#: src/config/options.inc:1194 +#: src/config/options.inc:1203 msgid "Keep session active" msgstr "Garder la session active" -#: src/config/options.inc:1196 +#: src/config/options.inc:1205 msgid "Keep the session active even if the last terminal exits." msgstr "Garder la session active même si le dernier terminal est clos." -#: src/config/options.inc:1198 +#: src/config/options.inc:1207 msgid "Auto save session" msgstr "Sauver automatiquement la session" -#: src/config/options.inc:1200 +#: src/config/options.inc:1209 msgid "" "Automatically save the session when quitting.\n" "This feature requires bookmark support." @@ -4175,11 +4196,11 @@ msgstr "" "Sauvegarder automatiquement la session au moment de quitter.\n" "Cette fonctionnalité nécessite le support des signets." -#: src/config/options.inc:1203 +#: src/config/options.inc:1212 msgid "Auto restore session" msgstr "Restaurer automatiquement la session" -#: src/config/options.inc:1205 +#: src/config/options.inc:1214 msgid "" "Automatically restore the session at start.\n" "This feature requires bookmark support." @@ -4187,11 +4208,11 @@ msgstr "" "Restaurer automatiquement la session au démarrage.\n" "Cette fonctionnalité nécessite le support des signets." -#: src/config/options.inc:1208 +#: src/config/options.inc:1217 msgid "Auto save and restore session folder name" msgstr "Nom du dossier pour la session automatique" -#: src/config/options.inc:1210 +#: src/config/options.inc:1219 msgid "" "Name of the bookmarks folder used for auto saving and restoring session.\n" "The name has to be unique. Any folders with the same name will be deleted.\n" @@ -4201,11 +4222,11 @@ msgstr "" "automatique de la session. Le nom doit être unique, tout dossier du même\n" "nom sera détruit. Cette option n'a de sens qu'avec le support des signets." -#: src/config/options.inc:1214 +#: src/config/options.inc:1223 msgid "Homepage URI" msgstr "URI de la page d'accueil" -#: src/config/options.inc:1216 +#: src/config/options.inc:1225 msgid "" "The URI to load either at startup time when no URI was given\n" "on the command line or when requested by the goto-url-home action.\n" @@ -4217,19 +4238,19 @@ msgstr "" "Mettre \"\" si la variable d'environnement WWW_HOME doit être\n" "utilisée comme URI de page d'accueil." -#: src/config/options.inc:1222 +#: src/config/options.inc:1231 msgid "Date format" msgstr "Format des dates" -#: src/config/options.inc:1224 +#: src/config/options.inc:1233 msgid "Date format to use in dialogs. See strftime(3)." msgstr "Format utilisé pour les dates dans les dialogues. Voir strftime(3)." -#: src/config/options.inc:1227 +#: src/config/options.inc:1236 msgid "Set window title" msgstr "Modifier le titre de la fenêtre" -#: src/config/options.inc:1229 +#: src/config/options.inc:1238 msgid "" "Set the window title when running in a windowing environment\n" "in an xterm-like terminal. This way the document's title is\n" @@ -4574,7 +4595,7 @@ msgid "No header info." msgstr "Aucune information d'en-tête." #: src/dialogs/download.c:237 src/dialogs/menu.c:571 -#: src/protocol/bittorrent/dialogs.c:228 src/session/download.c:362 +#: src/protocol/bittorrent/dialogs.c:228 src/session/download.c:361 msgid "Download" msgstr "Téléchargement" @@ -6951,7 +6972,7 @@ msgstr "Fichiers" msgid "Comment" msgstr "Commentaire" -#: src/protocol/bittorrent/dialogs.c:229 src/session/download.c:363 +#: src/protocol/bittorrent/dialogs.c:229 src/session/download.c:362 #, c-format msgid "" "Download complete:\n" @@ -7124,7 +7145,7 @@ msgstr "Que voulez-vous faire avec le fichier '%s' ?" msgid "Information about the torrent" msgstr "Informations sur le torrent" -#: src/protocol/bittorrent/dialogs.c:763 src/session/download.c:1039 +#: src/protocol/bittorrent/dialogs.c:763 src/session/download.c:1036 msgid "What to do?" msgstr "Que faire ?" @@ -7132,11 +7153,11 @@ msgstr "Que faire ?" msgid "Down~load" msgstr "Té~lécharger" -#: src/protocol/bittorrent/dialogs.c:791 src/session/download.c:1133 +#: src/protocol/bittorrent/dialogs.c:791 src/session/download.c:1130 msgid "~Display" msgstr "A~fficher" -#: src/protocol/bittorrent/dialogs.c:795 src/session/download.c:1137 +#: src/protocol/bittorrent/dialogs.c:795 src/session/download.c:1134 msgid "Show ~header" msgstr "~Montrer les en-têtes" @@ -7857,12 +7878,12 @@ msgstr "Erreur de script" msgid "Scripting" msgstr "Scripting" -#: src/session/download.c:234 src/session/download.c:331 -#: src/session/download.c:498 src/session/download.c:593 +#: src/session/download.c:233 src/session/download.c:330 +#: src/session/download.c:497 src/session/download.c:592 msgid "Download error" msgstr "Erreur de téléchargement" -#: src/session/download.c:235 src/session/download.c:594 +#: src/session/download.c:234 src/session/download.c:593 #, c-format msgid "" "Could not create file '%s':\n" @@ -7871,7 +7892,7 @@ msgstr "" "Impossible de créer le fichier '%s':\n" "%s" -#: src/session/download.c:332 +#: src/session/download.c:331 #, c-format msgid "" "Error downloading %s:\n" @@ -7882,16 +7903,16 @@ msgstr "" "\n" "%s" -#: src/session/download.c:499 +#: src/session/download.c:498 #, c-format msgid "'%s' is a directory." msgstr "'%s' est un répertoire." -#: src/session/download.c:533 +#: src/session/download.c:532 msgid "File exists" msgstr "Fichier existant" -#: src/session/download.c:534 +#: src/session/download.c:533 #, c-format msgid "" "This file already exists:\n" @@ -7906,51 +7927,51 @@ msgstr "" "Le nom alternatif est:\n" "%s" -#: src/session/download.c:541 +#: src/session/download.c:540 msgid "Sa~ve under the alternative name" msgstr "Sau~ver sous un nom alternatif" -#: src/session/download.c:542 +#: src/session/download.c:541 msgid "~Overwrite the original file" msgstr "Ecraser le fichier ~original" -#: src/session/download.c:543 +#: src/session/download.c:542 msgid "~Resume download of the original file" msgstr "~Reprendre le téléchargement du fichier original" -#: src/session/download.c:1042 +#: src/session/download.c:1039 msgid "Unknown type" msgstr "Type inconnu" -#: src/session/download.c:1059 +#: src/session/download.c:1056 #, c-format msgid "What would you like to do with the file '%s' (type: %s%s%s)?" msgstr "Que voulez-vous faire avec le fichier '%s' (type: %s%s%s) ?" -#: src/session/download.c:1089 +#: src/session/download.c:1086 #, no-c-format msgid "Program ('%' will be replaced by the filename)" msgstr "Programme ('%' sera remplacé par le nom du fichier)" -#: src/session/download.c:1093 +#: src/session/download.c:1090 msgid "Block the terminal" msgstr "Bloquer le terminal" -#: src/session/download.c:1099 +#: src/session/download.c:1096 #, c-format msgid "The file will be opened with the program '%s'." msgstr "Le fichier sera ouvert avec le programme '%s'." -#: src/session/download.c:1120 +#: src/session/download.c:1117 msgid "~Open" msgstr "~Ouvrir" -#: src/session/session.c:742 src/session/session.c:761 src/session/task.c:269 +#: src/session/session.c:750 src/session/session.c:769 src/session/task.c:269 #: src/viewer/text/textarea.c:385 msgid "Warning" msgstr "Avertissement" -#: src/session/session.c:743 +#: src/session/session.c:751 msgid "" "You have empty string in protocol.http.user_agent - this was a default value " "in the past, substituted by default ELinks User-Agent string. However, " @@ -7969,7 +7990,7 @@ msgstr "" "défaut sera utilisée. Si vous n'avez aucune idée de quoi nous parlons alors " "faites juste ça. Toutes nos excuses pour ce désagrément." -#: src/session/session.c:762 +#: src/session/session.c:770 msgid "" "You have option config.saving_style set to a de facto obsolete value. The " "configuration saving algorithms of ELinks were changed from the last time " @@ -7990,11 +8011,11 @@ msgstr "" "l'option config.saving_style dans le but d'obtenir un fonctionnement " "correct. Toutes nos excuses pour l'éventuel désagrément causé." -#: src/session/session.c:787 +#: src/session/session.c:795 msgid "Welcome" msgstr "Bienvenue" -#: src/session/session.c:788 +#: src/session/session.c:796 msgid "" "Welcome to ELinks!\n" "\n" @@ -8384,3 +8405,6 @@ msgstr "Erreur lors de la sauvegarde" #: src/viewer/text/view.c:1289 msgid "Error writing to file" msgstr "Erreur lors de l'écriture du fichier" + +#~ msgid "Rules for passing URIs to external commands." +#~ msgstr "Règles de passage d'URIs aux commandes externes." diff --git a/src/config/options.inc b/src/config/options.inc index a3c91e14..649bd494 100644 --- a/src/config/options.inc +++ b/src/config/options.inc @@ -724,7 +724,16 @@ static struct option_info config_options_info[] = { INIT_OPT_TREE("document", N_("URI passing"), "uri_passing", OPT_SORT | OPT_AUTOCREATE, - N_("Rules for passing URIs to external commands.")), + N_("Rules for passing URIs to external commands. When one rule\n" + "is defined the link and tab menu will have a menu item that\n" + "makes it possible to pass the the link, frame or tab URI to\n" + "an external command. If several rules are defined the link and\n" + "tab menu will have a submenu of items for each rule. Note, this\n" + "is mostly useful for launching graphical viewers, since there\n" + "is not support for releasing the terminal while the command runs.\n" + "The action and submenus are also available by binding keys to\n" + "the frame-external-command, the link-external-command, and\n" + "the tab-external-command actions.")), INIT_OPT_STRING("document.uri_passing", NULL, "_template_", 0, "", diff --git a/src/ecmascript/see/form.c b/src/ecmascript/see/form.c index cbb6c9e8..2fc5ac58 100644 --- a/src/ecmascript/see/form.c +++ b/src/ecmascript/see/form.c @@ -859,7 +859,17 @@ form_put(struct SEE_interpreter *interp, struct SEE_object *o, return; if (p == s_action) { - mem_free_set(&form->action, string); + if (form->action) { + struct uri *uri = get_uri(form->action, URI_HTTP_REFERRER_HOST); + + if (uri) { + mem_free_set(&form->action, join_urls(uri, string)); + mem_free(string); + done_uri(uri); + } + } else { + mem_free_set(&form->action, string); + } } else if (p == s_encoding) { if (!strcasecmp(string, "application/x-www-form-urlencoded")) { form->method = form->method == FORM_METHOD_GET ? FORM_METHOD_GET diff --git a/src/ecmascript/spidermonkey/form.c b/src/ecmascript/spidermonkey/form.c index 85889579..e50384dc 100644 --- a/src/ecmascript/spidermonkey/form.c +++ b/src/ecmascript/spidermonkey/form.c @@ -735,6 +735,15 @@ form_set_property(JSContext *ctx, JSObject *obj, jsval id, jsval *vp) switch (JSVAL_TO_INT(id)) { case JSP_FORM_ACTION: + if (form->action) { + struct uri *uri = get_uri(form->action, URI_HTTP_REFERRER_HOST); + + if (uri) { + mem_free_set(&form->action, join_urls(uri, jsval_to_string(ctx, vp))); + done_uri(uri); + break; + } + } mem_free_set(&form->action, stracpy(jsval_to_string(ctx, vp))); break; diff --git a/src/network/connection.c b/src/network/connection.c index f2c59a08..d084ef1a 100644 --- a/src/network/connection.c +++ b/src/network/connection.c @@ -724,6 +724,9 @@ abort_connection(struct connection *conn, enum connection_state state) assertm(is_in_result_state(state), "connection didn't end in result state (%d)", state); + if (state == S_OK && conn->cached) + normalize_cache_entry(conn->cached, conn->from); + set_connection_state(conn, state); if (conn->running) interrupt_connection(conn); @@ -1021,7 +1024,7 @@ void move_download(struct download *old, struct download *new, enum connection_priority newpri) { - struct connection *conn = old->conn; + struct connection *conn; assert(old); @@ -1029,7 +1032,9 @@ move_download(struct download *old, struct download *new, * example the file protocol loads it's object immediately. This is * catched by the result state check below. */ - new->conn = old->conn; + conn = old->conn; + + new->conn = conn; new->cached = old->cached; new->prev_error = old->prev_error; new->progress = old->progress; @@ -1037,8 +1042,13 @@ move_download(struct download *old, struct download *new, new->pri = newpri; if (is_in_result_state(old->state)) { - if (new->callback) + /* Ensure that new->conn is always "valid", that is NULL if the + * connection has been detached and non-NULL otherwise. */ + if (new->callback) { + new->conn = NULL; + new->progress = NULL; new->callback(new, new->data); + } return; } diff --git a/src/protocol/about.c b/src/protocol/about.c index e9c5cbf5..7cfe8317 100644 --- a/src/protocol/about.c +++ b/src/protocol/about.c @@ -114,8 +114,6 @@ about_protocol_handler(struct connection *conn) } #endif - normalize_cache_entry(cached, len); - /* Set content to known type */ mem_free_set(&cached->content_type, stracpy("text/html")); } diff --git a/src/protocol/data.c b/src/protocol/data.c index 603f59a9..cd5b4900 100644 --- a/src/protocol/data.c +++ b/src/protocol/data.c @@ -157,7 +157,6 @@ data_protocol_handler(struct connection *conn) int datalen = strlen(data); add_fragment(cached, conn->from, data, datalen); - normalize_cache_entry(cached, datalen); } mem_free(data); diff --git a/src/protocol/file/file.c b/src/protocol/file/file.c index 764935ba..8d593424 100644 --- a/src/protocol/file/file.c +++ b/src/protocol/file/file.c @@ -279,6 +279,7 @@ file_protocol_handler(struct connection *connection) } else { add_fragment(cached, 0, page.source, page.length); + connection->from += page.length; if (!cached->content_type) { unsigned char *ctype = null_or_stracpy(type); @@ -287,15 +288,10 @@ file_protocol_handler(struct connection *connection) * allocation. */ if (type && !ctype) state = S_OUT_OF_MEM; - else - normalize_cache_entry(cached, page.length); /* Setup file read or directory listing for * viewing. */ mem_free_set(&cached->content_type, ctype); - - } else { - normalize_cache_entry(cached, page.length); } done_string(&page); diff --git a/src/protocol/finger/finger.c b/src/protocol/finger/finger.c index f53ad994..6f09b728 100644 --- a/src/protocol/finger/finger.c +++ b/src/protocol/finger/finger.c @@ -27,15 +27,6 @@ struct module finger_protocol_module = struct_module( /* done: */ NULL ); -static void -finger_end_request(struct connection *conn, enum connection_state state) -{ - if (state == S_OK && conn->cached) - normalize_cache_entry(conn->cached, conn->from); - - abort_connection(conn, state); -} - static void finger_get_response(struct socket *socket, struct read_buffer *rb) { @@ -50,7 +41,7 @@ finger_get_response(struct socket *socket, struct read_buffer *rb) conn->cached = cached; if (socket->state == SOCKET_CLOSED) { - finger_end_request(conn, S_OK); + abort_connection(conn, S_OK); return; } diff --git a/src/protocol/fsp/fsp.c b/src/protocol/fsp/fsp.c index 6e785ae6..8e2f3978 100644 --- a/src/protocol/fsp/fsp.c +++ b/src/protocol/fsp/fsp.c @@ -232,8 +232,6 @@ fsp_got_data(struct socket *socket, struct read_buffer *rb) } if (!len) { - if (conn->from) - normalize_cache_entry(conn->cached, conn->from); abort_connection(conn, S_OK); return; } diff --git a/src/protocol/ftp/ftp.c b/src/protocol/ftp/ftp.c index 38a1aa5c..c46c21ec 100644 --- a/src/protocol/ftp/ftp.c +++ b/src/protocol/ftp/ftp.c @@ -1347,11 +1347,10 @@ out_of_mem: static void ftp_end_request(struct connection *conn, enum connection_state state) { - set_connection_state(conn, state); - - if (conn->state == S_OK && conn->cached) { + if (state == S_OK && conn->cached) { normalize_cache_entry(conn->cached, conn->from); } + set_connection_state(conn, state); add_keepalive_connection(conn, FTP_KEEPALIVE_TIMEOUT, NULL); } diff --git a/src/protocol/gopher/gopher.c b/src/protocol/gopher/gopher.c index c1d8781b..2ba57657 100644 --- a/src/protocol/gopher/gopher.c +++ b/src/protocol/gopher/gopher.c @@ -329,30 +329,6 @@ init_gopher_connection_info(struct connection *conn) } -static void -end_gopher_connection(struct connection *conn, enum connection_state state) -{ - if (state == S_OK && conn->cached) { -#if 0 - /* Seeing dots at all files .. trying to remove the end-marker - * ".\r\n" */ - struct gopher_connection_info *gopher = conn->info; - - if (gopher - && gopher->entity - && gopher->entity->type != GOPHER_DIRECTORY - && gopher->entity->type != GOPHER_INDEX - && gopher->entity->type != GOPHER_CSO) { - conn->from -= 3; - } -#endif - normalize_cache_entry(conn->cached, conn->from); - } - - abort_connection(conn, state); -} - - /* Add a link. The title of the destination is set, as there is no way of * knowing what the title is when we arrive. * @@ -713,7 +689,7 @@ read_gopher_response_data(struct socket *socket, struct read_buffer *rb) assert(gopher && gopher->entity); if (!conn->cached && !init_gopher_cache_entry(conn)) { - end_gopher_connection(conn, S_OUT_OF_MEM); + abort_connection(conn, S_OUT_OF_MEM); return; } @@ -763,7 +739,7 @@ read_gopher_response_data(struct socket *socket, struct read_buffer *rb) } if (state != S_TRANS) { - end_gopher_connection(conn, state); + abort_connection(conn, state); return; } @@ -797,7 +773,7 @@ gopher_protocol_handler(struct connection *conn) * - FM */ if (uri->datalen == 1 && *uri->data == GOPHER_CSO) { /* FIXME: redirect_cache() */ - end_gopher_connection(conn, S_GOPHER_CSO_ERROR); + abort_connection(conn, S_GOPHER_CSO_ERROR); } break; @@ -810,7 +786,7 @@ gopher_protocol_handler(struct connection *conn) * - FM */ if (uri->datalen >= 1 && *uri->data == GOPHER_FILE) { /* FIXME: redirect_cache() */ - end_gopher_connection(conn, S_OK); + abort_connection(conn, S_OK); } #endif break; @@ -819,7 +795,7 @@ gopher_protocol_handler(struct connection *conn) state = init_gopher_connection_info(conn); if (state != S_CONN) { /* FIXME: Handle bad selector ... */ - end_gopher_connection(conn, state); + abort_connection(conn, state); return; } diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c index 3efcdef5..d05a99d9 100644 --- a/src/protocol/http/http.c +++ b/src/protocol/http/http.c @@ -470,14 +470,12 @@ http_end_request(struct connection *conn, enum connection_state state, { shutdown_connection_stream(conn); - if (state == S_OK && conn->cached) { - normalize_cache_entry(conn->cached, !notrunc ? conn->from : -1); - } - if (conn->info && !((struct http_connection_info *) conn->info)->close && (!conn->socket->ssl) /* We won't keep alive ssl connections */ && (!get_opt_bool("protocol.http.bugs.post_no_keepalive") || !conn->uri->post)) { + if (state == S_OK && conn->cached) + normalize_cache_entry(conn->cached, !notrunc ? conn->from : -1); set_connection_state(conn, state); add_keepalive_connection(conn, HTTP_KEEPALIVE_TIMEOUT, NULL); } else { diff --git a/src/protocol/nntp/connection.c b/src/protocol/nntp/connection.c index 7a297cf6..e054fcfd 100644 --- a/src/protocol/nntp/connection.c +++ b/src/protocol/nntp/connection.c @@ -217,17 +217,16 @@ nntp_end_request(struct connection *conn, enum connection_state state) return; } - set_connection_state(conn, state); - - if (conn->state == S_OK) { + if (state == S_OK) { if (conn->cached) { normalize_cache_entry(conn->cached, conn->from); } - } else if (conn->state == S_OUT_OF_MEM) { + } else if (state == S_OUT_OF_MEM) { /* FIXME: Clear the socket buffers before ending so the one * grabing the keepalive connection will be able to go on. */ } + set_connection_state(conn, state); add_keepalive_connection(conn, NNTP_KEEPALIVE_TIMEOUT, nntp_quit); } diff --git a/src/protocol/smb/smb.c b/src/protocol/smb/smb.c index 62550e31..d8b4a93e 100644 --- a/src/protocol/smb/smb.c +++ b/src/protocol/smb/smb.c @@ -475,10 +475,8 @@ end_smb_connection(struct connection *conn) if (smb_get_cache(conn)) return; - if (conn->from) { - normalize_cache_entry(conn->cached, conn->from); + if (conn->from) goto bye; - } /* Ensure termination by LF + NUL chars, memory for this * was reserved by smb_read_text(). */ @@ -507,7 +505,6 @@ end_smb_connection(struct connection *conn) add_fragment(conn->cached, 0, page.source, page.length); conn->from += page.length; - normalize_cache_entry(conn->cached, page.length); done_string(&page); mem_free_set(&conn->cached->content_type, stracpy("text/html")); diff --git a/src/protocol/uri.c b/src/protocol/uri.c index 88020dcc..d3979b28 100644 --- a/src/protocol/uri.c +++ b/src/protocol/uri.c @@ -460,6 +460,8 @@ struct string * add_uri_to_string(struct string *string, struct uri *uri, enum uri_component components) { + int add_host = 0; + /* Custom or unknown keep the URI untouched. */ if (uri->protocol == PROTOCOL_UNKNOWN) return add_to_string(string, struri(uri)); @@ -486,7 +488,7 @@ add_uri_to_string(struct string *string, struct uri *uri, } if (wants(URI_HOST) && uri->hostlen) { - int add_host = 1; + add_host = 1; #ifdef CONFIG_IPV6 /* Rationale for wants(URI_PORT): The [notation] was invented @@ -550,7 +552,7 @@ add_uri_to_string(struct string *string, struct uri *uri, } /* Only add slash if we need to separate */ - if ((wants(URI_DATA) || wants(URI_POST)) + if ((wants(URI_DATA) || wants(URI_POST) || add_host) && wants(~(URI_DATA | URI_PORT)) && get_protocol_need_slash_after_host(uri->protocol)) add_char_to_string(string, '/'); diff --git a/src/session/download.c b/src/session/download.c index 106d1ac0..1f2a02bb 100644 --- a/src/session/download.c +++ b/src/session/download.c @@ -968,10 +968,7 @@ tp_display(struct type_query *type_query) new->callback = (download_callback_T *) doc_loading_callback; new->data = ses; - if (is_in_progress_state(old->state)) - move_download(old, new, PRI_MAIN); - else - new->state = old->state; + move_download(old, new, PRI_MAIN); } display_timer(ses); diff --git a/src/session/session.c b/src/session/session.c index 29b1fdd7..afa5664a 100644 --- a/src/session/session.c +++ b/src/session/session.c @@ -604,11 +604,19 @@ doc_loading_callback(struct download *download, struct session *ses) print_screen_status(ses); #ifdef CONFIG_GLOBHIST - if (download->conn && download->pri != PRI_CSS) { + if (download->pri != PRI_CSS) { unsigned char *title = ses->doc_view->document->title; - struct uri *uri = download->conn->proxied_uri; + struct uri *uri; - add_global_history_item(struri(uri), title, time(NULL)); + if (download->conn) + uri = download->conn->proxied_uri; + else if (download->cached) + uri = download->cached->uri; + else + uri = NULL; + + if (uri) + add_global_history_item(struri(uri), title, time(NULL)); } #endif diff --git a/src/viewer/text/draw.c b/src/viewer/text/draw.c index 95d21e37..cdf87603 100644 --- a/src/viewer/text/draw.c +++ b/src/viewer/text/draw.c @@ -373,5 +373,4 @@ refresh_view(struct session *ses, struct document_view *doc_view, int frames) draw_doc(ses, doc_view, 1); if (frames) draw_frames(ses); print_screen_status(ses); - redraw_from_window(ses->tab); } diff --git a/src/viewer/text/form.c b/src/viewer/text/form.c index 7f4bf9e4..296ee990 100644 --- a/src/viewer/text/form.c +++ b/src/viewer/text/form.c @@ -982,9 +982,7 @@ get_form_uri(struct session *ses, struct document_view *doc_view, if (fc->type == FC_RESET) { do_reset_form(doc_view, form); return NULL; - } else if (fc->type == FC_BUTTON) { - return NULL; - } + } if (!form->action || !init_string(&data)) diff --git a/src/viewer/text/link.c b/src/viewer/text/link.c index b1e68651..d9a0617d 100644 --- a/src/viewer/text/link.c +++ b/src/viewer/text/link.c @@ -860,18 +860,28 @@ get_link_uri(struct session *ses, struct document_view *doc_view, } } -static void -try_submit_given_form(struct session *ses, struct document_view *doc_view, - struct form *form, int do_reload) +static int +call_onsubmit_and_submit(struct session *ses, struct document_view *doc_view, + struct form_control *fc, int do_reload) { + struct uri *uri = NULL; + enum cache_mode mode = do_reload ? CACHE_MODE_FORCE_RELOAD : CACHE_MODE_NORMAL; + + assert(fc->form); /* regardless of whether there is a FORM element */ + if_assert_failed return 0; + #ifdef CONFIG_ECMASCRIPT - if (form->onsubmit) { + /* If the form has multiple submit buttons, this does not + * explicitly tell the ECMAScript code which of them was + * pressed. W3C DOM Level 3 doesn't seem to include such a + * feature. */ + if (fc->form->onsubmit) { struct string code; if (init_string(&code)) { struct view_state *vs = doc_view->vs; struct ecmascript_interpreter *interpreter; - unsigned char *ret = form->onsubmit; + unsigned char *ret = fc->form->onsubmit; int res; if (vs->ecmascript_fragile) @@ -883,14 +893,24 @@ try_submit_given_form(struct session *ses, struct document_view *doc_view, while ((ret = strstr(ret, "return "))) while (*ret != ' ') *ret++ = ' '; - add_to_string(&code, form->onsubmit); + add_to_string(&code, fc->form->onsubmit); res = ecmascript_eval_boolback(interpreter, &code); done_string(&code); - if (!res) return; + /* If the user presses Enter in a text field, + * and document.browse.forms.auto_submit is + * true, and the form has an onsubmit script + * that returns false, then insert mode should + * end, so return 1 here rather than 0. */ + if (!res) return 1; } } -#endif - submit_given_form(ses, doc_view, form, do_reload); +#endif /* CONFIG_ECMASCRIPT */ + + uri = get_form_uri(ses, doc_view, fc); + if (!uri) return 0; + goto_uri_frame(ses, uri, fc->form->target, mode); + done_uri(uri); + return 1; } struct link * @@ -907,10 +927,11 @@ goto_current_link(struct session *ses, struct document_view *doc_view, int do_re if (link_is_form(link)) { struct form_control *fc = link->data.form_control; - struct form *form = fc->form; - try_submit_given_form(ses, doc_view, form, do_reload); - return link; + if (!call_onsubmit_and_submit(ses, doc_view, fc, do_reload)) + return NULL; + else + return link; } else uri = get_link_uri(ses, doc_view, link);