Mercurial > pidgin
changeset 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 | 419c93864e6b |
children | 9107bb853c49 |
files | ChangeLog.API pidgin/gtkimhtml.c pidgin/gtkimhtml.h |
diffstat | 3 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Mon Nov 26 09:49:59 2007 +0000 +++ b/ChangeLog.API Mon Nov 26 10:12:41 2007 +0000 @@ -11,6 +11,8 @@ added utility functions pidgin_dialog_get_vbox_with_properties, pidgin_dialog_get_vbox, pidgin_dialog_get_action_area to access the contents in the created dialog. (Peter 'fmoo' Ruibal) + * GTK_IMHTML_NO_SMILEY for GtkIMHtmlOptions means not to look for + smileys in the text. (goutnet) version 2.3.0 (11/24/2007): libpurple:
--- 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;
--- a/pidgin/gtkimhtml.h Mon Nov 26 09:49:59 2007 +0000 +++ b/pidgin/gtkimhtml.h Mon Nov 26 10:12:41 2007 +0000 @@ -225,7 +225,8 @@ GTK_IMHTML_RETURN_LOG = 1 << 7, GTK_IMHTML_USE_POINTSIZE = 1 << 8, GTK_IMHTML_NO_FORMATTING = 1 << 9, - GTK_IMHTML_USE_SMOOTHSCROLLING = 1 << 10 + GTK_IMHTML_USE_SMOOTHSCROLLING = 1 << 10, + GTK_IMHTML_NO_SMILEY = 1 << 11, } GtkIMHtmlOptions; enum {