How do I make a GtkEntry widget activate on pressing the Return key?

The Entry widget emits an 'activate' signal when you press return in it. Just attach to the activate signal on the entry and do whatever you want to do. Typical code would be:

  entry = gtk_entry_new();
  gtk_signal_connect (GTK_OBJECT(entry), "activate",