Mercurial > pidgin
diff pidgin/gtkimhtml.c @ 21650:1f6935a5d189
Patch from 'goutnet' to not insert smileys when pasting as plain text.
This closes #3286.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 26 Nov 2007 10:12:41 +0000 |
parents | 3aa34d20d798 |
children | b05a8f1db1c3 |
line wrap: on
line diff
--- a/pidgin/gtkimhtml.c Mon Nov 26 09:49:59 2007 +0000 +++ b/pidgin/gtkimhtml.c Mon Nov 26 10:12:41 2007 +0000 @@ -1010,7 +1010,7 @@ static void imhtml_paste_insert(GtkIMHtml *imhtml, const char *text, gboolean plaintext) { GtkTextIter iter; - GtkIMHtmlOptions flags = plaintext ? 0 : (GTK_IMHTML_NO_NEWLINE | GTK_IMHTML_NO_COMMENTS); + GtkIMHtmlOptions flags = plaintext ? GTK_IMHTML_NO_SMILEY : (GTK_IMHTML_NO_NEWLINE | GTK_IMHTML_NO_COMMENTS); if (gtk_text_buffer_get_selection_bounds(imhtml->text_buffer, NULL, NULL)) gtk_text_buffer_delete_selection(imhtml->text_buffer, TRUE, TRUE); @@ -2980,6 +2980,7 @@ pos += tlen; g_free(tag); /* This was allocated back in VALID_TAG() */ } else if (imhtml->edit.link == NULL && + !(options & GTK_IMHTML_NO_SMILEY) && gtk_imhtml_is_smiley(imhtml, fonts, c, &smilelen)) { GtkIMHtmlFontDetail *fd; gchar *sml = NULL;