diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-09 13:21:56 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2013-11-09 13:21:56 +0100 |
commit | 9b4eb6d60766300c6f1ae9503b283a45d07f1d4c (patch) | |
tree | f59491db3341c8f6d0fb50f3c39abd39f0781ed8 | |
parent | 2b049723262b3f1247575f75c8a698e646458db0 (diff) | |
download | weechat-9b4eb6d60766300c6f1ae9503b283a45d07f1d4c.zip |
core: add bar item "buffer_zoom", add signals "buffer_{zoomed|unzoomed}" (patch #8204) (patch from Nils Görs)
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | doc/de/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/en/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/en/weechat_plugin_api.en.txt | 34 | ||||
-rw-r--r-- | doc/fr/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/fr/weechat_plugin_api.fr.txt | 34 | ||||
-rw-r--r-- | doc/it/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | doc/it/weechat_plugin_api.it.txt | 36 | ||||
-rw-r--r-- | doc/ja/autogen/user/weechat_options.txt | 5 | ||||
-rw-r--r-- | po/cs.po | 5 | ||||
-rw-r--r-- | po/de.po | 8 | ||||
-rw-r--r-- | po/es.po | 8 | ||||
-rw-r--r-- | po/fr.po | 9 | ||||
-rw-r--r-- | po/hu.po | 5 | ||||
-rw-r--r-- | po/it.po | 8 | ||||
-rw-r--r-- | po/ja.po | 8 | ||||
-rw-r--r-- | po/pl.po | 8 | ||||
-rw-r--r-- | po/pt_BR.po | 5 | ||||
-rw-r--r-- | po/ru.po | 5 | ||||
-rw-r--r-- | po/tr.po | 5 | ||||
-rw-r--r-- | po/weechat.pot | 5 | ||||
-rw-r--r-- | src/core/wee-config.c | 7 | ||||
-rw-r--r-- | src/core/wee-config.h | 1 | ||||
-rw-r--r-- | src/gui/gui-bar-item.c | 50 | ||||
-rw-r--r-- | src/gui/gui-bar-item.h | 1 | ||||
-rw-r--r-- | src/gui/gui-input.c | 6 |
27 files changed, 233 insertions, 53 deletions
@@ -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,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 diff --git a/doc/de/autogen/user/weechat_options.txt b/doc/de/autogen/user/weechat_options.txt index 92821d0b2..994b56e90 100644 --- a/doc/de/autogen/user/weechat_options.txt +++ b/doc/de/autogen/user/weechat_options.txt @@ -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 diff --git a/doc/en/autogen/user/weechat_options.txt b/doc/en/autogen/user/weechat_options.txt index 4d1ecd04b..44e9d27d6 100644 --- a/doc/en/autogen/user/weechat_options.txt +++ b/doc/en/autogen/user/weechat_options.txt @@ -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 diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt index 43db83c20..0e556108e 100644 --- a/doc/en/weechat_plugin_api.en.txt +++ b/doc/en/weechat_plugin_api.en.txt @@ -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 diff --git a/doc/fr/autogen/user/weechat_options.txt b/doc/fr/autogen/user/weechat_options.txt index 4f0438df6..4db34e8c0 100644 --- a/doc/fr/autogen/user/weechat_options.txt +++ b/doc/fr/autogen/user/weechat_options.txt @@ -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 diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt index 75ba9e0d4..60585e68c 100644 --- a/doc/fr/weechat_plugin_api.fr.txt +++ b/doc/fr/weechat_plugin_api.fr.txt @@ -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 diff --git a/doc/it/autogen/user/weechat_options.txt b/doc/it/autogen/user/weechat_options.txt index 2cb734f66..35b698cd8 100644 --- a/doc/it/autogen/user/weechat_options.txt +++ b/doc/it/autogen/user/weechat_options.txt @@ -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 diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt index f23c3facb..ec20c111d 100644 --- a/doc/it/weechat_plugin_api.it.txt +++ b/doc/it/weechat_plugin_api.it.txt @@ -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 diff --git a/doc/ja/autogen/user/weechat_options.txt b/doc/ja/autogen/user/weechat_options.txt index 2f7b8a180..27e95ec93 100644 --- a/doc/ja/autogen/user/weechat_options.txt +++ b/doc/ja/autogen/user/weechat_options.txt @@ -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 を参照)` ** タイプ: 文字列 @@ -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 " @@ -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 " @@ -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 " @@ -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 " @@ -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 " @@ -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 " @@ -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 " @@ -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 " diff --git a/po/pt_BR.po b/po/pt_BR.po index 8998c8c63..380dfe68c 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: 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 " @@ -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 " @@ -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 " diff --git a/po/weechat.pot b/po/weechat.pot index 71bf91677..cb53825c7 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -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 " diff --git a/src/core/wee-config.c b/src/core/wee-config.c index 6d213f19f..b9815641a 100644 --- a/src/core/wee-config.c +++ b/src/core/wee-config.c @@ -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", diff --git a/src/core/wee-config.h b/src/core/wee-config.h index f78a8749e..db943e601 100644 --- a/src/core/wee-config.h +++ b/src/core/wee-config.h @@ -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; diff --git a/src/gui/gui-bar-item.c b/src/gui/gui-bar-item.c index 8300e007c..1ea72a931 100644 --- a/src/gui/gui-bar-item.c +++ b/src/gui/gui-bar-item.c @@ -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, @@ -1120,6 +1121,38 @@ gui_bar_item_default_buffer_nicklist_count (void *data, } /* + * 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], diff --git a/src/gui/gui-bar-item.h b/src/gui/gui-bar-item.h index 1c8405b2e..df75be82a 100644 --- a/src/gui/gui-bar-item.h +++ b/src/gui/gui-bar-item.h @@ -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, diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index a97f485f7..708e31e92 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -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); } /* |