summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/curses/gui-curses-main.c2
-rw-r--r--src/gui/gtk/gui-gtk-main.c2
-rw-r--r--src/gui/gui-buffer.c5
-rw-r--r--src/gui/gui-buffer.h3
4 files changed, 7 insertions, 5 deletions
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index c4870167b..7fbcd40cc 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -93,7 +93,7 @@ gui_main_init ()
if (gui_window_new (NULL, 0, 0, COLS, LINES, 100, 100))
{
gui_current_window = gui_windows;
- ptr_buffer = gui_buffer_new (NULL, "weechat", "weechat");
+ ptr_buffer = gui_buffer_new (NULL, "weechat", "weechat", NULL);
if (ptr_buffer)
{
gui_init_ok = 1;
diff --git a/src/gui/gtk/gui-gtk-main.c b/src/gui/gtk/gui-gtk-main.c
index bee6ff971..46fd7380c 100644
--- a/src/gui/gtk/gui-gtk-main.c
+++ b/src/gui/gtk/gui-gtk-main.c
@@ -162,7 +162,7 @@ gui_main_init ()
if (gui_window_new (NULL, 0, 0, 0, 0, 100, 100))
{
gui_current_window = gui_windows;
- ptr_buffer = gui_buffer_new (NULL, "weechat", "weechat");
+ ptr_buffer = gui_buffer_new (NULL, "weechat", "weechat", NULL);
if (ptr_buffer)
{
gui_init_ok = 1;
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c
index 91bd41522..f4719d572 100644
--- a/src/gui/gui-buffer.c
+++ b/src/gui/gui-buffer.c
@@ -63,7 +63,8 @@ struct t_gui_buffer *gui_buffer_before_raw_data = NULL; /* buf. before raw */
*/
struct t_gui_buffer *
-gui_buffer_new (void *plugin, char *category, char *name)
+gui_buffer_new (void *plugin, char *category, char *name,
+ void (*input_data_cb)(struct t_gui_buffer *, char *))
{
struct t_gui_buffer *new_buffer;
struct t_gui_completion *new_completion;
@@ -118,7 +119,7 @@ gui_buffer_new (void *plugin, char *category, char *name)
/* input */
new_buffer->input = 1;
- new_buffer->input_data_cb = NULL;
+ new_buffer->input_data_cb = input_data_cb;
new_buffer->input_nick = NULL;
new_buffer->input_buffer_alloc = GUI_BUFFER_INPUT_BLOCK_SIZE;
new_buffer->input_buffer = (char *) malloc (GUI_BUFFER_INPUT_BLOCK_SIZE);
diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h
index 95985bd9f..8e3a11ddb 100644
--- a/src/gui/gui-buffer.h
+++ b/src/gui/gui-buffer.h
@@ -139,7 +139,8 @@ extern struct t_gui_buffer *gui_buffer_before_raw_data;
/* buffer functions */
-extern struct t_gui_buffer *gui_buffer_new (void *, char *, char *);
+extern struct t_gui_buffer *gui_buffer_new (void *, char *, char *,
+ void (*)(struct t_gui_buffer *, char *));
extern int gui_buffer_valid (struct t_gui_buffer *);
extern void gui_buffer_set_category (struct t_gui_buffer *, char *);
extern void gui_buffer_set_name (struct t_gui_buffer *, char *);