/* ***********************IMPORTANT *********************************************
 *  Copyright (C) 2004-2007 Thierry Lagarde <tlagarde@users.sourceforge.net>
 *  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.
 *
 *
 *                      ********************
 *
 *
 *  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 Library General Public License for more details.
 *
 *
 *                      ********************
 *
 *
 * You are highly encouraged to send your changes to <tlagarde@users.sourceforge.net>
 * for possible incorporation into the main distribution.
 * By sending these changes to <tlagarde@users.sourceforge.net>,
 * it is assumed that you are offering <tlagarde@users.sourceforge.net>
 * the unlimited, non-exclusive right to reuse, modify, and relicense the code.
 *
 *
 *                      ********************
 *
 *  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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **************************************************************************************/
#include <gtk/gtk.h>

#include "WakeUp_Callbacks.h"
#include "WakeUp_Interface.h"
#include "../Declaration_Constante.h"
#include "WakeUp_Interface.h"
#include "Root_Interface.h"

GtkWidget *create_win_WakeUp (void)
{
	scrolledwindow_WakeUp = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_WakeUp);
	gtk_container_add (GTK_CONTAINER (viewport_Modules), scrolledwindow_WakeUp);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_WakeUp), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

	viewport_WakeUp = gtk_viewport_new (NULL, NULL);
	gtk_widget_show (viewport_WakeUp);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_WakeUp), viewport_WakeUp);
	gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport_WakeUp), GTK_SHADOW_NONE);

	hbox_WakeUp = gtk_hbox_new (FALSE, 0);
	gtk_widget_show (hbox_WakeUp);
	gtk_container_add (GTK_CONTAINER (viewport_WakeUp), hbox_WakeUp);

	fixed_WakeUp_Gauche = gtk_fixed_new ();
	gtk_widget_show (fixed_WakeUp_Gauche);
	gtk_box_pack_start (GTK_BOX (hbox_WakeUp), fixed_WakeUp_Gauche, TRUE, TRUE, 0);

	vbox_WakeUp = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox_WakeUp);
	gtk_box_pack_start (GTK_BOX (hbox_WakeUp), vbox_WakeUp, TRUE, TRUE, 0);

	fixed_WakeUp_Haut = gtk_fixed_new ();
	gtk_widget_show (fixed_WakeUp_Haut);
	gtk_box_pack_start (GTK_BOX (vbox_WakeUp), fixed_WakeUp_Haut, TRUE, TRUE, 0);

	button_WakeUp = gtk_button_new ();
	gtk_widget_show (button_WakeUp);
	gtk_box_pack_start (GTK_BOX (vbox_WakeUp), button_WakeUp, FALSE, FALSE, 0);

	alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0);
	gtk_widget_show (alignment1);
	gtk_container_add (GTK_CONTAINER (button_WakeUp), alignment1);

	hbox1 = gtk_hbox_new (FALSE, 2);
	gtk_widget_show (hbox1);
	gtk_container_add (GTK_CONTAINER (alignment1), hbox1);

	image1 = gtk_image_new_from_stock ("gtk-network", GTK_ICON_SIZE_BUTTON);
	gtk_widget_show (image1);
	gtk_box_pack_start (GTK_BOX (hbox1), image1, FALSE, FALSE, 0);

	label1 = gtk_label_new_with_mnemonic ("Send magic Wake-on-LAN packets");
	gtk_widget_show (label1);
	gtk_box_pack_start (GTK_BOX (hbox1), label1, FALSE, FALSE, 0);

	fixed_WakeUp_Bas = gtk_fixed_new ();
	gtk_widget_show (fixed_WakeUp_Bas);
	gtk_box_pack_start (GTK_BOX (vbox_WakeUp), fixed_WakeUp_Bas, TRUE, TRUE, 0);

	fixed_WakeUp_Droit = gtk_fixed_new ();
	gtk_widget_show (fixed_WakeUp_Droit);
	gtk_box_pack_start (GTK_BOX (hbox_WakeUp), fixed_WakeUp_Droit, TRUE, TRUE, 0);

 	g_signal_connect ((gpointer) button_WakeUp, "clicked",G_CALLBACK (on_button_WakeUp_clicked), NULL);
	return scrolledwindow_WakeUp;
}
