From b17e1bcf8902e88e2f9579101c6a1cfa35d5b83d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Tue, 30 Jun 2020 20:16:19 +0200 Subject: [PATCH] api: add pointer "_bar_window" in hashtable sent to hook focus callback (closes #1450) --- ChangeLog.adoc | 1 + doc/en/weechat_plugin_api.en.adoc | 4 ++++ doc/fr/weechat_plugin_api.fr.adoc | 4 ++++ doc/it/weechat_plugin_api.it.adoc | 5 +++++ doc/ja/weechat_plugin_api.ja.adoc | 5 +++++ src/gui/gui-focus.c | 1 + 6 files changed, 20 insertions(+) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 42f2fa760..65dd10a0c 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -33,6 +33,7 @@ New features:: * core: add default key kbd:[Alt+Shift+N] to toggle nicklist bar * core: add command line option "--stdout" in weechat-headless binary to log to stdout rather than ~/.weechat/weechat.log (issue #1475, issue #1477) * core: reload configuration files on SIGHUP (issue #1476) + * api: add pointer "_bar_window" in hashtable sent to hook focus callback (issue #1450) * api: add info_hashtable "focus_info" (issue #1245, issue #1257) * api: rename function hook_completion_get_string to completion_get_string and hook_completion_list_add to completion_list_add * api: add functions completion_new, completion_search and completion_free diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index d60de708f..e9510755b 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -12158,6 +12158,10 @@ Content of hashtable sent to callback (keys and values are of type "string"): | _bar_item_col | Column in bar item. | "0" ... "n" | "-1" + +| _bar_window | Pointer to bar window + + _(WeeChat ≥ 2.9)_. | + "0x12345678" | "" |=== [NOTE] diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 6f0b3251b..5bf3393a6 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -12424,6 +12424,10 @@ valeurs sont de type "string") : | _bar_item_col | Colonne dans l'objet de barre. | "0" ... "n" | "-1" + +| _bar_window | Pointeur vers la fenêtre de barre + + _(WeeChat ≥ 2.9)_. | + "0x12345678" | "" |=== [NOTE] diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index b34bf0116..effabdd9e 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -12647,6 +12647,11 @@ Contenuto della tabella hash inviata alla callback (tasti e valori sono di tipo | _bar_item_col | Colonna nell'elemento barra. | "0" ... "n" | "-1" + +// TRANSLATION MISSING +| _bar_window | Pointer to bar window + + _(WeeChat ≥ 2.9)_. | + "0x12345678" | "" |=== [NOTE] diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index 661303008..6e37c7261 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -12156,6 +12156,11 @@ info を使う前にエリアが一致していることを確認して下さい | _bar_item_col | バー要素中の列座標 | "0" ... "n" | "-1" + +// TRANSLATION MISSING +| _bar_window | Pointer to bar window + + _(WeeChat ≥ 2.9)_. | + "0x12345678" | "" |=== [NOTE] diff --git a/src/gui/gui-focus.c b/src/gui/gui-focus.c index 52f6e3edc..cd8cd94a9 100644 --- a/src/gui/gui-focus.c +++ b/src/gui/gui-focus.c @@ -241,6 +241,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key) HASHTABLE_SET_STR_NOT_NULL("_chat_eol", focus_info->chat_eol); /* bar/item */ + HASHTABLE_SET_POINTER("_bar_window", focus_info->bar_window); if (focus_info->bar_window) { HASHTABLE_SET_STR("_bar_name", ((focus_info->bar_window)->bar)->name);