changeset 30592:9e7fc6d8ee18

Do not paste in a read-only imhtml. Fixes #12109.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sun, 06 Jun 2010 02:15:40 +0000
parents 52ffd59b26fc
children bed884491864
files pidgin/gtkimhtml.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkimhtml.c	Thu Jun 03 23:13:03 2010 +0000
+++ b/pidgin/gtkimhtml.c	Sun Jun 06 02:15:40 2010 +0000
@@ -1353,6 +1353,9 @@
 static void
 imhtml_paste_cb(GtkIMHtml *imhtml, const char *str)
 {
+	if (!gtk_text_view_get_editable(GTK_TEXT_VIEW(imhtml)))
+		return;
+
 	if (!str || !*str || !strcmp(str, "html"))
 		g_signal_emit_by_name(imhtml, "paste_clipboard");
 	else if (!strcmp(str, "text"))