summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-08-17 23:24:40 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-08-17 23:24:40 +0000
commit6db6b35e408398603245ccf095423e729ed87b7f (patch)
tree1bb14e64a9f504156b6dc00c0340525f5ce71c1c /src
parentaacbf82675e3fb3371d941cf2b805cd5594fb4c0 (diff)
downloadweechat-6db6b35e408398603245ccf095423e729ed87b7f.zip
Added 'C'lear option on IRC raw buffer
Diffstat (limited to 'src')
-rw-r--r--src/gui/curses/gui-curses-input.c4
-rw-r--r--src/gui/gui-common.c7
2 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-input.c b/src/gui/curses/gui-curses-input.c
index d173f6416..e3c5b5e12 100644
--- a/src/gui/curses/gui-curses-input.c
+++ b/src/gui/curses/gui-curses-input.c
@@ -409,7 +409,9 @@ gui_input_draw (t_gui_buffer *buffer, int erase)
move (ptr_win->win_input_y, ptr_win->win_input_x);
break;
case BUFFER_TYPE_RAW_DATA:
- mvwprintw (GUI_CURSES(ptr_win)->win_input, 0, 0, _(" [Q] Close raw data view"));
+ wmove (GUI_CURSES(ptr_win)->win_input, 0, 0);
+ wprintw (GUI_CURSES(ptr_win)->win_input, _(" [C] Clear buffer"));
+ wprintw (GUI_CURSES(ptr_win)->win_input, _(" [Q] Close raw data view"));
wclrtoeol (GUI_CURSES(ptr_win)->win_input);
ptr_win->win_input_cursor_x = 0;
if (ptr_win == gui_current_window)
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index 8dcaa167a..f01e07dc7 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -778,6 +778,13 @@ gui_exec_action_raw_data (t_gui_window *window, char *actions)
switch (actions[0])
{
/* close raw IRC data */
+ case 'c':
+ case 'C':
+ gui_buffer_clear (window->buffer);
+ gui_window_redraw_buffer (window->buffer);
+ return;
+ break;
+ /* close raw IRC data */
case 'q':
case 'Q':
if (gui_buffer_before_raw_data)