/*  $Id: about.c,v 1.1 1999/06/04 21:33:22 colin Exp colin $ */

/*  ----------------------------------------------------------------------

    gtail -- A "tail -f" for GTK+.
    Copyright (c) 1999 Colin Marquardt <colin.marquardt@gmx.de>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

    ---------------------------------------------------------------------- */

#include <gtk/gtk.h>

GtkWidget*
CreateAboutDialog ()
{
  GtkWidget *aboutdialog;
  GtkWidget *dialog_vbox1;
  GtkWidget *label1;
  GtkWidget *dialog_action_area1;
  GtkWidget *button1;
  gchar *abouttext = "gtail\n\n gtail comes with ABSOLUTELY NO WARRANTY.\n This is free software, and you are welcome to redistribute it\nunder the conditions of the GNU General Public Licence.\n\n(c) 1999 Colin Marquardt";
  
  aboutdialog = gtk_dialog_new ();
  gtk_object_set_data (GTK_OBJECT (aboutdialog), "aboutdialog", aboutdialog);
  GTK_WINDOW (aboutdialog)->type = GTK_WINDOW_DIALOG;
  gtk_window_set_title (GTK_WINDOW (aboutdialog), "About");
  gtk_window_set_policy (GTK_WINDOW (aboutdialog), TRUE, TRUE, FALSE);

  dialog_vbox1 = GTK_DIALOG (aboutdialog)->vbox;
  gtk_object_set_data (GTK_OBJECT (aboutdialog), "dialog_vbox1", dialog_vbox1);
  gtk_widget_show (dialog_vbox1);

  label1 = gtk_label_new (abouttext);
  gtk_object_set_data (GTK_OBJECT (aboutdialog), "label1", label1);
  gtk_widget_show (label1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), label1, TRUE, TRUE, 0);
  gtk_misc_set_padding (GTK_MISC (label1), 10, 10);

  dialog_action_area1 = GTK_DIALOG (aboutdialog)->action_area;
  gtk_object_set_data (GTK_OBJECT (aboutdialog), "dialog_action_area1", dialog_action_area1);
  gtk_widget_show (dialog_action_area1);
  gtk_container_border_width (GTK_CONTAINER (dialog_action_area1), 10);

  button1 = gtk_button_new_with_label ("OK");
  gtk_object_set_data (GTK_OBJECT (aboutdialog), "button1", button1);
  gtk_widget_show (button1);
  gtk_box_pack_start (GTK_BOX (dialog_action_area1), button1, TRUE, TRUE, 0);
  gtk_signal_connect_object (GTK_OBJECT (button1), "clicked",
                             GTK_SIGNAL_FUNC (gtk_widget_destroy),
                             GTK_OBJECT (aboutdialog));

  return aboutdialog;
}
