summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-02-09 20:34:56 +0100
committerSébastien Helleu <flashcode@flashtux.org>2021-02-09 20:34:56 +0100
commit630fe0581f59d4c6266b2149e6ff0b5170115d7b (patch)
tree5ead8aee724a11f57ea599a0c191b7b13fac7768
parentcore: add fixed behavior of command /window splitv in release notes (diff)
downloadweechat-630fe0581f59d4c6266b2149e6ff0b5170115d7b.tar.xz
weechat-630fe0581f59d4c6266b2149e6ff0b5170115d7b.zip
buflist: add option buflist.look.use_items to speed up display of buflist (closes #1613)
-rw-r--r--ChangeLog.adoc1
-rw-r--r--ReleaseNotes.adoc13
-rw-r--r--doc/de/includes/autogen_user_options.de.adoc6
-rw-r--r--doc/en/includes/autogen_user_options.en.adoc6
-rw-r--r--doc/fr/includes/autogen_user_options.fr.adoc6
-rw-r--r--doc/it/includes/autogen_user_options.it.adoc6
-rw-r--r--doc/ja/includes/autogen_user_options.ja.adoc6
-rw-r--r--doc/pl/includes/autogen_user_options.pl.adoc6
-rw-r--r--po/cs.po8
-rw-r--r--po/de.po8
-rw-r--r--po/es.po8
-rw-r--r--po/fr.po13
-rw-r--r--po/hu.po8
-rw-r--r--po/it.po8
-rw-r--r--po/ja.po8
-rw-r--r--po/pl.po8
-rw-r--r--po/pt.po8
-rw-r--r--po/pt_BR.po8
-rw-r--r--po/ru.po8
-rw-r--r--po/tr.po8
-rw-r--r--po/weechat.pot8
-rw-r--r--src/plugins/buflist/buflist-bar-item.c18
-rw-r--r--src/plugins/buflist/buflist-config.c27
-rw-r--r--src/plugins/buflist/buflist-config.h1
24 files changed, 187 insertions, 18 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index 47cd559a1..ab3592e9b 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -28,6 +28,7 @@ New features::
* core: add option "recreate" in command /filter
* core: add raw string in evaluation of expressions with "raw:xxx" (issue #1611)
* core: add evaluation of conditions in evaluation of expressions with "eval_cond:" (issue #1582)
+ * buflist: add option buflist.look.use_items to speed up display of buflist (issue #1613)
* irc: add info "irc_is_message_ignored"
* irc: add server option "default_chantypes", used when the server does not send them in message 005 (issue #1610)
* trigger: add variable "${tg_trigger_name}" in command trigger evaluated strings (issue #1580)
diff --git a/ReleaseNotes.adoc b/ReleaseNotes.adoc
index 84793ccd7..ca069cd7a 100644
--- a/ReleaseNotes.adoc
+++ b/ReleaseNotes.adoc
@@ -20,6 +20,19 @@ https://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
[[v3.1]]
== Version 3.1 (under dev)
+[[v3.1_buflist_option_use_items]]
+=== Buflist option buflist.look.use_items
+
+A new buflist option `buflist.look.use_items` has been added to speed up
+display of buflist, in case you use a single buflist item (the most common use case).
+
+If ever you use more than one item (item "buflist2" or even "buflist3"), you
+must adjust the value of the new option, which defaults to 1:
+
+----
+/set buflist.look.use_items 2
+----
+
[[v3.1_window_splitv]]
=== Vertical split of windows
diff --git a/doc/de/includes/autogen_user_options.de.adoc b/doc/de/includes/autogen_user_options.de.adoc
index 6b539f70c..e1682bac9 100644
--- a/doc/de/includes/autogen_user_options.de.adoc
+++ b/doc/de/includes/autogen_user_options.de.adoc
@@ -1781,6 +1781,12 @@
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette
** Standardwert: `+"number,-active"+`
+
+* [[option_buflist.look.use_items]] *buflist.look.use_items*
+** Beschreibung: pass:none[number of buflist bar items that can be used; the item names are: "buflist", "buflist2", "buflist3"; be careful, using more than one bar item slows down the display of buffers list]
+** Typ: integer
+** Werte: 1 .. 3
+** Standardwert: `+1+`
// end::buflist_options[]
// tag::fifo_options[]
diff --git a/doc/en/includes/autogen_user_options.en.adoc b/doc/en/includes/autogen_user_options.en.adoc
index b958545a4..b141a5418 100644
--- a/doc/en/includes/autogen_user_options.en.adoc
+++ b/doc/en/includes/autogen_user_options.en.adoc
@@ -1781,6 +1781,12 @@
** type: string
** values: any string
** default value: `+"number,-active"+`
+
+* [[option_buflist.look.use_items]] *buflist.look.use_items*
+** description: pass:none[number of buflist bar items that can be used; the item names are: "buflist", "buflist2", "buflist3"; be careful, using more than one bar item slows down the display of buffers list]
+** type: integer
+** values: 1 .. 3
+** default value: `+1+`
// end::buflist_options[]
// tag::fifo_options[]
diff --git a/doc/fr/includes/autogen_user_options.fr.adoc b/doc/fr/includes/autogen_user_options.fr.adoc
index 02a487406..f0194ff8f 100644
--- a/doc/fr/includes/autogen_user_options.fr.adoc
+++ b/doc/fr/includes/autogen_user_options.fr.adoc
@@ -1781,6 +1781,12 @@
** type: chaîne
** valeurs: toute chaîne
** valeur par défaut: `+"number,-active"+`
+
+* [[option_buflist.look.use_items]] *buflist.look.use_items*
+** description: pass:none[nombre d'objets de barre buflist qui peuvent être utilisés ; les objets de barre sont : "buflist", "buflist2", "buflist3" ; attention, utiliser plus d'un objet de barre ralentit l'affichage de la liste des tampons]
+** type: entier
+** valeurs: 1 .. 3
+** valeur par défaut: `+1+`
// end::buflist_options[]
// tag::fifo_options[]
diff --git a/doc/it/includes/autogen_user_options.it.adoc b/doc/it/includes/autogen_user_options.it.adoc
index 4c920be56..105f0b3c8 100644
--- a/doc/it/includes/autogen_user_options.it.adoc
+++ b/doc/it/includes/autogen_user_options.it.adoc
@@ -1781,6 +1781,12 @@
** tipo: stringa
** valori: qualsiasi stringa
** valore predefinito: `+"number,-active"+`
+
+* [[option_buflist.look.use_items]] *buflist.look.use_items*
+** descrizione: pass:none[number of buflist bar items that can be used; the item names are: "buflist", "buflist2", "buflist3"; be careful, using more than one bar item slows down the display of buffers list]
+** tipo: intero
+** valori: 1 .. 3
+** valore predefinito: `+1+`
// end::buflist_options[]
// tag::fifo_options[]
diff --git a/doc/ja/includes/autogen_user_options.ja.adoc b/doc/ja/includes/autogen_user_options.ja.adoc
index b32c5de9e..11efb5aa6 100644
--- a/doc/ja/includes/autogen_user_options.ja.adoc
+++ b/doc/ja/includes/autogen_user_options.ja.adoc
@@ -1781,6 +1781,12 @@
** タイプ: 文字列
** 値: 未制約文字列
** デフォルト値: `+"number,-active"+`
+
+* [[option_buflist.look.use_items]] *buflist.look.use_items*
+** 説明: pass:none[number of buflist bar items that can be used; the item names are: "buflist", "buflist2", "buflist3"; be careful, using more than one bar item slows down the display of buffers list]
+** タイプ: 整数
+** 値: 1 .. 3
+** デフォルト値: `+1+`
// end::buflist_options[]
// tag::fifo_options[]
diff --git a/doc/pl/includes/autogen_user_options.pl.adoc b/doc/pl/includes/autogen_user_options.pl.adoc
index 0340efafd..4e31dc9fc 100644
--- a/doc/pl/includes/autogen_user_options.pl.adoc
+++ b/doc/pl/includes/autogen_user_options.pl.adoc
@@ -1781,6 +1781,12 @@
** typ: ciąg
** wartości: dowolny ciąg
** domyślna wartość: `+"number,-active"+`
+
+* [[option_buflist.look.use_items]] *buflist.look.use_items*
+** opis: pass:none[number of buflist bar items that can be used; the item names are: "buflist", "buflist2", "buflist3"; be careful, using more than one bar item slows down the display of buffers list]
+** typ: liczba
+** wartości: 1 .. 3
+** domyślna wartość: `+1+`
// end::buflist_options[]
// tag::fifo_options[]
diff --git a/po/cs.po b/po/cs.po
index cfddfac73..b7873f2d5 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5109,6 +5109,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/de.po b/po/de.po
index f34d0d498..d745d13da 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-08 13:38+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@@ -6213,6 +6213,12 @@ msgstr ""
"der Pointer der bar_item kann genutzt werden, Beispiel \"bar_item.name\")"
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/es.po b/po/es.po
index d40dc4d7e..b870b2967 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5309,6 +5309,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/fr.po b/po/fr.po
index c5b2e992a..902a2655b 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-02-08 13:10+0100\n"
-"PO-Revision-Date: 2021-02-08 13:12+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
+"PO-Revision-Date: 2021-02-09 20:25+0100\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -6070,6 +6070,15 @@ msgstr ""
"\"bar_item.name\")"
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+"nombre d'objets de barre buflist qui peuvent être utilisés ; les objets de "
+"barre sont : \"buflist\", \"buflist2\", \"buflist3\" ; attention, utiliser "
+"plus d'un objet de barre ralentit l'affichage de la liste des tampons"
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/hu.po b/po/hu.po
index 7ec5ce00b..eca6631fe 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4647,6 +4647,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/it.po b/po/it.po
index ccaa263a0..0465ff9cb 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5443,6 +5443,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/ja.po b/po/ja.po
index 9e5325e5a..6bff39eb3 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@@ -5765,6 +5765,12 @@ msgstr ""
"バッファの短縮名を使い、大文字小文字を区別せずにソートして、順番を逆にします"
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/pl.po b/po/pl.po
index 2cd951d99..59e7fca01 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: 2021-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: Polish <kde-i18n-doc@kde.org>\n"
@@ -5917,6 +5917,12 @@ msgstr ""
"użyty, na przykład \"bar_item.name\")"
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/pt.po b/po/pt.po
index d9c855008..ec0b70ec9 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@@ -5710,6 +5710,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 296e3d8ec..2fe12e3c6 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5260,6 +5260,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/ru.po b/po/ru.po
index 553e98757..2e377e39c 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4682,6 +4682,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/tr.po b/po/tr.po
index 094b6e783..4568f57ed 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\n"
"PO-Revision-Date: 2021-02-06 15:55+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -4252,6 +4252,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/po/weechat.pot b/po/weechat.pot
index 0e0b1250a..a7936f3a8 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-02-08 13:10+0100\n"
+"POT-Creation-Date: 2021-02-09 20:31+0100\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"
@@ -4235,6 +4235,12 @@ msgid ""
msgstr ""
msgid ""
+"number of buflist bar items that can be used; the item names are: \"buflist"
+"\", \"buflist2\", \"buflist3\"; be careful, using more than one bar item "
+"slows down the display of buffers list"
+msgstr ""
+
+msgid ""
"format of each line with a buffer (note: content is evaluated, see /help "
"buflist); example: standard format for bar item \"buflist\" and only the "
"buffer number between square brackets for other bar items (\"buflist2\" and "
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c
index 89b774d19..88972cf8c 100644
--- a/src/plugins/buflist/buflist-bar-item.c
+++ b/src/plugins/buflist/buflist-bar-item.c
@@ -103,16 +103,23 @@ buflist_bar_item_get_index_with_pointer (struct t_gui_bar_item *item)
/*
* Updates buflist bar item if buflist is enabled (or if force argument is 1).
+ *
+ * If force == 1, all used items are refreshed
+ * (according to option buflist.look.use_items).
+ * If force == 2, all items are refreshed.
*/
void
buflist_bar_item_update (int force)
{
- int i;
+ int i, num_items;
if (force || weechat_config_boolean (buflist_config_look_enabled))
{
- for (i = 0; i < BUFLIST_BAR_NUM_ITEMS; i++)
+ num_items = (force == 2) ?
+ BUFLIST_BAR_NUM_ITEMS :
+ weechat_config_integer (buflist_config_look_use_items);
+ for (i = 0; i < num_items; i++)
{
weechat_bar_item_update (buflist_bar_item_get_name (i));
}
@@ -318,14 +325,17 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
if (!weechat_config_boolean (buflist_config_look_enabled))
return NULL;
+ item_index = (int)((unsigned long)pointer);
+
+ if (item_index + 1 > weechat_config_integer (buflist_config_look_use_items))
+ return NULL;
+
prev_number = -1;
line_number = 0;
line_number_current_buffer = 0;
buflist = weechat_string_dyn_alloc (256);
- item_index = (int)((unsigned long)pointer);
-
weechat_hashtable_set (buflist_hashtable_pointers, "bar_item", item);
if (window)
weechat_hashtable_set (buflist_hashtable_pointers, "window", window);
diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c
index f187bcfbb..a0691da90 100644
--- a/src/plugins/buflist/buflist-config.c
+++ b/src/plugins/buflist/buflist-config.c
@@ -44,6 +44,7 @@ struct t_config_option *buflist_config_look_nick_prefix;
struct t_config_option *buflist_config_look_nick_prefix_empty;
struct t_config_option *buflist_config_look_signals_refresh;
struct t_config_option *buflist_config_look_sort;
+struct t_config_option *buflist_config_look_use_items;
/* buflist config, format section */
@@ -338,6 +339,22 @@ buflist_config_change_nick_prefix (const void *pointer, void *data,
}
/*
+ * Callback for changes on option "buflist.look.use_items".
+ */
+
+void
+buflist_config_change_use_items (const void *pointer, void *data,
+ struct t_config_option *option)
+{
+ /* make C compiler happy */
+ (void) pointer;
+ (void) data;
+ (void) option;
+
+ buflist_bar_item_update (2);
+}
+
+/*
* Callback for changes on options needing bar item refresh.
*/
@@ -565,6 +582,16 @@ buflist_config_init ()
NULL, NULL, NULL,
&buflist_config_change_sort, NULL, NULL,
NULL, NULL, NULL);
+ buflist_config_look_use_items = weechat_config_new_option (
+ buflist_config_file, ptr_section,
+ "use_items", "integer",
+ N_("number of buflist bar items that can be used; the item names are: "
+ "\"buflist\", \"buflist2\", \"buflist3\"; be careful, using more "
+ "than one bar item slows down the display of buffers list"),
+ NULL, 1, BUFLIST_BAR_NUM_ITEMS, "1", NULL, 0,
+ NULL, NULL, NULL,
+ &buflist_config_change_use_items, NULL, NULL,
+ NULL, NULL, NULL);
/* format */
ptr_section = weechat_config_new_section (buflist_config_file, "format",
diff --git a/src/plugins/buflist/buflist-config.h b/src/plugins/buflist/buflist-config.h
index a2d68bc8b..1a368fcde 100644
--- a/src/plugins/buflist/buflist-config.h
+++ b/src/plugins/buflist/buflist-config.h
@@ -45,6 +45,7 @@ extern struct t_config_option *buflist_config_look_nick_prefix;
extern struct t_config_option *buflist_config_look_nick_prefix_empty;
extern struct t_config_option *buflist_config_look_signals_refresh;
extern struct t_config_option *buflist_config_look_sort;
+extern struct t_config_option *buflist_config_look_use_items;
extern struct t_config_option *buflist_config_format_buffer;
extern struct t_config_option *buflist_config_format_buffer_current;