From bb41de8c0255887720f570e5f0594a497f9ea0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 14 Mar 2021 14:11:06 +0100 Subject: api: add info "weechat_daemon" --- ChangeLog.adoc | 4 ++++ doc/de/includes/autogen_api_infos.de.adoc | 2 ++ doc/en/includes/autogen_api_infos.en.adoc | 2 ++ doc/fr/includes/autogen_api_infos.fr.adoc | 2 ++ doc/it/includes/autogen_api_infos.it.adoc | 2 ++ doc/ja/includes/autogen_api_infos.ja.adoc | 2 ++ doc/pl/includes/autogen_api_infos.pl.adoc | 2 ++ po/cs.po | 6 +++++- po/de.po | 6 +++++- po/es.po | 6 +++++- po/fr.po | 7 +++++-- po/hu.po | 5 ++++- po/it.po | 6 +++++- po/ja.po | 6 +++++- po/pl.po | 6 +++++- po/pt.po | 6 +++++- po/pt_BR.po | 6 +++++- po/ru.po | 5 ++++- po/tr.po | 5 ++++- po/weechat.pot | 5 ++++- src/plugins/plugin-api-info.c | 25 +++++++++++++++++++++++++ 21 files changed, 102 insertions(+), 14 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 2fa7eae34..349473a74 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -18,6 +18,10 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] [[v3.2]] == Version 3.2 (under dev) +New features:: + + * api: add info "weechat_daemon" + Bug fixes:: * core: recreate buflist and fset bars on /reload when WeeChat is started without configuration files (issue #1618) diff --git a/doc/de/includes/autogen_api_infos.de.adoc b/doc/de/includes/autogen_api_infos.de.adoc index 49da0fd80..e96a5f960 100644 --- a/doc/de/includes/autogen_api_infos.de.adoc +++ b/doc/de/includes/autogen_api_infos.de.adoc @@ -134,6 +134,8 @@ | weechat | version_number | WeeChat-Version (als Zahl) | - +| weechat | weechat_daemon | 1 if WeeChat is running in daemon mode (headless, in background) | - + | weechat | weechat_dir | WeeChat Verzeichnis | - | weechat | weechat_headless | 1, falls WeeChat im Hintergrundmodus ausgeführt wird | - diff --git a/doc/en/includes/autogen_api_infos.en.adoc b/doc/en/includes/autogen_api_infos.en.adoc index ca013c27c..79fb31349 100644 --- a/doc/en/includes/autogen_api_infos.en.adoc +++ b/doc/en/includes/autogen_api_infos.en.adoc @@ -134,6 +134,8 @@ | weechat | version_number | WeeChat version (as number) | - +| weechat | weechat_daemon | 1 if WeeChat is running in daemon mode (headless, in background) | - + | weechat | weechat_dir | WeeChat directory | - | weechat | weechat_headless | 1 if WeeChat is running headless | - diff --git a/doc/fr/includes/autogen_api_infos.fr.adoc b/doc/fr/includes/autogen_api_infos.fr.adoc index 0ca565f1f..1944664f3 100644 --- a/doc/fr/includes/autogen_api_infos.fr.adoc +++ b/doc/fr/includes/autogen_api_infos.fr.adoc @@ -134,6 +134,8 @@ | weechat | version_number | version de WeeChat (sous forme de nombre) | - +| weechat | weechat_daemon | 1 si WeeChat tourne en mode démon (sans interface, en tâche de fond) | - + | weechat | weechat_dir | répertoire de WeeChat | - | weechat | weechat_headless | 1 si WeeChat tourne sans interface | - diff --git a/doc/it/includes/autogen_api_infos.it.adoc b/doc/it/includes/autogen_api_infos.it.adoc index 763351bcd..9f04007a1 100644 --- a/doc/it/includes/autogen_api_infos.it.adoc +++ b/doc/it/includes/autogen_api_infos.it.adoc @@ -134,6 +134,8 @@ | weechat | version_number | versione di WeeChat (come numero) | - +| weechat | weechat_daemon | 1 if WeeChat is running in daemon mode (headless, in background) | - + | weechat | weechat_dir | directory WeeChat | - | weechat | weechat_headless | 1 if WeeChat is running headless | - diff --git a/doc/ja/includes/autogen_api_infos.ja.adoc b/doc/ja/includes/autogen_api_infos.ja.adoc index c428df33f..7524374c8 100644 --- a/doc/ja/includes/autogen_api_infos.ja.adoc +++ b/doc/ja/includes/autogen_api_infos.ja.adoc @@ -134,6 +134,8 @@ | weechat | version_number | WeeChat のバージョン (数字) | - +| weechat | weechat_daemon | 1 if WeeChat is running in daemon mode (headless, in background) | - + | weechat | weechat_dir | WeeChat ディレクトリ | - | weechat | weechat_headless | 1 if WeeChat is running headless | - diff --git a/doc/pl/includes/autogen_api_infos.pl.adoc b/doc/pl/includes/autogen_api_infos.pl.adoc index a9d75905a..87724cfd8 100644 --- a/doc/pl/includes/autogen_api_infos.pl.adoc +++ b/doc/pl/includes/autogen_api_infos.pl.adoc @@ -134,6 +134,8 @@ | weechat | version_number | Wersja WeeChat (jako liczba) | - +| weechat | weechat_daemon | 1 if WeeChat is running in daemon mode (headless, in background) | - + | weechat | weechat_dir | Katalog WeeChat | - | weechat | weechat_headless | 1 jeśli WeeChat działa w trybie bez interfejsu | - diff --git a/po/cs.po b/po/cs.po index 54def9b97..f53862161 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -10338,6 +10338,10 @@ msgstr "1 pokud se WeeChat aktualizuje (příkaz `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1 pokud se WeeChat aktualizuje (příkaz `/upgrade`)" +#, fuzzy +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1 pokud se WeeChat aktualizuje (příkaz `/upgrade`)" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/de.po b/po/de.po index 0c81f60b6..b9c61d33d 100644 --- a/po/de.po +++ b/po/de.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-03-14 13:36+0100\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -12260,6 +12260,10 @@ msgstr "1 falls WeeChat ein Upgrade durchführt (Befehl `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1, falls WeeChat im Hintergrundmodus ausgeführt wird" +#, fuzzy +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1, falls WeeChat im Hintergrundmodus ausgeführt wird" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/es.po b/po/es.po index dd1c10f37..6e1ba6a16 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: Elián Hanisch \n" "Language-Team: weechat-dev \n" @@ -10649,6 +10649,10 @@ msgstr "1 si WeeChat se está actualizando (comando `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1 si WeeChat se está actualizando (comando `/upgrade`)" +#, fuzzy +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1 si WeeChat se está actualizando (comando `/upgrade`)" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/fr.po b/po/fr.po index d897add41..c2b6af51a 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: 2021-03-14 13:34+0100\n" -"PO-Revision-Date: 2021-03-14 13:35+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" +"PO-Revision-Date: 2021-03-14 14:00+0100\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -11986,6 +11986,9 @@ msgstr "1 si WeeChat est en cours de mise à jour (commande `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1 si WeeChat tourne sans interface" +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1 si WeeChat tourne en mode démon (sans interface, en tâche de fond)" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/hu.po b/po/hu.po index 0b4ffb350..28095d3d4 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -9686,6 +9686,9 @@ msgstr "" msgid "1 if WeeChat is running headless" msgstr "" +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/it.po b/po/it.po index 26cd97a03..f880ba632 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -10834,6 +10834,10 @@ msgstr "1 se si sta aggiornando WeeChat (comando `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1 se si sta aggiornando WeeChat (comando `/upgrade`)" +#, fuzzy +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1 se si sta aggiornando WeeChat (comando `/upgrade`)" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/ja.po b/po/ja.po index d9bf2af7b..d2db601ea 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -11727,6 +11727,10 @@ msgstr "1 jeżeli WeeChat jest aktualizowany (komenda `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1 jeśli WeeChat działa w trybie bez interfejsu" +#, fuzzy +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1 jeśli WeeChat działa w trybie bez interfejsu" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/pt.po b/po/pt.po index df00a2844..d76ea3662 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -11291,6 +11291,10 @@ msgstr "1 se o WeeChat está a atualizar (comando `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1 se o WeeChat está a atualizar (comando `/upgrade`)" +#, fuzzy +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1 se o WeeChat está a atualizar (comando `/upgrade`)" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/pt_BR.po b/po/pt_BR.po index ef0950764..f803dbf15 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-03-05 20:43+0100\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -10135,6 +10135,10 @@ msgstr "1 se o WeeChat está sendo atualizado (comando `/upgrade`)" msgid "1 if WeeChat is running headless" msgstr "1 se o WeeChat está sendo atualizado (comando `/upgrade`)" +#, fuzzy +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "1 se o WeeChat está sendo atualizado (comando `/upgrade`)" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/ru.po b/po/ru.po index ceb70c5d5..2ddfeef01 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -9721,6 +9721,9 @@ msgstr "" msgid "1 if WeeChat is running headless" msgstr "" +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/tr.po b/po/tr.po index 13f56b824..55af455bb 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2021-02-06 15:55+0100\n" "Last-Translator: Hasan Kiran \n" "Language-Team: weechat-dev \n" @@ -8846,6 +8846,9 @@ msgstr "" msgid "1 if WeeChat is running headless" msgstr "" +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/po/weechat.pot b/po/weechat.pot index 536379461..c5fa5c9e3 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: 2021-03-14 13:34+0100\n" +"POT-Creation-Date: 2021-03-14 14:00+0100\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -8705,6 +8705,9 @@ msgstr "" msgid "1 if WeeChat is running headless" msgstr "" +msgid "1 if WeeChat is running in daemon mode (headless, in background)" +msgstr "" + msgid "" "1 if automatic connection to servers is enabled, 0 if it has been disabled " "by the user (option \"-a\" or \"--no-connect\")" diff --git a/src/plugins/plugin-api-info.c b/src/plugins/plugin-api-info.c index 3d8c75aad..773742581 100644 --- a/src/plugins/plugin-api-info.c +++ b/src/plugins/plugin-api-info.c @@ -338,6 +338,27 @@ plugin_api_info_weechat_headless_cb (const void *pointer, void *data, return strdup (value); } +/* + * Returns WeeChat info "weechat_daemon". + */ + +char * +plugin_api_info_weechat_daemon_cb (const void *pointer, void *data, + const char *info_name, + const char *arguments) +{ + char value[32]; + + /* make C compiler happy */ + (void) pointer; + (void) data; + (void) info_name; + (void) arguments; + + snprintf (value, sizeof (value), "%d", weechat_daemon); + return strdup (value); +} + /* * Returns WeeChat info "auto_connect". */ @@ -1804,6 +1825,10 @@ plugin_api_info_init () hook_info (NULL, "weechat_headless", N_("1 if WeeChat is running headless"), NULL, &plugin_api_info_weechat_headless_cb, NULL, NULL); + hook_info (NULL, "weechat_daemon", + N_("1 if WeeChat is running in daemon mode " + "(headless, in background)"), + NULL, &plugin_api_info_weechat_daemon_cb, NULL, NULL); hook_info (NULL, "auto_connect", N_("1 if automatic connection to servers is enabled, " "0 if it has been disabled by the user (option \"-a\" or " -- cgit v1.2.3