mirror of
https://github.com/weechat/weechat.git
synced 2026-07-09 11:13:12 +02:00
Command "/buffer notify"
This commit is contained in:
@@ -1966,10 +1966,15 @@ gui_add_message (t_gui_buffer *buffer, int type, int color, char *message)
|
||||
}
|
||||
if (buffer->num_displayed == 0)
|
||||
{
|
||||
hotlist_add (buffer->last_line->line_with_message +
|
||||
buffer->last_line->line_with_highlight,
|
||||
buffer);
|
||||
gui_draw_buffer_status (gui_current_window->buffer, 1);
|
||||
if (3 - buffer->last_line->line_with_message -
|
||||
buffer->last_line->line_with_highlight <=
|
||||
buffer->notify_level)
|
||||
{
|
||||
hotlist_add (buffer->last_line->line_with_message +
|
||||
buffer->last_line->line_with_highlight,
|
||||
buffer);
|
||||
gui_draw_buffer_status (gui_current_window->buffer, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -182,6 +182,9 @@ gui_buffer_new (t_gui_window *window, void *server, void *channel, int dcc,
|
||||
new_buffer->num_lines = 0;
|
||||
new_buffer->line_complete = 1;
|
||||
|
||||
/* notify level */
|
||||
new_buffer->notify_level = 3;
|
||||
|
||||
/* create/append to log file */
|
||||
new_buffer->log_filename = NULL;
|
||||
new_buffer->log_file = NULL;
|
||||
|
||||
@@ -150,6 +150,12 @@ struct t_gui_buffer
|
||||
int num_lines; /* number of lines in the window */
|
||||
int line_complete; /* current line complete ? (\n ending) */
|
||||
|
||||
/* notify level: when activity should be displayed? default: 3 (always) */
|
||||
int notify_level; /* 0 = never */
|
||||
/* 1 = highlight only */
|
||||
/* 2 = highlight + message */
|
||||
/* 3 = highlight + message + join/part */
|
||||
|
||||
/* file to save buffer content */
|
||||
char *log_filename; /* filename for saving buffer content */
|
||||
FILE *log_file; /* for logging buffer to file */
|
||||
|
||||
Reference in New Issue
Block a user