mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 06:46:38 +02:00
core: add key "_chat_line_nick" in focus hashtable
This commit is contained in:
@@ -8290,6 +8290,7 @@ Content of hashtable sent to callback (keys and values are of type "string"):
|
||||
| _chat_line_date_printed | line date ^(3)^ | "1313237175" | "0"
|
||||
| _chat_line_time | time displayed | "14:06:15" | ""
|
||||
| _chat_line_tags | tags of line | "irc_privmsg,notify_message,nick_FlashCode,log1" | ""
|
||||
| _chat_line_nick | nick of line | "FlashCode" | ""
|
||||
| _chat_line_prefix | prefix of line | "@FlashCode" | ""
|
||||
| _chat_line_message | message of line | "Hello world!" | ""
|
||||
| _chat_word | word at (x,y) | "Hello" | ""
|
||||
|
||||
@@ -8427,6 +8427,7 @@ Contenu de la hashtable envoyée au "callback" (les clés et valeurs sont de typ
|
||||
| _chat_line_date_printed | date de la ligne ^(3)^ | "1313237175" | "0"
|
||||
| _chat_line_time | heure affichée | "14:06:15" | ""
|
||||
| _chat_line_tags | étiquettes de la ligne | "irc_privmsg,notify_message,nick_FlashCode,log1" | ""
|
||||
| _chat_line_nick | pseudo de la ligne | "FlashCode" | ""
|
||||
| _chat_line_prefix | préfixe de la ligne | "@FlashCode" | ""
|
||||
| _chat_line_message | message de la ligne | "Hello world!" | ""
|
||||
| _chat_word | mot à la position (x,y) | "Hello" | ""
|
||||
|
||||
@@ -8347,6 +8347,7 @@ Content of hashtable sent to callback (keys and values are of type "string"):
|
||||
| _chat_line_date_printed | line date ^(3)^ | "1313237175" | "0"
|
||||
| _chat_line_time | time displayed | "14:06:15" | ""
|
||||
| _chat_line_tags | tags of line | "irc_privmsg,notify_message,nick_FlashCode,log1" | ""
|
||||
| _chat_line_nick | nick of line | "FlashCode" | ""
|
||||
| _chat_line_prefix | prefix of line | "@FlashCode" | ""
|
||||
| _chat_line_message | message of line | "Hello world!" | ""
|
||||
| _chat_word | word at (x,y) | "Hello" | ""
|
||||
|
||||
@@ -122,6 +122,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
|
||||
{
|
||||
struct t_hashtable *hashtable;
|
||||
char str_value[128], *str_time, *str_prefix, *str_tags, *str_message;
|
||||
const char *nick;
|
||||
|
||||
hashtable = hashtable_new (32,
|
||||
WEECHAT_HASHTABLE_STRING,
|
||||
@@ -167,11 +168,13 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
|
||||
str_prefix = gui_color_decode (((focus_info->chat_line)->data)->prefix, NULL);
|
||||
str_tags = string_build_with_split_string ((const char **)((focus_info->chat_line)->data)->tags_array, ",");
|
||||
str_message = gui_color_decode (((focus_info->chat_line)->data)->message, NULL);
|
||||
nick = gui_line_get_nick_tag (focus_info->chat_line);
|
||||
FOCUS_INT("_chat_line_y", ((focus_info->chat_line)->data)->y);
|
||||
FOCUS_TIME("_chat_line_date", ((focus_info->chat_line)->data)->date);
|
||||
FOCUS_TIME("_chat_line_date_printed", ((focus_info->chat_line)->data)->date_printed);
|
||||
FOCUS_STR_VAR("_chat_line_time", str_time);
|
||||
FOCUS_STR_VAR("_chat_line_tags", str_tags);
|
||||
FOCUS_STR_VAR("_chat_line_nick", nick);
|
||||
FOCUS_STR_VAR("_chat_line_prefix", str_prefix);
|
||||
FOCUS_STR_VAR("_chat_line_message", str_message);
|
||||
if (str_time)
|
||||
@@ -190,6 +193,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key)
|
||||
FOCUS_STR("_chat_line_date_printed", "-1");
|
||||
FOCUS_STR("_chat_line_time", "");
|
||||
FOCUS_STR("_chat_line_tags", "");
|
||||
FOCUS_STR("_chat_line_nick", "");
|
||||
FOCUS_STR("_chat_line_prefix", "");
|
||||
FOCUS_STR("_chat_line_message", "");
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ extern int gui_line_match_regex (struct t_gui_line *line,
|
||||
regex_t *regex_message);
|
||||
extern int gui_line_match_tags (struct t_gui_line *line, int tags_count,
|
||||
char **tags_array);
|
||||
extern const char *gui_line_get_nick_tag (struct t_gui_line *line);
|
||||
extern int gui_line_has_highlight (struct t_gui_line *line);
|
||||
extern void gui_line_compute_buffer_max_length (struct t_gui_buffer *buffer,
|
||||
struct t_gui_lines *lines);
|
||||
|
||||
Reference in New Issue
Block a user