diff options
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/curses/gui-curses-window.c | 15 | ||||
-rw-r--r-- | src/gui/gtk/gui-gtk-window.c | 10 | ||||
-rw-r--r-- | src/gui/gui-action.c | 6 | ||||
-rw-r--r-- | src/gui/gui.h | 1 |
4 files changed, 27 insertions, 5 deletions
diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index a70017d3b..ae2096125 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -431,6 +431,21 @@ gui_window_redraw_buffer (t_gui_buffer *buffer) } /* + * gui_window_redraw_all_buffers: redraw all buffers + */ + +void +gui_window_redraw_all_buffers () +{ + t_gui_window *ptr_win; + + for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) + { + gui_window_redraw_buffer (ptr_win->buffer); + } +} + +/* * gui_window_switch_to_buffer: switch to another buffer */ diff --git a/src/gui/gtk/gui-gtk-window.c b/src/gui/gtk/gui-gtk-window.c index e527f31a4..43342599a 100644 --- a/src/gui/gtk/gui-gtk-window.c +++ b/src/gui/gtk/gui-gtk-window.c @@ -157,6 +157,16 @@ gui_window_redraw_buffer (t_gui_buffer *buffer) } /* + * gui_window_redraw_all_buffers: redraw all buffers + */ + +void +gui_window_redraw_all_buffers () +{ + /* TODO: write this function for Gtk */ +} + +/* * gui_window_switch_to_buffer: switch to another buffer */ diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c index 34e4d1ab1..69be9c6ac 100644 --- a/src/gui/gui-action.c +++ b/src/gui/gui-action.c @@ -1405,7 +1405,6 @@ gui_action_scroll_unread (t_gui_window *window, char *args) 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 */ @@ -1421,10 +1420,7 @@ gui_action_set_unread (t_gui_window *window, char *args) } /* refresh all windows */ - for (ptr_win = gui_windows; ptr_win; ptr_win = ptr_win->next_window) - { - gui_window_redraw_buffer (ptr_win->buffer); - } + gui_window_redraw_all_buffers (); } /* diff --git a/src/gui/gui.h b/src/gui/gui.h index 640c68eea..159eb501b 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -250,6 +250,7 @@ extern int gui_window_objects_init (t_gui_window *); extern void gui_window_objects_free (t_gui_window *, int); extern int gui_window_calculate_pos_size (t_gui_window *, int); extern void gui_window_redraw_buffer (t_gui_buffer *); +extern void gui_window_redraw_all_buffers (); extern void gui_window_switch_to_buffer (t_gui_window *, t_gui_buffer *); extern void gui_window_page_up (t_gui_window *); extern void gui_window_page_down (t_gui_window *); |