buflist: add option buflist.look.enabled

This commit is contained in:
Sébastien Helleu 2017-05-05 23:24:02 +02:00
parent b58d9910e3
commit 90a9a1fb96
26 changed files with 228 additions and 75 deletions

View File

@ -27,14 +27,29 @@ A new plugin called "buflist" has been added, it replaces the script "buffers.pl
If the script is installed, you will see two sidebars with list of buffers. If the script is installed, you will see two sidebars with list of buffers.
If you fell in love with buflist, you can uninstall the script and remove its bar If you fell in love with buflist and that the script buffers.pl is installed,
with these commands: you can uninstall the script and remove its bar with these commands:
---- ----
/script remove buffers.pl /script remove buffers.pl
/bar del buffers /bar del buffers
---- ----
If you don't want the list of buffers, you can disable buflist:
----
/set buflist.look.enabled off
----
To save extra memory, you can even unload the buflist plugin, remove the bar and
prevent the plugin from loading on next startup:
----
/plugin unload buflist
/bar del buflist
/set weechat.plugin.autoload "*,!buflist"
----
[[v1.8_aspell_options]] [[v1.8_aspell_options]]
=== Aspell options === Aspell options

View File

@ -86,6 +86,12 @@
** Werte: beliebige Zeichenkette ** Werte: beliebige Zeichenkette
** Standardwert: `+"${buffer.hidden}==0"+` ** Standardwert: `+"${buffer.hidden}==0"+`
* [[option_buflist.look.enabled]] *buflist.look.enabled*
** Beschreibung: pass:none[enable buflist]
** Typ: boolesch
** Werte: on, off
** Standardwert: `+on+`
* [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer* * [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer*
** Beschreibung: pass:none[ist diese Einstellung aktiviert, kann mit der linken/rechten Maustaste auf dem aktuellen Buffer zum vorherigen/nächsten Buffer gesprungen werden] ** Beschreibung: pass:none[ist diese Einstellung aktiviert, kann mit der linken/rechten Maustaste auf dem aktuellen Buffer zum vorherigen/nächsten Buffer gesprungen werden]
** Typ: boolesch ** Typ: boolesch

View File

@ -86,6 +86,12 @@
** values: any string ** values: any string
** default value: `+"${buffer.hidden}==0"+` ** default value: `+"${buffer.hidden}==0"+`
* [[option_buflist.look.enabled]] *buflist.look.enabled*
** description: pass:none[enable buflist]
** type: boolean
** values: on, off
** default value: `+on+`
* [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer* * [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer*
** description: pass:none[if enabled, clicks with left/right buttons on the line with current buffer jump to previous/next visited buffer] ** description: pass:none[if enabled, clicks with left/right buttons on the line with current buffer jump to previous/next visited buffer]
** type: boolean ** type: boolean

View File

@ -86,6 +86,12 @@
** valeurs: toute chaîne ** valeurs: toute chaîne
** valeur par défaut: `+"${buffer.hidden}==0"+` ** valeur par défaut: `+"${buffer.hidden}==0"+`
* [[option_buflist.look.enabled]] *buflist.look.enabled*
** description: pass:none[activer buflist]
** type: booléen
** valeurs: on, off
** valeur par défaut: `+on+`
* [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer* * [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer*
** description: pass:none[si activé, les clics avec les boutons gauche/droit sur la ligne avec le tampon courant sautent au tampon visité avant/après] ** description: pass:none[si activé, les clics avec les boutons gauche/droit sur la ligne avec le tampon courant sautent au tampon visité avant/après]
** type: booléen ** type: booléen

View File

@ -86,6 +86,12 @@
** valori: qualsiasi stringa ** valori: qualsiasi stringa
** valore predefinito: `+"${buffer.hidden}==0"+` ** valore predefinito: `+"${buffer.hidden}==0"+`
* [[option_buflist.look.enabled]] *buflist.look.enabled*
** descrizione: pass:none[enable buflist]
** tipo: bool
** valori: on, off
** valore predefinito: `+on+`
* [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer* * [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer*
** descrizione: pass:none[if enabled, clicks with left/right buttons on the line with current buffer jump to previous/next visited buffer] ** descrizione: pass:none[if enabled, clicks with left/right buttons on the line with current buffer jump to previous/next visited buffer]
** tipo: bool ** tipo: bool

View File

@ -86,6 +86,12 @@
** 値: 未制約文字列 ** 値: 未制約文字列
** デフォルト値: `+"${buffer.hidden}==0"+` ** デフォルト値: `+"${buffer.hidden}==0"+`
* [[option_buflist.look.enabled]] *buflist.look.enabled*
** 説明: pass:none[enable buflist]
** タイプ: ブール
** 値: on, off
** デフォルト値: `+on+`
* [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer* * [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer*
** 説明: pass:none[有効の場合、現在のバッファを示す行で左または右ボタンをクリックすることで一つ前または次の訪問済みバッファに移動します] ** 説明: pass:none[有効の場合、現在のバッファを示す行で左または右ボタンをクリックすることで一つ前または次の訪問済みバッファに移動します]
** タイプ: ブール ** タイプ: ブール

View File

@ -86,6 +86,12 @@
** wartości: dowolny ciąg ** wartości: dowolny ciąg
** domyślna wartość: `+"${buffer.hidden}==0"+` ** domyślna wartość: `+"${buffer.hidden}==0"+`
* [[option_buflist.look.enabled]] *buflist.look.enabled*
** opis: pass:none[enable buflist]
** typ: bool
** wartości: on, off
** domyślna wartość: `+on+`
* [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer* * [[option_buflist.look.mouse_jump_visited_buffer]] *buflist.look.mouse_jump_visited_buffer*
** opis: pass:none[if enabled, clicks with left/right buttons on the line with current buffer jump to previous/next visited buffer] ** opis: pass:none[if enabled, clicks with left/right buttons on the line with current buffer jump to previous/next visited buffer]
** typ: bool ** typ: bool

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-01-06 21:59+0100\n" "PO-Revision-Date: 2017-01-06 21:59+0100\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n" "Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4966,6 +4966,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -19,7 +19,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-05-03 23:14+0200\n" "PO-Revision-Date: 2017-05-03 23:14+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n" "Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n" "Language-Team: German <kde-i18n-de@kde.org>\n"
@ -5909,6 +5909,9 @@ msgstr ""
"\"${buffer.hidden}==0 && ((${type}!=server && ${buffer.full_name}!=core." "\"${buffer.hidden}==0 && ((${type}!=server && ${buffer.full_name}!=core."
"weechat) || ${buffer.active}==1)\"" "weechat) || ${buffer.active}==1)\""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -22,7 +22,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-01-06 22:01+0100\n" "PO-Revision-Date: 2017-01-06 22:01+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n" "Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5179,6 +5179,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -21,8 +21,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-05-02 07:34+0200\n" "PO-Revision-Date: 2017-05-05 23:17+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n" "Language: fr\n"
@ -5778,6 +5778,9 @@ msgstr ""
"fusionnés avec le tampon \"core\" : \"${buffer.hidden}==0 && ((${type}!" "fusionnés avec le tampon \"core\" : \"${buffer.hidden}==0 && ((${type}!"
"=server && ${buffer.full_name}!=core.weechat) || ${buffer.active}==1)\"" "=server && ${buffer.full_name}!=core.weechat) || ${buffer.active}==1)\""
msgid "enable buflist"
msgstr "activer buflist"
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-01-06 22:03+0100\n" "PO-Revision-Date: 2017-01-06 22:03+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n" "Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4503,6 +4503,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-01-06 22:04+0100\n" "PO-Revision-Date: 2017-01-06 22:04+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n" "Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5317,6 +5317,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-05-02 09:00+0900\n" "PO-Revision-Date: 2017-05-02 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n" "Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/" "Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -5509,6 +5509,9 @@ msgstr ""
"\"${buffer.hidden}==0 && ((${type}!=server && ${buffer.full_name}!=core." "\"${buffer.hidden}==0 && ((${type}!=server && ${buffer.full_name}!=core."
"weechat) || ${buffer.active}==1)\"" "weechat) || ${buffer.active}==1)\""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-04-08 14:49+0200\n" "PO-Revision-Date: 2017-04-08 14:49+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n" "Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5571,6 +5571,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-04-08 14:50+0200\n" "PO-Revision-Date: 2017-04-08 14:50+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n" "Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n" "Language-Team: Portuguese <>\n"
@ -5573,6 +5573,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n" "PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n" "Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5119,6 +5119,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-01-06 22:06+0100\n" "PO-Revision-Date: 2017-01-06 22:06+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n" "Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4541,6 +4541,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -20,7 +20,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2017-01-06 22:07+0100\n" "PO-Revision-Date: 2017-01-06 22:07+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n" "Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4106,6 +4106,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: WeeChat\n" "Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-02 07:33+0200\n" "POT-Creation-Date: 2017-05-05 23:16+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n" "Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n" "Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4091,6 +4091,9 @@ msgid ""
"=core.weechat) || ${buffer.active}==1)\"" "=core.weechat) || ${buffer.active}==1)\""
msgstr "" msgstr ""
msgid "enable buflist"
msgstr ""
msgid "" msgid ""
"if enabled, clicks with left/right buttons on the line with current buffer " "if enabled, clicks with left/right buttons on the line with current buffer "
"jump to previous/next visited buffer" "jump to previous/next visited buffer"

View File

@ -37,6 +37,17 @@ struct t_hashtable *buflist_hashtable_options_conditions = NULL;
struct t_arraylist *buflist_list_buffers = NULL; struct t_arraylist *buflist_list_buffers = NULL;
/*
* Updates buflist bar item if buflist is enabled.
*/
void
buflist_bar_item_update ()
{
if (weechat_config_boolean (buflist_config_look_enabled))
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME);
}
/* /*
* Returns content of bar item "buffer_plugin": bar item with buffer plugin. * Returns content of bar item "buffer_plugin": bar item with buffer plugin.
*/ */
@ -79,6 +90,9 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
(void) buffer; (void) buffer;
(void) extra_info; (void) extra_info;
if (!weechat_config_boolean (buflist_config_look_enabled))
return NULL;
prev_number = -1; prev_number = -1;
buflist = weechat_string_dyn_alloc (256); buflist = weechat_string_dyn_alloc (256);

View File

@ -24,6 +24,7 @@
extern struct t_arraylist *buflist_list_buffers; extern struct t_arraylist *buflist_list_buffers;
extern void buflist_bar_item_update ();
extern int buflist_bar_item_init (); extern int buflist_bar_item_init ();
extern void buflist_bar_item_end (); extern void buflist_bar_item_end ();

View File

@ -52,7 +52,7 @@ buflist_command_buflist (const void *pointer, void *data,
if (weechat_strcasecmp (argv[1], "refresh") == 0) if (weechat_strcasecmp (argv[1], "refresh") == 0)
{ {
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME); buflist_bar_item_update ();
return WEECHAT_RC_OK; return WEECHAT_RC_OK;
} }

View File

@ -33,6 +33,7 @@ struct t_config_file *buflist_config_file = NULL;
/* buflist config, look section */ /* buflist config, look section */
struct t_config_option *buflist_config_look_display_conditions; struct t_config_option *buflist_config_look_display_conditions;
struct t_config_option *buflist_config_look_enabled;
struct t_config_option *buflist_config_look_mouse_jump_visited_buffer; struct t_config_option *buflist_config_look_mouse_jump_visited_buffer;
struct t_config_option *buflist_config_look_mouse_move_buffer; struct t_config_option *buflist_config_look_mouse_move_buffer;
struct t_config_option *buflist_config_look_mouse_wheel; struct t_config_option *buflist_config_look_mouse_wheel;
@ -60,29 +61,6 @@ char **buflist_config_sort_fields = NULL;
int buflist_config_sort_fields_count = 0; int buflist_config_sort_fields_count = 0;
/*
* Callback for changes on option "buflist.look.sort".
*/
void
buflist_config_change_sort (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
if (buflist_config_sort_fields)
weechat_string_free_split (buflist_config_sort_fields);
buflist_config_sort_fields = weechat_string_split (
weechat_config_string (buflist_config_look_sort),
",", 0, 0, &buflist_config_sort_fields_count);
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME);
}
/* /*
* Frees the signals hooked for refresh. * Frees the signals hooked for refresh.
*/ */
@ -106,27 +84,6 @@ buflist_config_free_signals_refresh ()
buflist_config_num_signals_refresh = 0; buflist_config_num_signals_refresh = 0;
} }
/*
* Callback for a signal on a buffer.
*/
int
buflist_config_signal_buffer_cb (const void *pointer, void *data,
const char *signal, const char *type_data,
void *signal_data)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) signal;
(void) type_data;
(void) signal_data;
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME);
return WEECHAT_RC_OK;
}
/* /*
* Compares two signals to add them in the sorted arraylist. * Compares two signals to add them in the sorted arraylist.
* *
@ -148,26 +105,38 @@ buflist_config_compare_signals (void *data, struct t_arraylist *arraylist,
} }
/* /*
* Callback for changes on option "buflist.look.signals_refresh". * Callback for a signal on a buffer.
*/
int
buflist_config_signal_buffer_cb (const void *pointer, void *data,
const char *signal, const char *type_data,
void *signal_data)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) signal;
(void) type_data;
(void) signal_data;
buflist_bar_item_update ();
return WEECHAT_RC_OK;
}
/*
* Hooks the signals for refresh.
*/ */
void void
buflist_config_change_signals_refresh (const void *pointer, void *data, buflist_config_hook_signals_refresh ()
struct t_config_option *option)
{ {
char **all_signals, **signals; char **all_signals, **signals;
const char *ptr_signals_refresh; const char *ptr_signals_refresh;
struct t_arraylist *signals_list; struct t_arraylist *signals_list;
int count, i; int count, i;
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
if (buflist_config_signals_refresh)
buflist_config_free_signals_refresh ();
all_signals = weechat_string_dyn_alloc (256); all_signals = weechat_string_dyn_alloc (256);
if (!all_signals) if (!all_signals)
return; return;
@ -232,6 +201,76 @@ buflist_config_change_signals_refresh (const void *pointer, void *data,
weechat_string_dyn_free (all_signals, 1); weechat_string_dyn_free (all_signals, 1);
} }
/*
* Callback for changes on option "buflist.look.enabled".
*/
void
buflist_config_change_enabled (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
buflist_config_free_signals_refresh ();
if (weechat_config_boolean (buflist_config_look_enabled))
{
/* buflist enabled */
buflist_config_hook_signals_refresh ();
weechat_command (NULL, "/mute /bar show buflist");
buflist_bar_item_update ();
}
else
{
/* buflist disabled */
weechat_command (NULL, "/mute /bar hide buflist");
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME);
}
}
/*
* Callback for changes on option "buflist.look.sort".
*/
void
buflist_config_change_sort (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
if (buflist_config_sort_fields)
weechat_string_free_split (buflist_config_sort_fields);
buflist_config_sort_fields = weechat_string_split (
weechat_config_string (buflist_config_look_sort),
",", 0, 0, &buflist_config_sort_fields_count);
buflist_bar_item_update ();
}
/*
* Callback for changes on option "buflist.look.signals_refresh".
*/
void
buflist_config_change_signals_refresh (const void *pointer, void *data,
struct t_config_option *option)
{
/* make C compiler happy */
(void) pointer;
(void) data;
(void) option;
buflist_config_free_signals_refresh ();
buflist_config_hook_signals_refresh ();
}
/* /*
* Callback for changes on option "buflist.look.nick_prefix". * Callback for changes on option "buflist.look.nick_prefix".
*/ */
@ -246,7 +285,7 @@ buflist_config_change_nick_prefix (const void *pointer, void *data,
(void) option; (void) option;
buflist_config_change_signals_refresh (NULL, NULL, NULL); buflist_config_change_signals_refresh (NULL, NULL, NULL);
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME); buflist_bar_item_update ();
} }
/* /*
@ -262,7 +301,7 @@ buflist_config_change_buflist (const void *pointer, void *data,
(void) data; (void) data;
(void) option; (void) option;
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME); buflist_bar_item_update ();
} }
/* /*
@ -309,6 +348,14 @@ buflist_config_init ()
NULL, NULL, NULL, NULL, NULL, NULL,
&buflist_config_change_buflist, NULL, NULL, &buflist_config_change_buflist, NULL, NULL,
NULL, NULL, NULL); NULL, NULL, NULL);
buflist_config_look_enabled = weechat_config_new_option (
buflist_config_file, ptr_section,
"enabled", "boolean",
N_("enable buflist"),
NULL, 0, 0, "on", NULL, 0,
NULL, NULL, NULL,
&buflist_config_change_enabled, NULL, NULL,
NULL, NULL, NULL);
buflist_config_look_mouse_jump_visited_buffer = weechat_config_new_option ( buflist_config_look_mouse_jump_visited_buffer = weechat_config_new_option (
buflist_config_file, ptr_section, buflist_config_file, ptr_section,
"mouse_jump_visited_buffer", "boolean", "mouse_jump_visited_buffer", "boolean",

View File

@ -33,6 +33,7 @@
extern struct t_config_file *buflist_config_file; extern struct t_config_file *buflist_config_file;
extern struct t_config_option *buflist_config_look_display_conditions; extern struct t_config_option *buflist_config_look_display_conditions;
extern struct t_config_option *buflist_config_look_enabled;
extern struct t_config_option *buflist_config_look_mouse_jump_visited_buffer; extern struct t_config_option *buflist_config_look_mouse_jump_visited_buffer;
extern struct t_config_option *buflist_config_look_mouse_move_buffer; extern struct t_config_option *buflist_config_look_mouse_move_buffer;
extern struct t_config_option *buflist_config_look_mouse_wheel; extern struct t_config_option *buflist_config_look_mouse_wheel;

View File

@ -448,7 +448,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
"default", "default", "default", "on", "default", "default", "default", "on",
BUFLIST_BAR_ITEM_NAME); BUFLIST_BAR_ITEM_NAME);
weechat_bar_item_update (BUFLIST_BAR_ITEM_NAME); buflist_bar_item_update ();
buflist_mouse_init (); buflist_mouse_init ();