# HG changeset patch # User Mark Doliner # Date 1266210657 0 # Node ID f0e80126a3ce4df5f62fa22d43e21210cd47c5a1 # Parent 031fd1cd88df5ee3478e0d4ff84208c4face1edd Minor cleanup diff -r 031fd1cd88df -r f0e80126a3ce pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Mon Feb 15 00:20:55 2010 +0000 +++ b/pidgin/gtkimhtml.c Mon Feb 15 05:10:57 2010 +0000 @@ -5027,11 +5027,9 @@ } if (icon) { - char *text = g_strdup(unescaped); /* Do not g_free 'text'. - It will be destroyed when 'anchor' is destroyed. */ anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, iter); - g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", text, g_free); - g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_tiptext", g_strdup(text), g_free); + g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", g_strdup(unescaped), g_free); + g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_tiptext", g_strdup(unescaped), g_free); g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_htmltext", g_strdup(smiley), g_free); /* This catches the expose events generated by animated @@ -5049,12 +5047,10 @@ imhtml_smiley->anchors = g_slist_append(imhtml_smiley->anchors, g_object_ref(anchor)); if (ebox) { GtkWidget *img = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_MENU); - char *text = g_strdup(unescaped); gtk_container_add(GTK_CONTAINER(ebox), img); gtk_widget_show(img); - g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", text, g_free); - g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_tiptext", - g_strdup(text), g_free); + g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", g_strdup(unescaped), g_free); + g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_tiptext", g_strdup(unescaped), g_free); g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_htmltext", g_strdup(smiley), g_free); gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), ebox, anchor); }