struct _SmileyManagerTree {
gunichar c;
GdkPixbuf *pixbuf;
- const gchar *path;
+ gchar *path;
GSList *childrens;
};
g_object_unref (tree->pixbuf);
}
g_slist_free (tree->childrens);
+ g_free (tree->path);
g_slice_free (SmileyManagerTree, tree);
}
}
child->pixbuf = g_object_ref (pixbuf);
- child->path = path;
+ child->path = g_strdup (path);
}
static void
smiley_manager_add_valist (EmpathySmileyManager *manager,
GdkPixbuf *pixbuf,
- gchar *path,
+ const gchar *path,
const gchar *first_str,
va_list var_args)
{
smiley_manager_tree_insert (priv->tree, pixbuf, str, path);
}
- /* We give the ownership of path to the smiley */
g_object_set_data_full (G_OBJECT (pixbuf), "smiley_str",
g_strdup (first_str), g_free);
smiley = smiley_new (pixbuf, first_str);
smiley_manager_add_valist (manager, pixbuf, path, first_str, var_args);
va_end (var_args);
g_object_unref (pixbuf);
+ g_free (path);
}
}