diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-08-06 09:30:22 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-08-06 09:30:22 +0000 |
commit | 362866fdf26d70ce0da200b04d08122ba9db31f1 (patch) | |
tree | 03a0a3447d4ac8f598adb562b354a19a893bf740 /src/gui/gui-action.c | |
parent | d150376c54d84aee8b089c320a2743423c88c980 (diff) | |
download | weechat-362866fdf26d70ce0da200b04d08122ba9db31f1.zip |
Added key for setting unread marker on all buffers (default: ctrl-S + ctrl-U) (task 7180)
Diffstat (limited to 'src/gui/gui-action.c')
-rw-r--r-- | src/gui/gui-action.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c index 46871117b..34e4d1ab1 100644 --- a/src/gui/gui-action.c +++ b/src/gui/gui-action.c @@ -1399,6 +1399,35 @@ gui_action_scroll_unread (t_gui_window *window, char *args) } /* + * gui_action_set_unread: set unread marker for all buffers + */ + +void +gui_action_set_unread (t_gui_window *window, char *args) +{ + t_gui_window *ptr_win; + t_gui_buffer *ptr_buffer; + + /* make C compiler happy */ + (void) window; + (void) args; + + /* set read marker for all standard buffers */ + for (ptr_buffer = gui_buffers; ptr_buffer; + ptr_buffer = ptr_buffer->next_buffer) + { + if (ptr_buffer->type == BUFFER_TYPE_STANDARD) + ptr_buffer->last_read_line = ptr_buffer->last_line; + } + + /* refresh all windows */ + for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) + { + gui_window_redraw_buffer (ptr_win->buffer); + } +} + +/* * gui_action_hotlist_clear: clear hotlist */ |