summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.adoc1
-rw-r--r--po/cs.po10
-rw-r--r--po/de.po19
-rw-r--r--po/es.po10
-rw-r--r--po/fr.po10
-rw-r--r--po/hu.po10
-rw-r--r--po/it.po10
-rw-r--r--po/ja.po12
-rw-r--r--po/pl.po12
-rw-r--r--po/pt.po12
-rw-r--r--po/pt_BR.po10
-rw-r--r--po/ru.po10
-rw-r--r--po/sr.po12
-rw-r--r--po/tr.po12
-rw-r--r--po/weechat.pot8
-rw-r--r--src/plugins/trigger/trigger-command.c5
-rw-r--r--src/plugins/trigger/trigger-completion.c68
17 files changed, 209 insertions, 22 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index fe91e633d..6a8b8aa66 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -71,6 +71,7 @@ New features::
* relay: add modifiers "relay_client_irc_in", "relay_client_irc_out1" and "relay_client_irc_out" in irc protocol
* relay: add support of capability "echo-message" in irc protocol (issue #1949)
* relay: add handshake option "escape_commands" in weechat protocol
+ * trigger: add completions "trigger_names_disabled" and "trigger_names_enabled", used in completion of `/trigger disable` and `/trigger enable`
Bug fixes::
diff --git a/po/cs.po b/po/cs.po
index 0d6dc2648..116212ee0 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -13510,6 +13510,14 @@ msgid "default triggers"
msgstr "Seznam trigerů:"
#, fuzzy
+msgid "disabled triggers"
+msgstr "Seznam trigerů:"
+
+#, fuzzy
+msgid "enabled triggers"
+msgstr "zapni podporu myši"
+
+#, fuzzy
msgid "options for triggers"
msgstr "Seznam trigerů:"
diff --git a/po/de.po b/po/de.po
index 4ac3e3a02..62d7005b8 100644
--- a/po/de.po
+++ b/po/de.po
@@ -26,7 +26,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-06-04 11:12+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -11171,7 +11171,6 @@ msgstr "zeigt den Host innerhalb einer join Nachricht an"
msgid "display host in join messages from local client"
msgstr "zeigt den Host innerhalb einer join Nachrichten des lokalen Client an"
-#| msgid "display host in join messages"
msgid "display host in notice messages"
msgstr "zeigt den Host innerhalb einer notice Nachricht an"
@@ -16011,8 +16010,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 "
@@ -16020,8 +16018,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 "
@@ -16239,6 +16236,16 @@ msgstr "trigger"
msgid "default triggers"
msgstr "voreingestellte Trigger"
+#, fuzzy
+#| msgid "default triggers"
+msgid "disabled triggers"
+msgstr "voreingestellte Trigger"
+
+#, fuzzy
+#| msgid "enable trigger support"
+msgid "enabled triggers"
+msgstr "Triggerunterstützung einschalten"
+
msgid "options for triggers"
msgstr "Einstellungen für Trigger"
diff --git a/po/es.po b/po/es.po
index 0fcf0e9c6..d10374afa 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Santiago Forero <santiago@forero.xyz>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -14177,6 +14177,14 @@ msgid "default triggers"
msgstr "Lista de alias:"
#, fuzzy
+msgid "disabled triggers"
+msgstr "Lista de alias:"
+
+#, fuzzy
+msgid "enabled triggers"
+msgstr "habilitar soporte para ratón"
+
+#, fuzzy
msgid "options for triggers"
msgstr "opciones para proxies"
diff --git a/po/fr.po b/po/fr.po
index 57a35b972..a8699d866 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
-"PO-Revision-Date: 2023-06-03 21:09+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
+"PO-Revision-Date: 2023-06-10 20:30+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -15925,6 +15925,12 @@ msgstr "triggers"
msgid "default triggers"
msgstr "triggers par défaut"
+msgid "disabled triggers"
+msgstr "triggers désactivés"
+
+msgid "enabled triggers"
+msgstr "triggers activés"
+
msgid "options for triggers"
msgstr "options pour les triggers"
diff --git a/po/hu.po b/po/hu.po
index 49f37d13a..26aafbe1b 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -12777,6 +12777,14 @@ msgid "default triggers"
msgstr "Aliaszok listája:\n"
#, fuzzy
+msgid "disabled triggers"
+msgstr "Aliaszok listája:\n"
+
+#, fuzzy
+msgid "enabled triggers"
+msgstr "Aliaszok listája:\n"
+
+#, fuzzy
msgid "options for triggers"
msgstr "Aliaszok listája:\n"
diff --git a/po/it.po b/po/it.po
index 566e25457..f130ded76 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -13954,6 +13954,14 @@ msgid "default triggers"
msgstr "Elenco degli alias:"
#, fuzzy
+msgid "disabled triggers"
+msgstr "Elenco degli alias:"
+
+#, fuzzy
+msgid "enabled triggers"
+msgstr "abilita il supporto del mouse"
+
+#, fuzzy
msgid "options for triggers"
msgstr "opzioni per i proxy"
diff --git a/po/ja.po b/po/ja.po
index e2dde9298..68c78b9a1 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -15401,6 +15401,16 @@ msgstr "トリガ"
msgid "default triggers"
msgstr "デフォルトトリガ"
+#, fuzzy
+#| msgid "default triggers"
+msgid "disabled triggers"
+msgstr "デフォルトトリガ"
+
+#, fuzzy
+#| msgid "enable trigger support"
+msgid "enabled triggers"
+msgstr "トリガサポートの有効化"
+
msgid "options for triggers"
msgstr "トリガに対するオプション"
diff --git a/po/pl.po b/po/pl.po
index 6311f5fea..1cc62b3f9 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -16545,6 +16545,16 @@ msgstr "triggery"
msgid "default triggers"
msgstr "domyślne triggery"
+#, fuzzy
+#| msgid "default triggers"
+msgid "disabled triggers"
+msgstr "domyślne triggery"
+
+#, fuzzy
+#| msgid "enable trigger support"
+msgid "enabled triggers"
+msgstr "włącza wsparcie dla triggerów"
+
msgid "options for triggers"
msgstr "opcje dla triggerów"
diff --git a/po/pt.po b/po/pt.po
index 7dbc39514..b40cdee2c 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -15158,6 +15158,16 @@ msgstr "acionadores"
msgid "default triggers"
msgstr "acionadores predefinidos"
+#, fuzzy
+#| msgid "default triggers"
+msgid "disabled triggers"
+msgstr "acionadores predefinidos"
+
+#, fuzzy
+#| msgid "enable trigger support"
+msgid "enabled triggers"
+msgstr "ativar suporte de acionadores"
+
msgid "options for triggers"
msgstr "opções de acionadores"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 1ff1a8a17..08a970779 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Érico Nogueira <ericonr@disroot.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -13380,6 +13380,14 @@ msgid "default triggers"
msgstr "lista de atalhos"
#, fuzzy
+msgid "disabled triggers"
+msgstr "lista de atalhos"
+
+#, fuzzy
+msgid "enabled triggers"
+msgstr "habilita suporte à mouse"
+
+#, fuzzy
msgid "options for triggers"
msgstr "opções para proxys"
diff --git a/po/ru.po b/po/ru.po
index 359a33e37..882307c0b 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -12814,6 +12814,14 @@ msgid "default triggers"
msgstr "Список сокращений:\n"
#, fuzzy
+msgid "disabled triggers"
+msgstr "Список сокращений:\n"
+
+#, fuzzy
+msgid "enabled triggers"
+msgstr "Список сокращений:\n"
+
+#, fuzzy
msgid "options for triggers"
msgstr "Список сокращений:\n"
diff --git a/po/sr.po b/po/sr.po
index cb9eadcba..e056f35ae 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-14 15:29+0200\n"
"Last-Translator: Ivan Pešić <ivan.pesic@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -15546,6 +15546,16 @@ msgstr "окидачи"
msgid "default triggers"
msgstr "подразумевани окидачи"
+#, fuzzy
+#| msgid "default triggers"
+msgid "disabled triggers"
+msgstr "подразумевани окидачи"
+
+#, fuzzy
+#| msgid "enable trigger support"
+msgid "enabled triggers"
+msgstr "укључивање подршке за окидаче"
+
msgid "options for triggers"
msgstr "опције за окидаче"
diff --git a/po/tr.po b/po/tr.po
index 992b8655f..ebd9d5740 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+0200\n"
"PO-Revision-Date: 2023-05-01 20:23+0200\n"
"Last-Translator: Emir SARI <emir_sari@icloud.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -16034,6 +16034,16 @@ msgstr "tetikler"
msgid "default triggers"
msgstr "öntanımlı tetikler"
+#, fuzzy
+#| msgid "default triggers"
+msgid "disabled triggers"
+msgstr "öntanımlı tetikler"
+
+#, fuzzy
+#| msgid "enable trigger support"
+msgid "enabled triggers"
+msgstr "tetik desteğini etkinleştir"
+
msgid "options for triggers"
msgstr "tetik seçenekleri"
diff --git a/po/weechat.pot b/po/weechat.pot
index 313b1bf83..a45c42aa4 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2023-06-03 21:06+0200\n"
+"POT-Creation-Date: 2023-06-10 20:29+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"
@@ -11599,6 +11599,12 @@ msgstr ""
msgid "default triggers"
msgstr ""
+msgid "disabled triggers"
+msgstr ""
+
+msgid "enabled triggers"
+msgstr ""
+
msgid "options for triggers"
msgstr ""
diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c
index 2387a9b27..b1c0ff575 100644
--- a/src/plugins/trigger/trigger-command.c
+++ b/src/plugins/trigger/trigger-command.c
@@ -1314,8 +1314,9 @@ trigger_command_init ()
" || input|output|recreate %(trigger_names)"
" || set %(trigger_names) %(trigger_options)|name %(trigger_option_value)"
" || rename|copy %(trigger_names) %(trigger_names)"
- " || enable|disable|toggle|restart|del %(trigger_names)|-all "
- "%(trigger_names)|%*"
+ " || enable %(trigger_names_disabled)|-all %(trigger_names_disabled)|%*"
+ " || disable %(trigger_names_enabled)|-all %(trigger_names_enabled)|%*"
+ " || toggle|restart|del %(trigger_names)|-all %(trigger_names)|%*"
" || show %(trigger_names)"
" || restore %(trigger_names_default)|%*"
" || default"
diff --git a/src/plugins/trigger/trigger-completion.c b/src/plugins/trigger/trigger-completion.c
index 9de8d0f74..0e46ae9db 100644
--- a/src/plugins/trigger/trigger-completion.c
+++ b/src/plugins/trigger/trigger-completion.c
@@ -86,6 +86,68 @@ trigger_completion_triggers_default_cb (const void *pointer, void *data,
}
/*
+ * Adds disabled triggers to completion list.
+ */
+
+int
+trigger_completion_triggers_disabled_cb (const void *pointer, void *data,
+ const char *completion_item,
+ struct t_gui_buffer *buffer,
+ struct t_gui_completion *completion)
+{
+ struct t_trigger *ptr_trigger;
+
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) completion_item;
+ (void) buffer;
+
+ for (ptr_trigger = triggers; ptr_trigger;
+ ptr_trigger = ptr_trigger->next_trigger)
+ {
+ if (!weechat_config_boolean (ptr_trigger->options[TRIGGER_OPTION_ENABLED]))
+ {
+ weechat_completion_list_add (completion, ptr_trigger->name,
+ 0, WEECHAT_LIST_POS_SORT);
+ }
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
+ * Adds enabled triggers to completion list.
+ */
+
+int
+trigger_completion_triggers_enabled_cb (const void *pointer, void *data,
+ const char *completion_item,
+ struct t_gui_buffer *buffer,
+ struct t_gui_completion *completion)
+{
+ struct t_trigger *ptr_trigger;
+
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) completion_item;
+ (void) buffer;
+
+ for (ptr_trigger = triggers; ptr_trigger;
+ ptr_trigger = ptr_trigger->next_trigger)
+ {
+ if (weechat_config_boolean (ptr_trigger->options[TRIGGER_OPTION_ENABLED]))
+ {
+ weechat_completion_list_add (completion, ptr_trigger->name,
+ 0, WEECHAT_LIST_POS_SORT);
+ }
+ }
+
+ return WEECHAT_RC_OK;
+}
+
+/*
* Adds options for triggers to completion list.
*/
@@ -555,6 +617,12 @@ trigger_completion_init ()
weechat_hook_completion ("trigger_names_default",
N_("default triggers"),
&trigger_completion_triggers_default_cb, NULL, NULL);
+ weechat_hook_completion ("trigger_names_disabled",
+ N_("disabled triggers"),
+ &trigger_completion_triggers_disabled_cb, NULL, NULL);
+ weechat_hook_completion ("trigger_names_enabled",
+ N_("enabled triggers"),
+ &trigger_completion_triggers_enabled_cb, NULL, NULL);
weechat_hook_completion ("trigger_options",
N_("options for triggers"),
&trigger_completion_options_cb, NULL, NULL);