| 5042 |
5042 |
| 5043 if (nick_colors == NULL) { |
5043 if (nick_colors == NULL) { |
| 5044 nbr_nick_colors = NUM_NICK_COLORS; |
5044 nbr_nick_colors = NUM_NICK_COLORS; |
| 5045 nick_colors = generate_nick_colors(&nbr_nick_colors, gtk_widget_get_style(gtkconv->imhtml)->base[GTK_STATE_NORMAL]); |
5045 nick_colors = generate_nick_colors(&nbr_nick_colors, gtk_widget_get_style(gtkconv->imhtml)->base[GTK_STATE_NORMAL]); |
| 5046 } |
5046 } |
| |
5047 |
| |
5048 /* We don't want to see the custom smileys if our buddy send us the |
| |
5049 * defined shortcut. */ |
| |
5050 pidgin_themes_smiley_themeize(gtkconv->imhtml); |
| |
5051 /* We want to see our smileys in the entry */ |
| |
5052 pidgin_themes_smiley_themeize_custom(gtkconv->entry); |
| 5047 } |
5053 } |
| 5048 |
5054 |
| 5049 static void |
5055 static void |
| 5050 pidgin_conv_new_hidden(PurpleConversation *conv) |
5056 pidgin_conv_new_hidden(PurpleConversation *conv) |
| 5051 { |
5057 { |
| 5348 char *displaying; |
5354 char *displaying; |
| 5349 gboolean plugin_return; |
5355 gboolean plugin_return; |
| 5350 char *bracket; |
5356 char *bracket; |
| 5351 int tag_count = 0; |
5357 int tag_count = 0; |
| 5352 gboolean is_rtl_message = FALSE; |
5358 gboolean is_rtl_message = FALSE; |
| 5353 GtkSmileyTree *tree = NULL; |
|
| 5354 GHashTable *smiley_data = NULL; |
|
| 5355 |
5359 |
| 5356 g_return_if_fail(conv != NULL); |
5360 g_return_if_fail(conv != NULL); |
| 5357 gtkconv = PIDGIN_CONVERSATION(conv); |
5361 gtkconv = PIDGIN_CONVERSATION(conv); |
| 5358 g_return_if_fail(gtkconv != NULL); |
5362 g_return_if_fail(gtkconv != NULL); |
| 5359 |
5363 |
| 5508 gtk_font_options |= GTK_IMHTML_USE_POINTSIZE; |
5512 gtk_font_options |= GTK_IMHTML_USE_POINTSIZE; |
| 5509 } |
5513 } |
| 5510 |
5514 |
| 5511 if (!(flags & PURPLE_MESSAGE_RECV)) |
5515 if (!(flags & PURPLE_MESSAGE_RECV)) |
| 5512 { |
5516 { |
| 5513 /* Temporarily revert to the original smiley-data to avoid showing up |
5517 /* We want to see our own smileys. Need to revert it after send*/ |
| 5514 * custom smileys of the buddy when sending message |
5518 pidgin_themes_smiley_themeize_custom(gtkconv->imhtml); |
| 5515 */ |
|
| 5516 tree = GTK_IMHTML(gtkconv->imhtml)->default_smilies; |
|
| 5517 GTK_IMHTML(gtkconv->imhtml)->default_smilies = |
|
| 5518 GTK_IMHTML(gtkconv->entry)->default_smilies; |
|
| 5519 smiley_data = GTK_IMHTML(gtkconv->imhtml)->smiley_data; |
|
| 5520 GTK_IMHTML(gtkconv->imhtml)->smiley_data = GTK_IMHTML(gtkconv->entry)->smiley_data; |
|
| 5521 } |
5519 } |
| 5522 |
5520 |
| 5523 /* TODO: These colors should not be hardcoded so log.c can use them */ |
5521 /* TODO: These colors should not be hardcoded so log.c can use them */ |
| 5524 if (flags & PURPLE_MESSAGE_RAW) { |
5522 if (flags & PURPLE_MESSAGE_RAW) { |
| 5525 gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), message, gtk_font_options_all); |
5523 gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), message, gtk_font_options_all); |
| 5761 } |
5759 } |
| 5762 |
5760 |
| 5763 if (!(flags & PURPLE_MESSAGE_RECV)) |
5761 if (!(flags & PURPLE_MESSAGE_RECV)) |
| 5764 { |
5762 { |
| 5765 /* Restore the smiley-data */ |
5763 /* Restore the smiley-data */ |
| 5766 GTK_IMHTML(gtkconv->imhtml)->default_smilies = tree; |
5764 pidgin_themes_smiley_themeize(gtkconv->imhtml); |
| 5767 GTK_IMHTML(gtkconv->imhtml)->smiley_data = smiley_data; |
|
| 5768 } |
5765 } |
| 5769 |
5766 |
| 5770 purple_signal_emit(pidgin_conversations_get_handle(), |
5767 purple_signal_emit(pidgin_conversations_get_handle(), |
| 5771 (type == PURPLE_CONV_TYPE_IM ? "displayed-im-msg" : "displayed-chat-msg"), |
5768 (type == PURPLE_CONV_TYPE_IM ? "displayed-im-msg" : "displayed-chat-msg"), |
| 5772 account, name, displaying, conv, flags); |
5769 account, name, displaying, conv, flags); |