Commit 2a80b70a authored by Hidetoshi Tajima's avatar Hidetoshi Tajima

ask apps for COMPOUND_TEXT instead of TEXT correctly interpret the return

	* gtk/gtkclipboard.c (request_text_received_func): ask apps for
	COMPOUND_TEXT instead of TEXT
	* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
	interpret the return value of g_string_to_compound_text()
	(#55152)
parent d146290c
2001-08-08 HideToshi Tajima <tajima@eng.sun.com>
* gtk/gtkclipboard.c (request_text_received_func): ask apps for
COMPOUND_TEXT instead of TEXT
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
interpret the return value of g_string_to_compound_text()
(#55152)
2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de> 2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't
......
2001-08-08 HideToshi Tajima <tajima@eng.sun.com>
* gtk/gtkclipboard.c (request_text_received_func): ask apps for
COMPOUND_TEXT instead of TEXT
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
interpret the return value of g_string_to_compound_text()
(#55152)
2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de> 2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't
......
2001-08-08 HideToshi Tajima <tajima@eng.sun.com>
* gtk/gtkclipboard.c (request_text_received_func): ask apps for
COMPOUND_TEXT instead of TEXT
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
interpret the return value of g_string_to_compound_text()
(#55152)
2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de> 2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't
......
2001-08-08 HideToshi Tajima <tajima@eng.sun.com>
* gtk/gtkclipboard.c (request_text_received_func): ask apps for
COMPOUND_TEXT instead of TEXT
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
interpret the return value of g_string_to_compound_text()
(#55152)
2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de> 2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't
......
2001-08-08 HideToshi Tajima <tajima@eng.sun.com>
* gtk/gtkclipboard.c (request_text_received_func): ask apps for
COMPOUND_TEXT instead of TEXT
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
interpret the return value of g_string_to_compound_text()
(#55152)
2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de> 2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't
......
2001-08-08 HideToshi Tajima <tajima@eng.sun.com>
* gtk/gtkclipboard.c (request_text_received_func): ask apps for
COMPOUND_TEXT instead of TEXT
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
interpret the return value of g_string_to_compound_text()
(#55152)
2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de> 2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't
......
2001-08-08 HideToshi Tajima <tajima@eng.sun.com>
* gtk/gtkclipboard.c (request_text_received_func): ask apps for
COMPOUND_TEXT instead of TEXT
* gdk/x11/gdkselection-x11.c (gdk_utf8_to_compound_text): correctly
interpret the return value of g_string_to_compound_text()
(#55152)
2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de> 2001-08-08 Matthias Clasen <matthiasc@waldgeist.poet.de>
* gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't * gtk/gtktreestore.c (gtk_tree_store_iter_n_children): Don't
......
...@@ -639,6 +639,7 @@ gdk_utf8_to_compound_text (const gchar *str, ...@@ -639,6 +639,7 @@ gdk_utf8_to_compound_text (const gchar *str,
result = gdk_string_to_compound_text (locale_str, result = gdk_string_to_compound_text (locale_str,
encoding, format, ctext, length); encoding, format, ctext, length);
result = (result == Success? TRUE : FALSE);
g_free (locale_str); g_free (locale_str);
......
...@@ -641,18 +641,18 @@ request_text_received_func (GtkClipboard *clipboard, ...@@ -641,18 +641,18 @@ request_text_received_func (GtkClipboard *clipboard,
if (!result) if (!result)
{ {
/* If we asked for UTF8 and didn't get it, try text; if we asked /* If we asked for UTF8 and didn't get it, try compound_text;
* for text and didn't get it, try string. If we asked for * if we asked for compound_text and didn't get it, try string;
* anything else and didn't get it, give up. * If we asked for anything else and didn't get it, give up.
*/ */
if (selection_data->target == gdk_atom_intern ("UTF8_STRING", FALSE)) if (selection_data->target == gdk_atom_intern ("UTF8_STRING", FALSE))
{ {
gtk_clipboard_request_contents (clipboard, gtk_clipboard_request_contents (clipboard,
gdk_atom_intern ("TEXT", FALSE), gdk_atom_intern ("COMPOUND_TEXT", FALSE),
request_text_received_func, info); request_text_received_func, info);
return; return;
} }
else if (selection_data->target == gdk_atom_intern ("TEXT", FALSE)) else if (selection_data->target == gdk_atom_intern ("COMPOUND_TEXT", FALSE))
{ {
gtk_clipboard_request_contents (clipboard, gtk_clipboard_request_contents (clipboard,
GDK_TARGET_STRING, GDK_TARGET_STRING,
......
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