/*
 * 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 <gdk/gdkkeysyms.h>
#include <gtk/gtk.h>

#include "demo-Gtk-stubs.h"
#include "demo-Gtk-widgets.h"

GtkWidget*
create_xscreensaver_demo (void)
{
  GtkWidget *xscreensaver_demo;
  GtkWidget *outer_vbox;
  GtkWidget *menubar;
  guint tmp_key;
  GtkWidget *file;
  GtkWidget *file_menu;
  GtkAccelGroup *file_menu_accels;
  GtkWidget *activate_menu;
  GtkWidget *lock_menu;
  GtkWidget *kill_menu;
  GtkWidget *restart;
  GtkWidget *separator1;
  GtkWidget *exit_menu;
  GtkWidget *edit;
  GtkWidget *edit_menu;
  GtkAccelGroup *edit_menu_accels;
  GtkWidget *cut_menu;
  GtkWidget *copy_menu;
  GtkWidget *paste_menu;
  GtkWidget *help;
  GtkWidget *help_menu;
  GtkAccelGroup *help_menu_accels;
  GtkWidget *about_menu;
  GtkWidget *doc_menu;
  GtkWidget *notebook;
  GtkWidget *demos_hbox;
  GtkWidget *list_vbox;
  GtkWidget *scroller;
  GtkWidget *viewport;
  GtkWidget *list;
  GtkWidget *centering_hbox;
  GtkWidget *next_prev_hbox;
  GtkWidget *next;
  GtkWidget *prev;
  GtkWidget *opts_vbox;
  GtkWidget *frame;
  GtkWidget *doc;
  GtkWidget *opts_vbox2;
  GtkWidget *cmd_label;
  GtkWidget *cmd_text;
  GtkWidget *opts_hbox3;
  GtkWidget *enabled;
  GtkWidget *visual;
  GtkWidget *visual_combo;
  GList *visual_combo_items = NULL;
  GtkWidget *combo_entry1;
  GtkWidget *demo_hline;
  GtkWidget *demo_manual_hbox;
  GtkWidget *demo;
  GtkWidget *manual;
  GtkWidget *demo_tab;
  GtkWidget *options_vbox;
  GtkWidget *options_table;
  GtkWidget *options_table_2;
  GtkWidget *dpms_frame;
  GtkWidget *dpms_table;
  GtkWidget *dpms_off_text;
  GtkWidget *dpms_suspend_text;
  GtkWidget *dpms_standby_text;
  GtkWidget *dpms_standby_label;
  GtkWidget *dpms_off_label;
  GtkWidget *dpms_suspend_label;
  GtkWidget *dpms_dummy;
  GtkWidget *dpms_button_eventbox;
  GtkWidget *dpms_button;
  GtkWidget *cmap_frame;
  GtkWidget *cmap_table;
  GtkWidget *fade_text;
  GtkWidget *cmap_dummy;
  GtkWidget *fade_label;
  GtkWidget *install_button_eventbox;
  GtkWidget *install_button;
  GtkWidget *fade_button_eventbox;
  GtkWidget *fade_button;
  GtkWidget *unfade_button_eventbox;
  GtkWidget *unfade_button;
  GtkWidget *cmap_hr;
  GtkWidget *options_table_1;
  GtkWidget *grab_frame;
  GtkWidget *grab_table;
  GtkWidget *grab_image_eventbox;
  GtkWidget *grab_image_button;
  GtkWidget *image_browse_button;
  GtkWidget *grab_video_eventbox;
  GtkWidget *grab_video_button;
  GtkWidget *grab_desk_eventbox;
  GtkWidget *grab_desk_button;
  GtkWidget *grab_dummy;
  GtkWidget *image_text;
  GtkWidget *blanking_frame;
  GtkWidget *blanking_table;
  GtkWidget *lock_text;
  GtkWidget *cycle_text;
  GtkWidget *timeout_text;
  GtkWidget *timeout_label;
  GtkWidget *cycle_label;
  GtkWidget *lock_label;
  GtkWidget *blanking_dummy;
  GtkWidget *lock_button_eventbox;
  GtkWidget *lock_button;
  GtkWidget *blanking_hr;
  GtkWidget *diag_frame;
  GtkWidget *diag_table;
  GtkWidget *splash_button_eventbox;
  GtkWidget *splash_button;
  GtkWidget *capture_button_eventbox;
  GtkWidget *capture_button;
  GtkWidget *verbose_button_eventbox;
  GtkWidget *verbose_button;
  GtkWidget *options_tab;
  GtkAccelGroup *accel_group;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  accel_group = gtk_accel_group_new ();

  xscreensaver_demo = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_name (xscreensaver_demo, "xscreensaver_demo");
  gtk_object_set_data (GTK_OBJECT (xscreensaver_demo), "xscreensaver_demo", xscreensaver_demo);
  gtk_window_set_title (GTK_WINDOW (xscreensaver_demo), "XScreenSaver");
  gtk_window_set_policy (GTK_WINDOW (xscreensaver_demo), TRUE, TRUE, FALSE);
  gtk_window_set_wmclass (GTK_WINDOW (xscreensaver_demo), "xscreensaver", "XScreenSaver");

  outer_vbox = gtk_vbox_new (FALSE, 5);
  gtk_widget_set_name (outer_vbox, "outer_vbox");
  gtk_widget_ref (outer_vbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "outer_vbox", outer_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (outer_vbox);
  gtk_container_add (GTK_CONTAINER (xscreensaver_demo), outer_vbox);

  menubar = gtk_menu_bar_new ();
  gtk_widget_set_name (menubar, "menubar");
  gtk_widget_ref (menubar);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "menubar", menubar,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (menubar);
  gtk_box_pack_start (GTK_BOX (outer_vbox), menubar, FALSE, FALSE, 0);

  file = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (file)->child),
                                   "_File");
  gtk_widget_add_accelerator (file, "activate_item", accel_group,
                              tmp_key, GDK_MOD1_MASK, 0);
  gtk_widget_set_name (file, "file");
  gtk_widget_ref (file);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "file", file,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (file);
  gtk_container_add (GTK_CONTAINER (menubar), file);

  file_menu = gtk_menu_new ();
  gtk_widget_set_name (file_menu, "file_menu");
  gtk_widget_ref (file_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "file_menu", file_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (file), file_menu);
  file_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (file_menu));

  activate_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (activate_menu)->child),
                                   "_Blank Screen Now");
  gtk_widget_add_accelerator (activate_menu, "activate_item", file_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (activate_menu, "activate_menu");
  gtk_widget_ref (activate_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "activate_menu", activate_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (activate_menu);
  gtk_container_add (GTK_CONTAINER (file_menu), activate_menu);
  gtk_tooltips_set_tip (tooltips, activate_menu, "Activate the XScreenSaver daemon now (locking the screen if so configured.)", NULL);

  lock_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (lock_menu)->child),
                                   "_Lock Screen Now");
  gtk_widget_add_accelerator (lock_menu, "activate_item", file_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (lock_menu, "lock_menu");
  gtk_widget_ref (lock_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "lock_menu", lock_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lock_menu);
  gtk_container_add (GTK_CONTAINER (file_menu), lock_menu);
  gtk_tooltips_set_tip (tooltips, lock_menu, "Lock the screen now (even if \"Require Password\" is unchecked.)", NULL);

  kill_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (kill_menu)->child),
                                   "_Kill Daemon");
  gtk_widget_add_accelerator (kill_menu, "activate_item", file_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (kill_menu, "kill_menu");
  gtk_widget_ref (kill_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "kill_menu", kill_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (kill_menu);
  gtk_container_add (GTK_CONTAINER (file_menu), kill_menu);
  gtk_tooltips_set_tip (tooltips, kill_menu, "Tell the running XScreenSaver daemon to exit.", NULL);

  restart = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (restart)->child),
                                   "_Restart Daemon");
  gtk_widget_add_accelerator (restart, "activate_item", file_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (restart, "restart");
  gtk_widget_ref (restart);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "restart", restart,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (restart);
  gtk_container_add (GTK_CONTAINER (file_menu), restart);
  gtk_tooltips_set_tip (tooltips, restart, "Kill and re-launch the XScreenSaver daemon.", NULL);

  separator1 = gtk_menu_item_new ();
  gtk_widget_set_name (separator1, "separator1");
  gtk_widget_ref (separator1);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "separator1", separator1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (separator1);
  gtk_container_add (GTK_CONTAINER (file_menu), separator1);
  gtk_widget_set_sensitive (separator1, FALSE);

  exit_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (exit_menu)->child),
                                   "_Exit");
  gtk_widget_add_accelerator (exit_menu, "activate_item", file_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (exit_menu, "exit_menu");
  gtk_widget_ref (exit_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "exit_menu", exit_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (exit_menu);
  gtk_container_add (GTK_CONTAINER (file_menu), exit_menu);
  gtk_tooltips_set_tip (tooltips, exit_menu, "Exit the xscreensaver-demo program (but leave the XScreenSaver daemon running in the background.)", NULL);

  edit = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (edit)->child),
                                   "_Edit");
  gtk_widget_add_accelerator (edit, "activate_item", accel_group,
                              tmp_key, GDK_MOD1_MASK, 0);
  gtk_widget_set_name (edit, "edit");
  gtk_widget_ref (edit);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "edit", edit,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (edit);
  gtk_container_add (GTK_CONTAINER (menubar), edit);

  edit_menu = gtk_menu_new ();
  gtk_widget_set_name (edit_menu, "edit_menu");
  gtk_widget_ref (edit_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "edit_menu", edit_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (edit), edit_menu);
  edit_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (edit_menu));

  cut_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (cut_menu)->child),
                                   "C_ut");
  gtk_widget_add_accelerator (cut_menu, "activate_item", edit_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (cut_menu, "cut_menu");
  gtk_widget_ref (cut_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cut_menu", cut_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cut_menu);
  gtk_container_add (GTK_CONTAINER (edit_menu), cut_menu);

  copy_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (copy_menu)->child),
                                   "_Copy");
  gtk_widget_add_accelerator (copy_menu, "activate_item", edit_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (copy_menu, "copy_menu");
  gtk_widget_ref (copy_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "copy_menu", copy_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (copy_menu);
  gtk_container_add (GTK_CONTAINER (edit_menu), copy_menu);

  paste_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (paste_menu)->child),
                                   "_Paste");
  gtk_widget_add_accelerator (paste_menu, "activate_item", edit_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (paste_menu, "paste_menu");
  gtk_widget_ref (paste_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "paste_menu", paste_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (paste_menu);
  gtk_container_add (GTK_CONTAINER (edit_menu), paste_menu);

  help = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (help)->child),
                                   "_Help");
  gtk_widget_add_accelerator (help, "activate_item", accel_group,
                              tmp_key, GDK_MOD1_MASK, 0);
  gtk_widget_set_name (help, "help");
  gtk_widget_ref (help);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "help", help,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (help);
  gtk_container_add (GTK_CONTAINER (menubar), help);

  help_menu = gtk_menu_new ();
  gtk_widget_set_name (help_menu, "help_menu");
  gtk_widget_ref (help_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "help_menu", help_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_menu_item_set_submenu (GTK_MENU_ITEM (help), help_menu);
  help_menu_accels = gtk_menu_ensure_uline_accel_group (GTK_MENU (help_menu));

  about_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (about_menu)->child),
                                   "_About...");
  gtk_widget_add_accelerator (about_menu, "activate_item", help_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (about_menu, "about_menu");
  gtk_widget_ref (about_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "about_menu", about_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (about_menu);
  gtk_container_add (GTK_CONTAINER (help_menu), about_menu);
  gtk_tooltips_set_tip (tooltips, about_menu, "Display version information.", NULL);

  doc_menu = gtk_menu_item_new_with_label ("");
  tmp_key = gtk_label_parse_uline (GTK_LABEL (GTK_BIN (doc_menu)->child),
                                   "_Documentation...");
  gtk_widget_add_accelerator (doc_menu, "activate_item", help_menu_accels,
                              tmp_key, 0, 0);
  gtk_widget_set_name (doc_menu, "doc_menu");
  gtk_widget_ref (doc_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "doc_menu", doc_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (doc_menu);
  gtk_container_add (GTK_CONTAINER (help_menu), doc_menu);
  gtk_tooltips_set_tip (tooltips, doc_menu, "Go to the documentation on the XScreenSaver web page.", NULL);

  notebook = gtk_notebook_new ();
  gtk_widget_set_name (notebook, "notebook");
  gtk_widget_ref (notebook);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "notebook", notebook,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (notebook);
  gtk_box_pack_start (GTK_BOX (outer_vbox), notebook, TRUE, TRUE, 0);

  demos_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_set_name (demos_hbox, "demos_hbox");
  gtk_widget_ref (demos_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demos_hbox", demos_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (demos_hbox);
  gtk_container_add (GTK_CONTAINER (notebook), demos_hbox);

  list_vbox = gtk_vbox_new (FALSE, 5);
  gtk_widget_set_name (list_vbox, "list_vbox");
  gtk_widget_ref (list_vbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "list_vbox", list_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (list_vbox);
  gtk_box_pack_start (GTK_BOX (demos_hbox), list_vbox, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (list_vbox), 10);

  scroller = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_set_name (scroller, "scroller");
  gtk_widget_ref (scroller);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "scroller", scroller,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (scroller);
  gtk_box_pack_start (GTK_BOX (list_vbox), scroller, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);

  viewport = gtk_viewport_new (NULL, NULL);
  gtk_widget_set_name (viewport, "viewport");
  gtk_widget_ref (viewport);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "viewport", viewport,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (viewport);
  gtk_container_add (GTK_CONTAINER (scroller), viewport);
  gtk_container_set_border_width (GTK_CONTAINER (viewport), 1);

  list = gtk_list_new ();
  gtk_widget_set_name (list, "list");
  gtk_widget_ref (list);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "list", list,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (list);
  gtk_container_add (GTK_CONTAINER (viewport), list);

  centering_hbox = gtk_hbox_new (TRUE, 0);
  gtk_widget_set_name (centering_hbox, "centering_hbox");
  gtk_widget_ref (centering_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "centering_hbox", centering_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (centering_hbox);
  gtk_box_pack_start (GTK_BOX (list_vbox), centering_hbox, FALSE, TRUE, 0);

  next_prev_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (next_prev_hbox, "next_prev_hbox");
  gtk_widget_ref (next_prev_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "next_prev_hbox", next_prev_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (next_prev_hbox);
  gtk_box_pack_start (GTK_BOX (centering_hbox), next_prev_hbox, FALSE, FALSE, 0);

  next = gtk_button_new_with_label ("\\/");
  gtk_widget_set_name (next, "next");
  gtk_widget_ref (next);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "next", next,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (next);
  gtk_box_pack_start (GTK_BOX (next_prev_hbox), next, FALSE, FALSE, 0);
  GTK_WIDGET_SET_FLAGS (next, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, next, "Run the next demo in this list in full-screen mode (click the mouse to return.)", NULL);

  prev = gtk_button_new_with_label ("/\\");
  gtk_widget_set_name (prev, "prev");
  gtk_widget_ref (prev);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "prev", prev,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (prev);
  gtk_box_pack_start (GTK_BOX (next_prev_hbox), prev, FALSE, FALSE, 0);
  GTK_WIDGET_SET_FLAGS (prev, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, prev, "Run the previous demo in this list in full-screen mode (click the mouse to return.)", NULL);

  opts_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (opts_vbox, "opts_vbox");
  gtk_widget_ref (opts_vbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "opts_vbox", opts_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (opts_vbox);
  gtk_box_pack_start (GTK_BOX (demos_hbox), opts_vbox, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (opts_vbox), 10);

  frame = gtk_frame_new (NULL);
  gtk_widget_set_name (frame, "frame");
  gtk_widget_ref (frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "frame", frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (frame);
  gtk_box_pack_start (GTK_BOX (opts_vbox), frame, TRUE, TRUE, 0);

  doc = gtk_label_new ("");
  gtk_widget_set_name (doc, "doc");
  gtk_widget_ref (doc);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "doc", doc,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (doc);
  gtk_container_add (GTK_CONTAINER (frame), doc);
  gtk_label_set_justify (GTK_LABEL (doc), GTK_JUSTIFY_LEFT);
  gtk_label_set_line_wrap (GTK_LABEL (doc), TRUE);
  gtk_misc_set_alignment (GTK_MISC (doc), 0, 0);
  gtk_misc_set_padding (GTK_MISC (doc), 10, 10);

  opts_vbox2 = gtk_vbox_new (FALSE, 2);
  gtk_widget_set_name (opts_vbox2, "opts_vbox2");
  gtk_widget_ref (opts_vbox2);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "opts_vbox2", opts_vbox2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (opts_vbox2);
  gtk_box_pack_start (GTK_BOX (opts_vbox), opts_vbox2, FALSE, TRUE, 0);

  cmd_label = gtk_label_new ("Command Line:");
  gtk_widget_set_name (cmd_label, "cmd_label");
  gtk_widget_ref (cmd_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmd_label", cmd_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmd_label);
  gtk_box_pack_start (GTK_BOX (opts_vbox2), cmd_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (cmd_label), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (cmd_label), 0, 1);
  gtk_misc_set_padding (GTK_MISC (cmd_label), 0, 2);

  cmd_text = gtk_entry_new ();
  gtk_widget_set_name (cmd_text, "cmd_text");
  gtk_widget_ref (cmd_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmd_text", cmd_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmd_text);
  gtk_box_pack_start (GTK_BOX (opts_vbox2), cmd_text, FALSE, TRUE, 0);

  opts_hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (opts_hbox3, "opts_hbox3");
  gtk_widget_ref (opts_hbox3);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "opts_hbox3", opts_hbox3,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (opts_hbox3);
  gtk_box_pack_start (GTK_BOX (opts_vbox2), opts_hbox3, FALSE, TRUE, 4);
  gtk_container_set_border_width (GTK_CONTAINER (opts_hbox3), 4);

  enabled = gtk_check_button_new_with_label ("Enabled");
  gtk_widget_set_name (enabled, "enabled");
  gtk_widget_ref (enabled);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "enabled", enabled,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (enabled);
  gtk_box_pack_start (GTK_BOX (opts_hbox3), enabled, FALSE, FALSE, 0);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enabled), TRUE);

  visual = gtk_label_new ("Visual:");
  gtk_widget_set_name (visual, "visual");
  gtk_widget_ref (visual);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "visual", visual,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (visual);
  gtk_box_pack_start (GTK_BOX (opts_hbox3), visual, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (visual), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (visual), 1, 0.5);
  gtk_misc_set_padding (GTK_MISC (visual), 10, 0);

  visual_combo = gtk_combo_new ();
  gtk_widget_set_name (visual_combo, "visual_combo");
  gtk_widget_ref (visual_combo);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "visual_combo", visual_combo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (visual_combo);
  gtk_box_pack_start (GTK_BOX (opts_hbox3), visual_combo, FALSE, FALSE, 0);
  visual_combo_items = g_list_append (visual_combo_items, "Any");
  visual_combo_items = g_list_append (visual_combo_items, "Best");
  visual_combo_items = g_list_append (visual_combo_items, "Default");
  visual_combo_items = g_list_append (visual_combo_items, "Default-N");
  visual_combo_items = g_list_append (visual_combo_items, "GL");
  visual_combo_items = g_list_append (visual_combo_items, "TrueColor");
  visual_combo_items = g_list_append (visual_combo_items, "PseudoColor");
  visual_combo_items = g_list_append (visual_combo_items, "StaticGray");
  visual_combo_items = g_list_append (visual_combo_items, "GrayScale");
  visual_combo_items = g_list_append (visual_combo_items, "DirectColor");
  visual_combo_items = g_list_append (visual_combo_items, "Color");
  visual_combo_items = g_list_append (visual_combo_items, "Gray");
  visual_combo_items = g_list_append (visual_combo_items, "Mono");
  gtk_combo_set_popdown_strings (GTK_COMBO (visual_combo), visual_combo_items);
  g_list_free (visual_combo_items);

  combo_entry1 = GTK_COMBO (visual_combo)->entry;
  gtk_widget_set_name (combo_entry1, "combo_entry1");
  gtk_widget_ref (combo_entry1);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "combo_entry1", combo_entry1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (combo_entry1);
  gtk_tooltips_set_tip (tooltips, combo_entry1, "The X visual type that this demo will require.  If that visual is available it will be used, otherwise, this demo will not be run.", NULL);
  gtk_entry_set_text (GTK_ENTRY (combo_entry1), "Any");

  demo_hline = gtk_hseparator_new ();
  gtk_widget_set_name (demo_hline, "demo_hline");
  gtk_widget_ref (demo_hline);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo_hline", demo_hline,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (demo_hline);
  gtk_box_pack_start (GTK_BOX (opts_vbox), demo_hline, FALSE, FALSE, 5);

  demo_manual_hbox = gtk_hbutton_box_new ();
  gtk_widget_set_name (demo_manual_hbox, "demo_manual_hbox");
  gtk_widget_ref (demo_manual_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo_manual_hbox", demo_manual_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (demo_manual_hbox);
  gtk_box_pack_start (GTK_BOX (opts_vbox), demo_manual_hbox, FALSE, TRUE, 0);

  demo = gtk_button_new_with_label ("Demo");
  gtk_widget_set_name (demo, "demo");
  gtk_widget_ref (demo);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo", demo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (demo);
  gtk_container_add (GTK_CONTAINER (demo_manual_hbox), demo);
  GTK_WIDGET_SET_FLAGS (demo, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, demo, "Run this one in full-screen mode (click the mouse to return.)", NULL);

  manual = gtk_button_new_with_label ("Documentation...");
  gtk_widget_set_name (manual, "manual");
  gtk_widget_ref (manual);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "manual", manual,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (manual);
  gtk_container_add (GTK_CONTAINER (demo_manual_hbox), manual);
  GTK_WIDGET_SET_FLAGS (manual, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, manual, "Click here to read the manual for this display mode, if it has one.", NULL);

  demo_tab = gtk_label_new ("Graphics Demos");
  gtk_widget_set_name (demo_tab, "demo_tab");
  gtk_widget_ref (demo_tab);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo_tab", demo_tab,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (demo_tab);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 0), demo_tab);

  options_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (options_vbox, "options_vbox");
  gtk_widget_ref (options_vbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "options_vbox", options_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (options_vbox);
  gtk_container_add (GTK_CONTAINER (notebook), options_vbox);

  options_table = gtk_table_new (1, 2, TRUE);
  gtk_widget_set_name (options_table, "options_table");
  gtk_widget_ref (options_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "options_table", options_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (options_table);
  gtk_box_pack_start (GTK_BOX (options_vbox), options_table, FALSE, FALSE, 0);

  options_table_2 = gtk_table_new (2, 1, FALSE);
  gtk_widget_set_name (options_table_2, "options_table_2");
  gtk_widget_ref (options_table_2);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "options_table_2", options_table_2,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (options_table_2);
  gtk_table_attach (GTK_TABLE (options_table), options_table_2, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  dpms_frame = gtk_frame_new ("Display Power Management:");
  gtk_widget_set_name (dpms_frame, "dpms_frame");
  gtk_widget_ref (dpms_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_frame", dpms_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_frame);
  gtk_table_attach (GTK_TABLE (options_table_2), dpms_frame, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (dpms_frame), 10);

  dpms_table = gtk_table_new (4, 3, FALSE);
  gtk_widget_set_name (dpms_table, "dpms_table");
  gtk_widget_ref (dpms_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_table", dpms_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_table);
  gtk_container_add (GTK_CONTAINER (dpms_frame), dpms_table);
  gtk_container_set_border_width (GTK_CONTAINER (dpms_table), 10);
  gtk_table_set_row_spacings (GTK_TABLE (dpms_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (dpms_table), 10);

  dpms_off_text = gtk_entry_new_with_max_length (8);
  gtk_widget_set_name (dpms_off_text, "dpms_off_text");
  gtk_widget_ref (dpms_off_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_off_text", dpms_off_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_off_text);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_off_text, 1, 2, 3, 4,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, dpms_off_text, "How long until the monitor powers down (if Power Management is enabled).", NULL);

  dpms_suspend_text = gtk_entry_new_with_max_length (8);
  gtk_widget_set_name (dpms_suspend_text, "dpms_suspend_text");
  gtk_widget_ref (dpms_suspend_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_suspend_text", dpms_suspend_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_suspend_text);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_suspend_text, 1, 2, 2, 3,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, dpms_suspend_text, "How long until the monitor goes into power-saving mode (if Power Management is enabled).", NULL);

  dpms_standby_text = gtk_entry_new_with_max_length (8);
  gtk_widget_set_name (dpms_standby_text, "dpms_standby_text");
  gtk_widget_ref (dpms_standby_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_standby_text", dpms_standby_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_standby_text);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_standby_text, 1, 2, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, dpms_standby_text, "How long before the monitor goes completely black (if Power Management is enabled).", NULL);

  dpms_standby_label = gtk_label_new ("Standby After:");
  gtk_widget_set_name (dpms_standby_label, "dpms_standby_label");
  gtk_widget_ref (dpms_standby_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_standby_label", dpms_standby_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_standby_label);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_standby_label, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (dpms_standby_label), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (dpms_standby_label), 1, 0.5);

  dpms_off_label = gtk_label_new ("Off After:");
  gtk_widget_set_name (dpms_off_label, "dpms_off_label");
  gtk_widget_ref (dpms_off_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_off_label", dpms_off_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_off_label);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_off_label, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (dpms_off_label), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (dpms_off_label), 1, 0.5);

  dpms_suspend_label = gtk_label_new ("Suspend After:");
  gtk_widget_set_name (dpms_suspend_label, "dpms_suspend_label");
  gtk_widget_ref (dpms_suspend_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_suspend_label", dpms_suspend_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_suspend_label);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_suspend_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (dpms_suspend_label), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (dpms_suspend_label), 1, 0.5);

  dpms_dummy = gtk_label_new ("");
  gtk_widget_set_name (dpms_dummy, "dpms_dummy");
  gtk_widget_ref (dpms_dummy);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_dummy", dpms_dummy,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_dummy);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_dummy, 2, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (dpms_dummy), GTK_JUSTIFY_LEFT);

  dpms_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (dpms_button_eventbox, "dpms_button_eventbox");
  gtk_widget_ref (dpms_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_button_eventbox", dpms_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_button_eventbox);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_button_eventbox, 0, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, dpms_button_eventbox, "Whether the monitor should be powered down after a while.", NULL);

  dpms_button = gtk_check_button_new_with_label ("Power Management Enabled");
  gtk_widget_set_name (dpms_button, "dpms_button");
  gtk_widget_ref (dpms_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_button", dpms_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_button);
  gtk_container_add (GTK_CONTAINER (dpms_button_eventbox), dpms_button);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dpms_button), TRUE);

  cmap_frame = gtk_frame_new ("Colormaps:");
  gtk_widget_set_name (cmap_frame, "cmap_frame");
  gtk_widget_ref (cmap_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmap_frame", cmap_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmap_frame);
  gtk_table_attach (GTK_TABLE (options_table_2), cmap_frame, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (cmap_frame), 10);

  cmap_table = gtk_table_new (5, 3, FALSE);
  gtk_widget_set_name (cmap_table, "cmap_table");
  gtk_widget_ref (cmap_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmap_table", cmap_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmap_table);
  gtk_container_add (GTK_CONTAINER (cmap_frame), cmap_table);
  gtk_container_set_border_width (GTK_CONTAINER (cmap_table), 10);
  gtk_table_set_row_spacings (GTK_TABLE (cmap_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (cmap_table), 10);

  fade_text = gtk_entry_new_with_max_length (8);
  gtk_widget_set_name (fade_text, "fade_text");
  gtk_widget_ref (fade_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "fade_text", fade_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fade_text);
  gtk_table_attach (GTK_TABLE (cmap_table), fade_text, 1, 2, 4, 5,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, fade_text, "How long it should take for the screen to fade in and out.", NULL);

  cmap_dummy = gtk_label_new ("");
  gtk_widget_set_name (cmap_dummy, "cmap_dummy");
  gtk_widget_ref (cmap_dummy);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmap_dummy", cmap_dummy,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmap_dummy);
  gtk_table_attach (GTK_TABLE (cmap_table), cmap_dummy, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (cmap_dummy), GTK_JUSTIFY_LEFT);

  fade_label = gtk_label_new ("Fade Duration:");
  gtk_widget_set_name (fade_label, "fade_label");
  gtk_widget_ref (fade_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "fade_label", fade_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fade_label);
  gtk_table_attach (GTK_TABLE (cmap_table), fade_label, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (fade_label), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (fade_label), 1, 0.5);

  install_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (install_button_eventbox, "install_button_eventbox");
  gtk_widget_ref (install_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "install_button_eventbox", install_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (install_button_eventbox);
  gtk_table_attach (GTK_TABLE (cmap_table), install_button_eventbox, 0, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, install_button_eventbox, "Whether to install a private colormap when running in 8-bit mode on the default Visual.", NULL);

  install_button = gtk_check_button_new_with_label ("Install Colormap");
  gtk_widget_set_name (install_button, "install_button");
  gtk_widget_ref (install_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "install_button", install_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (install_button);
  gtk_container_add (GTK_CONTAINER (install_button_eventbox), install_button);

  fade_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (fade_button_eventbox, "fade_button_eventbox");
  gtk_widget_ref (fade_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "fade_button_eventbox", fade_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fade_button_eventbox);
  gtk_table_attach (GTK_TABLE (cmap_table), fade_button_eventbox, 0, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, fade_button_eventbox, "Whether the screen should slowly fade to black when the screen saver activates.", NULL);

  fade_button = gtk_check_button_new_with_label ("Fade To Black When Blanking");
  gtk_widget_set_name (fade_button, "fade_button");
  gtk_widget_ref (fade_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "fade_button", fade_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fade_button);
  gtk_container_add (GTK_CONTAINER (fade_button_eventbox), fade_button);

  unfade_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (unfade_button_eventbox, "unfade_button_eventbox");
  gtk_widget_ref (unfade_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "unfade_button_eventbox", unfade_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (unfade_button_eventbox);
  gtk_table_attach (GTK_TABLE (cmap_table), unfade_button_eventbox, 0, 3, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, unfade_button_eventbox, "Whether the screen should slowly fade in from black when the screen saver deactivates.", NULL);

  unfade_button = gtk_check_button_new_with_label ("Fade From Black When Unblanking");
  gtk_widget_set_name (unfade_button, "unfade_button");
  gtk_widget_ref (unfade_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "unfade_button", unfade_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (unfade_button);
  gtk_container_add (GTK_CONTAINER (unfade_button_eventbox), unfade_button);

  cmap_hr = gtk_hseparator_new ();
  gtk_widget_set_name (cmap_hr, "cmap_hr");
  gtk_widget_ref (cmap_hr);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmap_hr", cmap_hr,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmap_hr);
  gtk_table_attach (GTK_TABLE (cmap_table), cmap_hr, 0, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 2);

  options_table_1 = gtk_table_new (3, 1, FALSE);
  gtk_widget_set_name (options_table_1, "options_table_1");
  gtk_widget_ref (options_table_1);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "options_table_1", options_table_1,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (options_table_1);
  gtk_table_attach (GTK_TABLE (options_table), options_table_1, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  grab_frame = gtk_frame_new ("Image Manipulation:");
  gtk_widget_set_name (grab_frame, "grab_frame");
  gtk_widget_ref (grab_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_frame", grab_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_frame);
  gtk_table_attach (GTK_TABLE (options_table_1), grab_frame, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (grab_frame), 10);

  grab_table = gtk_table_new (4, 3, FALSE);
  gtk_widget_set_name (grab_table, "grab_table");
  gtk_widget_ref (grab_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_table", grab_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_table);
  gtk_container_add (GTK_CONTAINER (grab_frame), grab_table);
  gtk_container_set_border_width (GTK_CONTAINER (grab_table), 10);

  grab_image_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (grab_image_eventbox, "grab_image_eventbox");
  gtk_widget_ref (grab_image_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_image_eventbox", grab_image_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_image_eventbox);
  gtk_table_attach (GTK_TABLE (grab_table), grab_image_eventbox, 0, 3, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, grab_image_eventbox, "Whether the image-manipulating modes should operate on random images loaded from disk.", NULL);

  grab_image_button = gtk_check_button_new_with_label ("Choose Random Image:");
  gtk_widget_set_name (grab_image_button, "grab_image_button");
  gtk_widget_ref (grab_image_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_image_button", grab_image_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_image_button);
  gtk_container_add (GTK_CONTAINER (grab_image_eventbox), grab_image_button);

  image_browse_button = gtk_button_new_with_label ("Browse");
  gtk_widget_set_name (image_browse_button, "image_browse_button");
  gtk_widget_ref (image_browse_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "image_browse_button", image_browse_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (image_browse_button);
  gtk_table_attach (GTK_TABLE (grab_table), image_browse_button, 2, 3, 3, 4,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 4, 0);

  grab_video_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (grab_video_eventbox, "grab_video_eventbox");
  gtk_widget_ref (grab_video_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_video_eventbox", grab_video_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_video_eventbox);
  gtk_table_attach (GTK_TABLE (grab_table), grab_video_eventbox, 0, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, grab_video_eventbox, "Whether the image-manipulating modes should operate on images captured from the system's video input (if there is one).", NULL);

  grab_video_button = gtk_check_button_new_with_label ("Grab Video Frames");
  gtk_widget_set_name (grab_video_button, "grab_video_button");
  gtk_widget_ref (grab_video_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_video_button", grab_video_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_video_button);
  gtk_container_add (GTK_CONTAINER (grab_video_eventbox), grab_video_button);

  grab_desk_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (grab_desk_eventbox, "grab_desk_eventbox");
  gtk_widget_ref (grab_desk_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_desk_eventbox", grab_desk_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_desk_eventbox);
  gtk_table_attach (GTK_TABLE (grab_table), grab_desk_eventbox, 0, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, grab_desk_eventbox, "Whether the image-manipulating modes should be allowed to operate on an image of your desktop.", NULL);

  grab_desk_button = gtk_check_button_new_with_label ("Grab Desktop Images");
  gtk_widget_set_name (grab_desk_button, "grab_desk_button");
  gtk_widget_ref (grab_desk_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_desk_button", grab_desk_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_desk_button);
  gtk_container_add (GTK_CONTAINER (grab_desk_eventbox), grab_desk_button);

  grab_dummy = gtk_label_new ("");
  gtk_widget_set_name (grab_dummy, "grab_dummy");
  gtk_widget_ref (grab_dummy);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_dummy", grab_dummy,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_dummy);
  gtk_table_attach (GTK_TABLE (grab_table), grab_dummy, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
                    (GtkAttachOptions) (GTK_SHRINK), 0, 0);
  gtk_label_set_justify (GTK_LABEL (grab_dummy), GTK_JUSTIFY_LEFT);
  gtk_misc_set_padding (GTK_MISC (grab_dummy), 8, 0);

  image_text = gtk_entry_new ();
  gtk_widget_set_name (image_text, "image_text");
  gtk_widget_ref (image_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "image_text", image_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (image_text);
  gtk_table_attach (GTK_TABLE (grab_table), image_text, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, image_text, "The directory from which images will be randomly chosen.", NULL);

  blanking_frame = gtk_frame_new ("Blanking and Locking:");
  gtk_widget_set_name (blanking_frame, "blanking_frame");
  gtk_widget_ref (blanking_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "blanking_frame", blanking_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (blanking_frame);
  gtk_table_attach (GTK_TABLE (options_table_1), blanking_frame, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (blanking_frame), 10);

  blanking_table = gtk_table_new (5, 3, FALSE);
  gtk_widget_set_name (blanking_table, "blanking_table");
  gtk_widget_ref (blanking_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "blanking_table", blanking_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (blanking_table);
  gtk_container_add (GTK_CONTAINER (blanking_frame), blanking_table);
  gtk_container_set_border_width (GTK_CONTAINER (blanking_table), 10);
  gtk_table_set_row_spacings (GTK_TABLE (blanking_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (blanking_table), 10);

  lock_text = gtk_entry_new_with_max_length (8);
  gtk_widget_set_name (lock_text, "lock_text");
  gtk_widget_ref (lock_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "lock_text", lock_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lock_text);
  gtk_table_attach (GTK_TABLE (blanking_table), lock_text, 1, 2, 4, 5,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, lock_text, "How long after the screen saver has activated until a password will be required (if  `Require Password' is also set.)", NULL);

  cycle_text = gtk_entry_new_with_max_length (8);
  gtk_widget_set_name (cycle_text, "cycle_text");
  gtk_widget_ref (cycle_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cycle_text", cycle_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cycle_text);
  gtk_table_attach (GTK_TABLE (blanking_table), cycle_text, 1, 2, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, cycle_text, "How long each demo will be run before moving on to another.", NULL);

  timeout_text = gtk_entry_new_with_max_length (8);
  gtk_widget_set_name (timeout_text, "timeout_text");
  gtk_widget_ref (timeout_text);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "timeout_text", timeout_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (timeout_text);
  gtk_table_attach (GTK_TABLE (blanking_table), timeout_text, 1, 2, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, timeout_text, "How long until the screen saver activates and begins running demos.", NULL);

  timeout_label = gtk_label_new ("Blank After:");
  gtk_widget_set_name (timeout_label, "timeout_label");
  gtk_widget_ref (timeout_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "timeout_label", timeout_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (timeout_label);
  gtk_table_attach (GTK_TABLE (blanking_table), timeout_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (timeout_label), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (timeout_label), 1, 0.5);

  cycle_label = gtk_label_new ("Cycle After:");
  gtk_widget_set_name (cycle_label, "cycle_label");
  gtk_widget_ref (cycle_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cycle_label", cycle_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cycle_label);
  gtk_table_attach (GTK_TABLE (blanking_table), cycle_label, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (cycle_label), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (cycle_label), 1, 0.5);

  lock_label = gtk_label_new ("Lock After:");
  gtk_widget_set_name (lock_label, "lock_label");
  gtk_widget_ref (lock_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "lock_label", lock_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lock_label);
  gtk_table_attach (GTK_TABLE (blanking_table), lock_label, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (lock_label), GTK_JUSTIFY_RIGHT);
  gtk_misc_set_alignment (GTK_MISC (lock_label), 1, 0.5);

  blanking_dummy = gtk_label_new ("");
  gtk_widget_set_name (blanking_dummy, "blanking_dummy");
  gtk_widget_ref (blanking_dummy);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "blanking_dummy", blanking_dummy,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (blanking_dummy);
  gtk_table_attach (GTK_TABLE (blanking_table), blanking_dummy, 2, 3, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (blanking_dummy), GTK_JUSTIFY_LEFT);

  lock_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (lock_button_eventbox, "lock_button_eventbox");
  gtk_widget_ref (lock_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "lock_button_eventbox", lock_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lock_button_eventbox);
  gtk_table_attach (GTK_TABLE (blanking_table), lock_button_eventbox, 0, 3, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_tooltips_set_tip (tooltips, lock_button_eventbox, "Whether a password should be required to unblank the screen.", NULL);

  lock_button = gtk_check_button_new_with_label ("Require Password");
  gtk_widget_set_name (lock_button, "lock_button");
  gtk_widget_ref (lock_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "lock_button", lock_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lock_button);
  gtk_container_add (GTK_CONTAINER (lock_button_eventbox), lock_button);

  blanking_hr = gtk_hseparator_new ();
  gtk_widget_set_name (blanking_hr, "blanking_hr");
  gtk_widget_ref (blanking_hr);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "blanking_hr", blanking_hr,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (blanking_hr);
  gtk_table_attach (GTK_TABLE (blanking_table), blanking_hr, 0, 3, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 2);

  diag_frame = gtk_frame_new ("Diagnostics:");
  gtk_widget_set_name (diag_frame, "diag_frame");
  gtk_widget_ref (diag_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "diag_frame", diag_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (diag_frame);
  gtk_table_attach (GTK_TABLE (options_table_1), diag_frame, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (diag_frame), 10);

  diag_table = gtk_table_new (3, 1, FALSE);
  gtk_widget_set_name (diag_table, "diag_table");
  gtk_widget_ref (diag_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "diag_table", diag_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (diag_table);
  gtk_container_add (GTK_CONTAINER (diag_frame), diag_table);
  gtk_container_set_border_width (GTK_CONTAINER (diag_table), 10);
  gtk_table_set_row_spacings (GTK_TABLE (diag_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (diag_table), 10);

  splash_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (splash_button_eventbox, "splash_button_eventbox");
  gtk_widget_ref (splash_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "splash_button_eventbox", splash_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (splash_button_eventbox);
  gtk_table_attach (GTK_TABLE (diag_table), splash_button_eventbox, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, splash_button_eventbox, "Whether the splash screen (with the version number and `Help' button) should be momentarily displayed when the daemon first starts up.", NULL);

  splash_button = gtk_check_button_new_with_label ("Display Splash Screen at Startup");
  gtk_widget_set_name (splash_button, "splash_button");
  gtk_widget_ref (splash_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "splash_button", splash_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (splash_button);
  gtk_container_add (GTK_CONTAINER (splash_button_eventbox), splash_button);
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (splash_button), TRUE);

  capture_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (capture_button_eventbox, "capture_button_eventbox");
  gtk_widget_ref (capture_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "capture_button_eventbox", capture_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (capture_button_eventbox);
  gtk_table_attach (GTK_TABLE (diag_table), capture_button_eventbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, capture_button_eventbox, "Whether the stdout and stderr streams of graphics demos should be displayed on the xscreensaver window.", NULL);

  capture_button = gtk_check_button_new_with_label ("Display Subprocess Errors");
  gtk_widget_set_name (capture_button, "capture_button");
  gtk_widget_ref (capture_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "capture_button", capture_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (capture_button);
  gtk_container_add (GTK_CONTAINER (capture_button_eventbox), capture_button);

  verbose_button_eventbox = gtk_event_box_new ();
  gtk_widget_set_name (verbose_button_eventbox, "verbose_button_eventbox");
  gtk_widget_ref (verbose_button_eventbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "verbose_button_eventbox", verbose_button_eventbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (verbose_button_eventbox);
  gtk_table_attach (GTK_TABLE (diag_table), verbose_button_eventbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, verbose_button_eventbox, "Whether the daemon should print lots of debugging information.", NULL);

  verbose_button = gtk_check_button_new_with_label ("Verbose Diagnostics");
  gtk_widget_set_name (verbose_button, "verbose_button");
  gtk_widget_ref (verbose_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "verbose_button", verbose_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (verbose_button);
  gtk_container_add (GTK_CONTAINER (verbose_button_eventbox), verbose_button);

  options_tab = gtk_label_new ("Screensaver Options");
  gtk_widget_set_name (options_tab, "options_tab");
  gtk_widget_ref (options_tab);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "options_tab", options_tab,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (options_tab);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook), 1), options_tab);

  gtk_signal_connect (GTK_OBJECT (activate_menu), "activate",
                      GTK_SIGNAL_FUNC (activate_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_menu), "activate",
                      GTK_SIGNAL_FUNC (lock_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (kill_menu), "activate",
                      GTK_SIGNAL_FUNC (kill_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (restart), "activate",
                      GTK_SIGNAL_FUNC (restart_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (exit_menu), "activate",
                      GTK_SIGNAL_FUNC (exit_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cut_menu), "activate",
                      GTK_SIGNAL_FUNC (cut_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (copy_menu), "activate",
                      GTK_SIGNAL_FUNC (copy_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (paste_menu), "activate",
                      GTK_SIGNAL_FUNC (paste_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (about_menu), "activate",
                      GTK_SIGNAL_FUNC (about_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (doc_menu), "activate",
                      GTK_SIGNAL_FUNC (doc_menu_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (notebook), "switch_page",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (next), "clicked",
                      GTK_SIGNAL_FUNC (run_next_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (prev), "clicked",
                      GTK_SIGNAL_FUNC (run_prev_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (enabled), "toggled",
                      GTK_SIGNAL_FUNC (enabled_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (demo), "clicked",
                      GTK_SIGNAL_FUNC (run_this_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (manual), "clicked",
                      GTK_SIGNAL_FUNC (manual_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_off_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_off_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_suspend_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_suspend_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_standby_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_standby_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (fade_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (fade_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (install_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (fade_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (unfade_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (grab_image_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (image_browse_button), "clicked",
                      GTK_SIGNAL_FUNC (browse_image_dir_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (grab_video_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (grab_desk_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (image_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (image_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cycle_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cycle_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (timeout_text), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (timeout_text), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (splash_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (capture_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (verbose_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);

  gtk_widget_grab_default (next);
  gtk_object_set_data (GTK_OBJECT (xscreensaver_demo), "tooltips", tooltips);

  gtk_window_add_accel_group (GTK_WINDOW (xscreensaver_demo), accel_group);

  return xscreensaver_demo;
}

