im.pidgin.pidgin.next.minor: 21c334ee185b992a5d2e382a58397131a4470508
sadrul at pidgin.im
sadrul at pidgin.im
Mon Nov 26 05:19:05 EST 2007
-----------------------------------------------------------------
Revision: 21c334ee185b992a5d2e382a58397131a4470508
Ancestor: 0540f77d94df5dad5c4caee955eb359d2822e7d7
Author: sadrul at pidgin.im
Date: 2007-11-26T10:12:41
Branch: im.pidgin.pidgin.next.minor
Modified files:
ChangeLog.API pidgin/gtkimhtml.c pidgin/gtkimhtml.h
ChangeLog:
Patch from 'goutnet' to not insert smileys when pasting as plain text.
This closes #3286.
-------------- next part --------------
============================================================
--- ChangeLog.API c00d6fc4765cbe6c93589d0c971fc925edcf07d6
+++ ChangeLog.API a66edee9a7250f1d96b818941c9bf9fc781a6161
@@ -11,6 +11,8 @@ version 2.4.0 (??/??/????):
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:
============================================================
--- pidgin/gtkimhtml.c 314edca9329042a9b656e82d296c798156bb33ac
+++ pidgin/gtkimhtml.c c78a2965f8c34a7b5847e4c128e61ffbfe6ed5fa
@@ -1010,7 +1010,7 @@ static void imhtml_paste_insert(GtkIMHtm
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 @@ void gtk_imhtml_insert_html_at_iter(GtkI
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;
============================================================
--- pidgin/gtkimhtml.h 0684d9edaff390fb68c15e7ad3577fa3aab1e278
+++ pidgin/gtkimhtml.h 92ad0cd035ed124fdc45d3d9b6a6043048c3dd25
@@ -225,7 +225,8 @@ typedef enum {
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 {
More information about the Commits
mailing list