summaryrefslogtreecommitdiff
path: root/src/gui/gui-common.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2005-01-19 17:04:55 +0000
committerSebastien Helleu <flashcode@flashtux.org>2005-01-19 17:04:55 +0000
commit6a1230de547fc142db844c6be030ff7164e1de47 (patch)
tree7fde4bb59a66d6e6d3cc7a5c731b77561f9b3b5a /src/gui/gui-common.c
parent684f43298eb54e63a8ac979c043b28d090e719fa (diff)
downloadweechat-6a1230de547fc142db844c6be030ff7164e1de47.zip
Added charset conversion in infobar
Diffstat (limited to 'src/gui/gui-common.c')
-rw-r--r--src/gui/gui-common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gui/gui-common.c b/src/gui/gui-common.c
index 36cb5dda0..842bf4c74 100644
--- a/src/gui/gui-common.c
+++ b/src/gui/gui-common.c
@@ -299,17 +299,21 @@ gui_infobar_printf (int time_displayed, int color, char *message, ...)
static char buffer[1024];
va_list argptr;
t_gui_infobar *ptr_infobar;
- char *pos;
+ char *pos, *buf2;
va_start (argptr, message);
vsnprintf (buffer, sizeof (buffer) - 1, message, argptr);
va_end (argptr);
+ buf2 = weechat_convert_encoding (cfg_look_charset_decode,
+ local_charset,
+ buffer);
+
ptr_infobar = (t_gui_infobar *)malloc (sizeof (t_gui_infobar));
if (ptr_infobar)
{
ptr_infobar->color = color;
- ptr_infobar->text = strdup (buffer);
+ ptr_infobar->text = strdup (buf2);
pos = strchr (ptr_infobar->text, '\n');
if (pos)
pos[0] = '\0';
@@ -321,6 +325,8 @@ gui_infobar_printf (int time_displayed, int color, char *message, ...)
else
wee_log_printf (_("%s not enough memory for infobar message\n"),
WEECHAT_ERROR);
+
+ free (buf2);
}
/*