1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

Compare commits

...

29 Commits

Author SHA1 Message Date
Sébastien Helleu a4e7e18c14 Version 4.0.2 2023-07-12 20:42:04 +02:00
Sébastien Helleu ea934864d4 core: fix renaming of options with command /item rename (issue #1978)
The options `weechat.custom_bar_item.xxx.*` are now properly renamed to the new
item name.

This fixes a save issue (item saved with old name in config) and a crash if a
new item is created with the old name.
2023-07-10 07:34:41 +02:00
Sébastien Helleu 6e7fe96046 core: add quotes around key names in /help key 2023-07-05 21:25:58 +02:00
Sébastien Helleu 82daed8076 core: check that ptr_value is not NULL 2023-07-04 19:15:36 +02:00
Sébastien Helleu bcc061292d core: keep keys ctrl-H and ctrl-? (in lower case) if they were manually bound to custom commands in a previous version 2023-07-04 19:10:51 +02:00
Sébastien Helleu 3b26d6750e core: add key ctrl-backspace in /help key (closes #1975) 2023-07-04 18:41:31 +02:00
Sébastien Helleu 71f8c2ba17 doc: fix anchor links in auto-generated files 2023-07-04 18:31:30 +02:00
Sébastien Helleu 2d91845d53 core: update ChangeLog 2023-07-03 23:01:12 +02:00
Sébastien Helleu ed67f4bf0a core: fix styles 2023-07-03 22:59:37 +02:00
Trygve Aaberge e311564387 core: don't send key_pressed signal again for the same key press
If you press an incomplete key sequence, previously WeeChat would send
the key_pressed signal again for the same keys on the next key.

E.g. if you press escape and then 1, previously you would get the
key_pressed signal with signal_data `\x01[` when you pressed escape, and
then key_pressed with `\x01[` again when you pressed 1 (plus key_pressed
with `1` for the 1 key). So two signals for the escape key, even though
it was only pressed once.

With this patch, you only get one signal for each key press. So one with
`\x01[` when you press escape and then one with `1` when you press 1.
2023-07-03 22:57:10 +02:00
Trygve Aaberge 2781f38052 core: don't send key_combo_* signals for incomplete keys
Version 4.0.0 (specifically commit 1f5c791c3) changed the key handling
so key_combo_* signals were sent for each character in a sequence,
rather than just when the sequence is finished. This broke parts of the
vimode.py script.

E.g. for the up arrow, 3.8 sends key_combo_default signal once with the
signal_data `\x01[[A`, while 4.0.0 sends it three times with the
signal_data `\x01[`, `\x01[[` and `\x01[[A`.

With this patch, the previous behavior is brought back. There is one
small change though. In 3.8 if you press escape one or two times it
doesn't send key_combo_default, but if you press it three or more times
it sends it for each escape press. With this patch, it's never sent for
plain escape presses, only when the sequence is finished with some other
key.

This is intentional, as getting key_combo_default for escape presses
doesn't make sense since it's not a finished combo, and the behavior of
3.8 where you got it after three or more key presses was most likely
unintentional as it just happened because it didn't match any key
bindings anymore (there are key bindings starting with one or two escape
characters, but not more).
2023-07-03 22:57:10 +02:00
Sébastien Helleu 6c9ff45e5c tests: fix hdata tests failure on Alpine 3.18 2023-07-01 09:55:13 +02:00
Sébastien Helleu 3203ee8f05 tests/relay: fix crash in tests on Alpine 3.18 2023-07-01 09:55:01 +02:00
Sébastien Helleu b71af61581 build: fix detection of PHP 8.2 on Alpine 3.18 2023-07-01 09:54:52 +02:00
Sébastien Helleu 2304029d61 Version 4.0.2-dev 2023-07-01 09:53:53 +02:00
Sébastien Helleu b06edae3e3 Version 4.0.1 2023-06-30 21:18:01 +02:00
Sébastien Helleu 7d78be3a1b guile: fix crash on quit with Guile < 3 (closes #1965) 2023-06-27 21:44:54 +02:00
Sébastien Helleu 1107205059 core: update ChangeLog 2023-06-27 21:28:46 +02:00
Trygve Aaberge bd9978e467 core: check for newline characters in string_is_whitespace_char
This fixes a bug where if you had multiple lines in the input and
pressed ctrl-w when the cursor was after the first word of any line but
the first, it would delete both the word before the cursor and the last
word on the preceding line.
2023-06-27 21:26:47 +02:00
Sébastien Helleu b4d999010a api: do not convert option name to lower case in API functions config_set_plugin and config_set_desc_plugin 2023-06-27 12:58:51 +02:00
Sébastien Helleu 9939f939aa irc: sent "QUIT" message to servers connected with TLS on /upgrade 2023-06-26 22:08:22 +02:00
Sébastien Helleu 929d6fd452 core: fix level of section title in release notes 2023-06-26 21:23:25 +02:00
Sébastien Helleu db117f34dd core: display actual key name and command with key Alt+k
Key Alt+K (upper K) is removed as well as commands `/input grab_raw_key` and
`/input grab_raw_key_command`.
2023-06-26 20:40:11 +02:00
Sébastien Helleu f546796b49 irc: reply to a CTCP request sent to self nick (closes #1966) 2023-06-25 22:06:52 +02:00
Sébastien Helleu dd3277adbb core: add missing space in French translation 2023-06-25 19:14:48 +02:00
Sébastien Helleu cb7647a3ea core: force key "return" to command "/input return" when migrating legacy keys 2023-06-25 19:14:15 +02:00
Sébastien Helleu 21292f7464 core: fix format in Czech translation 2023-06-25 16:12:35 +02:00
Sébastien Helleu 3c433b5106 core: add option weechat.color.status_name_insecure in ChangeLog and release notes 2023-06-25 15:17:40 +02:00
Sébastien Helleu b578a0a4b9 Version 4.0.1-dev 2023-06-25 15:12:34 +02:00
40 changed files with 540 additions and 181 deletions
+34
View File
@@ -10,6 +10,39 @@ This document lists all the changes for each version. +
For a list of important changes that require manual actions, please look at release notes.
[[v4.0.2]]
== Version 4.0.2 (2023-07-12)
Bug fixes::
* core: fix renaming of options with command `/item rename` (issue #1978)
* core: don't send "key_pressed" signal again for the same key press (issue #1976)
* core: don't send "key_combo_*" signals for incomplete keys (issue #1976)
* core: add key ctrl-backspace in /help key (issue #1975)
* core: keep keys ctrl-H and ctrl-? (in lower case) if they were manually bound to custom commands in a previous version
Tests::
* core: fix hdata tests failure on Alpine 3.18
* relay: fix crash in tests on Alpine 3.18
Build::
* php: fix detection of PHP 8.2 on Alpine 3.18
[[v4.0.1]]
== Version 4.0.1 (2023-06-30)
Bug fixes::
* core: force key "return" to command "/input return" when migrating legacy keys
* core: display actual key name and command with key kbd:[Alt+k], remove key kbd:[Alt+K] (grab raw key) and associated commands `/input grab_raw_key` and `/input grab_raw_key_command`
* core: check for newline characters in string_is_whitespace_char (issue #1968)
* api: do not convert option name to lower case in API functions config_set_plugin and config_set_desc_plugin
* guile: fix crash on quit with Guile < 3 (issue #1965)
* irc: reply to a CTCP request sent to self nick (issue #1966)
* irc: sent "QUIT" message to servers connected with TLS on `/upgrade`
[[v4.0.0]]
== Version 4.0.0 (2023-06-24)
@@ -33,6 +66,7 @@ New features::
* core: add access to hashtable properties in evaluation of expressions (issue #1888)
* core: display similar command names when a command is unknown (issue #1877)
* core: rename option weechat.color.status_name_ssl to weechat.color.status_name_tls
* core: add option weechat.color.status_name_insecure to display buffer name with a specific color when not connected with TLS to the server
* core, plugins: make many identifiers case sensitive (issue #1872, issue #398, bug #32213)
* core: add item "mouse_status" in default status bar, change default color to lightgreen
* core, trigger: add options weechat.color.chat_status_disabled and weechat.color.chat_status_enabled, remove options trigger.color.trigger and trigger.color.trigger_disabled, add enabled/disabled status color in output of `/filter list` (issue #1820)
+24
View File
@@ -11,6 +11,26 @@ It is recommended to read it when upgrading to a new stable version. +
For a complete list of changes, please look at ChangeLog.
[[v4.0.1]]
== Version 4.0.1 (2023-06-30)
[[v4.0.1_config_set_plugin]]
=== Functions config_set_plugin and config_set_desc_plugin
The functions link:https://weechat.org/doc/weechat/plugin/#_config_set_plugin[config_set_plugin]
and link:https://weechat.org/doc/weechat/plugin/#_config_set_desc_plugin[config_set_desc_plugin]
are not converting any more the option name to lower case because since version 4.0.0,
the name of options is case sensitive.
[[v4.0.1_grab_raw_key]]
=== Grab raw key and command
Key kbd:[Alt+K] (upper case) has been removed, as well as commands
`/input grab_raw_key` and `/input grab_raw_key_command`.
Now the key kbd:[Alt+k] displays the actual key name and command, possibly
raw key.
[[v4.0.0]]
== Version 4.0.0 (2023-06-24)
@@ -182,6 +202,10 @@ Alias converted to lower case: "CLOSE" => "close"
[[v4.0.0_tls]]
=== TLS options and connections
Option `weechat.color.status_name_insecure` has been added, the buffer name
is now displayed with color `lightmagenta` by default if the connection with
the server is *NOT* made with TLS.
Options, commands and documentation have been updated to "TLS" instead of "SSL":
* core option:
+1 -1
View File
@@ -48,7 +48,7 @@ if(NOT PHP_FOUND)
execute_process(COMMAND ${PHP_CONFIG_EXECUTABLE} --version OUTPUT_VARIABLE PHP_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
if(${PHP_VERSION} MATCHES "^[78]")
find_library(PHP_LIB
NAMES php8.2 php8.1 php8.0 php8 php7.4 php7.3 php7.2 php7.1 php7.0 php7 php
NAMES php8.2 php82 php8.1 php81 php8.0 php80 php8 php7.4 php74 php7.3 php73 php7.2 php72 php7.1 php71 php7.0 php70 php7 php
HINTS ${PHP_LIB_PREFIX} ${PHP_LIB_PREFIX}/lib ${PHP_LIB_PREFIX}/lib64
)
if(PHP_LIB)
+7 -3
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-25 00:48+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: cs\n"
@@ -54,7 +54,7 @@ msgstr ""
#, c-format
msgid "End of command '%s', timeout reached (%.1fs)"
msgstr "Konec příkazu '%s', vypršel časový limit (%.lfs)"
msgstr "Konec příkazu '%s', vypršel časový limit (%.1fs)"
#, c-format
msgid "System clock skew detected (%+ld seconds), reinitializing all timers"
@@ -2043,6 +2043,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+18 -14
View File
@@ -26,8 +26,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"PO-Revision-Date: 2023-06-23 07:41+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
"Language: de_DE\n"
@@ -2540,6 +2540,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
@@ -2611,6 +2615,11 @@ msgstr ""
"damit die zu belegende Taste zu ermitteln. Durch diesen Schritt wird der "
"benötigte Tasten-Code in die Befehlszeile übernommen.\n"
"\n"
"Für einige Tasten müssen Sie möglicherweise /debug key verwenden. Dadurch "
"wird der Wert des Rohschlüssels angezeigt, der verwendet werden kann (zum "
"Beispiel könnte die Taste Strg+Rücktaste \"ctrl-H\" sein \"ctrl-?\", "
"abhängig von Ihrem Terminal und anderen Einstellungen).\n"
"\n"
"Zulässige Modifikatortasten (in dieser Reihenfolge, wenn mehrere verwendet "
"werden):\n"
" meta- (Alt-Taste)\n"
@@ -5605,20 +5614,17 @@ msgid ""
"%sError: %s, line %d: invalid config version: \"%s\" => rest of file is "
"IGNORED, default options are used"
msgstr ""
"%sFehler: %s, Zeile %d: Ungültige Konfigurationsversion: \"%s\" => Der Rest"
" der Datei wird IGNORIERT, es werden Standardoptionen verwendet"
"%sFehler: %s, Zeile %d: Ungültige Konfigurationsversion: \"%s\" => Der Rest "
"der Datei wird IGNORIERT, es werden Standardoptionen verwendet"
#, c-format
#| msgid ""
#| "%sWarning: %s, version read (%d) is newer than supported version (%d), "
#| "options may be broken!"
msgid ""
"%sError: %s, version read (%d) is newer than supported version (%d) => rest "
"of file is IGNORED, default options are used"
msgstr ""
"%sFehler: %s, verwendete Version (%d) ist neuer als die unterstützte Version"
" (%d) => Der Rest der Datei wird IGNORIERT, es werden Standardoptionen"
" verwendet"
"%sFehler: %s, verwendete Version (%d) ist neuer als die unterstützte Version "
"(%d) => Der Rest der Datei wird IGNORIERT, es werden Standardoptionen "
"verwendet"
#, c-format
msgid "%sWarning: %s, line %d: option outside section: %s"
@@ -16026,8 +16032,7 @@ msgstr "verwaltet Trigger, das Schweizer Armeemesser für WeeChat"
msgid ""
"list|listfull|listdefault || add|addoff|addreplace <name> <hook> "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
"return_code>\" [\"<post_action>\"]]]]]] "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
@@ -16035,8 +16040,7 @@ msgid ""
"monitor [<filter>]"
msgstr ""
"list|listfull|listdefault || add|addoff|addreplace <name> <hook> "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<"
"return_code>\" [\"<post_action>\"]]]]]] "
"[\"<arguments>\" [\"<conditions>\" [\"<regex>\" [\"<command>\" [\"<return_code>\" [\"<post_action>\"]]]]]] "
"|| addinput [<hook>] || input|output|recreate <name> || set <name> <option> "
"<value> || rename|copy <name> <new_name> || enable|disable|toggle [<name>|-"
"all [<name>...]] || restart <name>|-all [<name>...] || show <name> || del "
+5 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2537,6 +2537,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+12 -3
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"PO-Revision-Date: 2023-06-17 11:46+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-07-05 21:25+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -2491,6 +2491,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
@@ -2558,6 +2562,11 @@ msgstr ""
"d'utiliser la touche alt+k (ou Échap puis k), et puis de presser la touche à "
"associer : cela insère le code de la touche dans la ligne de commande.\n"
"\n"
"Pour certaines touches vous pourriez avoir besoin d'utiliser /debug key, "
"cela affiche le code brut de la touche qui peut être utilisé (par exemple "
"ctrl+backspace pourrait être \"ctrl-h\" ou \"ctrl-?\", selon votre terminal "
"et d'autres paramètres).\n"
"\n"
"Modificateurs autorisés (dans cet ordre lorsque plusieurs sont utilisés) :\n"
" meta- (touche alt)\n"
" ctrl- (touche control)\n"
@@ -3932,7 +3941,7 @@ msgstr "Ancienne touche convertie : \"%s\" => \"%s\""
#, c-format
msgid "Command converted for key \"%s\": \"%s\" => \"%s\""
msgstr "Commande convertie pour la touche\"%s\" : \"%s\" => \"%s\""
msgstr "Commande convertie pour la touche \"%s\" : \"%s\" => \"%s\""
msgid "debug level for plugin (\"core\" for WeeChat core)"
msgstr "niveau de debug pour l'extension (\"core\" pour le cœur de WeeChat)"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1868,6 +1868,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2125,6 +2125,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -2506,6 +2506,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -2838,6 +2838,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -2499,6 +2499,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2202,6 +2202,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1889,6 +1889,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+70 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2424,6 +2424,71 @@ msgstr ""
"<контекст> <тастер> || resetall -yes [<контекст>] || missing [<контекст>] || "
"legacy <тастер> [<тастер>...]"
#, fuzzy
#| msgid ""
#| " list: list all current keys\n"
#| "listdefault: list default keys\n"
#| " listdiff: list differences between current and default keys (keys "
#| "added, redefined or deleted)\n"
#| " context: name of context (\"default\" or \"search\")\n"
#| " bind: bind a command to a key or display command bound to key (for "
#| "context \"default\")\n"
#| " bindctxt: bind a command to a key or display command bound to key, for "
#| "given context\n"
#| " command: command (many commands can be separated by semicolons)\n"
#| " unbind: remove a key binding (for context \"default\")\n"
#| " unbindctxt: remove a key binding for given context\n"
#| " reset: reset a key to default binding (for context \"default\")\n"
#| " resetctxt: reset a key to default binding, for given context\n"
#| " resetall: restore bindings to the default values and delete ALL "
#| "personal bindings (use carefully!)\n"
#| " missing: add missing keys (using default bindings), useful after "
#| "installing new WeeChat version\n"
#| " legacy: display new name for legacy keys\n"
#| "\n"
#| "When binding a command to a key, it is recommended to use key alt+k (or "
#| "Esc then k), and then press the key to bind: this will insert key name in "
#| "command line.\n"
#| "\n"
#| "Modifiers allowed (in this order when multiple are used):\n"
#| " meta- (alt key)\n"
#| " ctrl- (control key)\n"
#| " shift- (shift key, can only be used with key names below)\n"
#| "\n"
#| "Key names allowed: f0 to f20, home, insert, delete, end, backspace, pgup, "
#| "pgdn, up, down, right, left, tab, return, comma, space.\n"
#| "\n"
#| "Combo of keys must be separated by a comma.\n"
#| "\n"
#| "For context \"mouse\" (possible in context \"cursor\" too), key has "
#| "format: \"@area:key\" or \"@area1>area2:key\" where area can be:\n"
#| " *: any area on screen\n"
#| " chat: chat area (any buffer)\n"
#| " chat(xxx): chat area for buffer with name \"xxx\" (full name including "
#| "plugin)\n"
#| " bar(*): any bar\n"
#| " bar(xxx): bar \"xxx\"\n"
#| " item(*): any bar item\n"
#| " item(xxx): bar item \"xxx\"\n"
#| "Wildcard \"*\" is allowed in key to match many mouse events.\n"
#| "A special value for command with format \"hsignal:name\" can be used for "
#| "context mouse, this will send the hsignal \"name\" with the focus "
#| "hashtable as argument.\n"
#| "Another special value \"-\" can be used to disable key (it will be "
#| "ignored when looking for keys).\n"
#| "\n"
#| "Examples:\n"
#| " key alt-r to jump to #weechat IRC channel:\n"
#| " /key bind meta-r /buffer #weechat\n"
#| " restore default binding for key alt-r:\n"
#| " /key reset meta-r\n"
#| " key meta-v then f1 to run /help:\n"
#| " /key bind meta-v,f1 /help\n"
#| " key \"tab\" to stop search in buffer:\n"
#| " /key bindctxt search tab /input search_stop\n"
#| " middle button of mouse on a nick to retrieve info on nick:\n"
#| " /key bindctxt mouse @item(buffer_nicklist):button3 /msg nickserv info "
#| "${nick}"
msgid ""
" list: list all current keys\n"
"listdefault: list default keys\n"
@@ -2449,6 +2514,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2023-06-17 11:47+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -2536,6 +2536,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+5 -1
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2023-06-17 11:44+0200\n"
"POT-Creation-Date: 2023-07-05 21:24+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -1726,6 +1726,10 @@ msgid ""
"then k), and then press the key to bind: this will insert key name in "
"command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays the raw key "
"code that can be used (for example the key ctrl+backspace could be \"ctrl-"
"h\" or \"ctrl-?\", depending on your terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+6 -17
View File
@@ -3534,28 +3534,12 @@ COMMAND_CALLBACK(input)
else if (string_strcmp (argv[1], "grab_key") == 0)
{
gui_input_grab_key (buffer,
0, /* raw_key */
0, /* command */
(argc > 2) ? argv[2] : NULL);
}
else if (string_strcmp (argv[1], "grab_raw_key") == 0)
{
gui_input_grab_key (buffer,
1, /* raw_key */
0, /* command */
(argc > 2) ? argv[2] : NULL);
}
else if (string_strcmp (argv[1], "grab_key_command") == 0)
{
gui_input_grab_key (buffer,
0, /* raw_key */
1, /* command */
(argc > 2) ? argv[2] : NULL);
}
else if (string_strcmp (argv[1], "grab_raw_key_command") == 0)
{
gui_input_grab_key (buffer,
1, /* raw_key */
1, /* command */
(argc > 2) ? argv[2] : NULL);
}
@@ -8433,7 +8417,7 @@ command_init ()
"move_next_word || move_previous_line || move_next_line || "
"history_previous || history_next || history_global_previous || "
"history_global_next || "
"grab_key || grab_raw_key || grab_raw_key_command || grab_key_command || "
"grab_key || grab_key_command || "
"grab_mouse || grab_mouse_area || "
"insert || send",
&command_input, NULL, NULL);
@@ -8538,6 +8522,11 @@ command_init ()
"(or Esc then k), and then press the key to bind: this will insert "
"key name in command line.\n"
"\n"
"For some keys you might need to use /debug key, this displays "
"the raw key code that can be used (for example the key "
"ctrl+backspace could be \"ctrl-h\" or \"ctrl-?\", depending on your "
"terminal and other settings).\n"
"\n"
"Modifiers allowed (in this order when multiple are used):\n"
" meta- (alt key)\n"
" ctrl- (control key)\n"
+30 -1
View File
@@ -1601,7 +1601,24 @@ config_weechat_update_cb (const void *pointer, void *data,
}
else
{
new_option = gui_key_legacy_to_alias (ptr_option);
/*
* if backspace or ctrl-backspace was manually bound to a
* different command, keep the key as-is (in lower case) ;
* in all other cases, convert the key to the new name
*/
if (ptr_section
&& (strcmp (ptr_section, "key") == 0)
&& ((strcmp (ptr_option, "ctrl-H") == 0)
|| (strcmp (ptr_option, "ctrl-?") == 0))
&& (ptr_value
&& (strcmp (ptr_value, "/input delete_previous_char") != 0)))
{
new_option = string_tolower (ptr_option);
}
else
{
new_option = gui_key_legacy_to_alias (ptr_option);
}
if (new_option)
{
if (strcmp (ptr_option, new_option) != 0)
@@ -1612,6 +1629,18 @@ config_weechat_update_cb (const void *pointer, void *data,
ptr_option, new_option);
hashtable_set (data_read, "option", new_option);
changes++;
if (ptr_section
&& (strcmp (ptr_section, "key") == 0)
&& (strcmp (new_option, "return") == 0)
&& (!ptr_value
|| (strcmp (ptr_value, "/input return") != 0)))
{
gui_chat_printf (
NULL,
_("Command converted for key \"%s\": \"%s\" => \"%s\""),
"return", ptr_value, "/input return");
hashtable_set (data_read, "value", "/input return");
}
}
free (new_option);
}
+96 -72
View File
@@ -30,6 +30,7 @@
#include <libintl.h>
#include <locale.h>
#include <gcrypt.h>
#include <regex.h>
#include "weechat.h"
#include "wee-arraylist.h"
@@ -46,7 +47,8 @@
#include "wee-utf8.h"
#include "../plugins/plugin.h"
#define ESCAPE(msg) (doc_gen_escape (msg))
#define ESCAPE_TABLE(msg) (doc_gen_escape_table (msg))
#define ESCAPE_ANCHOR(msg) (doc_gen_escape_anchor_link (msg))
#define TRANS(msg) ((msg && msg[0]) ? _(msg) : msg)
#define TRANS_DEF(msg, def) ((msg && msg[0]) ? _(msg) : def)
#define PLUGIN(plugin) ((plugin) ? plugin->name : "weechat")
@@ -62,7 +64,7 @@ char *string_escaped[32];
*/
char *
doc_gen_escape (const char *message)
doc_gen_escape_table (const char *message)
{
index_string_escaped = (index_string_escaped + 1) % 32;
@@ -74,6 +76,31 @@ doc_gen_escape (const char *message)
return string_escaped[index_string_escaped];
}
/*
* Escapes a string to be used as anchor link: replace ",", "@" and "*" by "-".
*/
char *
doc_gen_escape_anchor_link (const char *message)
{
regex_t regex;
if (string_regcomp (&regex, "[,@*():&|]+", REG_EXTENDED) != 0)
return NULL;
index_string_escaped = (index_string_escaped + 1) % 32;
if (string_escaped[index_string_escaped])
free (string_escaped[index_string_escaped]);
string_escaped[index_string_escaped] = string_replace_regex (
message, &regex, "-", '$', NULL, NULL);
regfree (&regex);
return string_escaped[index_string_escaped];
}
/*
* Opens a file for write using:
* - path
@@ -435,7 +462,7 @@ doc_gen_user_options (const char *path, const char *lang)
struct t_config_option *ptr_option;
struct t_arraylist *list_options;
int i, list_size, index_option;
char *name_escaped, *desc_escaped, *values, str_values[256];
char *desc_escaped, *values, str_values[256];
char *default_value, *tmp;
file = doc_gen_open_file (path, "user", "options", lang);
@@ -489,15 +516,14 @@ doc_gen_user_options (const char *path, const char *lang)
}
if (index_option > 0)
string_fprintf (file, "\n");
name_escaped = string_replace (ptr_option->name, ",", "_");
desc_escaped = (ptr_option->description) ?
string_replace (TRANS(ptr_option->description), "]", "\\]") :
strdup ("");
string_fprintf (file,
"* [[option_%s.%s.%s]] *%s.%s.%s*\n",
"* [[option_%s.%s.%s]] *pass:none[%s.%s.%s]*\n",
ptr_option->config_file->name,
ptr_option->section->name,
name_escaped,
ESCAPE_ANCHOR(ptr_option->name),
ptr_option->config_file->name,
ptr_option->section->name,
ptr_option->name);
@@ -568,8 +594,6 @@ doc_gen_user_options (const char *path, const char *lang)
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "",
default_value,
(ptr_option->type == CONFIG_OPTION_TYPE_STRING) ? "\"" : "");
if (name_escaped)
free (name_escaped);
if (desc_escaped)
free (desc_escaped);
if (values)
@@ -614,9 +638,9 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
"[width=\"100%\",cols=\"2m,5m,5\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s\n",
ESCAPE(_("Alias")),
ESCAPE(_("Command")),
ESCAPE(_("Completion")));
ESCAPE_TABLE(_("Alias")),
ESCAPE_TABLE(_("Command")),
ESCAPE_TABLE(_("Completion")));
ptr_infolist = hook_infolist_get (NULL, "alias_default", NULL, NULL);
while (infolist_next (ptr_infolist))
@@ -624,10 +648,10 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
ptr_completion = infolist_string(ptr_infolist, "completion");
string_fprintf (file,
"| /%s | /%s | %s\n",
ESCAPE(infolist_string(ptr_infolist, "name")),
ESCAPE(infolist_string(ptr_infolist, "command")),
ESCAPE_TABLE(infolist_string(ptr_infolist, "name")),
ESCAPE_TABLE(infolist_string(ptr_infolist, "command")),
(ptr_completion && ptr_completion[0]) ?
ESCAPE(ptr_completion) : "-");
ESCAPE_TABLE(ptr_completion) : "-");
}
infolist_free (ptr_infolist);
@@ -663,8 +687,8 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
"[width=\"50%\",cols=\"^2m,3\",options=\"header\"]\n"
"|===\n"
"| %s | %s\n",
ESCAPE(_("IRC color")),
ESCAPE(_("WeeChat color")));
ESCAPE_TABLE(_("IRC color")),
ESCAPE_TABLE(_("WeeChat color")));
ptr_infolist = hook_infolist_get (NULL, "irc_color_weechat", NULL, NULL);
while (infolist_next (ptr_infolist))
@@ -672,8 +696,8 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
string_fprintf (
file,
"| %s | %s\n",
ESCAPE(infolist_string(ptr_infolist, "color_irc")),
ESCAPE(infolist_string(ptr_infolist, "color_weechat")));
ESCAPE_TABLE(infolist_string(ptr_infolist, "color_irc")),
ESCAPE_TABLE(infolist_string(ptr_infolist, "color_weechat")));
}
infolist_free (ptr_infolist);
@@ -737,10 +761,10 @@ doc_gen_api_infos (const char *path, const char *lang)
"[width=\"100%\",cols=\"^1,^2,6,6\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s | %s\n",
ESCAPE(_("Plugin")),
ESCAPE(_("Name")),
ESCAPE(_("Description")),
ESCAPE(_("Arguments")));
ESCAPE_TABLE(_("Plugin")),
ESCAPE_TABLE(_("Name")),
ESCAPE_TABLE(_("Description")),
ESCAPE_TABLE(_("Arguments")));
list_hooks = arraylist_new (64, 1, 0,
&doc_gen_hook_info_cmp_cb, NULL,
@@ -758,10 +782,10 @@ doc_gen_api_infos (const char *path, const char *lang)
string_fprintf (
file,
"| %s | %s | %s | %s\n",
ESCAPE(PLUGIN(ptr_hook->plugin)),
ESCAPE(HOOK_INFO(ptr_hook, info_name)),
ESCAPE(TRANS(HOOK_INFO(ptr_hook, description))),
ESCAPE(TRANS_DEF(HOOK_INFO(ptr_hook, args_description), "-")));
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
ESCAPE_TABLE(HOOK_INFO(ptr_hook, info_name)),
ESCAPE_TABLE(TRANS(HOOK_INFO(ptr_hook, description))),
ESCAPE_TABLE(TRANS_DEF(HOOK_INFO(ptr_hook, args_description), "-")));
}
arraylist_free (list_hooks);
@@ -826,11 +850,11 @@ doc_gen_api_infos_hashtable (const char *path, const char *lang)
"[width=\"100%\",cols=\"^1,^2,6,6,8\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s | %s | %s\n",
ESCAPE(_("Plugin")),
ESCAPE(_("Name")),
ESCAPE(_("Description")),
ESCAPE(_("Hashtable (input)")),
ESCAPE(_("Hashtable (output)")));
ESCAPE_TABLE(_("Plugin")),
ESCAPE_TABLE(_("Name")),
ESCAPE_TABLE(_("Description")),
ESCAPE_TABLE(_("Hashtable (input)")),
ESCAPE_TABLE(_("Hashtable (output)")));
list_hooks = arraylist_new (64, 1, 0,
&doc_gen_hook_info_hashtable_cmp_cb, NULL,
@@ -848,10 +872,10 @@ doc_gen_api_infos_hashtable (const char *path, const char *lang)
string_fprintf (
file,
"| %s | %s | %s | %s | %s\n",
ESCAPE(PLUGIN(ptr_hook->plugin)),
ESCAPE(HOOK_INFO(ptr_hook, info_name)),
ESCAPE(TRANS(HOOK_INFO_HASHTABLE(ptr_hook, description))),
ESCAPE(TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, args_description), "-")),
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
ESCAPE_TABLE(HOOK_INFO(ptr_hook, info_name)),
ESCAPE_TABLE(TRANS(HOOK_INFO_HASHTABLE(ptr_hook, description))),
ESCAPE_TABLE(TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, args_description), "-")),
TRANS_DEF(HOOK_INFO_HASHTABLE(ptr_hook, output_description), "-"));
}
@@ -917,11 +941,11 @@ doc_gen_api_infolists (const char *path, const char *lang)
"[width=\"100%\",cols=\"^1,^2,5,5,5\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s | %s | %s\n",
ESCAPE(_("Plugin")),
ESCAPE(_("Name")),
ESCAPE(_("Description")),
ESCAPE(_("Pointer")),
ESCAPE(_("Arguments")));
ESCAPE_TABLE(_("Plugin")),
ESCAPE_TABLE(_("Name")),
ESCAPE_TABLE(_("Description")),
ESCAPE_TABLE(_("Pointer")),
ESCAPE_TABLE(_("Arguments")));
list_hooks = arraylist_new (64, 1, 0,
&doc_gen_hook_infolist_cmp_cb, NULL,
@@ -939,11 +963,11 @@ doc_gen_api_infolists (const char *path, const char *lang)
string_fprintf (
file,
"| %s | %s | %s | %s | %s\n",
ESCAPE(PLUGIN(ptr_hook->plugin)),
ESCAPE(HOOK_INFOLIST(ptr_hook, infolist_name)),
ESCAPE(TRANS(HOOK_INFOLIST(ptr_hook, description))),
ESCAPE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, pointer_description), "-")),
ESCAPE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, args_description), "-")));
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
ESCAPE_TABLE(HOOK_INFOLIST(ptr_hook, infolist_name)),
ESCAPE_TABLE(TRANS(HOOK_INFOLIST(ptr_hook, description))),
ESCAPE_TABLE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, pointer_description), "-")),
ESCAPE_TABLE(TRANS_DEF(HOOK_INFOLIST(ptr_hook, args_description), "-")));
}
arraylist_free (list_hooks);
@@ -1203,11 +1227,11 @@ doc_gen_api_hdata (const char *path, const char *lang)
"[width=\"100%\",cols=\"^1,^2,2,2,5\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s | %s | %s\n\n",
ESCAPE(_("Plugin")),
ESCAPE(_("Name")),
ESCAPE(_("Description")),
ESCAPE(_("Lists")),
ESCAPE(_("Variables")));
ESCAPE_TABLE(_("Plugin")),
ESCAPE_TABLE(_("Name")),
ESCAPE_TABLE(_("Description")),
ESCAPE_TABLE(_("Lists")),
ESCAPE_TABLE(_("Variables")));
list_hooks = arraylist_new (64, 1, 0,
&doc_gen_hook_hdata_cmp_cb, NULL,
@@ -1227,15 +1251,15 @@ doc_gen_api_hdata (const char *path, const char *lang)
HOOK_HDATA(ptr_hook, hdata_name));
string_fprintf (file,
"| %s\n",
ESCAPE(PLUGIN(ptr_hook->plugin)));
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)));
string_fprintf (file,
"| [[%s]]<<%s,%s>>\n",
ESCAPE(str_anchor),
ESCAPE(str_anchor),
ESCAPE(HOOK_HDATA(ptr_hook, hdata_name)));
ESCAPE_TABLE(str_anchor),
ESCAPE_TABLE(str_anchor),
ESCAPE_TABLE(HOOK_HDATA(ptr_hook, hdata_name)));
string_fprintf (file,
"| %s\n",
ESCAPE(TRANS(HOOK_HDATA(ptr_hook, description))));
ESCAPE_TABLE(TRANS(HOOK_HDATA(ptr_hook, description))));
ptr_hdata = hook_hdata_get (NULL, HOOK_HDATA(ptr_hook, hdata_name));
if (ptr_hdata)
doc_gen_api_hdata_content (file, ptr_hdata);
@@ -1303,9 +1327,9 @@ doc_gen_api_completions (const char *path, const char *lang)
"[width=\"100%\",cols=\"^1,^2,7\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s\n",
ESCAPE(_("Plugin")),
ESCAPE(_("Name")),
ESCAPE(_("Description")));
ESCAPE_TABLE(_("Plugin")),
ESCAPE_TABLE(_("Name")),
ESCAPE_TABLE(_("Description")));
list_hooks = arraylist_new (64, 1, 0,
&doc_gen_hook_completion_cmp_cb, NULL,
@@ -1323,9 +1347,9 @@ doc_gen_api_completions (const char *path, const char *lang)
string_fprintf (
file,
"| %s | %s | %s\n",
ESCAPE(PLUGIN(ptr_hook->plugin)),
ESCAPE(HOOK_COMPLETION(ptr_hook, completion_item)),
ESCAPE(TRANS(HOOK_COMPLETION(ptr_hook, description))));
ESCAPE_TABLE(PLUGIN(ptr_hook->plugin)),
ESCAPE_TABLE(HOOK_COMPLETION(ptr_hook, completion_item)),
ESCAPE_TABLE(TRANS(HOOK_COMPLETION(ptr_hook, description))));
}
arraylist_free (list_hooks);
@@ -1363,9 +1387,9 @@ doc_gen_api_url_options (const char *path, const char *lang)
"[width=\"100%\",cols=\"2,^1,7\",options=\"header\"]\n"
"|===\n"
"| %s | %s ^(1)^ | %s ^(2)^\n",
ESCAPE(_("Option")),
ESCAPE(_("Type")),
ESCAPE(_("Constants")));
ESCAPE_TABLE(_("Option")),
ESCAPE_TABLE(_("Type")),
ESCAPE_TABLE(_("Constants")));
for (i = 0; url_options[i].name; i++)
{
@@ -1373,8 +1397,8 @@ doc_gen_api_url_options (const char *path, const char *lang)
string_fprintf (
file,
"| %s | %s |",
ESCAPE(name),
ESCAPE(url_type_string[url_options[i].type]));
ESCAPE_TABLE(name),
ESCAPE_TABLE(url_type_string[url_options[i].type]));
if (name)
free (name);
if (url_options[i].constants)
@@ -1450,9 +1474,9 @@ doc_gen_api_plugins_priority (const char *path, const char *lang)
"[width=\"30%\",cols=\"1,3,2\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s\n",
ESCAPE(_("Rank")),
ESCAPE(_("Plugin")),
ESCAPE(_("Priority")));
ESCAPE_TABLE(_("Rank")),
ESCAPE_TABLE(_("Plugin")),
ESCAPE_TABLE(_("Priority")));
list_plugins = arraylist_new (64, 1, 0,
&doc_gen_plugin_cmp_cb, NULL,
@@ -1536,9 +1560,9 @@ doc_gen_api_config_priority (const char *path, const char *lang)
"[width=\"30%\",cols=\"1,3,2\",options=\"header\"]\n"
"|===\n"
"| %s | %s | %s\n",
ESCAPE(_("Rank")),
ESCAPE(_("File")),
ESCAPE(_("Priority")));
ESCAPE_TABLE(_("Rank")),
ESCAPE_TABLE(_("File")),
ESCAPE_TABLE(_("Priority")));
list_configs = arraylist_new (64, 1, 0,
&doc_gen_config_cmp_cb, NULL,
+6 -2
View File
@@ -1312,7 +1312,7 @@ string_convert_escaped_chars (const char *string)
}
/*
* Checks if first char of string is a whitespace (space or tab).
* Checks if first char of string is a whitespace (space, tab, newline or carriage return).
*
* Returns:
* 1: first char is whitespace
@@ -1322,7 +1322,11 @@ string_convert_escaped_chars (const char *string)
int
string_is_whitespace_char (const char *string)
{
return (string && ((string[0] == ' ') || string[0] == '\t')) ? 1 : 0;
return (string && (
(string[0] == ' ')
|| (string[0] == '\t')
|| (string[0] == '\n')
|| (string[0] == '\r'))) ? 1 : 0;
}
/*
+2 -1
View File
@@ -134,7 +134,6 @@ gui_key_default_bindings (int context, int create_option)
BIND("meta-h,meta-r", "/hotlist restore");
BIND("meta-h,meta-R", "/hotlist restore -all");
BIND("meta-k", "/input grab_key_command");
BIND("meta-K", "/input grab_raw_key_command");
BIND("meta-s", "/mute spell toggle");
BIND("meta-u", "/window scroll_unread");
BIND("ctrl-s,ctrl-u", "/allbuf /buffer set unread");
@@ -398,11 +397,13 @@ gui_key_flush (int paste)
* code which is not UTF-8 valid)
*/
if (!paste
&& (i > gui_key_last_key_pressed_sent)
&& (!gui_mouse_event_pending
|| utf8_is_valid (key_str, -1, NULL)))
{
(void) hook_signal_send ("key_pressed",
WEECHAT_HOOK_SIGNAL_STRING, key_str);
gui_key_last_key_pressed_sent = i;
}
if (gui_current_window->buffer->text_search != GUI_TEXT_SEARCH_DISABLED)
+38 -3
View File
@@ -443,10 +443,18 @@ gui_bar_item_custom_new (const char *name, const char *conditions,
name,
GUI_BAR_ITEM_CUSTOM_OPTION_CONDITIONS,
conditions);
if (!option_conditions)
return NULL;
option_content = gui_bar_item_custom_create_option (
name,
GUI_BAR_ITEM_CUSTOM_OPTION_CONTENT,
content);
if (!option_content)
{
config_file_option_free (option_conditions, 0);
return NULL;
}
new_bar_item_custom = gui_bar_item_custom_new_with_options (
name,
@@ -517,21 +525,48 @@ int
gui_bar_item_custom_rename (struct t_gui_bar_item_custom *item,
const char *new_name)
{
char *old_name, *option_name;
int i, length;
if (!item || !gui_bar_item_custom_name_valid (new_name))
return 0;
if (gui_bar_item_custom_search (new_name))
return 0;
old_name = strdup (item->name);
if (!old_name)
return 0;
length = strlen (new_name) + 128;
option_name = malloc (length);
if (!option_name)
{
free (old_name);
return 0;
}
free (item->bar_item->name);
item->bar_item->name = strdup (new_name);
gui_bar_item_update (item->name);
gui_bar_item_update (item->bar_item->name);
free (item->name);
item->name = strdup (new_name);
for (i = 0; i < GUI_BAR_ITEM_CUSTOM_NUM_OPTIONS; i++)
{
snprintf (option_name, length,
"%s.%s",
new_name,
gui_bar_item_custom_option_string[i]);
config_file_option_rename (item->options[i], option_name);
}
gui_bar_item_update (old_name);
gui_bar_item_update (item->name);
free (old_name);
free (option_name);
return 1;
}
+2 -3
View File
@@ -1729,11 +1729,10 @@ gui_input_history_global_next (struct t_gui_buffer *buffer)
*/
void
gui_input_grab_key (struct t_gui_buffer *buffer, int raw_key, int command,
const char *delay)
gui_input_grab_key (struct t_gui_buffer *buffer, int command, const char *delay)
{
if (buffer->input)
gui_key_grab_init (raw_key, command, delay);
gui_key_grab_init (command, delay);
}
/*
+2 -2
View File
@@ -78,8 +78,8 @@ extern void gui_input_history_local_previous (struct t_gui_buffer *buffer);
extern void gui_input_history_local_next (struct t_gui_buffer *buffer);
extern void gui_input_history_global_previous (struct t_gui_buffer *buffer);
extern void gui_input_history_global_next (struct t_gui_buffer *buffer);
extern void gui_input_grab_key (struct t_gui_buffer *buffer, int raw_key,
int command, const char *delay);
extern void gui_input_grab_key (struct t_gui_buffer *buffer, int command,
const char *delay);
extern void gui_input_grab_mouse (struct t_gui_buffer *buffer, int area);
extern void gui_input_insert (struct t_gui_buffer *buffer, const char *args);
extern void gui_input_undo (struct t_gui_buffer *buffer);
+20 -18
View File
@@ -87,7 +87,6 @@ int gui_key_verbose = 0; /* 1 to see some messages */
char gui_key_combo[1024]; /* buffer used for combos */
int gui_key_grab = 0; /* 1 if grab mode enabled (alt-k) */
int gui_key_grab_raw = 0; /* grab raw key code? */
int gui_key_grab_count = 0; /* number of keys pressed in grab mode */
int gui_key_grab_command = 0; /* grab command bound to key? */
int gui_key_grab_delay = 0; /* delay for grab (default is 500) */
@@ -95,6 +94,7 @@ int gui_key_grab_delay = 0; /* delay for grab (default is 500) */
int *gui_key_buffer = NULL; /* input buffer (for paste detection) */
int gui_key_buffer_alloc = 0; /* input buffer allocated size */
int gui_key_buffer_size = 0; /* input buffer size in bytes */
int gui_key_last_key_pressed_sent = -1;
int gui_key_paste_pending = 0; /* 1 is big paste was detected and */
/* WeeChat is asking user what to do */
@@ -185,13 +185,12 @@ gui_key_get_current_context ()
*/
void
gui_key_grab_init (int grab_raw_key, int grab_command, const char *delay)
gui_key_grab_init (int grab_command, const char *delay)
{
long milliseconds;
char *error;
gui_key_grab = 1;
gui_key_grab_raw = grab_raw_key;
gui_key_grab_count = 0;
gui_key_grab_command = grab_command;
@@ -217,8 +216,7 @@ int
gui_key_grab_end_timer_cb (const void *pointer, void *data, int remaining_calls)
{
char *key_name, *key_name_alias, *key_utf8;
const char *ptr_key_name;
struct t_gui_key *ptr_key;
struct t_gui_key *ptr_key_raw, *ptr_key;
int rc;
/* make C compiler happy */
@@ -264,23 +262,23 @@ gui_key_grab_end_timer_cb (const void *pointer, void *data, int remaining_calls)
}
}
ptr_key_name = (gui_key_grab_raw) ? key_name : key_name_alias;
/* add expanded key to input buffer */
if (gui_current_window->buffer->input)
{
gui_input_insert_string (gui_current_window->buffer, ptr_key_name);
if (gui_key_grab_command)
ptr_key_raw = gui_key_search (gui_keys[GUI_KEY_CONTEXT_DEFAULT],
key_name);
ptr_key = gui_key_search (gui_keys[GUI_KEY_CONTEXT_DEFAULT],
key_name_alias);
gui_input_insert_string (gui_current_window->buffer,
(ptr_key_raw) ? key_name : key_name_alias);
/* add command bound to key (if found) */
if (gui_key_grab_command && (ptr_key_raw || ptr_key))
{
/* add command bound to key (if found) */
ptr_key = gui_key_search (gui_keys[GUI_KEY_CONTEXT_DEFAULT],
ptr_key_name);
if (ptr_key)
{
gui_input_insert_string (gui_current_window->buffer, " ");
gui_input_insert_string (gui_current_window->buffer,
ptr_key->command);
}
gui_input_insert_string (gui_current_window->buffer, " ");
gui_input_insert_string (
gui_current_window->buffer,
(ptr_key_raw) ?
ptr_key_raw->command : ptr_key->command);
}
gui_input_text_changed_modifier_and_signal (
gui_current_window->buffer,
@@ -2391,6 +2389,9 @@ gui_key_pressed (const char *key_str)
rc_expand = gui_key_expand (gui_key_combo, &key_name, &key_name_alias);
if (!rc_expand)
goto end_no_input;
ptr_key = NULL;
exact_match = 0;
@@ -2693,6 +2694,7 @@ gui_key_buffer_reset ()
gui_key_buffer_optimize ();
}
gui_key_paste_lines = 0;
gui_key_last_key_pressed_sent = -1;
}
/*
+2 -2
View File
@@ -82,6 +82,7 @@ extern int gui_key_grab;
extern int gui_key_grab_count;
extern int *gui_key_buffer;
extern int gui_key_buffer_size;
extern int gui_key_last_key_pressed_sent;
extern int gui_key_paste_pending;
extern int gui_key_paste_bracketed;
extern time_t gui_key_last_activity_time;
@@ -90,8 +91,7 @@ extern time_t gui_key_last_activity_time;
extern void gui_key_init ();
extern int gui_key_search_context (const char *context);
extern void gui_key_grab_init (int grab_raw_key, int grab_command,
const char *delay);
extern void gui_key_grab_init (int grab_command, const char *delay);
extern int gui_key_expand (const char *key,
char **key_name, char **key_name_alias);
extern char *gui_key_legacy_to_alias (const char *key);
+9
View File
@@ -1289,7 +1289,16 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
scm_install_gmp_memory_functions = 0;
#endif /* defined(HAVE_GUILE_GMP_MEMORY_FUNCTIONS) && (SCM_MAJOR_VERSION < 3 || (SCM_MAJOR_VERSION == 3 && SCM_MINOR_VERSION == 0 && SCM_MICRO_VERSION < 8)) */
#if defined(__MACH__) || SCM_MAJOR_VERSION < 3
/*
* on GNU/Hurd or if using Guile < 3, use scm_with_guile() instead of
* scm_init_guile() to prevent crash on exit
*/
scm_with_guile (&weechat_guile_init, NULL);
#else
/* any other OS (not GNU/Hurd) or Guile >= 3.x */
scm_init_guile ();
#endif
guile_module_weechat = scm_c_define_module ("weechat",
&weechat_guile_api_module_init,
+35 -4
View File
@@ -2454,6 +2454,8 @@ IRC_PROTOCOL_CALLBACK(notice)
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick;
int notify_private, is_channel, is_channel_orig, nick_is_me, display_host;
int cap_echo_message, msg_already_received;
time_t time_now;
struct t_gui_buffer *ptr_buffer;
IRC_PROTOCOL_MIN_PARAMS(2);
@@ -2479,8 +2481,23 @@ IRC_PROTOCOL_CALLBACK(notice)
if (nick && (pos_args[0] == '\01'))
{
irc_ctcp_display_reply_from_nick (server, date, tags, command, nick,
address, pos_args);
cap_echo_message = weechat_hashtable_has_key (server->cap_list,
"echo-message");
msg_already_received = weechat_hashtable_has_key (
server->echo_msg_recv, irc_message);
if (!msg_already_received && cap_echo_message)
{
time_now = time (NULL);
weechat_hashtable_set (server->echo_msg_recv,
irc_message, &time_now);
}
if (!cap_echo_message || !msg_already_received)
{
irc_ctcp_display_reply_from_nick (server, date, tags, command, nick,
address, pos_args);
}
if (msg_already_received)
weechat_hashtable_remove (server->echo_msg_recv, irc_message);
}
else
{
@@ -3024,7 +3041,9 @@ IRC_PROTOCOL_CALLBACK(privmsg)
{
char *msg_args, *msg_args2, str_tags[1024], *str_color, *color;
const char *pos_target, *remote_nick, *pv_tags;
int status_msg, is_channel, nick_is_me;
int status_msg, is_channel, nick_is_me, cap_echo_message;
int msg_already_received;
time_t time_now;
struct t_irc_channel *ptr_channel;
struct t_irc_nick *ptr_nick;
@@ -3175,7 +3194,17 @@ IRC_PROTOCOL_CALLBACK(privmsg)
/* CTCP to user */
if (msg_args[0] == '\01')
{
if (nick_is_me)
cap_echo_message = weechat_hashtable_has_key (server->cap_list,
"echo-message");
msg_already_received = weechat_hashtable_has_key (
server->echo_msg_recv, irc_message);
if (!msg_already_received && cap_echo_message)
{
time_now = time (NULL);
weechat_hashtable_set (server->echo_msg_recv,
irc_message, &time_now);
}
if (nick_is_me && cap_echo_message && !msg_already_received)
{
irc_protocol_privmsg_display_ctcp_send (
server, remote_nick, address, msg_args);
@@ -3185,6 +3214,8 @@ IRC_PROTOCOL_CALLBACK(privmsg)
irc_ctcp_recv (server, date, tags, command, NULL, params[0],
address, nick, remote_nick, msg_args, irc_message);
}
if (msg_already_received)
weechat_hashtable_remove (server->echo_msg_recv, irc_message);
goto end;
}
+33
View File
@@ -1768,6 +1768,11 @@ irc_server_alloc (const char *name)
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_TIME,
NULL, NULL);
new_server->echo_msg_recv = weechat_hashtable_new (
32,
WEECHAT_HASHTABLE_STRING,
WEECHAT_HASHTABLE_TIME,
NULL, NULL);
new_server->batches = NULL;
new_server->last_batch = NULL;
new_server->buffer = NULL;
@@ -2254,6 +2259,7 @@ irc_server_free_data (struct t_irc_server *server)
weechat_hashtable_free (server->join_manual);
weechat_hashtable_free (server->join_channel_key);
weechat_hashtable_free (server->join_noswitch);
weechat_hashtable_free (server->echo_msg_recv);
/* free server data */
for (i = 0; i < IRC_SERVER_NUM_OPTIONS; i++)
@@ -3914,6 +3920,23 @@ irc_server_check_join_smart_filtered_cb (void *data,
}
}
/*
* Callback called for each message received with echo-message: deletes old
* messages in the hashtable.
*/
void
irc_server_check_echo_msg_recv_cb (void *data,
struct t_hashtable *hashtable,
const void *key, const void *value)
{
/* make C compiler happy */
(void) data;
if (*((time_t *)value) + (60 * 5) < time (NULL))
weechat_hashtable_remove (hashtable, key);
}
/*
* Timer called each second to perform some operations on servers.
*/
@@ -4094,6 +4117,9 @@ irc_server_timer_cb (const void *pointer, void *data, int remaining_calls)
NULL);
}
}
weechat_hashtable_map (ptr_server->echo_msg_recv,
&irc_server_check_echo_msg_recv_cb,
NULL);
ptr_batch = ptr_server->batches;
while (ptr_batch)
{
@@ -4196,6 +4222,9 @@ irc_server_close_connection (struct t_irc_server *server)
/* remove all keys for joins without switch */
weechat_hashtable_remove_all (server->join_noswitch);
/* remove all messages stored (with capability echo-message) */
weechat_hashtable_remove_all (server->echo_msg_recv);
/* remove all batched events pending */
irc_batch_free_all (server);
@@ -6476,6 +6505,7 @@ irc_server_hdata_server_cb (const void *pointer, void *data,
WEECHAT_HDATA_VAR(struct t_irc_server, join_manual, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, join_channel_key, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, join_noswitch, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, echo_msg_recv, HASHTABLE, 0, NULL, NULL);
WEECHAT_HDATA_VAR(struct t_irc_server, batches, POINTER, 0, NULL, "irc_batch");
WEECHAT_HDATA_VAR(struct t_irc_server, last_batch, POINTER, 0, NULL, "irc_batch");
WEECHAT_HDATA_VAR(struct t_irc_server, buffer, POINTER, 0, NULL, "buffer");
@@ -7265,6 +7295,9 @@ irc_server_print_log ()
weechat_log_printf (" join_noswitch . . . . . . : 0x%lx (hashtable: '%s')",
ptr_server->join_noswitch,
weechat_hashtable_get_string (ptr_server->join_noswitch, "keys_values"));
weechat_log_printf (" echo_msg_recv . . . . . . : 0x%lx (hashtable: '%s')",
ptr_server->echo_msg_recv,
weechat_hashtable_get_string (ptr_server->echo_msg_recv, "keys_values"));
weechat_log_printf (" batches . . . . . . . . . : 0x%lx", ptr_server->batches);
weechat_log_printf (" last_batch. . . . . . . . : 0x%lx", ptr_server->last_batch);
weechat_log_printf (" buffer. . . . . . . . . . : 0x%lx", ptr_server->buffer);
+1
View File
@@ -289,6 +289,7 @@ struct t_irc_server
struct t_hashtable *join_manual; /* manual joins pending */
struct t_hashtable *join_channel_key; /* keys pending for joins */
struct t_hashtable *join_noswitch; /* joins w/o switch to buffer */
struct t_hashtable *echo_msg_recv; /* msg received with echo-message */
struct t_irc_batch *batches; /* batched events (cap "batch") */
struct t_irc_batch *last_batch; /* last batch */
struct t_gui_buffer *buffer; /* GUI buffer allocated for server */
+2
View File
@@ -149,6 +149,8 @@ irc_signal_upgrade_cb (const void *pointer, void *data,
"work for servers connected via TLS"),
weechat_prefix ("error"), IRC_PLUGIN_NAME);
}
/* send QUIT to server, then disconnect */
irc_command_quit_server (ptr_server, NULL);
irc_server_disconnect (ptr_server, 0, 0);
/*
* schedule reconnection: WeeChat will reconnect to this server
+4 -15
View File
@@ -114,7 +114,7 @@ plugin_config_set (const char *plugin_name, const char *option_name,
const char *value)
{
int length, rc;
char *option_full_name, *option_full_name_lower;
char *option_full_name;
rc = WEECHAT_CONFIG_OPTION_SET_ERROR;
@@ -124,12 +124,7 @@ plugin_config_set (const char *plugin_name, const char *option_name,
{
snprintf (option_full_name, length, "%s.%s",
plugin_name, option_name);
option_full_name_lower = string_tolower (option_full_name);
if (option_full_name_lower)
{
rc = plugin_config_set_internal (option_full_name_lower, value);
free (option_full_name_lower);
}
rc = plugin_config_set_internal (option_full_name, value);
free (option_full_name);
}
@@ -206,7 +201,7 @@ plugin_config_set_desc (const char *plugin_name, const char *option_name,
const char *description)
{
int length;
char *option_full_name, *option_full_name_lower;
char *option_full_name;
length = strlen (plugin_name) + 1 + strlen (option_name) + 1;
option_full_name = malloc (length);
@@ -214,13 +209,7 @@ plugin_config_set_desc (const char *plugin_name, const char *option_name,
{
snprintf (option_full_name, length, "%s.%s",
plugin_name, option_name);
option_full_name_lower = string_tolower (option_full_name);
if (option_full_name_lower)
{
plugin_config_set_desc_internal (option_full_name_lower,
description);
free (option_full_name_lower);
}
plugin_config_set_desc_internal (option_full_name, description);
free (option_full_name);
}
}
+1 -1
View File
@@ -206,7 +206,7 @@ relay_irc_sendf (struct t_relay_client *client, const char *format, ...)
const char *str_message, *ptr_msg1, *ptr_msg2;
struct t_hashtable *hashtable_in, *hashtable_out;
if (!client)
if (!client || !format)
return;
weechat_va_format (format);
+1 -1
View File
@@ -526,7 +526,7 @@ TEST_GROUP(CoreHdataWithList)
item->test_string = strdup ("item2");
item->test_string2 = strdup ("string2");
item->test_string3 = NULL;
ptr_item1->test_string_null = NULL;
item->test_string_null = NULL;
item->test_shared_string = string_shared_get ("item2_shared");
strcpy (item->test_array_2_words_fixed_size[0], "item2-word1");
strcpy (item->test_array_2_words_fixed_size[1], "item2-word2");
+2
View File
@@ -1090,6 +1090,8 @@ TEST(CoreString, IsWhitespaceChar)
LONGS_EQUAL(1, string_is_whitespace_char (" abc def"));
LONGS_EQUAL(1, string_is_whitespace_char ("\tabc def"));
LONGS_EQUAL(1, string_is_whitespace_char ("\nabc def"));
LONGS_EQUAL(1, string_is_whitespace_char ("\rabc def"));
}
/*
@@ -455,6 +455,9 @@ TEST(GuiBarItemCustom, Rename)
CHECK(new_item->bar_item);
STRCMP_EQUAL("test3", new_item->bar_item->name);
STRCMP_EQUAL("test3.conditions", new_item->options[GUI_BAR_ITEM_CUSTOM_OPTION_CONDITIONS]->name);
STRCMP_EQUAL("test3.content", new_item->options[GUI_BAR_ITEM_CUSTOM_OPTION_CONTENT]->name);
gui_bar_item_custom_free (new_item);
gui_bar_item_custom_free (new_item2);
}
+27 -4
View File
@@ -2950,10 +2950,33 @@ TEST(IrcProtocolWithServer, privmsg)
* valid CTCP to channel from self nick
* (case of bouncer of if echo-message capability is enabled)
*/
RECV(":alice!user@host PRIVMSG bob :\01VERSION\01");
CHECK_PV("bob", "--", "CTCP query to bob: VERSION",
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
if (i == 0)
{
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
"irc_privmsg,irc_ctcp,host_user@host,log1");
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION DCC "
"CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION",
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
"no_highlight,log1");
}
else
{
CHECK_PV("alice", "--", "CTCP query to alice: CLIENTINFO",
"irc_privmsg,irc_ctcp,self_msg,notify_none,no_highlight,"
"nick_alice,host_user@host,log1");
/*
* with echo-message capability, when the same message is received
* for the second time, the request and reply are displayed
*/
RECV(":alice!user@host PRIVMSG alice :\01CLIENTINFO\01");
CHECK_SRV("--", "CTCP requested by alice: CLIENTINFO",
"irc_privmsg,irc_ctcp,host_user@host,log1");
CHECK_SRV("--", "CTCP reply to alice: CLIENTINFO ACTION DCC "
"CLIENTINFO FINGER PING SOURCE TIME USERINFO VERSION",
"irc_privmsg,irc_ctcp,irc_ctcp_reply,self_msg,notify_none,"
"no_highlight,log1");
}
/* close xfer buffer */
if (xfer_buffer)
@@ -487,7 +487,6 @@ TEST(RelayIrc, RelayIrcMessageParse)
TEST(RelayIrcWithClient, RelayIrcSendf)
{
relay_irc_sendf (NULL, NULL);
relay_irc_sendf (NULL, "test");
relay_irc_sendf (ptr_relay_client, NULL);
+2 -2
View File
@@ -39,8 +39,8 @@
# devel-number the devel version as hex number ("0x04010000" for "4.1.0-dev")
#
WEECHAT_STABLE="4.0.0"
WEECHAT_DEVEL="4.0.0"
WEECHAT_STABLE="4.0.2"
WEECHAT_DEVEL="4.0.2"
STABLE_MAJOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f1)
STABLE_MINOR=$(echo "${WEECHAT_STABLE}" | cut -d"." -f2)