g_slice_free (SmileyManagerTree, tree);
}
+/* Note: This function takes the ownership of str */
static EmpathySmiley *
-smiley_new (GdkPixbuf *pixbuf, const gchar *str)
+smiley_new (GdkPixbuf *pixbuf, gchar *str)
{
EmpathySmiley *smiley;
if (pixbuf) {
smiley->pixbuf = g_object_ref (pixbuf);
}
- smiley->str = g_strdup (str);
+ smiley->str = str;
return smiley;
}
smiley_manager_tree_insert (priv->tree, smiley, str);
}
- priv->smileys = g_slist_prepend (priv->smileys, smiley_new (smiley, first_str));
+ priv->smileys = g_slist_prepend (priv->smileys,
+ smiley_new (smiley, g_strdup (first_str)));
}
void