buflist: add option buflist.look.use_items to speed up display of buflist (closes #1613)
This commit is contained in:
parent
d74f2e3183
commit
630fe0581f
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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[]
|
||||
|
@ -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[]
|
||||
|
@ -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[]
|
||||
|
@ -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[]
|
||||
|
@ -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[]
|
||||
|
@ -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[]
|
||||
|
8
po/cs.po
8
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"
|
||||
@ -5108,6 +5108,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
8
po/de.po
8
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"
|
||||
@ -6212,6 +6212,12 @@ msgstr ""
|
||||
"Kleinschreibung unterschieden wird (Hinweis: der Inhalt ist evaluiert, nur "
|
||||
"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 "
|
||||
|
8
po/es.po
8
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"
|
||||
@ -5308,6 +5308,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
13
po/fr.po
13
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"
|
||||
@ -6069,6 +6069,15 @@ msgstr ""
|
||||
"évalué, seul le pointeur vers bar_item peut être utilisé, par exemple "
|
||||
"\"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 "
|
||||
|
8
po/hu.po
8
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"
|
||||
@ -4646,6 +4646,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
8
po/it.po
8
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"
|
||||
@ -5442,6 +5442,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
8
po/ja.po
8
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/"
|
||||
@ -5764,6 +5764,12 @@ msgstr ""
|
||||
"文字を区別せずに比較を行うには \"~\" 文字を使います; 例: \"-~short_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 "
|
||||
|
8
po/pl.po
8
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"
|
||||
@ -5916,6 +5916,12 @@ msgstr ""
|
||||
"(uwaga: zawartość jest przetwarzana, tylko wskaźnik na bar_item może zostać "
|
||||
"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 "
|
||||
|
8
po/pt.po
8
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"
|
||||
@ -5709,6 +5709,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
@ -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"
|
||||
@ -5259,6 +5259,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
8
po/ru.po
8
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"
|
||||
@ -4681,6 +4681,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
8
po/tr.po
8
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"
|
||||
@ -4251,6 +4251,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
@ -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"
|
||||
@ -4234,6 +4234,12 @@ msgid ""
|
||||
"pointer to bar_item can be used, for example \"bar_item.name\")"
|
||||
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 "
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
||||
@ -337,6 +338,22 @@ buflist_config_change_nick_prefix (const void *pointer, void *data,
|
||||
buflist_bar_item_update (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* 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",
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user