diff options
Diffstat (limited to 'src/gui/gtk/gui-display.c')
-rw-r--r-- | src/gui/gtk/gui-display.c | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/src/gui/gtk/gui-display.c b/src/gui/gtk/gui-display.c index 7d108b8d3..ef8c21c0f 100644 --- a/src/gui/gtk/gui-display.c +++ b/src/gui/gtk/gui-display.c @@ -1476,6 +1476,44 @@ gui_window_scroll_down (t_gui_window *window) } /* + * gui_window_scroll_top: scroll to top of buffer + */ + +void +gui_window_scroll_top (t_gui_window *window) +{ + if (!gui_ok) + return; + + if (!window->first_line_displayed) + { + window->start_line = window->buffer->lines; + window->start_line_pos = 0; + gui_draw_buffer_chat (window->buffer, 0); + gui_draw_buffer_status (window->buffer, 0); + } +} + +/* + * gui_window_scroll_bottom: scroll to bottom of buffer + */ + +void +gui_window_scroll_bottom (t_gui_window *window) +{ + if (!gui_ok) + return; + + if (window->start_line) + { + window->start_line = NULL; + window->start_line_pos = 0; + gui_draw_buffer_chat (window->buffer, 0); + gui_draw_buffer_status (window->buffer, 0); + } +} + +/* * gui_window_nick_beginning: go to beginning of nicklist */ @@ -2152,7 +2190,6 @@ void gui_init () { GdkColor color_fg, color_bg; - GtkRcStyle *rc_style; gui_init_colors (); |