pidgin: e61b97fb: Minor cleanup
markdoliner at pidgin.im
markdoliner at pidgin.im
Mon Feb 15 00:15:59 EST 2010
-----------------------------------------------------------------
Revision: e61b97fb956c5d140faf9d56d6d9a530422c6e21
Ancestor: 1d831e835bac31debd4d67cc75397c378c00bc7e
Author: markdoliner at pidgin.im
Date: 2010-02-15T05:10:57
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e61b97fb956c5d140faf9d56d6d9a530422c6e21
Modified files:
pidgin/gtkimhtml.c
ChangeLog:
Minor cleanup
-------------- next part --------------
============================================================
--- pidgin/gtkimhtml.c e8fe44521117c176144426a7dc17e6ad57890d87
+++ pidgin/gtkimhtml.c 831db77ff290965c58cc0fa7f87269cad65e34ab
@@ -5027,11 +5027,9 @@ void gtk_imhtml_insert_smiley_at_iter(Gt
}
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 @@ void gtk_imhtml_insert_smiley_at_iter(Gt
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);
}
More information about the Commits
mailing list