# HG changeset patch # User Richard Laager # Date 1211784452 0 # Node ID c4b476c55b49f19054e8afb62ffd04dbd767f7fa # Parent 00350a318b30c0a99f74c78324c9ba7cbe295e4f# Parent 865c8e53c08e0890e03fbd93f298e5faf6813e5d merge of '105b7094f7adbdda665762aa99781df1fad9d86c' and '7347c33cabd303ddbcb162b7ad7899f3dac480ba' diff -r 00350a318b30 -r c4b476c55b49 pidgin/gtkconv.c --- a/pidgin/gtkconv.c Mon May 26 06:42:20 2008 +0000 +++ b/pidgin/gtkconv.c Mon May 26 06:47:32 2008 +0000 @@ -5191,11 +5191,8 @@ nick_colors = generate_nick_colors(&nbr_nick_colors, gtk_widget_get_style(gtkconv->imhtml)->base[GTK_STATE_NORMAL]); } - /* We don't want to see the custom smileys if our buddy send us the - * defined shortcut. */ - pidgin_themes_smiley_themeize(gtkconv->imhtml); - /* We want to see our smileys in the entry */ - pidgin_themes_smiley_themeize_custom(gtkconv->entry); + if (conv->features & PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY) + pidgin_themes_smiley_themeize_custom(gtkconv->entry); } static void @@ -5661,7 +5658,7 @@ gtk_font_options |= GTK_IMHTML_USE_POINTSIZE; } - if (!(flags & PURPLE_MESSAGE_RECV)) + if (!(flags & PURPLE_MESSAGE_RECV) && (conv->features & PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY)) { /* We want to see our own smileys. Need to revert it after send*/ pidgin_themes_smiley_themeize_custom(gtkconv->imhtml); @@ -5846,7 +5843,7 @@ gtkconv_set_unseen(gtkconv, unseen); } - if (!(flags & PURPLE_MESSAGE_RECV)) + if (!(flags & PURPLE_MESSAGE_RECV) && (conv->features & PURPLE_CONNECTION_ALLOW_CUSTOM_SMILEY)) { /* Restore the smiley-data */ pidgin_themes_smiley_themeize(gtkconv->imhtml); diff -r 00350a318b30 -r c4b476c55b49 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Mon May 26 06:42:20 2008 +0000 +++ b/pidgin/gtkimhtml.c Mon May 26 06:47:32 2008 +0000 @@ -1001,19 +1001,14 @@ char *selection; #ifndef _WIN32 gsize len; - GString *str = g_string_new(NULL); if (primary) { text = gtk_imhtml_get_markup_range(imhtml, &start, &end); } else text = html_clipboard; /* Mozilla asks that we start our text/html with the Unicode byte order mark */ - str = g_string_append_unichar(str, 0xfeff); - str = g_string_append(str, text); - str = g_string_append_unichar(str, 0x0000); - selection = g_convert(str->str, str->len, "UTF-16", "UTF-8", NULL, &len, NULL); + selection = g_convert(text, -1, "UTF-16", "UTF-8", NULL, &len, NULL); gtk_selection_data_set(selection_data, gdk_atom_intern("text/html", FALSE), 16, (const guchar *)selection, len); - g_string_free(str, TRUE); #else selection = clipboard_html_to_win32(html_clipboard); gtk_selection_data_set(selection_data, gdk_atom_intern("HTML Format", FALSE), 8, (const guchar *)selection, strlen(selection)); diff -r 00350a318b30 -r c4b476c55b49 pidgin/gtkutils.c --- a/pidgin/gtkutils.c Mon May 26 06:42:20 2008 +0000 +++ b/pidgin/gtkutils.c Mon May 26 06:47:32 2008 +0000 @@ -103,7 +103,7 @@ g_signal_connect(G_OBJECT(imhtml), "url_clicked", G_CALLBACK(url_clicked_cb), NULL); - pidgin_themes_smiley_themeize_custom(imhtml); + pidgin_themes_smiley_themeize(imhtml); gtk_imhtml_set_funcs(GTK_IMHTML(imhtml), >kimhtml_cbs);