diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-14 14:04:33 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-08-14 14:04:33 +0200 |
commit | 08f13b3965cb339550f7cc8a9777ac6fe766356c (patch) | |
tree | 60a7c5cedc79b29e9e195ab0457304964eea54eb /src/gui | |
parent | ae2c061350e05230ad8423ba24adc08d0a19e7a2 (diff) | |
download | weechat-08f13b3965cb339550f7cc8a9777ac6fe766356c.zip |
core: add key "_chat_line_nick" in focus hashtable
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui-focus.c | 4 | ||||
-rw-r--r-- | src/gui/gui-line.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/gui-focus.c b/src/gui/gui-focus.c index 70d9e8eb6..31e7285f7 100644 --- a/src/gui/gui-focus.c +++ b/src/gui/gui-focus.c @@ -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", ""); } diff --git a/src/gui/gui-line.h b/src/gui/gui-line.h index 2d1566db5..dd7a30d85 100644 --- a/src/gui/gui-line.h +++ b/src/gui/gui-line.h @@ -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); |