# HG changeset patch # User Sean Egan # Date 1070515399 0 # Node ID 662a33ce434326e38b126ac315405a853fc011ec # Parent edebf99a5ec44642a0636b680406945c50ce59bf [gaim-migrate @ 8381] This does protocol-specific smileys when wysiwyging. It will also reflect changes in smiley theme. committer: Tailor Script diff -r edebf99a5ec4 -r 662a33ce4343 src/dialogs.c --- a/src/dialogs.c Thu Dec 04 05:06:59 2003 +0000 +++ b/src/dialogs.c Thu Dec 04 05:23:19 2003 +0000 @@ -1572,12 +1572,12 @@ { GaimGtkConversation *gtkconv; char *smiley_text = g_object_get_data(G_OBJECT(widget), "smiley_text"); - GtkTextMark *select_mark, *insert_mark; - GtkTextIter select_iter, insert_iter; - + GaimProtocol protocol = gaim_account_get_protocol(gaim_conversation_get_account(c)); + GaimPlugin *proto = gaim_find_prpl(protocol); + gtkconv = GAIM_GTK_CONVERSATION(c); - gtk_imhtml_insert_smiley(GTK_IMHTML(gtkconv->entry), smiley_text); + gtk_imhtml_insert_smiley(GTK_IMHTML(gtkconv->entry), proto->info->name, smiley_text); close_smiley_dialog(NULL, c); } diff -r edebf99a5ec4 -r 662a33ce4343 src/gtkimhtml.c --- a/src/gtkimhtml.c Thu Dec 04 05:06:59 2003 +0000 +++ b/src/gtkimhtml.c Thu Dec 04 05:23:19 2003 +0000 @@ -2194,7 +2194,7 @@ imhtml->format_spans = g_list_append(imhtml->format_spans, span); } -void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *smiley) +void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley) { GtkTextMark *ins = gtk_text_buffer_get_insert(imhtml->text_buffer); GtkTextIter iter; @@ -2205,7 +2205,7 @@ GtkTextChildAnchor *anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); g_object_set_data(G_OBJECT(anchor), "text_tag", smiley); - annipixbuf = gtk_smiley_tree_image(imhtml, NULL, smiley); + annipixbuf = gtk_smiley_tree_image(imhtml, sml, smiley); if(annipixbuf) { if(gdk_pixbuf_animation_is_static_image(annipixbuf)) { pixbuf = gdk_pixbuf_animation_get_static_image(annipixbuf); diff -r edebf99a5ec4 -r 662a33ce4343 src/gtkimhtml.h --- a/src/gtkimhtml.h Thu Dec 04 05:06:59 2003 +0000 +++ b/src/gtkimhtml.h Thu Dec 04 05:23:19 2003 +0000 @@ -214,7 +214,7 @@ gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); void gtk_imhtml_insert_link(GtkIMHtml *imhtml, const char *url, const char *text); - +void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); char *gtk_imhtml_get_text(GtkIMHtml *imhtml); diff -r edebf99a5ec4 -r 662a33ce4343 src/themes.c --- a/src/themes.c Thu Dec 04 05:06:59 2003 +0000 +++ b/src/themes.c Thu Dec 04 05:23:19 2003 +0000 @@ -193,8 +193,10 @@ for (cnv = gaim_get_conversations(); cnv != NULL; cnv = cnv->next) { GaimConversation *conv = cnv->data; - if (GAIM_IS_GTK_CONVERSATION(conv)) + if (GAIM_IS_GTK_CONVERSATION(conv)) { smiley_themeize(GAIM_GTK_CONVERSATION(conv)->imhtml); + smiley_themeize(GAIM_GTK_CONVERSATION(conv)->entry); + } } }