/*****************************************************************************/

/*
 *      resetdefault.c -- REALmagic calibration application 
 *
 *      Copyright (C) 2000 Sigma Designs
 *                    written by Nicolas Vignal <nicolas_vignal@sdesigns.com>
 *                    modified by Emmanuel Michon <emmanuel_michon@sdesigns.com>
 *
 *      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 "define.h"

#include "resetdefault.h"
#include "resetdefaultCB.h"

#include"./pixmaps/REALmagic.xpm"

GtkWidget*
create_ResetDefaults (void)
{
  GtkWidget *ResetDefaults;
  GtkWidget *vbox8;
  GtkWidget *BorderAdjust;
  GtkWidget *ColorCalibration;
  GtkWidget *hbuttonbox3;
  GtkWidget *Ok;
  GtkWidget *Cancel;

  ResetDefaults = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_object_set_data (GTK_OBJECT (ResetDefaults), "ResetDefaults", ResetDefaults);
  gtk_widget_set_usize (ResetDefaults, 430, 100);
  gtk_container_set_border_width (GTK_CONTAINER (ResetDefaults), 10);
  gtk_window_set_title (GTK_WINDOW (ResetDefaults), _("Reset defaults"));
  gtk_window_set_position (GTK_WINDOW (ResetDefaults), GTK_WIN_POS_CENTER);
  gtk_window_set_policy (GTK_WINDOW (ResetDefaults), FALSE, FALSE, FALSE);

  vbox8 = gtk_vbox_new (FALSE, 0);
  gtk_widget_ref (vbox8);
  gtk_object_set_data_full (GTK_OBJECT (ResetDefaults), "vbox8", vbox8,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (vbox8);
  gtk_container_add (GTK_CONTAINER (ResetDefaults), vbox8);

  BorderAdjust = gtk_check_button_new_with_label (_("Reset current BORDER ADJUST settings to default factory values"));
  gtk_widget_ref (BorderAdjust);
  gtk_object_set_data_full (GTK_OBJECT (ResetDefaults), "BorderAdjust", BorderAdjust,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (BorderAdjust);
  gtk_box_pack_start (GTK_BOX (vbox8), BorderAdjust, FALSE, FALSE, 0);

  ColorCalibration = gtk_check_button_new_with_label (_("Reset current COLOR CALIBRATION settings to default factory values"));
  gtk_widget_ref (ColorCalibration);
  gtk_object_set_data_full (GTK_OBJECT (ResetDefaults), "ColorCalibration", ColorCalibration,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (ColorCalibration);
  gtk_box_pack_start (GTK_BOX (vbox8), ColorCalibration, FALSE, FALSE, 0);

  hbuttonbox3 = gtk_hbutton_box_new ();
  gtk_widget_ref (hbuttonbox3);
  gtk_object_set_data_full (GTK_OBJECT (ResetDefaults), "hbuttonbox3", hbuttonbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (hbuttonbox3);
  gtk_box_pack_start (GTK_BOX (vbox8), hbuttonbox3, TRUE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox3), GTK_BUTTONBOX_SPREAD);

  Ok = gtk_button_new_with_label (_("OK"));
  gtk_widget_ref (Ok);
  gtk_object_set_data_full (GTK_OBJECT (ResetDefaults), "Ok", Ok,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (Ok);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), Ok);

  Cancel = gtk_button_new_with_label (_("Cancel"));
  gtk_widget_ref (Cancel);
  gtk_object_set_data_full (GTK_OBJECT (ResetDefaults), "Cancel", Cancel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (Cancel);
  gtk_container_add (GTK_CONTAINER (hbuttonbox3), Cancel);

  gtk_signal_connect (GTK_OBJECT (ResetDefaults), "destroy",
                      GTK_SIGNAL_FUNC (gtk_widget_destroy),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ResetDefaults), "delete_event",
                      GTK_SIGNAL_FUNC (RD_Cancel_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (BorderAdjust), "toggled",
                      GTK_SIGNAL_FUNC (RD_BorderAdjust_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ColorCalibration), "toggled",
                      GTK_SIGNAL_FUNC (RD_ColorCalibration_toggled),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (Ok), "clicked",
                      GTK_SIGNAL_FUNC (RD_Ok_clicked),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (Cancel), "clicked",
                      GTK_SIGNAL_FUNC (RD_Cancel_clicked),
                      NULL);

/* addon*/
 	/* set window icon*/
	set_window_icon(ResetDefaults,REALmagic_xpm);
/* end of addon*/

  return ResetDefaults;
}


