#include <gtk/gtk.h>

static void quit (GtkWidget *widget, gpointer data)
{
  gtk_main_quit ();
}

static gboolean
delete_event (GtkWidget *widget,
	      GdkEvent  *event,
	      gpointer   data )
{
  gtk_main_quit ();
  return TRUE;
}

int
main (int argc, char **argv)
{
  GtkWidget *window, *button;
  GtkStatusIcon *status_icon;

  gtk_init(&argc, &argv);
  
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  button = gtk_button_new_with_label ("Close");
  gtk_container_add (GTK_CONTAINER(window), button);
  g_signal_connect (button, "clicked",
                    G_CALLBACK (quit), NULL);
  g_signal_connect (window, "delete_event",
		    G_CALLBACK (delete_event), NULL);
  gtk_widget_set_size_request (button, 80, 40);
  gtk_widget_show_all (window);
  status_icon = gtk_status_icon_new_from_stock (GTK_STOCK_ABOUT);  
 
  gtk_main ();

  g_object_unref (status_icon);
  gtk_widget_destroy (window);
  return 0;
}
