Mercurial > pidgin.yaz
diff pidgin/gtkconv.c @ 22874:02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Mauro Srgio Ferreira Brasil.
I have not applied the bits on MSN yet. I will have to look at it later, but
I would rather someone else more familiar with the MSN code look at it first.
I changed some bits of the applied patch (whitespacing, camelcasing etc.), and
the bit that required a major version bump (in gtkthemes.h). There are a few
more things that need to be done for this to be merged back to i.p.p.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Tue, 19 Feb 2008 19:41:56 +0000 |
parents | 36036b9489fe |
children | fdda2b8a4146 |
line wrap: on
line diff
--- a/pidgin/gtkconv.c Mon Feb 18 19:22:39 2008 +0000 +++ b/pidgin/gtkconv.c Tue Feb 19 19:41:56 2008 +0000 @@ -5044,6 +5044,12 @@ nbr_nick_colors = NUM_NICK_COLORS; 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); } static void @@ -5350,8 +5356,6 @@ char *bracket; int tag_count = 0; gboolean is_rtl_message = FALSE; - GtkSmileyTree *tree = NULL; - GHashTable *smiley_data = NULL; g_return_if_fail(conv != NULL); gtkconv = PIDGIN_CONVERSATION(conv); @@ -5510,14 +5514,8 @@ if (!(flags & PURPLE_MESSAGE_RECV)) { - /* Temporarily revert to the original smiley-data to avoid showing up - * custom smileys of the buddy when sending message - */ - tree = GTK_IMHTML(gtkconv->imhtml)->default_smilies; - GTK_IMHTML(gtkconv->imhtml)->default_smilies = - GTK_IMHTML(gtkconv->entry)->default_smilies; - smiley_data = GTK_IMHTML(gtkconv->imhtml)->smiley_data; - GTK_IMHTML(gtkconv->imhtml)->smiley_data = GTK_IMHTML(gtkconv->entry)->smiley_data; + /* We want to see our own smileys. Need to revert it after send*/ + pidgin_themes_smiley_themeize_custom(gtkconv->imhtml); } /* TODO: These colors should not be hardcoded so log.c can use them */ @@ -5763,8 +5761,7 @@ if (!(flags & PURPLE_MESSAGE_RECV)) { /* Restore the smiley-data */ - GTK_IMHTML(gtkconv->imhtml)->default_smilies = tree; - GTK_IMHTML(gtkconv->imhtml)->smiley_data = smiley_data; + pidgin_themes_smiley_themeize(gtkconv->imhtml); } purple_signal_emit(pidgin_conversations_get_handle(),