Mercurial > pidgin.yaz
comparison src/gtkimhtml.c @ 7736:662a33ce4343
[gaim-migrate @ 8381]
This does protocol-specific smileys when wysiwyging. It will also reflect
changes in smiley theme.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 04 Dec 2003 05:23:19 +0000 |
parents | edebf99a5ec4 |
children | ddc450689c05 |
comparison
equal
deleted
inserted
replaced
7735:edebf99a5ec4 | 7736:662a33ce4343 |
---|---|
2192 gtk_text_buffer_insert_with_tags(imhtml->text_buffer, &iter, text, strlen(text), linktag, tag, NULL); | 2192 gtk_text_buffer_insert_with_tags(imhtml->text_buffer, &iter, text, strlen(text), linktag, tag, NULL); |
2193 span->end = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE); | 2193 span->end = gtk_text_buffer_create_mark(imhtml->text_buffer, NULL, &iter, TRUE); |
2194 imhtml->format_spans = g_list_append(imhtml->format_spans, span); | 2194 imhtml->format_spans = g_list_append(imhtml->format_spans, span); |
2195 } | 2195 } |
2196 | 2196 |
2197 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *smiley) | 2197 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley) |
2198 { | 2198 { |
2199 GtkTextMark *ins = gtk_text_buffer_get_insert(imhtml->text_buffer); | 2199 GtkTextMark *ins = gtk_text_buffer_get_insert(imhtml->text_buffer); |
2200 GtkTextIter iter; | 2200 GtkTextIter iter; |
2201 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, ins); | 2201 gtk_text_buffer_get_iter_at_mark(imhtml->text_buffer, &iter, ins); |
2202 GdkPixbuf *pixbuf = NULL; | 2202 GdkPixbuf *pixbuf = NULL; |
2203 GdkPixbufAnimation *annipixbuf = NULL; | 2203 GdkPixbufAnimation *annipixbuf = NULL; |
2204 GtkWidget *icon = NULL; | 2204 GtkWidget *icon = NULL; |
2205 | 2205 |
2206 GtkTextChildAnchor *anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); | 2206 GtkTextChildAnchor *anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); |
2207 g_object_set_data(G_OBJECT(anchor), "text_tag", smiley); | 2207 g_object_set_data(G_OBJECT(anchor), "text_tag", smiley); |
2208 annipixbuf = gtk_smiley_tree_image(imhtml, NULL, smiley); | 2208 annipixbuf = gtk_smiley_tree_image(imhtml, sml, smiley); |
2209 if(annipixbuf) { | 2209 if(annipixbuf) { |
2210 if(gdk_pixbuf_animation_is_static_image(annipixbuf)) { | 2210 if(gdk_pixbuf_animation_is_static_image(annipixbuf)) { |
2211 pixbuf = gdk_pixbuf_animation_get_static_image(annipixbuf); | 2211 pixbuf = gdk_pixbuf_animation_get_static_image(annipixbuf); |
2212 if(pixbuf) | 2212 if(pixbuf) |
2213 icon = gtk_image_new_from_pixbuf(pixbuf); | 2213 icon = gtk_image_new_from_pixbuf(pixbuf); |