1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 03:03:12 +02:00

core: add key "_chat_line_nick" in focus hashtable

This commit is contained in:
Sebastien Helleu
2011-08-14 14:04:33 +02:00
parent ae2c061350
commit 08f13b3965
5 changed files with 8 additions and 0 deletions
+4
View File
@@ -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", "");
}
+1
View File
@@ -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);