Mariano Su�z-Alvarez ha scritto lo scorso 30/06/04 10.39:
On Wed, 2004-06-30 at 10:41 +0200, Carlo wrote:vikram_dravid_sr ha scritto lo scorso 30/06/04 8.00:hi , i need to know how i can get the text inserted into a text box printed on my konsole???? should i use callbacks in GTK........pl. let me know!!! vikram------------------------------------------------------------------------Here is a code snippet of a callback function that does what you ask: void on_button1_clicked (GtkButton * button, gpointer user_data) { GtkWidget * in, * out; gchar * text;
Carlo, It's better not to cast away the const-ness of the string gtk_entry_get_text returns. That allows gcc to provide useful warnings if you try to free it, for example. -- m
Right, in the hurry I omitted the G_CONST_RETURN qualifier:
G_CONST_RETURN gchar * text;