You need to have the parent widget of the entry. It means, the dialog or window. If you're using Glade (or you're doing the same on your own), all widgets of that dialog are connected with it and can be accessed using lookup_widget. The call looks this way:
Code:
GtkWidget *entry;
entry = lookup_widget(parent_widget,"entry1");
Now you have the entry and can put text inside.