1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 16:23:14 +02:00

fset: use a pre-defined format when a format option is empty

Using the pre-defined format (without eval) is about 3.5x faster.
This commit is contained in:
Sébastien Helleu
2017-06-28 22:04:18 +02:00
parent 987ef9e454
commit 5bb7472ed7
22 changed files with 370 additions and 129 deletions
+3 -3
View File
@@ -393,13 +393,13 @@
** Standardwert: `+"/unset ${name}"+`
* [[option_fset.format.option1]] *fset.format.option1*
** Beschreibung: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** Beschreibung: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette
** Standardwert: `+"${marked} ${name} ${type} ${value2}"+`
** Standardwert: `+""+`
* [[option_fset.format.option2]] *fset.format.option2*
** Beschreibung: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** Beschreibung: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette
** Standardwert: `+"${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}"+`
+3 -3
View File
@@ -393,13 +393,13 @@
** default value: `+"/unset ${name}"+`
* [[option_fset.format.option1]] *fset.format.option1*
** description: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** description: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** type: string
** values: any string
** default value: `+"${marked} ${name} ${type} ${value2}"+`
** default value: `+""+`
* [[option_fset.format.option2]] *fset.format.option2*
** description: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** description: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** type: string
** values: any string
** default value: `+"${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}"+`
+3 -3
View File
@@ -393,13 +393,13 @@
** valeur par défaut: `+"/unset ${name}"+`
* [[option_fset.format.option1]] *fset.format.option1*
** description: pass:none[premier format de chaque ligne avec une option qui n'est pas marquée ni sélectionnée (note : le contenu est évalué, voir /help fset) ; les formats peuvent être changés avec la touche ctrl+X]
** description: pass:none[premier format de chaque ligne avec une option qui n'est pas marquée ni sélectionnée (note : le contenu est évalué, voir /help fset) ; un format vide utilise le format pré-défini ("${marked} ${name} ${type} ${value2}"), qui se fait sans évaluation de chaîne et donc plus rapide ; les formats peuvent être changés avec la touche ctrl+X]
** type: chaîne
** valeurs: toute chaîne
** valeur par défaut: `+"${marked} ${name} ${type} ${value2}"+`
** valeur par défaut: `+""+`
* [[option_fset.format.option2]] *fset.format.option2*
** description: pass:none[second format de chaque ligne avec une option qui n'est pas marquée ni sélectionnée (note : le contenu est évalué, voir /help fset) ; les formats peuvent être changés avec la touche ctrl+X]
** description: pass:none[second format de chaque ligne avec une option qui n'est pas marquée ni sélectionnée (note : le contenu est évalué, voir /help fset) ; un format vide utilise le format pré-défini ("${marked} ${name} ${type} ${value2}"), qui se fait sans évaluation de chaîne et donc plus rapide ; les formats peuvent être changés avec la touche ctrl+X]
** type: chaîne
** valeurs: toute chaîne
** valeur par défaut: `+"${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}"+`
+3 -3
View File
@@ -393,13 +393,13 @@
** valore predefinito: `+"/unset ${name}"+`
* [[option_fset.format.option1]] *fset.format.option1*
** descrizione: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** descrizione: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** tipo: stringa
** valori: qualsiasi stringa
** valore predefinito: `+"${marked} ${name} ${type} ${value2}"+`
** valore predefinito: `+""+`
* [[option_fset.format.option2]] *fset.format.option2*
** descrizione: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** descrizione: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** tipo: stringa
** valori: qualsiasi stringa
** valore predefinito: `+"${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}"+`
+3 -3
View File
@@ -393,13 +393,13 @@
** デフォルト値: `+"/unset ${name}"+`
* [[option_fset.format.option1]] *fset.format.option1*
** 説明: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** 説明: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** タイプ: 文字列
** 値: 未制約文字列
** デフォルト値: `+"${marked} ${name} ${type} ${value2}"+`
** デフォルト値: `+""+`
* [[option_fset.format.option2]] *fset.format.option2*
** 説明: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** 説明: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** タイプ: 文字列
** 値: 未制約文字列
** デフォルト値: `+"${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}"+`
+3 -3
View File
@@ -393,13 +393,13 @@
** domyślna wartość: `+"/unset ${name}"+`
* [[option_fset.format.option1]] *fset.format.option1*
** opis: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** opis: pass:none[first format of each line with an option which is not marked nor the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** typ: ciąg
** wartości: dowolny ciąg
** domyślna wartość: `+"${marked} ${name} ${type} ${value2}"+`
** domyślna wartość: `+""+`
* [[option_fset.format.option2]] *fset.format.option2*
** opis: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); formats can be switched with key ctrl+X]
** opis: pass:none[second format of each line with an option which is not marked not the selected one (note: content is evaluated, see /help fset); an empty string uses the predefined format ("${marked} ${name} ${type} ${value2}"), which is without evaluation of string and then much faster; formats can be switched with key ctrl+X]
** typ: ciąg
** wartości: dowolny ciąg
** domyślna wartość: `+"${marked} ${name} ${type} ${value2}${newline} ${empty_name} ${_default_value}${color:darkgray} -- ${min}..${max}${newline} ${empty_name} ${description}"+`
+7 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:32+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5732,13 +5732,17 @@ msgstr "zobrazí nápovědu k příkazům a volbám"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:32+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -6891,13 +6891,17 @@ msgstr "Zeigt einen Hilfstext für Befehle und Einstellungen an"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:32+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5948,13 +5948,17 @@ msgstr "mostrar ayuda sobre los comandos y opciones"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+16 -8
View File
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"PO-Revision-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-28 22:03+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -6959,21 +6959,29 @@ msgstr "utiliser la commande /mute pour définir les options"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
"premier format de chaque ligne avec une option qui n'est pas marquée ni "
"sélectionnée (note : le contenu est évalué, voir /help fset) ; les formats "
"peuvent être changés avec la touche ctrl+X"
"sélectionnée (note : le contenu est évalué, voir /help fset) ; un format "
"vide utilise le format par défaut (\"${marked} ${name} ${type} "
"${value2}\"), qui se fait sans évaluation de chaîne et donc plus rapide ; "
"les formats peuvent être changés avec la touche ctrl+X"
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
"second format de chaque ligne avec une option qui n'est pas marquée ni "
"sélectionnée (note : le contenu est évalué, voir /help fset) ; les formats "
"peuvent être changés avec la touche ctrl+X"
"sélectionnée (note : le contenu est évalué, voir /help fset) ; un format "
"vide utilise le format par défaut (\"${marked} ${name} ${type} "
"${value2}\"), qui se fait sans évaluation de chaîne et donc plus rapide ; "
"les formats peuvent être changés avec la touche ctrl+X"
msgid ""
"format of help line written before each option exported in a file (note: "
+7 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:32+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5265,13 +5265,17 @@ msgstr "segítség megjelenítése a parancsokhoz"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:32+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6119,13 +6119,17 @@ msgstr "visualizza l'aiuto su comandi e opzioni"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -6453,13 +6453,17 @@ msgstr "コマンドとオプションに関するヘルプを表示"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6590,13 +6590,17 @@ msgstr "wyświetl pomoc na temat komend i opcji"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -6479,13 +6479,17 @@ msgstr "mostrar ajuda sobre comandos e opções"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5912,13 +5912,17 @@ msgstr "mostra a ajuda sobre comandos e opções"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5303,13 +5303,17 @@ msgstr "отобразить помощь по командам"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+0200\n"
"PO-Revision-Date: 2017-06-26 23:33+0200\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4847,13 +4847,17 @@ msgstr "komutlar ve seçenekler hakkında yardım göster"
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+7 -3
View File
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-06-26 23:32+0200\n"
"POT-Creation-Date: 2017-06-28 22:02+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"
@@ -4823,13 +4823,17 @@ msgstr ""
msgid ""
"first format of each line with an option which is not marked nor the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
msgid ""
"second format of each line with an option which is not marked not the "
"selected one (note: content is evaluated, see /help fset); formats can be "
"selected one (note: content is evaluated, see /help fset); an empty string "
"uses the default format (\"${marked} ${name} ${type} ${value2}\"), which "
"is without evaluation of string and then much faster; formats can be "
"switched with key ctrl+X"
msgstr ""
+219 -40
View File
@@ -107,16 +107,22 @@ fset_buffer_set_title ()
*
* If fill_right == 1, fills with spaces on the right. Otherwise
* fills with spaces on the left before the value.
*
* If skip_colors == 1, the field value may contain color codes, so
* weechat_strlen_screen() is used instead of weechat_utf8_strlen_screen()
* and then the functions is slower.
*/
void
fset_buffer_fills_field (char *field, char *field_spaces, int size,
int max_length, int fill_right)
fset_buffer_fills_field (char *field, char *field_spaces,
int size, int max_length,
int fill_right, int skip_colors)
{
int length, length_screen, num_spaces;
length = strlen (field);
length_screen = weechat_strlen_screen (field);
length_screen = (skip_colors) ?
weechat_strlen_screen (field) : weechat_utf8_strlen_screen (field);
if (max_length > size - 1)
max_length = size - 1;
@@ -142,18 +148,21 @@ fset_buffer_fills_field (char *field, char *field_spaces, int size,
}
/* field with spaces */
memset (field_spaces, ' ', max_length);
field_spaces[max_length] = '\0';
if (field_spaces)
{
memset (field_spaces, ' ', max_length);
field_spaces[max_length] = '\0';
}
}
/*
* Displays a line with an fset option.
* Displays a line with an fset option using an evaluated format.
*/
void
fset_buffer_display_option (struct t_fset_option *fset_option)
fset_buffer_display_option_eval (struct t_fset_option *fset_option)
{
char *line, str_color_line[128], *color_line, **lines;
char *line, str_color_line[128], **lines;
char str_field[4096], str_field2[4096];
char str_color_value[128], str_color_quotes[128], str_number[64];
int selected_line, y, i, num_lines;
@@ -188,7 +197,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_file", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->file, 1);
fset_option_max_length->file, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"file", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -209,7 +218,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_section", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->section, 1);
fset_option_max_length->section, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"section", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -230,7 +239,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_option", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->option, 1);
fset_option_max_length->option, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"option", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -251,7 +260,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_name", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->name, 1);
fset_option_max_length->name, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"name", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -268,7 +277,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_parent_name", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->parent_name, 1);
fset_option_max_length->parent_name, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"parent_name", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -286,7 +295,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_type", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->type, 1);
fset_option_max_length->type, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"type", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -304,7 +313,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_type_en", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->type_en, 1);
fset_option_max_length->type_en, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"type_en", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -322,7 +331,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_type_short", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->type_short, 1);
fset_option_max_length->type_short, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"type_short", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -340,7 +349,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_type_tiny", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->type_tiny, 1);
fset_option_max_length->type_tiny, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"type_tiny", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -370,7 +379,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_default_value", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->default_value, 1);
fset_option_max_length->default_value, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"default_value", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -439,7 +448,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_value", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->value, 1);
fset_option_max_length->value, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"value", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -473,7 +482,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_value2", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->value2, 1);
fset_option_max_length->value2, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"value2", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -497,7 +506,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_value2", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->value2, 1);
fset_option_max_length->value2, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"value2", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -524,7 +533,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_parent_value", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->parent_value, 1);
fset_option_max_length->parent_value, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"parent_value", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -538,7 +547,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_parent_value", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->parent_value, 1);
fset_option_max_length->parent_value, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"parent_value", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -556,7 +565,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_min", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->min, 1);
fset_option_max_length->min, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"min", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -573,7 +582,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_max", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->max, 1);
fset_option_max_length->max, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"max", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -591,7 +600,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_description", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->description, 1);
fset_option_max_length->description, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"description", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -609,7 +618,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_description2", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->description2, 1);
fset_option_max_length->description2, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"description2", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -626,7 +635,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_description_en", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->description_en, 1);
fset_option_max_length->description_en, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"description_en", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -644,7 +653,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_description_en2", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->description_en2, 1);
fset_option_max_length->description_en2, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"description_en2", str_field);
@@ -659,7 +668,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_string_values", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->string_values, 1);
fset_option_max_length->string_values, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"string_values", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -684,7 +693,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"_marked", str_field);
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
fset_option_max_length->marked, 1);
fset_option_max_length->marked, 1, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"marked", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -703,7 +712,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
snprintf (str_number, sizeof (str_number),
"%d", weechat_arraylist_size (fset_options));
fset_buffer_fills_field (str_field, str_field2, sizeof (str_field),
strlen (str_number), 0);
strlen (str_number), 0, 1);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
"index", str_field);
weechat_hashtable_set (fset_buffer_hashtable_extra_vars,
@@ -728,7 +737,7 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
"newline", "\r\n");
/* build string for line */
color_line = NULL;
str_color_line[0] = '\0';
format_number = weechat_config_integer (fset_config_look_format_number);
if (selected_line)
{
@@ -736,7 +745,6 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
",%s",
weechat_config_string (
fset_config_color_line_selected_bg[format_number - 1]));
color_line = strdup (weechat_color (str_color_line));
}
else if (fset_option->marked)
{
@@ -744,7 +752,6 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
",%s",
weechat_config_string (
fset_config_color_line_marked_bg[format_number - 1]));
color_line = strdup (weechat_color (str_color_line));
}
/* evaluate line */
@@ -761,18 +768,190 @@ fset_buffer_display_option (struct t_fset_option *fset_option)
y = fset_option->index * fset_config_format_option_num_lines[format_number - 1];
for (i = 0; i < num_lines; i++)
{
weechat_printf_y (fset_buffer, y, "%s%s",
(color_line) ? color_line : "",
lines[i]);
weechat_printf_y (
fset_buffer, y,
"%s%s",
(str_color_line[0]) ? weechat_color (str_color_line) : "",
lines[i]);
y++;
}
weechat_string_free_split (lines);
}
free (line);
}
}
if (color_line)
free (color_line);
/*
* Displays a line with an fset option using a predefined format
* (much faster because there is no eval).
*/
void
fset_buffer_display_option_predefined_format (struct t_fset_option *fset_option)
{
int selected_line, value_undef, value_changed, format_number;
int add_quotes, add_quotes_parent;
char str_marked[128], str_name[4096], str_type[128], str_value[4096];
char str_color_line[128], str_color_value[128], str_color_quotes[128];
selected_line = (fset_option->index == fset_buffer_selected_line) ? 1 : 0;
value_undef = (fset_option->value == NULL) ? 1 : 0;
value_changed = (fset_option_value_is_changed (fset_option)) ? 1 : 0;
format_number = weechat_config_integer (fset_config_look_format_number);
str_color_line[0] = '\0';
if (selected_line)
{
snprintf (str_color_line, sizeof (str_color_line),
",%s",
weechat_config_string (
fset_config_color_line_selected_bg[format_number - 1]));
}
else if (fset_option->marked)
{
snprintf (str_color_line, sizeof (str_color_line),
",%s",
weechat_config_string (
fset_config_color_line_marked_bg[format_number - 1]));
}
snprintf (str_marked, sizeof (str_marked),
"%s",
(fset_option->marked) ?
weechat_config_string (fset_config_look_marked_string) :
weechat_config_string (fset_config_look_unmarked_string));
fset_buffer_fills_field (str_marked, NULL, sizeof (str_marked),
fset_option_max_length->marked, 1, 0);
snprintf (str_name, sizeof (str_name),
"%s",
(fset_option->name) ? fset_option->name : "");
fset_buffer_fills_field (str_name, NULL, sizeof (str_name),
fset_option_max_length->name, 1, 0);
snprintf (str_type, sizeof (str_type),
"%s",
_(fset_option_type_string[fset_option->type]));
fset_buffer_fills_field (str_type, NULL, sizeof (str_type),
fset_option_max_length->type, 1, 0);
add_quotes = (fset_option->value && (fset_option->type == FSET_OPTION_TYPE_STRING)) ? 1 : 0;
if ((fset_option->type == FSET_OPTION_TYPE_COLOR)
&& weechat_config_boolean (fset_config_look_use_color_value))
{
snprintf (str_color_value, sizeof (str_color_value),
"%s",
weechat_color (fset_option->value));
}
else if (value_undef)
{
snprintf (str_color_value, sizeof (str_color_value),
"%s",
weechat_color (
weechat_config_string (
fset_config_color_value_undef[selected_line])));
snprintf (str_color_quotes, sizeof (str_color_quotes),
"%s",
weechat_color (
weechat_config_string (
fset_config_color_quotes[selected_line])));
}
else if (value_changed)
{
snprintf (str_color_value, sizeof (str_color_value),
"%s",
weechat_color (
weechat_config_string (
fset_config_color_value_changed[selected_line])));
snprintf (str_color_quotes, sizeof (str_color_quotes),
"%s",
weechat_color (
weechat_config_string (
fset_config_color_quotes_changed[selected_line])));
}
else
{
snprintf (str_color_value, sizeof (str_color_value),
"%s",
weechat_color (
weechat_config_string (
fset_config_color_value[selected_line])));
snprintf (str_color_quotes, sizeof (str_color_quotes),
"%s",
weechat_color (
weechat_config_string (
fset_config_color_quotes[selected_line])));
}
if (value_undef && fset_option->parent_value)
{
add_quotes_parent = (fset_option->parent_value && (fset_option->type == FSET_OPTION_TYPE_STRING)) ? 1 : 0;
snprintf (str_value, sizeof (str_value),
"%s%s%s%s%s%s%s -> %s%s%s%s%s%s",
(add_quotes) ? str_color_quotes : "",
(add_quotes) ? "\"" : "",
str_color_value,
(fset_option->value) ? fset_option->value : FSET_OPTION_VALUE_NULL,
(add_quotes) ? str_color_quotes : "",
(add_quotes) ? "\"" : "",
weechat_color ("default"),
(add_quotes_parent) ? weechat_color (weechat_config_string (fset_config_color_quotes[selected_line])) : "",
(add_quotes_parent) ? "\"" : "",
weechat_color (weechat_config_string (fset_config_color_parent_value[selected_line])),
(fset_option->parent_value) ? fset_option->parent_value : FSET_OPTION_VALUE_NULL,
(add_quotes_parent) ? weechat_color (weechat_config_string (fset_config_color_quotes[selected_line])) : "",
(add_quotes_parent) ? "\"" : "");
}
else
{
snprintf (str_value, sizeof (str_value),
"%s%s%s%s%s%s",
(add_quotes) ? str_color_quotes : "",
(add_quotes) ? "\"" : "",
str_color_value,
(fset_option->value) ? fset_option->value : FSET_OPTION_VALUE_NULL,
(add_quotes) ? str_color_quotes : "",
(add_quotes) ? "\"" : "");
}
weechat_printf_y (
fset_buffer, fset_option->index,
"%s%s%s %s%s %s%s %s",
(str_color_line[0]) ? weechat_color (str_color_line) : "",
(fset_option->marked) ?
weechat_color (
weechat_config_string (fset_config_color_marked[selected_line])) :
weechat_color (
weechat_config_string (fset_config_color_unmarked[selected_line])),
str_marked,
weechat_color (
weechat_config_string (
(value_changed) ?
fset_config_color_name_changed[selected_line] :
fset_config_color_name[selected_line])),
str_name,
weechat_color (
weechat_config_string (fset_config_color_type[selected_line])),
str_type,
str_value);
}
/*
* Displays a line with an fset option.
*/
void
fset_buffer_display_option (struct t_fset_option *fset_option)
{
int format_number;
const char *ptr_format;
format_number = weechat_config_integer (fset_config_look_format_number);
ptr_format = weechat_config_string (fset_config_format_option[format_number - 1]);
if (ptr_format && ptr_format[0])
fset_buffer_display_option_eval (fset_option);
else
fset_buffer_display_option_predefined_format (fset_option);
}
/*
+9 -3
View File
@@ -460,10 +460,13 @@ fset_config_init ()
"option1", "string",
N_("first format of each line with an option which is not marked "
"nor the selected one "
"(note: content is evaluated, see /help fset); formats can be "
"switched with key ctrl+X"),
"(note: content is evaluated, see /help fset); "
"an empty string uses the default format "
"(\"${marked} ${name} ${type} ${value2}\"), which is without "
"evaluation of string and then much faster; "
"formats can be switched with key ctrl+X"),
NULL, 0, 0,
"${marked} ${name} ${type} ${value2}",
"",
NULL, 0,
NULL, NULL, NULL,
&fset_config_change_format_cb, NULL, NULL,
@@ -474,6 +477,9 @@ fset_config_init ()
N_("second format of each line with an option which is not marked "
"not the selected one "
"(note: content is evaluated, see /help fset); "
"an empty string uses the default format "
"(\"${marked} ${name} ${type} ${value2}\"), which is without "
"evaluation of string and then much faster; "
"formats can be switched with key ctrl+X"),
NULL, 0, 0,
"${marked} ${name} ${type} ${value2}${newline}"
+24 -24
View File
@@ -573,61 +573,61 @@ fset_option_set_max_length_fields_option (struct t_fset_option *fset_option)
int length, length_value, length_parent_value;
/* file */
length = weechat_strlen_screen (fset_option->file);
length = weechat_utf8_strlen_screen (fset_option->file);
if (length > fset_option_max_length->file)
fset_option_max_length->file = length;
/* section */
length = weechat_strlen_screen (fset_option->section);
length = weechat_utf8_strlen_screen (fset_option->section);
if (length > fset_option_max_length->section)
fset_option_max_length->section = length;
/* option */
length = weechat_strlen_screen (fset_option->option);
length = weechat_utf8_strlen_screen (fset_option->option);
if (length > fset_option_max_length->option)
fset_option_max_length->option = length;
/* name */
length = weechat_strlen_screen (fset_option->name);
length = weechat_utf8_strlen_screen (fset_option->name);
if (length > fset_option_max_length->name)
fset_option_max_length->name = length;
/* parent_name */
length = (fset_option->parent_name) ?
weechat_strlen_screen (fset_option->name) : 0;
weechat_utf8_strlen_screen (fset_option->name) : 0;
if (length > fset_option_max_length->parent_name)
fset_option_max_length->parent_name = length;
/* type */
length = weechat_strlen_screen (_(fset_option_type_string[fset_option->type]));
length = weechat_utf8_strlen_screen (_(fset_option_type_string[fset_option->type]));
if (length > fset_option_max_length->type)
fset_option_max_length->type = length;
/* type_en */
length = weechat_strlen_screen (fset_option_type_string[fset_option->type]);
length = weechat_utf8_strlen_screen (fset_option_type_string[fset_option->type]);
if (length > fset_option_max_length->type_en)
fset_option_max_length->type_en = length;
/* type_short */
length = weechat_strlen_screen (fset_option_type_string_short[fset_option->type]);
length = weechat_utf8_strlen_screen (fset_option_type_string_short[fset_option->type]);
if (length > fset_option_max_length->type_short)
fset_option_max_length->type_short = length;
/* type_tiny */
length = weechat_strlen_screen (fset_option_type_string_tiny[fset_option->type]);
length = weechat_utf8_strlen_screen (fset_option_type_string_tiny[fset_option->type]);
if (length > fset_option_max_length->type_tiny)
fset_option_max_length->type_tiny = length;
/* default_value */
if (fset_option->default_value)
{
length = weechat_strlen_screen (fset_option->default_value);
length = weechat_utf8_strlen_screen (fset_option->default_value);
if (fset_option->type == FSET_OPTION_TYPE_STRING)
length += 2;
}
else
{
length = weechat_strlen_screen (FSET_OPTION_VALUE_NULL);
length = weechat_utf8_strlen_screen (FSET_OPTION_VALUE_NULL);
}
if (length > fset_option_max_length->default_value)
fset_option_max_length->default_value = length;
@@ -635,13 +635,13 @@ fset_option_set_max_length_fields_option (struct t_fset_option *fset_option)
/* value */
if (fset_option->value)
{
length_value = weechat_strlen_screen (fset_option->value);
length_value = weechat_utf8_strlen_screen (fset_option->value);
if (fset_option->type == FSET_OPTION_TYPE_STRING)
length_value += 2;
}
else
{
length_value = weechat_strlen_screen (FSET_OPTION_VALUE_NULL);
length_value = weechat_utf8_strlen_screen (FSET_OPTION_VALUE_NULL);
}
if (length_value > fset_option_max_length->value)
fset_option_max_length->value = length_value;
@@ -649,13 +649,13 @@ fset_option_set_max_length_fields_option (struct t_fset_option *fset_option)
/* parent_value */
if (fset_option->parent_value)
{
length_parent_value = weechat_strlen_screen (fset_option->parent_value);
length_parent_value = weechat_utf8_strlen_screen (fset_option->parent_value);
if (fset_option->type == FSET_OPTION_TYPE_STRING)
length_parent_value += 2;
}
else
{
length_parent_value = weechat_strlen_screen (FSET_OPTION_VALUE_NULL);
length_parent_value = weechat_utf8_strlen_screen (FSET_OPTION_VALUE_NULL);
}
if (length_parent_value > fset_option_max_length->parent_value)
fset_option_max_length->parent_value = length_parent_value;
@@ -668,50 +668,50 @@ fset_option_set_max_length_fields_option (struct t_fset_option *fset_option)
fset_option_max_length->value2 = length;
/* min */
length = weechat_strlen_screen (fset_option->min);
length = weechat_utf8_strlen_screen (fset_option->min);
if (length > fset_option_max_length->min)
fset_option_max_length->min = length;
/* max */
length = weechat_strlen_screen (fset_option->max);
length = weechat_utf8_strlen_screen (fset_option->max);
if (length > fset_option_max_length->max)
fset_option_max_length->max = length;
/* description */
length = (fset_option->description && fset_option->description[0]) ?
weechat_strlen_screen (_(fset_option->description)) : 0;
weechat_utf8_strlen_screen (_(fset_option->description)) : 0;
if (length > fset_option_max_length->description)
fset_option_max_length->description = length;
/* description2 */
length = weechat_strlen_screen (
length = weechat_utf8_strlen_screen (
(fset_option->description && fset_option->description[0]) ?
_(fset_option->description) : _("(no description)"));
if (length > fset_option_max_length->description2)
fset_option_max_length->description2 = length;
/* description_en */
length = weechat_strlen_screen (fset_option->description);
length = weechat_utf8_strlen_screen (fset_option->description);
if (length > fset_option_max_length->description_en)
fset_option_max_length->description_en = length;
/* description_en2 */
length = weechat_strlen_screen (
length = weechat_utf8_strlen_screen (
(fset_option->description && fset_option->description[0]) ?
fset_option->description : _("(no description)"));
if (length > fset_option_max_length->description_en2)
fset_option_max_length->description_en2 = length;
/* string_values */
length = weechat_strlen_screen (fset_option->string_values);
length = weechat_utf8_strlen_screen (fset_option->string_values);
if (length > fset_option_max_length->string_values)
fset_option_max_length->string_values = length;
/* marked */
length = weechat_strlen_screen (weechat_config_string (fset_config_look_marked_string));
length = weechat_utf8_strlen_screen (weechat_config_string (fset_config_look_marked_string));
if (length > fset_option_max_length->marked)
fset_option_max_length->marked = length;
length = weechat_strlen_screen (weechat_config_string (fset_config_look_unmarked_string));
length = weechat_utf8_strlen_screen (weechat_config_string (fset_config_look_unmarked_string));
if (length > fset_option_max_length->marked)
fset_option_max_length->marked = length;
}