Commit dd9aefca authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

Convert \n to \r\n also when storing CF_UNICODETEXT (UTF-16) in the

2006-06-11  Tor Lillqvist  <tml@novell.com>

	* gdk/win32/gdkproperty-win32.c (gdk_property_change): Convert \n
	to \r\n also when storing CF_UNICODETEXT (UTF-16) in the
	Clipboard. (#344496)
parent 7870cc59
2006-06-11 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkproperty-win32.c (gdk_property_change): Convert \n
to \r\n also when storing CF_UNICODETEXT (UTF-16) in the
Clipboard. (#344496)
2006-06-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentchooserwidget.c
......
2006-06-11 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkproperty-win32.c (gdk_property_change): Convert \n
to \r\n also when storing CF_UNICODETEXT (UTF-16) in the
Clipboard. (#344496)
2006-06-10 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkrecentchooserwidget.c
......
......@@ -336,6 +336,9 @@ gdk_property_change (GdkWindow *window,
wclen++; /* Terminating 0 */
size = wclen * 2;
for (i = 0; i < wclen; i++)
if (wcptr[i] == '\n')
size += 2;
GDK_NOTE (DND, g_print ("... as Unicode\n"));
}
else if (find_common_locale (data, nelements, nchars, &lcid, &buf, &size))
......@@ -427,9 +430,17 @@ gdk_property_change (GdkWindow *window,
break;
case UNICODE_TEXT:
cf = CF_UNICODETEXT;
memmove (ucptr, wcptr, size);
g_free (wcptr);
{
wchar_t *p = (wchar_t *) ucptr;
cf = CF_UNICODETEXT;
for (i = 0; i < wclen; i++)
{
if (wcptr[i] == '\n')
*p++ = '\r';
*p++ = wcptr[i];
}
g_free (wcptr);
}
break;
case SINGLE_LOCALE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment