From 806103504e777b62c22de78361f50accb1daf890 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Mon, 7 Apr 2003 20:00:40 +0000 Subject: Add I18N conversion to IRC topic messages. PR: 50675 Submitted by: Alexander Nedotsukov --- net-im/gaim/Makefile | 1 + net-im/gaim/files/patch-src_protocols_irc_irc.c | 35 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 net-im/gaim/files/patch-src_protocols_irc_irc.c (limited to 'net-im/gaim') diff --git a/net-im/gaim/Makefile b/net-im/gaim/Makefile index 5c30d17b4b0d..ca79b5521af3 100644 --- a/net-im/gaim/Makefile +++ b/net-im/gaim/Makefile @@ -6,6 +6,7 @@ PORTNAME= gaim PORTVERSION= 0.60 +PORTREVISION?= 1 CATEGORIES?= net MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/net-im/gaim/files/patch-src_protocols_irc_irc.c b/net-im/gaim/files/patch-src_protocols_irc_irc.c new file mode 100644 index 000000000000..e042b2e7a1e9 --- /dev/null +++ b/net-im/gaim/files/patch-src_protocols_irc_irc.c @@ -0,0 +1,35 @@ +--- src/protocols/irc/irc.c.orig Wed Mar 12 11:50:45 2003 ++++ src/protocols/irc/irc.c Wed Mar 12 12:20:56 2003 +@@ -699,9 +699,11 @@ + + if ((c = irc_find_chat(gc, text))) { + char buf[IRC_BUF_LEN]; +- gaim_chat_set_topic(GAIM_CHAT(c), NULL, po); ++ char *utf8 = irc_recv_convert(gc, po); ++ gaim_chat_set_topic(GAIM_CHAT(c), NULL, utf8); + g_snprintf(buf, sizeof(buf), _("%s has changed the topic to: %s"), +- text, po); ++ text, utf8); ++ g_free(utf8); + + gaim_conversation_write(c, NULL, buf, -1, WFLAG_SYSTEM, time(NULL)); + } +@@ -1616,12 +1618,14 @@ + { + struct gaim_conversation *c = irc_find_chat(gc, word[3]); + char *topic = *word_eol[4] == ':' ? word_eol[4] + 1 : word_eol[4]; +- char buf[IRC_BUF_LEN]; + + if (c) { +- gaim_chat_set_topic(GAIM_CHAT(c), nick, topic); ++ char buf[IRC_BUF_LEN]; ++ char *utf8 = irc_recv_convert(gc, topic); ++ gaim_chat_set_topic(GAIM_CHAT(c), nick, utf8); + g_snprintf(buf, sizeof(buf), +- _("%s has changed the topic to: %s"), nick, topic); ++ _("%s has changed the topic to: %s"), nick, utf8); ++ g_free(utf8); + + gaim_conversation_write(c, NULL, buf, -1, WFLAG_SYSTEM, time(NULL)); + } + -- cgit v1.2.3