changeset 23198:865c8e53c08e

merge of 'a06b635ebc40ccdad112528557020cfd60238d88' and 'c22d824152072143b7ba7eb8b365c97069c60761'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Mon, 26 May 2008 03:42:05 +0000
parents d54bc04bfd31 (diff) eab3ce582cac (current diff)
children c4b476c55b49 30eaeb7cc076
files
diffstat 3 files changed, 6 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Sun May 25 23:48:50 2008 +0000
+++ b/pidgin/gtkconv.c	Mon May 26 03:42:05 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);
--- a/pidgin/gtkimhtml.c	Sun May 25 23:48:50 2008 +0000
+++ b/pidgin/gtkimhtml.c	Mon May 26 03:42:05 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));
--- a/pidgin/gtkutils.c	Sun May 25 23:48:50 2008 +0000
+++ b/pidgin/gtkutils.c	Mon May 26 03:42:05 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), &gtkimhtml_cbs);