On Fri, Jul 22, 2005 at 04:31:39PM -0300, Arx Henrique wrote:
> i have a GtkEntry with a signal "activate" and this handle:
> 
> void translate(GtkEntry *widget, gpointer *data) {
>       const gchar *text;
>       text = gtk_entry_get_text(widget);
>       gui_app_notify_new(text);
>       g_free(text);
>       gtk_editable_delete_text(GTK_EDITABLE(widget), 0, -1);
> }
> 
> my doubt is g_free or not g_free the text?

When in doubt, read API docs:

    This string points to internally allocated storage in
    the widget and must not be freed, modified or stored.

Yeti


--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to