/*
 * <insert one-line description of what the program does>
 * Copyright (c) <2008-2009>, Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 2.1, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 * more details.
 *
 * You should have received a copy of the GNU Lesser General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc., 
 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */
/*
 * DO NOT EDIT THIS FILE - it is generated by Glade.
 */

#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>

#include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>

#include "GUI/callbacks.h"
#include "GUI/interface.h"
#include "GUI/support.h"

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)

#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
  g_object_set_data (G_OBJECT (component), name, widget)

GtkWidget*
create_AgentWindow (void)
{
  GtkWidget *AgentWindow;
  GdkPixbuf *AgentWindow_icon_pixbuf;
  GtkWidget *fixed1;
  GtkWidget *notebook1;
  GtkWidget *fixed2;
  GtkWidget *frame1;
  GtkWidget *alignment3;
  GtkWidget *hbox1;
  GtkWidget *label5;
  GtkWidget *entryServer;
  GtkWidget *label4;
  GtkWidget *frame2;
  GtkWidget *alignment4;
  GtkWidget *vbox1;
  GtkWidget *hbox5;
  GtkWidget *checkbutton1;
  GtkWidget *hbox2;
  GtkWidget *label7;
  GtkWidget *entryProxy;
  GtkWidget *hbox3;
  GtkWidget *label8;
  GtkWidget *entryName;
  GtkWidget *hbox4;
  GtkWidget *label9;
  GtkWidget *entryPwd;
  GtkWidget *label6;
  GtkWidget *label67;
  GtkWidget *empty_notebook_page;
  GtkWidget *label68;
  GtkWidget *btnCancel;
  GtkWidget *btnApply;
  GtkWidget *btnOK;
  GtkWidget *vboxtemp;

  AgentWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (AgentWindow), _("Theft Deterrent Management Console"));
  gtk_window_set_position (GTK_WINDOW (AgentWindow), GTK_WIN_POS_CENTER_ALWAYS);
  AgentWindow_icon_pixbuf = create_pixbuf ("logo32.png");
  if (AgentWindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (AgentWindow), AgentWindow_icon_pixbuf);
      gdk_pixbuf_unref (AgentWindow_icon_pixbuf);
    }

  fixed1 = gtk_fixed_new ();
  gtk_widget_show (fixed1);
  gtk_container_add (GTK_CONTAINER (AgentWindow), fixed1);
  gtk_widget_set_size_request (fixed1, 500, 300);

  notebook1 = gtk_notebook_new ();
  gtk_widget_show (notebook1);
  gtk_fixed_put (GTK_FIXED (fixed1), notebook1, 0, 0);
  gtk_widget_set_size_request (notebook1, 485, 200);
  GTK_WIDGET_UNSET_FLAGS (notebook1, GTK_CAN_FOCUS);
  gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook1), FALSE);
  gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook1), FALSE);

  fixed2 = gtk_fixed_new ();
  gtk_widget_show (fixed2);
  gtk_container_add (GTK_CONTAINER (notebook1), fixed2);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_fixed_put (GTK_FIXED (fixed2), frame1, 10, 10);
  gtk_widget_set_size_request (frame1, 517, 67);

  alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment3);
  gtk_container_add (GTK_CONTAINER (frame1), alignment3);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment3), 0, 2, 4, 0);

  hbox1 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox1);
  gtk_container_add (GTK_CONTAINER (alignment3), hbox1);

  label5 = gtk_label_new (_("Theft Deterrent Server Address:"));
  gtk_widget_show (label5);
  gtk_box_pack_start (GTK_BOX (hbox1), label5, TRUE, FALSE, 0);
  gtk_widget_set_size_request (label5, 245, -1);
  gtk_label_set_line_wrap (GTK_LABEL (label5), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label5), 0, 0.5);

  entryServer = gtk_entry_new ();
  gtk_widget_show (entryServer);
  gtk_box_pack_start (GTK_BOX (hbox1), entryServer, TRUE, FALSE, 0);
  gtk_widget_set_size_request (entryServer, 180, -1);

  label4 = gtk_label_new (_("<span foreground=\"#03F\">Server Info</span>"));
  gtk_widget_show (label4);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label4);
  gtk_label_set_use_markup (GTK_LABEL (label4), TRUE);

  frame2 = gtk_frame_new (NULL);
  gtk_widget_show (frame2);
  gtk_fixed_put (GTK_FIXED (fixed2), frame2, 10, 90);
  gtk_widget_set_size_request (frame2, 517, 160);

  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment4);
  gtk_container_add (GTK_CONTAINER (frame2), alignment4);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 4, 0);

  vbox1 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (alignment4), vbox1);

  hbox5 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_size_request(hbox5,235,20);
  gtk_widget_show (hbox5);
  vboxtemp = gtk_vbox_new(FALSE,0);
  gtk_widget_set_size_request(vboxtemp,235,35);
  gtk_widget_show(vboxtemp);
  gtk_box_pack_start(GTK_BOX(vboxtemp),hbox5,FALSE,FALSE,0);
  gtk_box_pack_start (GTK_BOX (vbox1), vboxtemp, TRUE, TRUE, 0);//hbox5

  checkbutton1 = gtk_check_button_new_with_mnemonic (_("Enable Proxy Server"));
  gtk_widget_set_size_request(checkbutton1,235,16);
  gtk_widget_show (checkbutton1);
  gtk_box_pack_start (GTK_BOX (hbox5), checkbutton1, FALSE, FALSE, 0);

  hbox2 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox2);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox2, TRUE, TRUE, 0);

  label7 = gtk_label_new (_("Proxy Server:"));
  gtk_widget_show (label7);
  gtk_box_pack_start (GTK_BOX (hbox2), label7, TRUE, FALSE, 0);
  gtk_widget_set_size_request (label7, 235, -1);
  gtk_label_set_line_wrap (GTK_LABEL (label7), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label7), 0, 0.5);

  entryProxy = gtk_entry_new ();
  gtk_widget_show (entryProxy);
  gtk_box_pack_start (GTK_BOX (hbox2), entryProxy, TRUE, FALSE, 0);
  gtk_widget_set_size_request (entryProxy, 180, -1);

  hbox3 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox3, TRUE, TRUE, 0);

  label8 = gtk_label_new (_("Proxy User name:"));
  gtk_widget_show (label8);
  gtk_box_pack_start (GTK_BOX (hbox3), label8, TRUE, FALSE, 0);
  gtk_widget_set_size_request (label8, 235, -1);
  gtk_label_set_line_wrap (GTK_LABEL (label8), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label8), 0, 0.5);

  entryName = gtk_entry_new ();
  gtk_widget_show (entryName);
  gtk_box_pack_start (GTK_BOX (hbox3), entryName, TRUE, FALSE, 0);
  gtk_widget_set_size_request (entryName, 180, -1);

  hbox4 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox4);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox4, TRUE, TRUE, 0);

  label9 = gtk_label_new (_("Proxy Password:"));
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox4), label9, TRUE, FALSE, 0);
  gtk_widget_set_size_request (label9, 235, -1);
  gtk_label_set_line_wrap (GTK_LABEL (label9), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);

  entryPwd = gtk_entry_new ();
  gtk_widget_show (entryPwd);
  gtk_box_pack_start (GTK_BOX (hbox4), entryPwd, TRUE, FALSE, 0);
  gtk_widget_set_size_request (entryPwd, 180, -1);
  gtk_entry_set_visibility (GTK_ENTRY (entryPwd), FALSE);

  label6 = gtk_label_new (_("<span foreground=\"#03F\">Proxy Server Info</span>"));
  gtk_widget_show (label6);
  gtk_frame_set_label_widget (GTK_FRAME (frame2), label6);
  gtk_label_set_use_markup (GTK_LABEL (label6), TRUE);

  label67 = gtk_label_new ("");
  gtk_widget_show (label67);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label67);

  empty_notebook_page = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (empty_notebook_page);
  gtk_container_add (GTK_CONTAINER (notebook1), empty_notebook_page);

  label68 = gtk_label_new ("");
  gtk_widget_show (label68);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label68);

  btnCancel = gtk_button_new_with_mnemonic ("Cancel");
  gtk_widget_show (btnCancel);
  gtk_fixed_put (GTK_FIXED (fixed1), btnCancel, 256, 266);
  gtk_widget_set_size_request (btnCancel, 80, 27);

  btnApply = gtk_button_new_with_mnemonic ("Apply");
  gtk_widget_show (btnApply);
  gtk_fixed_put (GTK_FIXED (fixed1), btnApply, 352, 266);
  gtk_widget_set_size_request (btnApply, 80, 27);

  btnOK = gtk_button_new_with_mnemonic ("OK");
  gtk_widget_show (btnOK);
  gtk_fixed_put (GTK_FIXED (fixed1), btnOK, 160, 266);
  gtk_widget_set_size_request (btnOK, 80, 27);

  g_signal_connect ((gpointer) AgentWindow, "delete_event",
                    G_CALLBACK (on_AgentWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) AgentWindow, "destroy_event",
                    G_CALLBACK (on_AgentWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) AgentWindow, "map_event",
                    G_CALLBACK (on_AgentWindow_map),
                    NULL);
  g_signal_connect ((gpointer) AgentWindow, "unmap_event",
                    G_CALLBACK (on_AgentWindow_unmap_event),
                    NULL);
/*  g_signal_connect ((gpointer) notebook1, "switch_page",
                    G_CALLBACK (on_notebook1_switch_page),
                    NULL);
  g_signal_connect ((gpointer) notebook1, "change_current_page",
                    G_CALLBACK (on_notebook1_change_current_page),
                    NULL);
  g_signal_connect ((gpointer) notebook1, "select_page",
                    G_CALLBACK (on_notebook1_select_page),
                    NULL);
 */ g_signal_connect ((gpointer) entryServer, "changed",
                    G_CALLBACK (on_entryServer_changed),
                    NULL);
  g_signal_connect ((gpointer) checkbutton1, "clicked",
                    G_CALLBACK (on_checkbutton1_clicked),
                    NULL);
  g_signal_connect ((gpointer) entryProxy, "changed",
                    G_CALLBACK (on_entryProxy_changed),
                    NULL);
  g_signal_connect ((gpointer) entryName, "changed",
                    G_CALLBACK (on_entryName_changed),
                    NULL);
  g_signal_connect ((gpointer) entryPwd, "changed",
                    G_CALLBACK (on_entryPwd_changed),
                    NULL);
  g_signal_connect ((gpointer) btnCancel, "clicked",
                    G_CALLBACK (on_btnCancel_clicked),
                    NULL);
  g_signal_connect ((gpointer) btnApply, "clicked",
                    G_CALLBACK (on_btnApply_clicked),
                    NULL);
  g_signal_connect ((gpointer) btnOK, "clicked",
                    G_CALLBACK (on_btnOK_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (AgentWindow, AgentWindow, "AgentWindow");
  GLADE_HOOKUP_OBJECT (AgentWindow, fixed1, "fixed1");
  GLADE_HOOKUP_OBJECT (AgentWindow, notebook1, "notebook1");
  GLADE_HOOKUP_OBJECT (AgentWindow, fixed2, "fixed2");
  GLADE_HOOKUP_OBJECT (AgentWindow, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (AgentWindow, alignment3, "alignment3");
  GLADE_HOOKUP_OBJECT (AgentWindow, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (AgentWindow, label5, "label5");
  GLADE_HOOKUP_OBJECT (AgentWindow, entryServer, "entryServer");
  GLADE_HOOKUP_OBJECT (AgentWindow, label4, "label4");
  GLADE_HOOKUP_OBJECT (AgentWindow, frame2, "frame2");
  GLADE_HOOKUP_OBJECT (AgentWindow, alignment4, "alignment4");
  GLADE_HOOKUP_OBJECT (AgentWindow, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (AgentWindow, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (AgentWindow, checkbutton1, "checkbutton1");
  GLADE_HOOKUP_OBJECT (AgentWindow, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (AgentWindow, label7, "label7");
  GLADE_HOOKUP_OBJECT (AgentWindow, entryProxy, "entryProxy");
  GLADE_HOOKUP_OBJECT (AgentWindow, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (AgentWindow, label8, "label8");
  GLADE_HOOKUP_OBJECT (AgentWindow, entryName, "entryName");
  GLADE_HOOKUP_OBJECT (AgentWindow, hbox4, "hbox4");
  GLADE_HOOKUP_OBJECT (AgentWindow, label9, "label9");
  GLADE_HOOKUP_OBJECT (AgentWindow, entryPwd, "entryPwd");
  GLADE_HOOKUP_OBJECT (AgentWindow, label6, "label6");
  GLADE_HOOKUP_OBJECT (AgentWindow, label67, "label67");
  GLADE_HOOKUP_OBJECT (AgentWindow, label68, "label68");
  GLADE_HOOKUP_OBJECT (AgentWindow, btnCancel, "btnCancel");
  GLADE_HOOKUP_OBJECT (AgentWindow, btnApply, "btnApply");
  GLADE_HOOKUP_OBJECT (AgentWindow, btnOK, "btnOK");

  return AgentWindow;
}
/*
GtkWidget*
create_WarningWindow (void)
{
  GtkWidget *WarningWindow;
  GdkPixbuf *WarningWindow_icon_pixbuf;
  GtkWidget *vbox6;
  GtkWidget *frame8;
  GtkWidget *alignment11;
  GtkWidget *vbox8;
  GtkWidget *hbox23;
  GtkWidget *label49;
  GtkWidget *labelDays;
  GtkWidget *label50;
  GtkWidget *hbox24;
  GtkWidget *label57;
  GtkWidget *labelTimes;
  GtkWidget *label55;
  GtkWidget *label59;
  GtkWidget *vbox7;
  GtkWidget *hbox21;
  GtkWidget *label58;
  GtkWidget *label60;
  GtkWidget *fixed5;
  GtkWidget *btnWarningOK;

  WarningWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (WarningWindow), _("Warning"));
  gtk_window_set_position (GTK_WINDOW (WarningWindow), GTK_WIN_POS_CENTER_ON_PARENT);
  WarningWindow_icon_pixbuf = create_pixbuf ("warning.png");
  if (WarningWindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (WarningWindow), WarningWindow_icon_pixbuf);
      gdk_pixbuf_unref (WarningWindow_icon_pixbuf);
    }

  vbox6 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox6);
  gtk_container_add (GTK_CONTAINER (WarningWindow), vbox6);
  gtk_container_set_border_width (GTK_CONTAINER (vbox6), 8);

  frame8 = gtk_frame_new (NULL);
  gtk_widget_show (frame8);
  gtk_box_pack_start (GTK_BOX (vbox6), frame8, TRUE, TRUE, 0);

  alignment11 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment11);
  gtk_container_add (GTK_CONTAINER (frame8), alignment11);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment11), 0, 0, 12, 0);

  vbox8 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox8);
  gtk_container_add (GTK_CONTAINER (alignment11), vbox8);

  hbox23 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox23);
  gtk_box_pack_start (GTK_BOX (vbox8), hbox23, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox23), 10);

  label49 = gtk_label_new (_("Certificate will expire in "));
  gtk_widget_show (label49);
  gtk_box_pack_start (GTK_BOX (hbox23), label49, FALSE, FALSE, 0);

  labelDays = gtk_label_new (_("100"));
  gtk_widget_show (labelDays);
  gtk_box_pack_start (GTK_BOX (hbox23), labelDays, FALSE, FALSE, 0);
  gtk_misc_set_padding (GTK_MISC (labelDays), 10, 0);

  label50 = gtk_label_new (_("day(s)."));
  gtk_widget_show (label50);
  gtk_box_pack_start (GTK_BOX (hbox23), label50, FALSE, FALSE, 0);

  hbox24 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox24);
  gtk_box_pack_start (GTK_BOX (vbox8), hbox24, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox24), 10);

  label57 = gtk_label_new (_("Certificate will expire in "));
  gtk_widget_show (label57);
  gtk_box_pack_start (GTK_BOX (hbox24), label57, FALSE, FALSE, 0);

  labelTimes = gtk_label_new (_("100"));
  gtk_widget_show (labelTimes);
  gtk_box_pack_start (GTK_BOX (hbox24), labelTimes, FALSE, FALSE, 0);
  gtk_misc_set_padding (GTK_MISC (labelTimes), 10, 0);

  label55 = gtk_label_new (_("operating system boot(s)."));
  gtk_widget_show (label55);
  gtk_box_pack_start (GTK_BOX (hbox24), label55, FALSE, FALSE, 0);

  label59 = gtk_label_new (_("<span foreground=\"#03F\">Prompt</span>"));
  gtk_widget_show (label59);
  gtk_frame_set_label_widget (GTK_FRAME (frame8), label59);
  gtk_label_set_use_markup (GTK_LABEL (label59), TRUE);

  vbox7 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox7);
  gtk_box_pack_start (GTK_BOX (vbox6), vbox7, TRUE, TRUE, 0);

  hbox21 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox21);
  gtk_box_pack_start (GTK_BOX (vbox7), hbox21, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox21), 10);

  label58 = gtk_label_new (_("Warning:"));
  gtk_widget_show (label58);
  gtk_box_pack_start (GTK_BOX (hbox21), label58, FALSE, FALSE, 5);

  label60 = gtk_label_new (_("To avoid usage interruption, please connect your device to the network and download a boot certificate from the theft deterrent certificate server."));
  gtk_widget_show (label60);
  gtk_box_pack_start (GTK_BOX (hbox21), label60, FALSE, FALSE, 0);
  gtk_label_set_line_wrap (GTK_LABEL (label60), TRUE);

  fixed5 = gtk_fixed_new ();
  gtk_widget_show (fixed5);
  gtk_box_pack_start (GTK_BOX (vbox7), fixed5, FALSE, FALSE, 0);

  btnWarningOK = gtk_button_new_with_mnemonic (_("OK"));
  gtk_widget_show (btnWarningOK);
  gtk_fixed_put (GTK_FIXED (fixed5), btnWarningOK, 328, 0);
  gtk_widget_set_size_request (btnWarningOK, 60, 27);

  g_signal_connect ((gpointer) WarningWindow, "delete_event",
                    G_CALLBACK (on_WarningWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) WarningWindow, "destroy_event",
                    G_CALLBACK (on_WarningWindow_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) WarningWindow, "unmap_event",
                    G_CALLBACK (on_WarningWindow_unmap_event),
                    NULL);
  g_signal_connect ((gpointer) WarningWindow, "map_event",
                    G_CALLBACK (on_WarningWindow_map_event),
                    NULL);
  g_signal_connect ((gpointer) btnWarningOK, "clicked",
                    G_CALLBACK (on_btnWarningOK_clicked),
                    NULL);

  // Store pointers to all widgets, for use by lookup_widget(). 
  GLADE_HOOKUP_OBJECT_NO_REF (WarningWindow, WarningWindow, "WarningWindow");
  GLADE_HOOKUP_OBJECT (WarningWindow, vbox6, "vbox6");
  GLADE_HOOKUP_OBJECT (WarningWindow, frame8, "frame8");
  GLADE_HOOKUP_OBJECT (WarningWindow, alignment11, "alignment11");
  GLADE_HOOKUP_OBJECT (WarningWindow, vbox8, "vbox8");
  GLADE_HOOKUP_OBJECT (WarningWindow, hbox23, "hbox23");
  GLADE_HOOKUP_OBJECT (WarningWindow, label49, "label49");
  GLADE_HOOKUP_OBJECT (WarningWindow, labelDays, "labelDays");
  GLADE_HOOKUP_OBJECT (WarningWindow, label50, "label50");
  GLADE_HOOKUP_OBJECT (WarningWindow, hbox24, "hbox24");
  GLADE_HOOKUP_OBJECT (WarningWindow, label57, "label57");
  GLADE_HOOKUP_OBJECT (WarningWindow, labelTimes, "labelTimes");
  GLADE_HOOKUP_OBJECT (WarningWindow, label55, "label55");
  GLADE_HOOKUP_OBJECT (WarningWindow, label59, "label59");
  GLADE_HOOKUP_OBJECT (WarningWindow, vbox7, "vbox7");
  GLADE_HOOKUP_OBJECT (WarningWindow, hbox21, "hbox21");
  GLADE_HOOKUP_OBJECT (WarningWindow, label58, "label58");
  GLADE_HOOKUP_OBJECT (WarningWindow, label60, "label60");
  GLADE_HOOKUP_OBJECT (WarningWindow, fixed5, "fixed5");
  GLADE_HOOKUP_OBJECT (WarningWindow, btnWarningOK, "btnWarningOK");

  return WarningWindow;
}

GtkWidget*
create_DownloadWindow (void)
{
  GtkWidget *DownloadWindow;
  GdkPixbuf *DownloadWindow_icon_pixbuf;
  GtkWidget *vbox9;
  GtkWidget *label62;
  GtkWidget *progressbar1;

  DownloadWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (DownloadWindow), _("Downloading"));
  gtk_window_set_position (GTK_WINDOW (DownloadWindow), GTK_WIN_POS_CENTER_ON_PARENT);
  gtk_window_set_modal (GTK_WINDOW (DownloadWindow), TRUE);
  gtk_window_set_resizable (GTK_WINDOW (DownloadWindow), FALSE);
  gtk_window_set_destroy_with_parent (GTK_WINDOW (DownloadWindow), TRUE);
  DownloadWindow_icon_pixbuf = create_pixbuf ("downloading.png");
  if (DownloadWindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (DownloadWindow), DownloadWindow_icon_pixbuf);
      gdk_pixbuf_unref (DownloadWindow_icon_pixbuf);
    }

  vbox9 = gtk_vbox_new (TRUE, 0);
  gtk_widget_show (vbox9);
  gtk_container_add (GTK_CONTAINER (DownloadWindow), vbox9);
  gtk_widget_set_size_request (vbox9, 350, 57);
  gtk_container_set_border_width (GTK_CONTAINER (vbox9), 3);

  label62 = gtk_label_new (_("Downloading..."));
  gtk_widget_show (label62);
  gtk_box_pack_start (GTK_BOX (vbox9), label62, FALSE, FALSE, 10);
  gtk_misc_set_alignment (GTK_MISC (label62), 0, 0.5);

  progressbar1 = gtk_progress_bar_new ();
  gtk_widget_show (progressbar1);
  gtk_box_pack_start (GTK_BOX (vbox9), progressbar1, FALSE, FALSE, 0);

  g_signal_connect ((gpointer) DownloadWindow, "destroy_event",
                    G_CALLBACK (on_DownloadWindow_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) DownloadWindow, "delete_event",
                    G_CALLBACK (on_DownloadWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) DownloadWindow, "map_event",
                    G_CALLBACK (on_DownloadWindow_map_event),
                    NULL);
  g_signal_connect ((gpointer) DownloadWindow, "unmap_event",
                    G_CALLBACK (on_DownloadWindow_unmap_event),
                    NULL);

  // Store pointers to all widgets, for use by lookup_widget(). 
  GLADE_HOOKUP_OBJECT_NO_REF (DownloadWindow, DownloadWindow, "DownloadWindow");
  GLADE_HOOKUP_OBJECT (DownloadWindow, vbox9, "vbox9");
  GLADE_HOOKUP_OBJECT (DownloadWindow, label62, "label62");
  GLADE_HOOKUP_OBJECT (DownloadWindow, progressbar1, "progressbar1");

  return DownloadWindow;
}
*/
GtkWidget*
create_RebootWindow (void)
{
  GtkWidget *RebootWindow;
  GdkPixbuf *RebootWindow_icon_pixbuf;
  GtkWidget *vbox10;
  GtkWidget *frame9;
  GtkWidget *alignment12;
  GtkWidget *vbox11;
  GtkWidget *label64;
  GtkWidget *hbox25;
  GtkWidget *label65;
  GtkWidget *labelRemainSeconds;
  GtkWidget *label66;
  GtkWidget *btnReboot;
  GtkWidget *label63;

  RebootWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (RebootWindow), _("Rebooting"));
  gtk_window_set_position (GTK_WINDOW (RebootWindow), GTK_WIN_POS_CENTER_ON_PARENT);
  RebootWindow_icon_pixbuf = create_pixbuf ("logo32.png");
  if (RebootWindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (RebootWindow), RebootWindow_icon_pixbuf);
      gdk_pixbuf_unref (RebootWindow_icon_pixbuf);
    }

  vbox10 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox10);
  gtk_container_add (GTK_CONTAINER (RebootWindow), vbox10);

  frame9 = gtk_frame_new (NULL);
  gtk_widget_show (frame9);
  gtk_box_pack_start (GTK_BOX (vbox10), frame9, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (frame9), 10);

  alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment12);
  gtk_container_add (GTK_CONTAINER (frame9), alignment12);
  gtk_container_set_border_width (GTK_CONTAINER (alignment12), 5);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 5, 5, 12, 0);

  vbox11 = gtk_vbox_new (FALSE, 10);
  gtk_widget_show (vbox11);
  gtk_container_add (GTK_CONTAINER (alignment12), vbox11);

  label64 = gtk_label_new (_("This system is shutting down. Windows must now restart because this machine needs to be reprovisioned immediately.Please save all work in progress."));
  gtk_widget_show (label64);
  gtk_box_pack_start (GTK_BOX (vbox11), label64, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label64), TRUE);
  gtk_label_set_line_wrap (GTK_LABEL (label64), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label64), 0, 0.5);

  hbox25 = gtk_hbox_new (TRUE, 0);
  gtk_widget_show (hbox25);
  gtk_box_pack_start (GTK_BOX (vbox11), hbox25, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (hbox25), 5);

  label65 = gtk_label_new (_("Remain"));
  gtk_widget_show (label65);
  gtk_box_pack_start (GTK_BOX (hbox25), label65, FALSE, FALSE, 0);

  labelRemainSeconds = gtk_label_new (_("60"));
  gtk_widget_show (labelRemainSeconds);
  gtk_box_pack_start (GTK_BOX (hbox25), labelRemainSeconds, FALSE, FALSE, 0);

  label66 = gtk_label_new (_("seconds"));
  gtk_widget_show (label66);
  gtk_box_pack_start (GTK_BOX (hbox25), label66, FALSE, FALSE, 0);

  btnReboot = gtk_button_new_with_mnemonic (_("Reboot Now!"));
  gtk_widget_show (btnReboot);
  gtk_box_pack_start (GTK_BOX (hbox25), btnReboot, FALSE, FALSE, 0);

  label63 = gtk_label_new (_("<span foreground=\"#03F\">Prompt</span>"));
  gtk_widget_show (label63);
  gtk_frame_set_label_widget (GTK_FRAME (frame9), label63);
  gtk_label_set_use_markup (GTK_LABEL (label63), TRUE);

  g_signal_connect ((gpointer) RebootWindow, "delete_event",
                    G_CALLBACK (on_RebootWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) RebootWindow, "destroy_event",
                    G_CALLBACK (on_RebootWindow_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) RebootWindow, "map_event",
                    G_CALLBACK (on_RebootWindow_map_event),
                    NULL);
  g_signal_connect ((gpointer) RebootWindow, "unmap_event",
                    G_CALLBACK (on_RebootWindow_unmap_event),
                    NULL);
  g_signal_connect ((gpointer) btnReboot, "clicked",
                    G_CALLBACK (on_btnReboot_clicked),
                    NULL);
  gtk_window_set_keep_above (GTK_WINDOW (RebootWindow), TRUE); //modify:zhangxian Date:2008-12-29
  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (RebootWindow, RebootWindow, "RebootWindow");
  GLADE_HOOKUP_OBJECT (RebootWindow, vbox10, "vbox10");
  GLADE_HOOKUP_OBJECT (RebootWindow, frame9, "frame9");
  GLADE_HOOKUP_OBJECT (RebootWindow, alignment12, "alignment12");
  GLADE_HOOKUP_OBJECT (RebootWindow, vbox11, "vbox11");
  GLADE_HOOKUP_OBJECT (RebootWindow, label64, "label64");
  GLADE_HOOKUP_OBJECT (RebootWindow, hbox25, "hbox25");
  GLADE_HOOKUP_OBJECT (RebootWindow, label65, "label65");
  GLADE_HOOKUP_OBJECT (RebootWindow, labelRemainSeconds, "labelRemainSeconds");
  GLADE_HOOKUP_OBJECT (RebootWindow, label66, "label66");
  GLADE_HOOKUP_OBJECT (RebootWindow, btnReboot, "btnReboot");
  GLADE_HOOKUP_OBJECT (RebootWindow, label63, "label63");

  return RebootWindow;
}

GtkWidget*
create_AboutWindow (void)
{
  GtkWidget *AboutWindow;
  GtkWidget *fixed6;
  GtkWidget *label70;
  GtkWidget *label72;
  GtkWidget *image1;
  GtkWidget *image2;
  GtkWidget *AboutButton;
  GdkPixbuf *AboutWindow_icon_pixbuf;

  AboutWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (AboutWindow), _("About Theft Deterrent Agent"));
  gtk_window_set_position (GTK_WINDOW (AboutWindow), GTK_WIN_POS_CENTER);

  AboutWindow_icon_pixbuf = create_pixbuf ("logo32.png");
  if (AboutWindow_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (AboutWindow), AboutWindow_icon_pixbuf);
      gdk_pixbuf_unref (AboutWindow_icon_pixbuf);
    }

  fixed6 = gtk_fixed_new ();
  gtk_widget_show (fixed6);
  gtk_container_add (GTK_CONTAINER (AboutWindow), fixed6);
  gtk_widget_set_size_request (fixed6, 350, 230);

  label70 = gtk_label_new (_("Theft Deterrent Agent\nVersion 2.0.0\n\n\nCopyright(c) 2007 Intel Corporaion.\nAll rights reserved."));
  gtk_widget_show (label70);
  gtk_fixed_put (GTK_FIXED (fixed6), label70, 83, 67);
  gtk_widget_set_size_request (label70, 300, 85);
  gtk_label_set_line_wrap (GTK_LABEL (label70), TRUE);

  /*label72 = gtk_label_new (_("<span weight=\"bold\">Intel Powered classmate PC</span>"));
  gtk_widget_show (label72);
  gtk_fixed_put (GTK_FIXED (fixed6), label72, 62, 14);
  gtk_widget_set_size_request (label72, 121, 16);
  gtk_label_set_use_markup (GTK_LABEL (label72), TRUE);*/

  image1 = create_pixmap (AboutWindow, "TheftDeterrent.png");
  gtk_widget_show (image1);
  gtk_fixed_put (GTK_FIXED (fixed6), image1, 27, 65);
  gtk_widget_set_size_request (image1, 40, 40);

   image2 = create_pixmap (AboutWindow, "AboutBanner.bmp");
  gtk_widget_show (image2);
  gtk_fixed_put (GTK_FIXED (fixed6), image2, 0, 0);
  gtk_widget_set_size_request (image2, 350, 50);


  AboutButton = gtk_button_new_with_mnemonic ("OK");
  gtk_widget_show (AboutButton);
  gtk_fixed_put (GTK_FIXED (fixed6), AboutButton, 252, 196);
  gtk_widget_set_size_request (AboutButton, 55, 25);

  g_signal_connect ((gpointer) AboutWindow, "map_event",
                    G_CALLBACK (on_AboutWindow_map_event),
                    NULL);
  g_signal_connect ((gpointer) AboutWindow, "unmap_event",
                    G_CALLBACK (on_AboutWindow_unmap_event),
                    NULL);
  g_signal_connect ((gpointer) AboutWindow, "delete_event",
                    G_CALLBACK (on_AboutWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) AboutWindow, "destroy_event",
                    G_CALLBACK (on_AboutWindow_destroy_event),
                    NULL);
  g_signal_connect ((gpointer) AboutButton, "clicked",
                    G_CALLBACK (on_AboutBtnOK_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (AboutWindow, AboutWindow, "AboutWindow");
  GLADE_HOOKUP_OBJECT (AboutWindow, fixed6, "fixed6");
  GLADE_HOOKUP_OBJECT (AboutWindow, label70, "label70");
  GLADE_HOOKUP_OBJECT (AboutWindow, label72, "label72");
  GLADE_HOOKUP_OBJECT (AboutWindow, image1, "image1");
  GLADE_HOOKUP_OBJECT (AboutWindow, AboutButton, "AboutButton");

  return AboutWindow;
}
