From 5193c0aeea85e6a11619c0bb7951b181ac1d1d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 19 Apr 2023 20:50:38 +0200 Subject: [PATCH] core: do now allow buffer property "input_multiline" to be reset to 0, except if buffer has no lines --- po/cs.po | 8 +++++++- po/de.po | 8 +++++++- po/es.po | 8 +++++++- po/fr.po | 12 ++++++++++-- po/hu.po | 8 +++++++- po/it.po | 8 +++++++- po/ja.po | 8 +++++++- po/pl.po | 8 +++++++- po/pt.po | 8 +++++++- po/pt_BR.po | 8 +++++++- po/ru.po | 8 +++++++- po/sr.po | 8 +++++++- po/tr.po | 8 +++++++- po/weechat.pot | 8 +++++++- src/gui/gui-buffer.c | 13 +++++++++++++ 15 files changed, 114 insertions(+), 15 deletions(-) diff --git a/po/cs.po b/po/cs.po index 600d88c35..20bf83da6 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: weechat-dev \n" @@ -5084,6 +5084,12 @@ msgid "%sMaximum number of buffers is reached (%d)" msgstr "" "maximální počet navštívených bufferů uchovaných v paměti (0 = nekonečně)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, fuzzy, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sChyba: je možné spojovat pouze bufferz s formátovaným obsahem" diff --git a/po/de.po b/po/de.po index e18fdbc59..8b8830fd1 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-04-13 20:09+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German - Germany \n" @@ -6308,6 +6308,12 @@ msgstr "%sEin Buffer mit dem selben Namen (%s) existiert bereits" msgid "%sMaximum number of buffers is reached (%d)" msgstr "%sMaximale Anzahl an Buffern erreicht (%d)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sEs ist nur möglich Buffer mit formatiertem Inhalt zusammenzufügen" diff --git a/po/es.po b/po/es.po index fa13e8f0d..e23f34ddd 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Santiago Forero \n" "Language-Team: weechat-dev \n" @@ -5697,6 +5697,12 @@ msgstr "%sError: un buffer con el mismo nombre (%s) ya existe" msgid "%sMaximum number of buffers is reached (%d)" msgstr "número máximo de buffers visitados en memoria" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, fuzzy, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "" diff --git a/po/fr.po b/po/fr.po index 9cb3e7d92..880c555d2 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-04-19 14:56+0200\n" -"PO-Revision-Date: 2023-04-19 16:34+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" +"PO-Revision-Date: 2023-04-20 22:35+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" "Language: fr\n" @@ -6173,6 +6173,14 @@ msgstr "%sUn tampon avec le même nom (%s) existe déjà" msgid "%sMaximum number of buffers is reached (%d)" msgstr "%sLe nombre maximum de tampons est atteint (%d)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" +"%sLa propriété de tampon \"%s\" ne peut pas être désactivée si le tampon " +"contient des lignes (tampon : %s)" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "" diff --git a/po/hu.po b/po/hu.po index 680a132b6..e8f815b23 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2022-10-15 22:51+0200\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: weechat-dev \n" @@ -4629,6 +4629,12 @@ msgid "%sMaximum number of buffers is reached (%d)" msgstr "" "felhasználói parancsok maximális száma az előzményekben (0 = korlátlan)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "" diff --git a/po/it.po b/po/it.po index 53d0c7b14..d4cc1a390 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: weechat-dev \n" @@ -5363,6 +5363,12 @@ msgstr "%sErrore: un buffer con lo stesso nome (%s) esiste già" msgid "%sMaximum number of buffers is reached (%d)" msgstr "numero massimo di buffer visitati da memorizzare" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, fuzzy, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sErrore: è possibile solo unire i buffer con il contenuto formattato" diff --git a/po/ja.po b/po/ja.po index 39b91000f..7fa8ed83d 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" "Language-Team: Polish \n" @@ -6424,6 +6424,12 @@ msgstr "%sIstnieje już bufor o nazwie (%s)" msgid "%sMaximum number of buffers is reached (%d)" msgstr "%sOsiągnięto maksymalną ilość buforów (%d)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sMożliwe jest tylko połączenie buforów z sformatowaną zawartością" diff --git a/po/pt.po b/po/pt.po index 7364d5311..216f4ae0f 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese <>\n" @@ -6008,6 +6008,12 @@ msgstr "%sErro: já existe um buffer com o mesmo nome (%s)" msgid "%sMaximum number of buffers is reached (%d)" msgstr "%sErro: o número máximo de buffers foi atingido (%d)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, fuzzy, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sErro: só é possível unir buffers com conteúdo formatado" diff --git a/po/pt_BR.po b/po/pt_BR.po index 90df1baab..8c85a453b 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Érico Nogueira \n" "Language-Team: weechat-dev \n" @@ -5322,6 +5322,12 @@ msgstr "%sErro: um buffer com o mesmo nome (%s) já existe" msgid "%sMaximum number of buffers is reached (%d)" msgstr "número máximo de buffers visitados a serem mantidos em memória" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, fuzzy, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sErro: só é possível mesclar buffers com conteúdo formatado" diff --git a/po/ru.po b/po/ru.po index cb2253c29..5c7570daa 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: weechat-dev \n" @@ -4667,6 +4667,12 @@ msgstr "" msgid "%sMaximum number of buffers is reached (%d)" msgstr "максимальное количество команд в истории (0 = не ограничено)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "" diff --git a/po/sr.po b/po/sr.po index d16b7657d..5c287add2 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-04-13 20:10+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: weechat-dev \n" @@ -6403,6 +6403,12 @@ msgstr "%sВећ постоји бафер са истим именом (%s)" msgid "%sMaximum number of buffers is reached (%d)" msgstr "%sДостигнут је максималан број бафера (%d)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sСпајање је могуће само за бафере са форматираним садржајем" diff --git a/po/tr.po b/po/tr.po index 53ac0ed6e..da2064baa 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2023-03-25 21:13+0100\n" "Last-Translator: Emir SARI \n" "Language-Team: weechat-dev \n" @@ -6419,6 +6419,12 @@ msgstr "%sAynı adlı başka bir arabellek (%s) halihazırda var" msgid "%sMaximum number of buffers is reached (%d)" msgstr "%sEn çok arabellek sayısına ulaşıldı (%d)" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "%sYalnızca biçimlendirilmiş içeriğe iye arabellekler birleştirilebilir" diff --git a/po/weechat.pot b/po/weechat.pot index 1a7de2cfb..e6064527d 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-04-19 14:56+0200\n" +"POT-Creation-Date: 2023-04-20 22:34+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -4249,6 +4249,12 @@ msgstr "" msgid "%sMaximum number of buffers is reached (%d)" msgstr "" +#, c-format +msgid "" +"%sBuffer property \"%s\" can not be disabled if buffer contains lines " +"(buffer: %s)" +msgstr "" + #, c-format msgid "%sIt is only possible to merge buffers with formatted content" msgstr "" diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index 88a0248ff..dc1b6d5dd 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -2102,6 +2102,19 @@ gui_buffer_set_input_multiline (struct t_gui_buffer *buffer, if (!buffer) return; + if (buffer->input_multiline + && !input_multiline + && buffer->own_lines->first_line) + { + gui_chat_printf (NULL, + _("%sBuffer property \"%s\" can not be disabled " + "if buffer contains lines (buffer: %s)"), + gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], + "input_multiline", + buffer->full_name); + return; + } + buffer->input_multiline = (input_multiline) ? 1 : 0; }