pidgin: dfe95832: Do not paste in a read-only imhtml. Fixe...

sadrul at pidgin.im sadrul at pidgin.im
Sat Jun 5 22:20:46 EDT 2010


-----------------------------------------------------------------
Revision: dfe958320740154e5d306f62dd8e7d260970ec29
Ancestor: 07a59c27400e4ab651316adfa2c75c22ed085fe5
Author: sadrul at pidgin.im
Date: 2010-06-06T02:15:40
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/dfe958320740154e5d306f62dd8e7d260970ec29

Modified files:
        pidgin/gtkimhtml.c

ChangeLog: 

Do not paste in a read-only imhtml. Fixes #12109.

-------------- next part --------------
============================================================
--- pidgin/gtkimhtml.c	e05445dce47c3bf29c3cbe9d7279ec4c33175b3f
+++ pidgin/gtkimhtml.c	9e71e4aad2a78354774e3eb6d67c3f8859ef3f90
@@ -1353,6 +1353,9 @@ imhtml_paste_cb(GtkIMHtml *imhtml, const
 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"))


More information about the Commits mailing list