diff options
author | sem <sem@FreeBSD.org> | 2004-07-17 19:01:17 +0800 |
---|---|---|
committer | sem <sem@FreeBSD.org> | 2004-07-17 19:01:17 +0800 |
commit | 7954fa286778e19bf6dde53e2840733491cc646e (patch) | |
tree | 8f55949807a367087f534b418803c3f5da0e8b69 /russian | |
parent | a9534a22bd0de794025502d829a76feb070135db (diff) | |
download | freebsd-ports-gnome-7954fa286778e19bf6dde53e2840733491cc646e.tar.gz freebsd-ports-gnome-7954fa286778e19bf6dde53e2840733491cc646e.tar.zst freebsd-ports-gnome-7954fa286778e19bf6dde53e2840733491cc646e.zip |
Gaim with underclared charsets support for oscar protocol.
Slave to net/gaim.
PR: ports/68112
Submitted by: Andrey Slusar <vasallia@ukr.net>
Approved by: krion (mentor)
Diffstat (limited to 'russian')
-rw-r--r-- | russian/Makefile | 1 | ||||
-rw-r--r-- | russian/gaim/Makefile | 18 | ||||
-rw-r--r-- | russian/gaim/files/patch-oscar.c | 74 |
3 files changed, 93 insertions, 0 deletions
diff --git a/russian/Makefile b/russian/Makefile index e25b23ec15d6..3f2d64be8227 100644 --- a/russian/Makefile +++ b/russian/Makefile @@ -12,6 +12,7 @@ SUBDIR += d1489 SUBDIR += elm.language SUBDIR += fortuneru + SUBDIR += gaim SUBDIR += kde3-i18n SUBDIR += koffice-i18n SUBDIR += koi2koi diff --git a/russian/gaim/Makefile b/russian/gaim/Makefile new file mode 100644 index 000000000000..0fd204a74cbe --- /dev/null +++ b/russian/gaim/Makefile @@ -0,0 +1,18 @@ +# New ports collection makefile for: ru-gaim +# Date created: 19 Jun 2004 +# Whom: Andrey Slusar <vasallia@ukr.net> +# +# $FreeBSD$ +# + +PORTNAME= xmms +CATEGORIES= russian + +MAINTAINER= vasallia@ukr.net +COMMENT= Gaim with underclared charsets support for oscar protocol + +MASTERDIR= ${.CURDIR}/../../net/gaim + +CONFLICTS= gaim-[0-9]* + +.include "${MASTERDIR}/Makefile" diff --git a/russian/gaim/files/patch-oscar.c b/russian/gaim/files/patch-oscar.c new file mode 100644 index 000000000000..121b0637d610 --- /dev/null +++ b/russian/gaim/files/patch-oscar.c @@ -0,0 +1,74 @@ +--- src/protocols/oscar/oscar.c.orig 2004-05-30 21:04:55.000000000 +0400 ++++ src/protocols/oscar/oscar.c 2004-06-05 22:14:22.000000000 +0400 +@@ -3019,6 +3019,7 @@ + GError *err = NULL; + struct buddyinfo *bi; + const char *iconfile; ++ char *charset; + + bi = g_hash_table_lookup(od->buddyinfo, gaim_normalize(account, userinfo->sn)); + if (!bi) { +@@ -3110,10 +3112,11 @@ + if (!args->msg || !args->msglen) + return 1; + +- tmp = g_convert(args->msg, args->msglen, "UTF-8", "ISO-8859-1", NULL, &convlen, &err); ++ charset = gaim_account_get_string(account, "plain_charset", "ISO-8859-1"); ++ tmp = g_convert(args->msg, args->msglen, "UTF-8", charset, NULL, &convlen, &err); + if (err) { +- gaim_debug_info("oscar", +- "ISO-8859-1 IM conversion: %s\n", err->message); ++ gaim_debug(GAIM_DEBUG_INFO, "oscar", ++ "%s IM conversion: %s\n", charset, err->message); + tmp = g_strdup(_("(There was an error receiving this message)")); + g_error_free(err); + } +@@ -5133,6 +5136,8 @@ + GError *err = NULL; + const char *iconfile = gaim_account_get_buddy_icon(gaim_connection_get_account(gc)); + char *tmpmsg = NULL, *tmpmsg2 = NULL; ++ GaimAccount *account = gc->account; ++ char *charset; + + if (dim && dim->connected) { + /* If we're directly connected, send a direct IM */ +@@ -5233,7 +5238,8 @@ + } + len = strlen(tmpmsg); + +- args.flags |= oscar_encoding_check(tmpmsg); ++ if(!(gaim_account_get_bool(account, "send_plain", FALSE))) ++ args.flags |= oscar_encoding_check(tmpmsg); + if (args.flags & AIM_IMFLAGS_UNICODE) { + gaim_debug_info("oscar", "Sending Unicode IM\n"); + args.charset = 0x0002; +@@ -5272,7 +5278,10 @@ + } else { + args.charset = 0x0000; + args.charsubset = 0x0000; +- args.msg = tmpmsg; ++ charset = gaim_account_get_string(account, "plain_charset", "ISO-8859-1"); ++ args.msg = g_convert(tmpmsg, len, charset, "UTF-8", NULL, &len, &err); ++ if (err) gaim_debug(GAIM_DEBUG_ERROR, "oscar", ++ "conversion error: %s\n", err->message); + } + args.msglen = len; + +@@ -7230,6 +7239,17 @@ + option = gaim_account_option_int_new(_("Auth port"), "port", 5190); + prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, + option); ++ option = gaim_account_option_string_new( ++ _("Charset for plain text messages"), ++ "plain_charset", "ISO-8859-1"); ++ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, ++ option); ++ ++ option = gaim_account_option_bool_new( ++ _("Send messages in plain text"), ++ "send_plain", FALSE); ++ prpl_info.protocol_options = g_list_append(prpl_info.protocol_options, ++ option); + + my_protocol = plugin; + } |