pidgin: a06b635e: Do not show custom smileys where the prp...

sadrul at pidgin.im sadrul at pidgin.im
Sun May 25 23:45:40 EDT 2008


-----------------------------------------------------------------
Revision: a06b635ebc40ccdad112528557020cfd60238d88
Ancestor: 740f6d249277d1f3ffc01d5fab1a580c2dd8fc79
Author: sadrul at pidgin.im
Date: 2008-05-26T03:40:54
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a06b635ebc40ccdad112528557020cfd60238d88

Modified files:
        pidgin/gtkconv.c pidgin/gtkutils.c

ChangeLog: 

Do not show custom smileys where the prpl doesn't support them. Thanks
Kevin!

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	868e50f002483c415ff9324968ab8b798eecea99
+++ pidgin/gtkconv.c	212abae85406357af5621522a8a389899e8628dc
@@ -5191,11 +5191,8 @@ private_gtkconv_new(PurpleConversation *
 		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 @@ pidgin_conv_write_conv(PurpleConversatio
 		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 @@ pidgin_conv_write_conv(PurpleConversatio
 		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);
============================================================
--- pidgin/gtkutils.c	2e64d0172b5166f238411aafe8d58390bcbaf433
+++ pidgin/gtkutils.c	5300c83bcc67128b323184570ac4d19d26ace4b4
@@ -103,7 +103,7 @@ pidgin_setup_imhtml(GtkWidget *imhtml)
 	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);
 


More information about the Commits mailing list