#include <gtk/gtk.h>

static gboolean
parent_set_hook (GSignalInvocationHint *ihint,
		 guint			n_param_values,
		 const GValue	       *param_values,
		 gpointer		data)
{
  return TRUE;
}

int main(int argc, char **argv)
{
  GtkWidget *toolbar, *frame, *window;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  toolbar = gtk_toolbar_new();
  frame = gtk_frame_new (NULL);

  gtk_container_add (GTK_CONTAINER (window), frame);
  gtk_container_add (GTK_CONTAINER (frame), toolbar);

  g_signal_add_emission_hook (g_signal_lookup ("parent-set", GTK_TYPE_WIDGET), 0,
			      parent_set_hook, NULL, NULL);

  gtk_container_remove (GTK_CONTAINER (window), frame);

  return 0;
}
