textgtkbuffergtkentry

gtk text entry receiving buffer from socket?


I made a simple window, using C and glade, with only a gtk textview and a gtk text entry, and at this moment my textview receives buffer/data from UDP socket, and it prints perfectly with the following command:

gtk_text_buffer_get_end_iter (buffer, & iter); 
gtk_text_buffer_insert (buffer, & iter, getbuf, -1);

And now I want a similar command to make my text entry to get the buffer/data that I receive from the socket. I've found this gtk_entry_buffer_insert_text which may be the right one, but I think that I'm missing something else, and I guess that I've to use the guint, but I don't know exactly how.


Solution

  • well, actually i solved the problem using only:

    gtk_entry_set_text (GTK_ENTRY(message_entry), getbuf);
    

    I only had to put my message_entry in global to work :D