diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-12-09 11:47:34 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-12-09 11:47:34 +0100 |
commit | 8b3980f508972313c89a7fcb5a96fed3dccff7cc (patch) | |
tree | f682355eef676f21df31c43488c55e618b199529 /src/gui | |
parent | 30ab415dc0024bd0e1fdb0b3a72dc8ec8f4c96c5 (diff) | |
download | weechat-8b3980f508972313c89a7fcb5a96fed3dccff7cc.zip |
Changes in IRC plugin to use new API
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/gui-buffer.c | 20 | ||||
-rw-r--r-- | src/gui/gui-buffer.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index cf6e77388..5cc8a30da 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -209,6 +209,26 @@ gui_buffer_valid (struct t_gui_buffer *buffer) } /* + * gui_buffer_get: get a buffer property + */ + +char * +gui_buffer_get (struct t_gui_buffer *buffer, char *property) +{ + long number; + char *error; + + if (string_strcasecmp (property, "category") == 0) + return buffer->category; + else if (string_strcasecmp (property, "name") == 0) + return buffer->name; + else if (string_strcasecmp (property, "title") == 0) + return buffer->title; + else if (string_strcasecmp (property, "nick") == 0) + return buffer->nick; +} + +/* * gui_buffer_set_category: set category for a buffer */ diff --git a/src/gui/gui-buffer.h b/src/gui/gui-buffer.h index 8e3a11ddb..dd80da6b1 100644 --- a/src/gui/gui-buffer.h +++ b/src/gui/gui-buffer.h @@ -142,6 +142,7 @@ extern struct t_gui_buffer *gui_buffer_before_raw_data; 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 char *gui_buffer_get (struct t_gui_buffer *, char *); extern void gui_buffer_set_category (struct t_gui_buffer *, char *); extern void gui_buffer_set_name (struct t_gui_buffer *, char *); extern void gui_buffer_set_log (struct t_gui_buffer *, char *); |