Re: gtk-entry pointer problem



Try to chage:
        gtk_entry_get_text(GTK_ENTRY (widget))
.. with ...
        gtk_editable_get_chars(GTK_EDITABLE(widget), 0, -1)

You can also use...
picture->path = g_strdup (gtk_entry_get_text (GTK_ENTRY (widget));

[gtk_entry_get_text (..) returns the address of statically allocated
area... So you need to duplicate the contents of the returned
string....and never forget free it when it is no longer needed]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]