summaryrefslogtreecommitdiff
path: root/chat/gaim/patches
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2004-05-06 13:44:00 +0000
committerjmmv <jmmv@pkgsrc.org>2004-05-06 13:44:00 +0000
commit370e7fc437adcaa7af5a53b261bb09b9d76c8f3b (patch)
tree98e2f734a0dcc706e0aa73e53b36fcc56f6ed4c0 /chat/gaim/patches
parentf3888ab567f7ebc681134c6685820efcf4f73ab9 (diff)
downloadpkgsrc-370e7fc437adcaa7af5a53b261bb09b9d76c8f3b.tar.gz
Apply a patch (coming from CVS) to fix pasting of text in gaim when it was
copied from Mozilla. From Matthew Luckie (maintainer). Bump revision to 1.
Diffstat (limited to 'chat/gaim/patches')
-rw-r--r--chat/gaim/patches/patch-aa30
1 files changed, 29 insertions, 1 deletions
diff --git a/chat/gaim/patches/patch-aa b/chat/gaim/patches/patch-aa
index 4542578891c..6bc93da7716 100644
--- a/chat/gaim/patches/patch-aa
+++ b/chat/gaim/patches/patch-aa
@@ -1,4 +1,4 @@
-$NetBSD: patch-aa,v 1.19 2004/04/24 09:29:54 jmmv Exp $
+$NetBSD: patch-aa,v 1.20 2004/05/06 13:44:00 jmmv Exp $
--- src/gtkimhtml.c.orig Fri Apr 23 04:24:05 2004
+++ src/gtkimhtml.c Sat Apr 24 05:37:14 2004
@@ -16,3 +16,31 @@ $NetBSD: patch-aa,v 1.19 2004/04/24 09:29:54 jmmv Exp $
if (info == TARGET_HTML) {
int len;
+@@ -684,7 +685,6 @@
+ static void paste_received_cb (GtkClipboard *clipboard, GtkSelectionData *selection_data, gpointer data)
+ {
+ char *text;
+- guint16 c;
+ GtkIMHtml *imhtml = data;
+ GtkTextIter iter;
+ GtkIMHtmlOptions flags = GTK_IMHTML_NO_NEWLINE;
+@@ -756,14 +756,14 @@
+ memcpy(text, selection_data->data, selection_data->length);
+ }
+
+- memcpy (&c, text, 2);
+- if (c == 0xfeff) {
+- /* This is UCS2 */
+- char *utf8 = g_convert(text+2, selection_data->length - 2, "UTF-8", "UCS-2", NULL, NULL, NULL);
++ if (selection_data->length >= 2 &&
++ (*(guint16 *)text == 0xfeff || *(guint16 *)text == 0xfffe)) {
++ /* This is UCS-2 */
++ char *utf8 = g_convert(text, selection_data->length, "UTF-8", "UCS-2", NULL, NULL, NULL);
+ g_free(text);
+ text = utf8;
+ if (!text) {
+- gaim_debug_warning("gtkimhtml", "g_convert failed in paste_received_cb\n");
++ gaim_debug_warning("gtkimhtml", "g_convert from UCS-2 failed in paste_received_cb\n");
+ return;
+ }
+ }