/* ***********************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 "Root_Callbacks.h"
#include "Root_Interface.h"
#include "Combo.h"
#include "../Declaration_Constante.h"
#include "../Objet_Liste.h"
#include "../Modules.h"
#include "../Gconf.h"
#include "../Image.h"
#include "../Snmp.h"
#include "../Macro.h"  

void create_window_root (void)
{
#ifdef         __GNOME_ENABLE
	tooltips = gtk_tooltips_new ();
#endif 
#ifndef         __MAEMO
	window_root = gtk_window_new (GTK_WINDOW_TOPLEVEL);
	window_root_icon_pixbuf = gdk_pixbuf_new_from_file (PATH_ICONE "/AutoScan.png", NULL);
	if (window_root_icon_pixbuf) {
		gtk_window_set_icon (GTK_WINDOW (window_root), window_root_icon_pixbuf);
		gdk_pixbuf_unref (window_root_icon_pixbuf);
	}
#else
	window_root = gtk_window_new_maemo ();
#endif
	gtk_widget_set_size_request (window_root, Lecture_Gconf_Int (INT_ROOT_SIZE_X), Lecture_Gconf_Int (INT_ROOT_SIZE_Y));

	gtk_window_move (GTK_WINDOW (window_root), 0,0);//Lecture_Gconf_Int (INT_ROOT_POSITION_X), Lecture_Gconf_Int (INT_ROOT_POSITION_Y));
	gtk_window_set_title (GTK_WINDOW (window_root), VERSION_AUTOSCAN);

	
	vbox_root = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox_root);
	gtk_container_add (GTK_CONTAINER (window_root), vbox_root);

	toolbar = gtk_toolbar_new ();
	gtk_widget_show (toolbar);
	gtk_box_pack_start (GTK_BOX (vbox_root), toolbar, FALSE, FALSE, 0);
   
	gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_BOTH);
	tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar));

	tmp_image = gtk_image_new_from_file (PATH_ICONE "connect_to_network.png");
	gtk_widget_show (tmp_image);
	toolbutton_Add_Network = (GtkWidget *) gtk_tool_button_new (tmp_image, "Add a network");
	gtk_widget_show (toolbutton_Add_Network);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_Add_Network);


	tmp_image = gtk_image_new_from_file (PATH_ICONE "view_tree.png");
	gtk_widget_show (tmp_image);
	toolbutton_View = (GtkWidget *) gtk_tool_button_new (tmp_image, "View");
#ifndef         __MAEMO
	gtk_widget_show (toolbutton_View);
#endif
	gtk_widget_set_sensitive (toolbutton_View, FALSE);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_View);

	tmp_image = gtk_image_new_from_file (PATH_ICONE "filesave.png");
	gtk_widget_show (tmp_image);
	toolbutton_Save = (GtkWidget *) gtk_tool_button_new (tmp_image, "Save");
	gtk_widget_show (toolbutton_Save);
	gtk_widget_set_sensitive (toolbutton_Save, FALSE);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_Save);

	tmp_image = gtk_image_new_from_file (PATH_ICONE "find.png");
	gtk_widget_show (tmp_image);
	toolbutton_Search = (GtkWidget *) gtk_tool_button_new (tmp_image, "Search");
	gtk_widget_show (toolbutton_Search);
	gtk_widget_set_sensitive (toolbutton_Search, FALSE);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_Search);

	tmp_image = gtk_image_new_from_file (PATH_ICONE "configure.png");
	gtk_widget_show (tmp_image);
	toolbutton_Settings = (GtkWidget *) gtk_tool_button_new (tmp_image, "Settings");
	gtk_widget_show (toolbutton_Settings);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_Settings);

	separatortoolitem_1 = (GtkWidget *) gtk_separator_tool_item_new ();
	gtk_widget_show (separatortoolitem_1);
	gtk_container_add (GTK_CONTAINER (toolbar), separatortoolitem_1);

	toggletoolbutton_Notification = (GtkWidget *) gtk_toggle_tool_button_new ();
	gtk_tool_button_set_label (GTK_TOOL_BUTTON (toggletoolbutton_Notification), "Notification");
	tmp_image = gtk_image_new_from_file (PATH_ICONE "Notifications.png");
	gtk_widget_show (tmp_image);
	gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (toggletoolbutton_Notification), tmp_image);
	gtk_widget_show (toggletoolbutton_Notification);
	gtk_container_add (GTK_CONTAINER (toolbar), toggletoolbutton_Notification);
	gtk_widget_set_sensitive (toggletoolbutton_Notification, FALSE);

	toggletoolbutton_Alert_Intrusion = (GtkWidget *) gtk_toggle_tool_button_new ();
	gtk_tool_button_set_label (GTK_TOOL_BUTTON (toggletoolbutton_Alert_Intrusion), "Intrusion Alert");
	tmp_image = gtk_image_new_from_file (PATH_ICONE "new_equipment.png");
	gtk_widget_show (tmp_image);
	gtk_widget_set_sensitive (toggletoolbutton_Alert_Intrusion, FALSE);
	gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (toggletoolbutton_Alert_Intrusion), tmp_image);
	gtk_widget_show (toggletoolbutton_Alert_Intrusion);
	gtk_container_add (GTK_CONTAINER (toolbar), toggletoolbutton_Alert_Intrusion);

	separatortoolitem_2 = (GtkWidget *) gtk_separator_tool_item_new ();
	gtk_widget_show (separatortoolitem_2);
	gtk_container_add (GTK_CONTAINER (toolbar), separatortoolitem_2);

	tmp_image = gtk_image_new_from_file (PATH_ICONE "help.png");
	gtk_widget_show (tmp_image);
	toolbutton_Help = (GtkWidget *) gtk_tool_button_new (tmp_image, "Help");
	gtk_widget_show (toolbutton_Help);
	gtk_widget_set_sensitive (toolbutton_Help, TRUE);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_Help);

	toolbutton_About = (GtkWidget *) gtk_tool_button_new_from_stock ("gtk-about");
	gtk_widget_show (toolbutton_About);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_About);
	
	/*tmp_image = gtk_image_new_from_file (PATH_ICONE "About.png");
	gtk_widget_show (tmp_image);
	toolbutton_About = (GtkWidget *) gtk_tool_button_new (tmp_image, "About");
	gtk_widget_show (toolbutton_About);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_About);*/
	
	separatortoolitem_3 = (GtkWidget *) gtk_separator_tool_item_new ();
	gtk_widget_show (separatortoolitem_3);
	gtk_container_add (GTK_CONTAINER (toolbar), separatortoolitem_3);

	tmp_image = gtk_image_new_from_file (PATH_ICONE "exit.png");
	gtk_widget_show (tmp_image);
	toolbutton_Exit = (GtkWidget *) gtk_tool_button_new (tmp_image, "Exit");
	gtk_widget_show (toolbutton_Exit);
	gtk_container_add (GTK_CONTAINER (toolbar), toolbutton_Exit);

	hpaned_root = gtk_hpaned_new ();
	gtk_widget_show (hpaned_root);
	gtk_box_pack_start (GTK_BOX (vbox_root), hpaned_root, TRUE, TRUE, 0);
	gtk_paned_set_position (GTK_PANED (hpaned_root), Lecture_Gconf_Int (INT_H_PANED_POSITION));

	notebook_reseau = gtk_notebook_new ();
	gtk_widget_show (notebook_reseau);
	gtk_paned_pack1 (GTK_PANED (hpaned_root), notebook_reseau, FALSE, TRUE);
	gtk_container_set_border_width (GTK_CONTAINER (notebook_reseau), 0);
	gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook_reseau), GTK_POS_LEFT);
	gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook_reseau), TRUE);

	vpaned_root = gtk_vpaned_new ();
	gtk_widget_show (vpaned_root);
	gtk_paned_pack2 (GTK_PANED (hpaned_root), vpaned_root, TRUE, TRUE);
	gtk_container_set_border_width (GTK_CONTAINER (vpaned_root), 2);
	gtk_paned_set_position (GTK_PANED (vpaned_root), Lecture_Gconf_Int (INT_V_PANED_POSITION));




  	viewport_Notebook_Info = gtk_viewport_new (NULL, NULL);
  	gtk_widget_show (viewport_Notebook_Info);
	gtk_paned_pack1 (GTK_PANED (vpaned_root), viewport_Notebook_Info, FALSE, TRUE);
	gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport_Notebook_Info), GTK_SHADOW_NONE);
  	
 	notebook_Info = gtk_notebook_new ();
  	gtk_widget_show (notebook_Info);
  	gtk_container_add (GTK_CONTAINER (viewport_Notebook_Info), notebook_Info);
  	gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook_Info), FALSE);
  	gtk_notebook_set_tab_pos (GTK_NOTEBOOK (notebook_Info), GTK_POS_BOTTOM);
	gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook_Info), FALSE);
	gtk_notebook_set_scrollable (GTK_NOTEBOOK (notebook_Info), TRUE);
	Page_Notebook_Info = 0; 
	
  	/*viewport_Treeview_Info = gtk_viewport_new (NULL, NULL);
  	gtk_widget_show (viewport_Treeview_Info);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), viewport_Treeview_Info);
	gtk_viewport_set_shadow_type (GTK_VIEWPORT (viewport_Treeview_Info), GTK_SHADOW_NONE);*/
		
	vbox_Treeview_Info = gtk_vbox_new (FALSE, 0);
  	gtk_widget_show (vbox_Treeview_Info);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), vbox_Treeview_Info);
   	
/*	image_notebook_Info = gtk_image_new_from_file (PATH_ICONE "Onglet/Info_Base.png");
  	gtk_widget_show (image_notebook_Info);
  	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 0), image_notebook_Info);
*/

 	hbox_notebook_Info = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 0), hbox_notebook_Info);


	image_notebook_Info = gtk_image_new_from_file (PATH_ICONE "Onglet/Info_Base.png");
  	gtk_widget_show (image_notebook_Info);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info), image_notebook_Info, TRUE, TRUE, 0);

  	label_notebook_Info = gtk_label_new ("Summary");
  	gtk_widget_show (label_notebook_Info);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info), label_notebook_Info, FALSE, FALSE, 0);


	/*scrolledwindow_Info_Base = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Base);
  	gtk_box_pack_start (GTK_BOX (vbox_Treeview_Info), scrolledwindow_Info_Base, FALSE, FALSE, 0);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Base), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
 	*/
	
	treeview_Info = Create_Liste (FALSE, FALSE, TRUE, TRUE, FALSE);
	gtk_widget_show (treeview_Info);
	gtk_box_pack_start (GTK_BOX (vbox_Treeview_Info), treeview_Info, FALSE, FALSE, 0);

	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info), FALSE);
  	GTK_WIDGET_UNSET_FLAGS (treeview_Info, GTK_CAN_FOCUS);


	  
	scrolledwindow_Info_Disk = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Disk);

  	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Disk), GTK_POLICY_NEVER, GTK_POLICY_NEVER);
 	gtk_box_pack_start (GTK_BOX (vbox_Treeview_Info), scrolledwindow_Info_Disk, TRUE, TRUE, 0);
	
	treeview_Info_Disk = Create_Liste_Barre ();
 	gtk_widget_show (treeview_Info_Disk);
  	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Disk), treeview_Info_Disk);

  	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Disk), FALSE);

	Icone_treeview_Info_Disk = Chargement_Image (PATH_ICONE "Disk.png", COULEUR);


	scrolledwindow_Info_Autre = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Autre);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Autre);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Autre), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
 	hbox_notebook_Info_Autre = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Autre);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 1), hbox_notebook_Info_Autre);

	image_notebook_Info_Autre = gtk_image_new_from_file (PATH_ICONE "Onglet/Info_Autre.png");
  	gtk_widget_show (image_notebook_Info_Autre);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Autre), image_notebook_Info_Autre, TRUE, TRUE, 0);

  	label_notebook_Info_Autre = gtk_label_new ("Info");
  	gtk_widget_show (label_notebook_Info_Autre);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Autre), label_notebook_Info_Autre, FALSE, FALSE, 0);

 	treeview_Info_Autre = Create_Liste (FALSE, FALSE, FALSE, TRUE, FALSE);
	gtk_widget_show (treeview_Info_Autre);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Autre), treeview_Info_Autre);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Autre), FALSE);


	scrolledwindow_Info_Snmp = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Snmp);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Snmp);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Snmp), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
  
 	hbox_notebook_Info_Snmp = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Snmp);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 2), hbox_notebook_Info_Snmp);

	image_notebook_Info_Snmp = gtk_image_new_from_file (PATH_ICONE "Onglet/Snmp.png");
  	gtk_widget_show (image_notebook_Info_Snmp);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Snmp), image_notebook_Info_Snmp, TRUE, TRUE, 0);

  	label_notebook_Info_Snmp = gtk_label_new ("Snmp");
  	gtk_widget_show (label_notebook_Info_Snmp);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Snmp), label_notebook_Info_Snmp, FALSE, FALSE, 0);

	treeview_Info_Snmp = Create_Liste (FALSE, FALSE, FALSE, TRUE, FALSE);
	gtk_widget_show (treeview_Info_Snmp);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Snmp), treeview_Info_Snmp);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Snmp), FALSE);

	scrolledwindow_Info_Software = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Software);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Software);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Software), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
  
 	hbox_notebook_Info_Software = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Software);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 3), hbox_notebook_Info_Software);

	image_notebook_Info_Software = gtk_image_new_from_file (PATH_ICONE "Onglet/Software.png");
  	gtk_widget_show (image_notebook_Info_Software);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Software), image_notebook_Info_Software, TRUE, TRUE, 0);

  	label_notebook_Info_Software = gtk_label_new ("Software");
  	gtk_widget_show (label_notebook_Info_Software);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Software), label_notebook_Info_Software, FALSE, FALSE, 0);
 	 
	treeview_Info_Software = Create_Liste_Snmp(SNMP_SOFTWARE);//Create_Liste (FALSE, FALSE, FALSE, TRUE, FALSE);
	gtk_widget_show (treeview_Info_Software);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Software), treeview_Info_Software);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Software), TRUE);


	scrolledwindow_Info_Tcp = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Tcp);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Tcp);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Tcp), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
  	hbox_notebook_Info_Tcp = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Tcp);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 4), hbox_notebook_Info_Tcp);

	image_notebook_Info_Tcp = gtk_image_new_from_file (PATH_ICONE "Onglet/Tcp.png");
  	gtk_widget_show (image_notebook_Info_Tcp);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Tcp), image_notebook_Info_Tcp, TRUE, TRUE, 0);

  	label_notebook_Info_Tcp = gtk_label_new ("TCP/IP");
  	gtk_widget_show (label_notebook_Info_Tcp);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Tcp), label_notebook_Info_Tcp, FALSE, FALSE, 0);
   	
	treeview_Info_Tcp = Create_Liste_Snmp(SNMP_NETWORK_TCPIP_TCP_CONNECTIONS);
	gtk_widget_show (treeview_Info_Tcp);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Tcp), treeview_Info_Tcp);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Tcp), TRUE);


	scrolledwindow_Info_Route = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Route);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Route);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Route), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
  	hbox_notebook_Info_Route = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Route);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 5), hbox_notebook_Info_Route);

	image_notebook_Info_Route = gtk_image_new_from_file (PATH_ICONE "Onglet/Route.png");
  	gtk_widget_show (image_notebook_Info_Route);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Route), image_notebook_Info_Route, TRUE, TRUE, 0);

  	label_notebook_Info_Route = gtk_label_new ("Route");
  	gtk_widget_show (label_notebook_Info_Route);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Route), label_notebook_Info_Route, FALSE, FALSE, 0);
   	
	treeview_Info_Route = Create_Liste_Snmp(SNMP_NETWORK_ROUTES);
	gtk_widget_show (treeview_Info_Route);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Route), treeview_Info_Route);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Route), TRUE);

	scrolledwindow_Info_Arp = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Arp);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Arp);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Arp), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
 	hbox_notebook_Info_Arp = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Arp);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 6), hbox_notebook_Info_Arp);

	image_notebook_Info_Arp = gtk_image_new_from_file (PATH_ICONE "Onglet/Arp.png");
  	gtk_widget_show (image_notebook_Info_Arp);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Arp), image_notebook_Info_Arp, TRUE, TRUE, 0);

  	label_notebook_Info_Arp = gtk_label_new ("Arp");
  	gtk_widget_show (label_notebook_Info_Arp);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Arp), label_notebook_Info_Arp, FALSE, FALSE, 0);
   	
	treeview_Info_Arp = Create_Liste_Snmp(SNMP_NETWORK_ARP);
	gtk_widget_show (treeview_Info_Arp);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Arp), treeview_Info_Arp);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Arp), TRUE);
	
	scrolledwindow_Info_Peripherique = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Peripherique);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Peripherique);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Peripherique), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
  	hbox_notebook_Info_Peripherique = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Peripherique);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 7), hbox_notebook_Info_Peripherique);

	image_notebook_Info_Peripherique = gtk_image_new_from_file (PATH_ICONE "Onglet/Peripherique.png");
  	gtk_widget_show (image_notebook_Info_Peripherique);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Peripherique), image_notebook_Info_Peripherique, TRUE, TRUE, 0);

  	label_notebook_Info_Peripherique = gtk_label_new ("Device");
  	gtk_widget_show (label_notebook_Info_Peripherique);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Peripherique), label_notebook_Info_Peripherique, FALSE, FALSE, 0);
   	
	treeview_Info_Peripherique = Create_Liste_Snmp(SNMP_SYSTEM_DEVICE);
	gtk_widget_show (treeview_Info_Peripherique);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Peripherique), treeview_Info_Peripherique);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Peripherique), TRUE);


	scrolledwindow_Info_Service = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Service);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Service);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Service), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
 	hbox_notebook_Info_Service = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Service);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 8), hbox_notebook_Info_Service);

	image_notebook_Info_Service = gtk_image_new_from_file (PATH_ICONE "Onglet/Service.png");
  	gtk_widget_show (image_notebook_Info_Service);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Service), image_notebook_Info_Service, TRUE, TRUE, 0);

  	label_notebook_Info_Service = gtk_label_new ("Service");
  	gtk_widget_show (label_notebook_Info_Service);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Service), label_notebook_Info_Service, FALSE, FALSE, 0);
  	
	treeview_Info_Service = Create_Liste_Snmp(SNMP_SYSTEM_SERVICE);
	gtk_widget_show (treeview_Info_Service);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Service), treeview_Info_Service);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Service), TRUE);

	scrolledwindow_Info_Interface = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Interface);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Interface);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Interface), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
 	hbox_notebook_Info_Interface = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Interface);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 9), hbox_notebook_Info_Interface);

	image_notebook_Info_Interface = gtk_image_new_from_file (PATH_ICONE "Onglet/Interface.png");
  	gtk_widget_show (image_notebook_Info_Interface);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Interface), image_notebook_Info_Interface, TRUE, TRUE, 0);

  	label_notebook_Info_Interface = gtk_label_new ("Interface");
  	gtk_widget_show (label_notebook_Info_Interface);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Interface), label_notebook_Info_Interface, FALSE, FALSE, 0);
	  	
	treeview_Info_Interface = Create_Liste_Snmp(SNMP_NETWORK_INTERFACES_BASIC);
	gtk_widget_show (treeview_Info_Interface);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Interface), treeview_Info_Interface);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Interface), TRUE);

	scrolledwindow_Info_Inventaire = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Inventaire);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Inventaire);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Inventaire), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
 	hbox_notebook_Info_Inventaire = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Inventaire);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 10), hbox_notebook_Info_Inventaire);

	image_notebook_Info_Inventaire = gtk_image_new_from_file (PATH_ICONE "Onglet/Inventaire.png");
  	gtk_widget_show (image_notebook_Info_Inventaire);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Inventaire), image_notebook_Info_Inventaire, TRUE, TRUE, 0);

  	label_notebook_Info_Inventaire = gtk_label_new ("Inventory");
  	gtk_widget_show (label_notebook_Info_Inventaire);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Inventaire), label_notebook_Info_Inventaire, FALSE, FALSE, 0);
  		
	treeview_Info_Inventaire = Create_Liste (FALSE, FALSE, FALSE, TRUE, FALSE);
	gtk_widget_show (treeview_Info_Inventaire);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Inventaire), treeview_Info_Inventaire);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Inventaire), FALSE);

	scrolledwindow_Info_Historique = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Historique);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Historique);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Historique), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
 	hbox_notebook_Info_Historique = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Historique);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 11), hbox_notebook_Info_Historique);

	image_notebook_Info_Historique = gtk_image_new_from_file (PATH_ICONE "Onglet/Historique.png");
  	gtk_widget_show (image_notebook_Info_Historique);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Historique), image_notebook_Info_Historique, TRUE, TRUE, 0);

  	label_notebook_Info_Historique = gtk_label_new ("History");
  	gtk_widget_show (label_notebook_Info_Historique);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Historique), label_notebook_Info_Historique, FALSE, FALSE, 0);
  	
	treeview_Info_Historique = Create_Liste (FALSE, FALSE, FALSE, TRUE, FALSE);
	gtk_widget_show (treeview_Info_Historique);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Historique), treeview_Info_Historique);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Historique), FALSE);


	scrolledwindow_Info_Nessus = gtk_scrolled_window_new (NULL, NULL);
	gtk_widget_show (scrolledwindow_Info_Nessus);
  	gtk_container_add (GTK_CONTAINER (notebook_Info), scrolledwindow_Info_Nessus);
	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow_Info_Nessus), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
 
 	hbox_notebook_Info_Nessus = gtk_hbox_new (FALSE, 0);
  	gtk_widget_show (hbox_notebook_Info_Nessus);
	gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook_Info), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook_Info), 12), hbox_notebook_Info_Nessus);

	image_notebook_Info_Nessus = gtk_image_new_from_file (PATH_ICONE "Onglet/Nessus.png");
  	gtk_widget_show (image_notebook_Info_Nessus);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Nessus), image_notebook_Info_Nessus, TRUE, TRUE, 0);

  	label_notebook_Info_Nessus = gtk_label_new ("Nessus");
  	gtk_widget_show (label_notebook_Info_Nessus);
  	gtk_box_pack_start (GTK_BOX (hbox_notebook_Info_Nessus), label_notebook_Info_Nessus, FALSE, FALSE, 0);
  	
	treeview_Info_Nessus = Create_Liste (FALSE, FALSE, FALSE, TRUE, FALSE);
	gtk_widget_show (treeview_Info_Nessus);
	gtk_container_add (GTK_CONTAINER (scrolledwindow_Info_Nessus), treeview_Info_Nessus);
	gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview_Info_Nessus), FALSE);





	vbox_Milieu = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox_Milieu);
	gtk_paned_pack2 (GTK_PANED (vpaned_root), vbox_Milieu, TRUE, TRUE);



	hbox_Milieu = gtk_hbox_new (FALSE, 0);
	gtk_widget_show (hbox_Milieu);
	gtk_box_pack_start (GTK_BOX (vbox_Milieu), hbox_Milieu, FALSE, FALSE, 0);

	combobox_liste_Modules = creation_combo (TRUE);
	gtk_box_pack_start (GTK_BOX (hbox_Milieu), combobox_liste_Modules, TRUE, TRUE, 0);
	gtk_widget_set_sensitive (combobox_liste_Modules, FALSE);

	fixed_milieu = gtk_fixed_new ();
	gtk_widget_show (fixed_milieu);
	gtk_box_pack_start (GTK_BOX (hbox_Milieu), fixed_milieu, TRUE, TRUE, 0);

	hbox_milieu = gtk_hbox_new (FALSE, 0);
	gtk_widget_show (hbox_milieu);
	gtk_box_pack_start (GTK_BOX (hbox_Milieu), hbox_milieu, FALSE, FALSE, 0);
	gtk_container_set_border_width (GTK_CONTAINER (hbox_milieu), 1);

	button_Erase = gtk_button_new ();
	gtk_widget_set_name (button_Erase, "button_Erase");
	gtk_widget_show (button_Erase);
	gtk_widget_set_sensitive (button_Erase, FALSE);
	gtk_box_pack_start (GTK_BOX (hbox_milieu), button_Erase, FALSE, FALSE, 0);
	gtk_button_set_relief (GTK_BUTTON (button_Erase), GTK_RELIEF_NONE);
	
	alignment_Erase = gtk_alignment_new (0.5, 0.5, 0, 0);
	gtk_widget_show (alignment_Erase);
	gtk_container_add (GTK_CONTAINER (button_Erase), alignment_Erase);

	hbox_Erase = gtk_hbox_new (FALSE, 2);
	gtk_widget_show (hbox_Erase);
	gtk_container_add (GTK_CONTAINER (alignment_Erase), hbox_Erase);

	image_Erase = gtk_image_new_from_file (PATH_ICONE "eraser.png");
	gtk_widget_show (image_Erase);
	gtk_box_pack_start (GTK_BOX (hbox_Erase), image_Erase, FALSE, FALSE, 0);
	
	button_Refresh = gtk_button_new ();
	gtk_widget_set_name (button_Refresh, "button_Refresh");
	gtk_widget_show (button_Refresh);
	gtk_widget_set_sensitive (button_Refresh, FALSE);
	gtk_box_pack_start (GTK_BOX (hbox_milieu), button_Refresh, FALSE, FALSE, 0);
	gtk_button_set_relief (GTK_BUTTON (button_Refresh), GTK_RELIEF_NONE);

	alignment_Refresh = gtk_alignment_new (0.5, 0.5, 0, 0);
	gtk_widget_show (alignment_Refresh);
	gtk_container_add (GTK_CONTAINER (button_Refresh), alignment_Refresh);

	hbox_Refresh = gtk_hbox_new (FALSE, 2);
	gtk_widget_show (hbox_Refresh);
	gtk_container_add (GTK_CONTAINER (alignment_Refresh), hbox_Refresh);

	image_Refresh = gtk_image_new_from_file (PATH_ICONE "reload.png");
	gtk_widget_show (image_Refresh);
	gtk_box_pack_start (GTK_BOX (hbox_Refresh), image_Refresh, FALSE, FALSE, 0);

	viewport_Modules = gtk_viewport_new (NULL, NULL);
	gtk_widget_show (viewport_Modules);
	gtk_box_pack_start (GTK_BOX (vbox_Milieu), viewport_Modules, TRUE, TRUE, 0);

	hbox_root = gtk_hbox_new (FALSE, 0);
	gtk_widget_show (hbox_root);
	gtk_box_pack_start (GTK_BOX (vbox_root), hbox_root, FALSE, FALSE, 0);

	progressbar = gtk_progress_bar_new ();
	gtk_widget_show (progressbar);
	gtk_box_pack_start (GTK_BOX (hbox_root), progressbar, FALSE, FALSE, 0);
	gtk_widget_set_size_request (progressbar, 213, 23);
	gtk_progress_bar_set_text (GTK_PROGRESS_BAR (progressbar), "Total : 0 (0/0) %100");

	vseparator_1 = gtk_vseparator_new ();
	gtk_widget_show (vseparator_1);
	gtk_box_pack_start (GTK_BOX (hbox_root), vseparator_1, FALSE, FALSE, 7);

	image_Network = gtk_image_new_from_file (PATH_ICONE "Network.png");
	gtk_widget_set_name (image_Network, "image_Network");
	gtk_widget_show (image_Network);
	gtk_box_pack_start (GTK_BOX (hbox_root), image_Network, FALSE, FALSE, 3);

	vbox_Utilisation_Reseau = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox_Utilisation_Reseau);
	gtk_box_pack_start (GTK_BOX (hbox_root), vbox_Utilisation_Reseau, FALSE, FALSE, 0);

	label_Utilisation_Reseau_Reception = gtk_label_new ("R : 0,0 Ko");
	gtk_widget_show (label_Utilisation_Reseau_Reception);
	gtk_box_pack_start (GTK_BOX (vbox_Utilisation_Reseau), label_Utilisation_Reseau_Reception, FALSE, FALSE, 0);

	label_Utilisation_Reseau_Emission = gtk_label_new ("S : 0,0 Ko");
	gtk_widget_show (label_Utilisation_Reseau_Emission);
	gtk_box_pack_start (GTK_BOX (vbox_Utilisation_Reseau), label_Utilisation_Reseau_Emission, FALSE, FALSE, 0);

	vseparator_2 = gtk_vseparator_new ();
	gtk_widget_show (vseparator_2);
	gtk_box_pack_start (GTK_BOX (hbox_root), vseparator_2, FALSE, FALSE, 7);

	image_Inter_AutoScan = gtk_image_new_from_file (PATH_ICONE "Inter-AutoScan.png");
	gtk_widget_show (image_Inter_AutoScan);
	gtk_box_pack_start (GTK_BOX (hbox_root), image_Inter_AutoScan, FALSE, FALSE, 0);

	vbox_Inter_AutoScan = gtk_vbox_new (FALSE, 0);
	gtk_widget_show (vbox_Inter_AutoScan);
	gtk_box_pack_start (GTK_BOX (hbox_root), vbox_Inter_AutoScan, FALSE, FALSE, 6);

	label_Inter_AutoScan_Reception = gtk_label_new ("R : 0,0 Ko");
	gtk_widget_show (label_Inter_AutoScan_Reception);
	gtk_box_pack_start (GTK_BOX (vbox_Inter_AutoScan), label_Inter_AutoScan_Reception, FALSE, FALSE, 0);

	label_Inter_AutoScan_Emission = gtk_label_new ("S : 0,0 ko");
	gtk_widget_show (label_Inter_AutoScan_Emission);
	gtk_box_pack_start (GTK_BOX (vbox_Inter_AutoScan), label_Inter_AutoScan_Emission, FALSE, FALSE, 0);

	vseparator_4 = gtk_vseparator_new ();
	gtk_widget_show (vseparator_4);
	gtk_box_pack_start (GTK_BOX (hbox_root), vseparator_4, FALSE, FALSE, 7);


	button_Message_Root = gtk_button_new ();
  	gtk_box_pack_start (GTK_BOX (hbox_root), button_Message_Root, FALSE, FALSE, 0);

  	image_Message_Root = gtk_image_new_from_file (PATH_ICONE "reload_new_version.png");
  	gtk_widget_show (image_Message_Root);
  	gtk_container_add (GTK_CONTAINER (button_Message_Root), image_Message_Root);

  	label_Message_Root = gtk_label_new ("A new update is available");
  	gtk_box_pack_start (GTK_BOX (hbox_root), label_Message_Root, FALSE, FALSE, 4);


#ifdef  __GNOME_ENABLE
	href_Site_Web = gnome_href_new ("http://autoscan.fr", "http://autoscan.fr");
	gtk_widget_set_name (href_Site_Web, "href_Site_Web");
	gtk_widget_show (href_Site_Web);
	gtk_box_pack_end (GTK_BOX (hbox_root), href_Site_Web, FALSE, FALSE, 0);
#else

#endif

	fixed_bas = gtk_fixed_new ();
	gtk_widget_show (fixed_bas);
	gtk_box_pack_start (GTK_BOX (hbox_root), fixed_bas, TRUE, TRUE, 0);

	g_signal_connect ((gpointer) window_root, "delete_event", G_CALLBACK (on_window_root_delete_event), NULL);
	g_signal_connect ((gpointer) toolbutton_Add_Network, "clicked", G_CALLBACK (on_toolbutton_Add_Network_clicked), NULL);
	g_signal_connect ((gpointer) toolbutton_View, "clicked", G_CALLBACK (on_toolbutton_View), NULL);
	g_signal_connect ((gpointer) toolbutton_Save, "clicked", G_CALLBACK (on_toolbutton_Save_clicked), NULL);
	g_signal_connect ((gpointer) toolbutton_Search, "clicked", G_CALLBACK (on_toolbutton_Search_clicked), NULL);
	g_signal_connect ((gpointer) toolbutton_Settings, "clicked", G_CALLBACK (on_toolbutton_Settings_clicked), NULL);
	g_signal_connect ((gpointer) toggletoolbutton_Notification, "clicked", G_CALLBACK (on_toggletoolbutton_Notification_clicked), NULL);
	g_signal_connect ((gpointer) toggletoolbutton_Alert_Intrusion, "toggled", G_CALLBACK (on_toggletoolbutton_Alert_Intrusion_toggled), NULL);
	g_signal_connect ((gpointer) toolbutton_Help, "clicked", G_CALLBACK (on_toolbutton_Help_clicked), NULL);
	g_signal_connect ((gpointer) toolbutton_About, "clicked", G_CALLBACK (on_toolbutton_About_clicked), NULL);
	g_signal_connect ((gpointer) toolbutton_Exit, "clicked", G_CALLBACK (on_toolbutton_Exit_clicked), NULL);
	g_signal_connect ((gpointer) notebook_reseau, "switch_page", G_CALLBACK (on_notebook_reseau_switch_page), NULL);
	g_signal_connect ((gpointer) notebook_Info, "switch_page", G_CALLBACK (on_notebook_Info_switch_page), NULL);
	g_signal_connect ((gpointer) button_Erase, "clicked", G_CALLBACK (on_button_Erase_clicked), NULL);
	g_signal_connect ((gpointer) button_Refresh, "clicked", G_CALLBACK (on_button_Rafraichir_clicked), NULL);
    g_signal_connect ((gpointer) button_Message_Root, "clicked",G_CALLBACK (on_button_Message_Root_clicked), NULL);
#ifdef   __MAEMO
	g_signal_connect(G_OBJECT(window_root), "key_press_event", G_CALLBACK(key_press_maemo),window_root);
#endif
	Modification_Toggle_En_Cours = FALSE;
	gtk_widget_hide (vbox_Milieu);
}
