core: add bar item "buffer_zoom", add signals "buffer_{zoomed|unzoomed}" (patch #8204) (patch from Nils Görs)

v2.8-utf8proc
Sebastien Helleu 2013-11-09 13:21:56 +01:00
parent 2b04972326
commit 9b4eb6d607
27 changed files with 233 additions and 53 deletions

View File

@ -11,6 +11,8 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
== Version 0.4.3 (under dev)
* core: add bar item "buffer_zoom", add signals "buffer_{zoomed|unzoomed}"
(patch #8204)
* core: create .conf file with default options only if the file does not exist
(and not on read error with existing file)
* core: fix highlight on action messages: skip the nick at beginning to prevent

11
NEWS
View File

@ -11,6 +11,17 @@ http://weechat.org/files/changelog/ChangeLog-devel.html[ChangeLog]
(file 'ChangeLog' in sources).
== Version 0.4.3 (under dev)
=== New bar item buffer_zoom
A new bar item has been added: 'buffer_zoom'.
The default value for status bar items becomes:
----
/set weechat.bar.status.items "[time],[buffer_count],[buffer_plugin],buffer_number+:+buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+buffer_filter,[lag],[hotlist],completion,scroll"
----
== Version 0.4.2 (2013-10-06)
=== Day change message

View File

@ -628,6 +628,11 @@
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"*"`)
* [[option_weechat.look.item_buffer_zoom]] *weechat.look.item_buffer_zoom*
** Beschreibung: `string used to show zoom on merged buffer (bar item "buffer_zoom")`
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"!"`)
* [[option_weechat.look.item_time_format]] *weechat.look.item_time_format*
** Beschreibung: `Format für die Zeitanzeige des Bar-Items, "time" (siehe man strftime, welche Platzhalter für das Datum und die Uhrzeit verwendet werden)`
** Typ: Zeichenkette

View File

@ -628,6 +628,11 @@
** type: string
** values: any string (default value: `"*"`)
* [[option_weechat.look.item_buffer_zoom]] *weechat.look.item_buffer_zoom*
** description: `string used to show zoom on merged buffer (bar item "buffer_zoom")`
** type: string
** values: any string (default value: `"!"`)
* [[option_weechat.look.item_time_format]] *weechat.look.item_time_format*
** description: `time format for "time" bar item (see man strftime for date/time specifiers)`
** type: string

View File

@ -7663,6 +7663,10 @@ Arguments:
String: comma-separated list of scripts removed |
Tcl script(s) removed
| weechat | buffer_opened |
Pointer: buffer |
Buffer opened
| weechat | buffer_closing |
Pointer: buffer |
Closing buffer
@ -7704,10 +7708,6 @@ Arguments:
Pointer: buffer |
Buffer moved
| weechat | buffer_opened |
Pointer: buffer |
Buffer opened
| weechat | buffer_renamed |
Pointer: buffer |
Buffer renamed
@ -7724,6 +7724,16 @@ Arguments:
Pointer: buffer |
Type of buffer changed
| weechat | buffer_zoomed +
_(WeeChat ≥ 0.4.3)_ |
Pointer: buffer |
Merged buffer zoomed
| weechat | buffer_unzoomed +
_(WeeChat ≥ 0.4.3)_ |
Pointer: buffer |
Merged buffer unzoomed
| weechat | day_changed +
_(WeeChat ≥ 0.3.2)_ |
String: new date, format: "2010-01-31" |
@ -7884,14 +7894,6 @@ Arguments:
Pointer: window |
Switching window
| weechat | window_unzoom |
Pointer: current window |
Unzooming window
| weechat | window_unzoomed |
Pointer: current window |
Window unzoomed
| weechat | window_zoom |
Pointer: current window |
Zomming window
@ -7900,6 +7902,14 @@ Arguments:
Pointer: current window |
Window zoomed
| weechat | window_unzoom |
Pointer: current window |
Unzooming window
| weechat | window_unzoomed |
Pointer: current window |
Window unzoomed
| xfer | xfer_add |
Pointer: infolist with xfer info |
New xfer

View File

@ -628,6 +628,11 @@
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"*"`)
* [[option_weechat.look.item_buffer_zoom]] *weechat.look.item_buffer_zoom*
** description: `chaîne utilisée pour montrer le zoom sur un tampon mélangé (objet de barre "buffer_zoom")`
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"!"`)
* [[option_weechat.look.item_time_format]] *weechat.look.item_time_format*
** description: `format de date/heure pour l'objet de barre "time" (voir man strftime pour le format de date/heure)`
** type: chaîne

View File

@ -7781,6 +7781,10 @@ Paramètres :
Chaîne: liste de scripts supprimés (séparés par des virgules) |
Script(s) tcl supprimé(s)
| weechat | buffer_opened |
Pointeur : tampon |
Tampon ouvert
| weechat | buffer_closing |
Pointeur : tampon |
Fermeture du tampon en cours
@ -7822,10 +7826,6 @@ Paramètres :
Pointeur : tampon |
Tampon déplacé
| weechat | buffer_opened |
Pointeur : tampon |
Tampon ouvert
| weechat | buffer_renamed |
Pointeur : tampon |
Tampon renommé
@ -7842,6 +7842,16 @@ Paramètres :
Pointeur : tampon |
Type de tampon changé
| weechat | buffer_zoomed +
_(WeeChat ≥ 0.4.3)_ |
Pointeur : tampon |
Zoom sur un tampon mélangé
| weechat | buffer_unzoomed +
_(WeeChat ≥ 0.4.3)_ |
Pointeur : tampon |
Fin du zoom sur un tampon mélangé
| weechat | day_changed +
_(WeeChat ≥ 0.3.2)_ |
Chaîne : nouvelle date, format : "2010-01-31" |
@ -8002,14 +8012,6 @@ Paramètres :
Pointeur : fenêtre |
Basculement vers une autre fenêtre
| weechat | window_unzoom |
Pointeur : fenêtre courante |
Fin du zoom en cours sur la fenêtre
| weechat | window_unzoomed |
Pointeur : fenêtre courante |
Fin du zoom effectué sur la fenêtre
| weechat | window_zoom |
Pointeur : fenêtre courante |
Zoom en cours sur la fenêtre
@ -8018,6 +8020,14 @@ Paramètres :
Pointeur : fenêtre courante |
Zomm effectué sur la fenêtre
| weechat | window_unzoom |
Pointeur : fenêtre courante |
Fin du zoom en cours sur la fenêtre
| weechat | window_unzoomed |
Pointeur : fenêtre courante |
Fin du zoom effectué sur la fenêtre
| xfer | xfer_add |
Pointeur : infolist avec l'info xfer |
Nouveau xfer

View File

@ -628,6 +628,11 @@
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"*"`)
* [[option_weechat.look.item_buffer_zoom]] *weechat.look.item_buffer_zoom*
** descrizione: `string used to show zoom on merged buffer (bar item "buffer_zoom")`
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"!"`)
* [[option_weechat.look.item_time_format]] *weechat.look.item_time_format*
** descrizione: `formato dell'ora per l'elemento barra "time" (consultare man strftime per gli specificatori data/ora)`
** tipo: stringa

View File

@ -7752,6 +7752,10 @@ Argomenti:
String: comma-separated list of scripts removed |
Tcl script(s) removed
| weechat | buffer_opened |
Puntatore: buffer |
Buffer aperto
| weechat | buffer_closing |
Puntatore: buffer |
Chiusura del buffer
@ -7795,10 +7799,6 @@ Argomenti:
Puntatore: buffer |
Buffer spostato
| weechat | buffer_opened |
Puntatore: buffer |
Buffer aperto
| weechat | buffer_renamed |
Puntatore: buffer |
Buffer rinominato
@ -7815,6 +7815,18 @@ Argomenti:
Puntatore: buffer |
Tipo di buffer modificato
// TRANSLATION MISSING
| weechat | buffer_zoomed +
_(WeeChat ≥ 0.4.3)_ |
Puntatore: buffer |
Merged buffer zoomed
// TRANSLATION MISSING
| weechat | buffer_unzoomed +
_(WeeChat ≥ 0.4.3)_ |
Puntatore: buffer |
Merged buffer unzoomed
| weechat | day_changed +
_(WeeChat ≥ 0.3.2)_ |
String: nuova data, formato: "2010-01-31" |
@ -7991,14 +8003,6 @@ Argomenti:
Puntatore: finestra |
Passaggio alla finestra
| weechat | window_unzoom |
Puntatore: finestra corrente |
Minimizzazione della finestra
| weechat | window_unzoomed |
Puntatore: finestra corrente |
Finestra minimizzata
| weechat | window_zoom |
Puntatore: finestra corrente |
Massimizzazione della finestra
@ -8007,6 +8011,14 @@ Argomenti:
Puntatore: finestra corrente |
Finestra massimizzata
| weechat | window_unzoom |
Puntatore: finestra corrente |
Minimizzazione della finestra
| weechat | window_unzoomed |
Puntatore: finestra corrente |
Finestra minimizzata
| xfer | xfer_add |
Puntatore: lista info con info per xfer|
Nuovo xfer

View File

@ -628,6 +628,11 @@
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"*"`)
* [[option_weechat.look.item_buffer_zoom]] *weechat.look.item_buffer_zoom*
** 説明: `string used to show zoom on merged buffer (bar item "buffer_zoom")`
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"!"`)
* [[option_weechat.look.item_time_format]] *weechat.look.item_time_format*
** 説明: `"time" バーアイテムの時間フォーマット (日付/時間指定子は strftime の man を参照)`
** タイプ: 文字列

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Jiri Golembiovsky <golemj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2831,6 +2831,9 @@ msgid ""
"\"buffer_filter\")"
msgstr ""
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.3-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <weechatter@arcor.de>\n"
@ -3239,6 +3239,12 @@ msgstr ""
"Zeichen mit welchem in der Bar-Item (\"buffer_filter\") signalisiert wird ob "
"im aktuellen Buffer die Filterfunktion eingeschaltet ist"
#, fuzzy
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
"Zeichen mit welchem in der Bar-Item (\"buffer_filter\") signalisiert wird ob "
"im aktuellen Buffer die Filterfunktion eingeschaltet ist"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2993,6 +2993,12 @@ msgstr ""
"cadena a usar para indicar que algunas líneas están filtradas en el buffer "
"actual (elemento de barra \"buffer_filter\")"
#, fuzzy
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
"cadena a usar para indicar que algunas líneas están filtradas en el buffer "
"actual (elemento de barra \"buffer_filter\")"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 13:08+0100\n"
"Last-Translator: Sebastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -3143,6 +3143,11 @@ msgstr ""
"chaîne utilisée pour montrer que des lignes sont filtrées dans le tampon "
"courant (objet de barre \"buffer_filter\")"
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
"chaîne utilisée pour montrer le zoom sur un tampon mélangé (objet de barre "
"\"buffer_zoom\")"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2449,6 +2449,9 @@ msgid ""
"\"buffer_filter\")"
msgstr ""
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3075,6 +3075,12 @@ msgstr ""
"stringa usata per mostrare che alcune righe sono state filtrate nel buffer "
"corrente (elemento barra \"buffer_filter\")"
#, fuzzy
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
"stringa usata per mostrare che alcune righe sono state filtrate nel buffer "
"corrente (elemento barra \"buffer_filter\")"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/WeeChat>\n"
@ -3042,6 +3042,12 @@ msgstr ""
"現在のバッファで何行かがフィルタされたことを示す文字列 (バーアイテム "
"\"buffer_filter\")"
#, fuzzy
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
"現在のバッファで何行かがフィルタされたことを示す文字列 (バーアイテム "
"\"buffer_filter\")"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -3112,6 +3112,12 @@ msgstr ""
"ciąg użyty do pokazania, że część linii jest filtrowana w obecnym buforze "
"(element paska \"buffer_filter\")"
#, fuzzy
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
"ciąg użyty do pokazania, że część linii jest filtrowana w obecnym buforze "
"(element paska \"buffer_filter\")"
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Sergio Durigan Junior <sergiosdj@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2914,6 +2914,9 @@ msgid ""
"\"buffer_filter\")"
msgstr ""
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:18+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2480,6 +2480,9 @@ msgid ""
"\"buffer_filter\")"
msgstr ""
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-11-09 10:13+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2198,6 +2198,9 @@ msgid ""
"\"buffer_filter\")"
msgstr ""
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat 0.4.1-dev\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2013-11-09 10:17+0100\n"
"POT-Creation-Date: 2013-11-09 12:20+0100\n"
"PO-Revision-Date: 2013-02-14 18:20+0100\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -2202,6 +2202,9 @@ msgid ""
"\"buffer_filter\")"
msgstr ""
msgid "string used to show zoom on merged buffer (bar item \"buffer_zoom\")"
msgstr ""
msgid ""
"jump to previous buffer displayed when jumping to current buffer number "
"with /buffer *N (where N is a buffer number), to easily switch to another "

View File

@ -129,6 +129,7 @@ struct t_config_option *config_look_input_share_overwrite;
struct t_config_option *config_look_input_undo_max;
struct t_config_option *config_look_item_time_format;
struct t_config_option *config_look_item_buffer_filter;
struct t_config_option *config_look_item_buffer_zoom;
struct t_config_option *config_look_jump_current_to_previous_buffer;
struct t_config_option *config_look_jump_previous_buffer_when_closing;
struct t_config_option *config_look_jump_smart_back_to_buffer;
@ -2273,6 +2274,12 @@ config_weechat_init_options ()
N_("string used to show that some lines are filtered in current buffer "
"(bar item \"buffer_filter\")"),
NULL, 0, 0, "*", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL);
config_look_item_buffer_zoom = config_file_new_option (
weechat_config_file, ptr_section,
"item_buffer_zoom", "string",
N_("string used to show zoom on merged buffer "
"(bar item \"buffer_zoom\")"),
NULL, 0, 0, "!", NULL, 0, NULL, NULL, &config_change_buffer_content, NULL, NULL, NULL);
config_look_jump_current_to_previous_buffer = config_file_new_option (
weechat_config_file, ptr_section,
"jump_current_to_previous_buffer", "boolean",

View File

@ -153,6 +153,7 @@ extern struct t_config_option *config_look_input_share_overwrite;
extern struct t_config_option *config_look_input_undo_max;
extern struct t_config_option *config_look_item_time_format;
extern struct t_config_option *config_look_item_buffer_filter;
extern struct t_config_option *config_look_item_buffer_zoom;
extern struct t_config_option *config_look_jump_current_to_previous_buffer;
extern struct t_config_option *config_look_jump_previous_buffer_when_closing;
extern struct t_config_option *config_look_jump_smart_back_to_buffer;

View File

@ -59,8 +59,9 @@ struct t_gui_bar_item *last_gui_bar_item = NULL; /* last bar item */
char *gui_bar_item_names[GUI_BAR_NUM_ITEMS] =
{ "input_paste", "input_prompt", "input_search", "input_text", "time",
"buffer_count", "buffer_plugin", "buffer_number", "buffer_name",
"buffer_modes", "buffer_filter", "buffer_nicklist_count", "scroll",
"hotlist", "completion", "buffer_title", "buffer_nicklist", "window_number"
"buffer_modes", "buffer_filter", "buffer_zoom", "buffer_nicklist_count",
"scroll", "hotlist", "completion", "buffer_title", "buffer_nicklist",
"window_number"
};
char *gui_bar_items_default_for_bars[][2] =
{ { GUI_BAR_DEFAULT_NAME_INPUT,
@ -69,8 +70,8 @@ char *gui_bar_items_default_for_bars[][2] =
"buffer_title" },
{ GUI_BAR_DEFAULT_NAME_STATUS,
"[time],[buffer_count],[buffer_plugin],buffer_number+:+"
"buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_filter,[lag],"
"[hotlist],completion,scroll" },
"buffer_name+(buffer_modes)+{buffer_nicklist_count}+buffer_zoom+"
"buffer_filter,[lag],[hotlist],completion,scroll" },
{ GUI_BAR_DEFAULT_NAME_NICKLIST,
"buffer_nicklist" },
{ NULL,
@ -1119,6 +1120,38 @@ gui_bar_item_default_buffer_nicklist_count (void *data,
return strdup (str_count);
}
/*
* Default item for zoom on merged buffer.
*/
char *
gui_bar_item_buffer_zoom (void *data, struct t_gui_bar_item *item,
struct t_gui_window *window,
struct t_gui_buffer *buffer,
struct t_hashtable *extra_info)
{
char buf[512];
/* make C compiler happy */
(void) data;
(void) item;
(void) window;
(void) extra_info;
if (!buffer)
return NULL;
/* don't display item if current buffer is not merged + zoomed */
if (buffer->active != 2)
return NULL;
snprintf (buf, sizeof (buf), "%s",
CONFIG_STRING(config_look_item_buffer_zoom));
return strdup (buf);
}
/*
* Default item for scrolling indicator.
*/
@ -1921,6 +1954,15 @@ gui_bar_item_init ()
gui_bar_item_hook_signal ("filters_*",
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_FILTER]);
/* buffer zoom */
gui_bar_item_new (NULL,
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_ZOOM],
&gui_bar_item_buffer_zoom, NULL);
gui_bar_item_hook_signal ("buffer_zoomed",
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_ZOOM]);
gui_bar_item_hook_signal ("buffer_unzoomed",
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_ZOOM]);
/* buffer nicklist count */
gui_bar_item_new (NULL,
gui_bar_item_names[GUI_BAR_ITEM_BUFFER_NICKLIST_COUNT],

View File

@ -33,6 +33,7 @@ enum t_gui_bar_item_weechat
GUI_BAR_ITEM_BUFFER_NAME,
GUI_BAR_ITEM_BUFFER_MODES,
GUI_BAR_ITEM_BUFFER_FILTER,
GUI_BAR_ITEM_BUFFER_ZOOM,
GUI_BAR_ITEM_BUFFER_NICKLIST_COUNT,
GUI_BAR_ITEM_SCROLL,
GUI_BAR_ITEM_HOTLIST,

View File

@ -1605,11 +1605,14 @@ void
gui_input_zoom_merged_buffer (struct t_gui_buffer *buffer)
{
struct t_gui_window *ptr_window;
int buffer_was_zoomed;
/* do nothing if current buffer is not merged with another buffer */
if (gui_buffer_count_merged_buffers (buffer->number) < 2)
return;
buffer_was_zoomed = (buffer->active == 2);
/* reset scroll in all windows displaying this buffer number */
for (ptr_window = gui_windows; ptr_window;
ptr_window = ptr_window->next_window)
@ -1646,6 +1649,9 @@ gui_input_zoom_merged_buffer (struct t_gui_buffer *buffer)
}
gui_buffer_ask_chat_refresh (buffer, 2);
hook_signal_send ((buffer_was_zoomed) ? "buffer_unzoomed" : "buffer_zoomed",
WEECHAT_HOOK_SIGNAL_POINTER, buffer);
}
/*