Mercurial > pidgin
diff src/gtknotify.c @ 7078:acd2a66e59ed
[gaim-migrate @ 7643]
robot101 gave us images in notify_formatted windows. very cool. This lets what I committed earlier (which was support for images in jabber vcards) to work.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 30 Sep 2003 18:41:28 +0000 |
parents | 9f2285b667a7 |
children | 2b99c950b817 |
line wrap: on
line diff
--- a/src/gtknotify.c Tue Sep 30 18:40:18 2003 +0000 +++ b/src/gtknotify.c Tue Sep 30 18:41:28 2003 +0000 @@ -270,6 +270,7 @@ GtkWidget *button; GtkWidget *imhtml; GtkWidget *sw; + GSList *images = NULL; int options = 0; char label_text[2048]; @@ -340,7 +341,20 @@ options ^= GTK_IMHTML_NO_NEWLINE; options ^= GTK_IMHTML_NO_SCROLL; - gtk_imhtml_append_text(GTK_IMHTML(imhtml), text, options); + gaim_gtk_find_images(text, &images); + gtk_imhtml_append_text_with_images(GTK_IMHTML(imhtml), text, options, images); + + if (images) { + GSList *tmp; + + for (tmp = images; tmp; tmp = tmp->next) { + GdkPixbuf *pixbuf = tmp->data; + if(pixbuf) + g_object_unref(pixbuf); + } + + g_slist_free(images); + } /* Show the window */ gtk_widget_show(window);