/*
 * 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"
#include "demo-Gtk-support.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 *help;
  GtkWidget *help_menu;
  GtkAccelGroup *help_menu_accels;
  GtkWidget *about_menu;
  GtkWidget *doc_menu;
  GtkWidget *notebook;
  GtkWidget *demos_table;
  GtkWidget *blanking_table;
  GtkWidget *cycle_label;
  GtkWidget *lock_button_eventbox;
  GtkWidget *lock_button;
  GtkWidget *timeout_label;
  GtkObject *timeout_spinbutton_adj;
  GtkWidget *timeout_spinbutton;
  GtkWidget *timeout_mlabel;
  GtkWidget *cycle_mlabel;
  GtkWidget *lock_mlabel;
  GtkObject *lock_spinbutton_adj;
  GtkWidget *lock_spinbutton;
  GtkObject *cycle_spinbutton_adj;
  GtkWidget *cycle_spinbutton;
  GtkWidget *demo_manual_hbbox;
  GtkWidget *demo;
  GtkWidget *settings;
  GtkWidget *list_vbox;
  GtkWidget *mode_hbox;
  GtkWidget *mode_label;
  GtkWidget *mode_menu;
  GtkWidget *mode_menu_menu;
  GtkWidget *glade_menuitem;
  GtkWidget *col_head_hbox;
  GtkWidget *use_col_frame;
  GtkWidget *use_label;
  GtkWidget *saver_col_frame;
  GtkWidget *saver_label;
  GtkWidget *scroller;
  GtkWidget *viewport;
  GtkWidget *list;
  GtkWidget *centering_hbox;
  GtkWidget *next_prev_hbox;
  GtkWidget *next;
  GtkWidget *prev;
  GtkWidget *preview_frame;
  GtkWidget *preview_aspectframe;
  GtkWidget *preview;
  GtkWidget *demo_tab;
  GtkWidget *options_table;
  GtkWidget *diag_frame;
  GtkWidget *diag_hbox;
  GtkWidget *diag_logo;
  GtkWidget *diag_vbox;
  GtkWidget *verbose_button_eventbox;
  GtkWidget *verbose_button;
  GtkWidget *capture_button_eventbox;
  GtkWidget *capture_button;
  GtkWidget *splash_button_eventbox;
  GtkWidget *splash_button;
  GtkWidget *cmap_frame;
  GtkWidget *cmap_hbox;
  GtkWidget *cmap_logo;
  GtkWidget *cmap_vbox;
  GtkWidget *install_button_eventbox;
  GtkWidget *install_button;
  GtkWidget *cmap_hr;
  GtkWidget *fade_button_eventbox;
  GtkWidget *fade_button;
  GtkWidget *unfade_button_eventbox;
  GtkWidget *unfade_button;
  GtkWidget *fade_hbox;
  GtkWidget *fade_dummy;
  GtkWidget *fade_label;
  GtkObject *fade_spinbutton_adj;
  GtkWidget *fade_spinbutton;
  GtkWidget *fade_sec_label;
  GtkWidget *dpms_frame;
  GtkWidget *dpms_hbox;
  GtkWidget *dpms_logo;
  GtkWidget *dpms_vbox;
  GtkWidget *dpms_button_eventbox;
  GtkWidget *dpms_button;
  GtkWidget *dpms_table;
  GtkObject *dpms_standby_spinbutton_adj;
  GtkWidget *dpms_standby_spinbutton;
  GtkWidget *dpms_standby_mlabel;
  GtkWidget *dpms_suspend_mlabel;
  GtkWidget *dpms_off_mlabel;
  GtkWidget *dpms_off_label;
  GtkWidget *dpms_suspend_label;
  GtkWidget *dpms_standby_label;
  GtkObject *dpms_suspend_spinbutton_adj;
  GtkWidget *dpms_suspend_spinbutton;
  GtkObject *dpms_off_spinbutton_adj;
  GtkWidget *dpms_off_spinbutton;
  GtkWidget *grab_frame;
  GtkWidget *grab_hbox;
  GtkWidget *img_logo;
  GtkWidget *grab_vbox;
  GtkWidget *grab_desk_eventbox;
  GtkWidget *grab_desk_button;
  GtkWidget *grab_video_eventbox;
  GtkWidget *grab_video_button;
  GtkWidget *grab_image_eventbox;
  GtkWidget *grab_image_button;
  GtkWidget *image_hbox;
  GtkWidget *grab_dummy;
  GtkWidget *image_text;
  GtkWidget *image_browse_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_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, (GtkAccelFlags) 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 \"Lock Screen\" 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);

  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, (GtkAccelFlags) 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_table = gtk_table_new (2, 2, FALSE);
  gtk_widget_set_name (demos_table, "demos_table");
  gtk_widget_ref (demos_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demos_table", demos_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (demos_table);
  gtk_container_add (GTK_CONTAINER (notebook), demos_table);
  gtk_container_set_border_width (GTK_CONTAINER (demos_table), 10);

  blanking_table = gtk_table_new (3, 4, 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_table_attach (GTK_TABLE (demos_table), blanking_table, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_table_set_row_spacings (GTK_TABLE (blanking_table), 2);

  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, 1, 2, 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);
  gtk_misc_set_padding (GTK_MISC (cycle_label), 8, 0);

  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, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, lock_button_eventbox, _("Whether a password should be required to un-blank the screen."), NULL);

  lock_button = gtk_check_button_new_with_label (_("Lock Screen After"));
  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);

  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, 1, 2, 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);
  gtk_misc_set_padding (GTK_MISC (timeout_label), 8, 0);

  timeout_spinbutton_adj = gtk_adjustment_new (0, 1, 720, 1, 30, 30);
  timeout_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (timeout_spinbutton_adj), 15, 0);
  gtk_widget_set_name (timeout_spinbutton, "timeout_spinbutton");
  gtk_widget_ref (timeout_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "timeout_spinbutton", timeout_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (timeout_spinbutton);
  gtk_table_attach (GTK_TABLE (blanking_table), timeout_spinbutton, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, timeout_spinbutton, _("How long before the monitor goes completely black."), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (timeout_spinbutton), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (timeout_spinbutton), TRUE);

  timeout_mlabel = gtk_label_new (_("minutes"));
  gtk_widget_set_name (timeout_mlabel, "timeout_mlabel");
  gtk_widget_ref (timeout_mlabel);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "timeout_mlabel", timeout_mlabel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (timeout_mlabel);
  gtk_table_attach (GTK_TABLE (blanking_table), timeout_mlabel, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (timeout_mlabel), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (timeout_mlabel), 0, 0.5);

  cycle_mlabel = gtk_label_new (_("minutes"));
  gtk_widget_set_name (cycle_mlabel, "cycle_mlabel");
  gtk_widget_ref (cycle_mlabel);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cycle_mlabel", cycle_mlabel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cycle_mlabel);
  gtk_table_attach (GTK_TABLE (blanking_table), cycle_mlabel, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (cycle_mlabel), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (cycle_mlabel), 0, 0.5);

  lock_mlabel = gtk_label_new (_("minutes"));
  gtk_widget_set_name (lock_mlabel, "lock_mlabel");
  gtk_widget_ref (lock_mlabel);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "lock_mlabel", lock_mlabel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lock_mlabel);
  gtk_table_attach (GTK_TABLE (blanking_table), lock_mlabel, 3, 4, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (lock_mlabel), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (lock_mlabel), 0, 0.5);

  lock_spinbutton_adj = gtk_adjustment_new (0, 0, 720, 1, 30, 30);
  lock_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (lock_spinbutton_adj), 15, 0);
  gtk_widget_set_name (lock_spinbutton, "lock_spinbutton");
  gtk_widget_ref (lock_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "lock_spinbutton", lock_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (lock_spinbutton);
  gtk_table_attach (GTK_TABLE (blanking_table), lock_spinbutton, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 10);
  gtk_tooltips_set_tip (tooltips, lock_spinbutton, _("How long before the monitor goes completely black."), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lock_spinbutton), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (lock_spinbutton), TRUE);

  cycle_spinbutton_adj = gtk_adjustment_new (0, 1, 720, 1, 30, 30);
  cycle_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (cycle_spinbutton_adj), 15, 0);
  gtk_widget_set_name (cycle_spinbutton, "cycle_spinbutton");
  gtk_widget_ref (cycle_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cycle_spinbutton", cycle_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cycle_spinbutton);
  gtk_table_attach (GTK_TABLE (blanking_table), cycle_spinbutton, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, cycle_spinbutton, _("How long before the monitor goes completely black."), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (cycle_spinbutton), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (cycle_spinbutton), TRUE);

  demo_manual_hbbox = gtk_hbutton_box_new ();
  gtk_widget_set_name (demo_manual_hbbox, "demo_manual_hbbox");
  gtk_widget_ref (demo_manual_hbbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "demo_manual_hbbox", demo_manual_hbbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (demo_manual_hbbox);
  gtk_table_attach (GTK_TABLE (demos_table), demo_manual_hbbox, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (demo_manual_hbbox), GTK_BUTTONBOX_SPREAD);

  demo = gtk_button_new_with_label (_("Preview"));
  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_hbbox), demo);
  GTK_WIDGET_SET_FLAGS (demo, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, demo, _("Demo the selected screen saver in full-screen mode (click the mouse to return.)"), NULL);

  settings = gtk_button_new_with_label (_("Settings..."));
  gtk_widget_set_name (settings, "settings");
  gtk_widget_ref (settings);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "settings", settings,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (settings);
  gtk_container_add (GTK_CONTAINER (demo_manual_hbbox), settings);
  GTK_WIDGET_SET_FLAGS (settings, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, settings, _("Customization and explanation of the selected screen saver."), NULL);

  list_vbox = gtk_vbox_new (FALSE, 0);
  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_table_attach (GTK_TABLE (demos_table), list_vbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (list_vbox), 10);

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

  mode_label = gtk_label_new (_("Mode:"));
  gtk_widget_set_name (mode_label, "mode_label");
  gtk_widget_ref (mode_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "mode_label", mode_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mode_label);
  gtk_box_pack_start (GTK_BOX (mode_hbox), mode_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (mode_label), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (mode_label), 0, 0.5);

  mode_menu = gtk_option_menu_new ();
  gtk_widget_set_name (mode_menu, "mode_menu");
  gtk_widget_ref (mode_menu);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "mode_menu", mode_menu,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (mode_menu);
  gtk_box_pack_start (GTK_BOX (mode_hbox), mode_menu, FALSE, FALSE, 4);
  mode_menu_menu = gtk_menu_new ();
  glade_menuitem = gtk_menu_item_new_with_label (_("Disable Screen Saver"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (mode_menu_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("Blank Screen Only"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (mode_menu_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("Only One Screen Saver"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (mode_menu_menu), glade_menuitem);
  glade_menuitem = gtk_menu_item_new_with_label (_("Random Screen Saver"));
  gtk_widget_show (glade_menuitem);
  gtk_menu_append (GTK_MENU (mode_menu_menu), glade_menuitem);
  gtk_option_menu_set_menu (GTK_OPTION_MENU (mode_menu), mode_menu_menu);
  gtk_option_menu_set_history (GTK_OPTION_MENU (mode_menu), 3);

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

  use_col_frame = gtk_frame_new (NULL);
  gtk_widget_set_name (use_col_frame, "use_col_frame");
  gtk_widget_ref (use_col_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "use_col_frame", use_col_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (use_col_frame);
  gtk_box_pack_start (GTK_BOX (col_head_hbox), use_col_frame, FALSE, FALSE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (use_col_frame), GTK_SHADOW_OUT);

  use_label = gtk_label_new (_("Use"));
  gtk_widget_set_name (use_label, "use_label");
  gtk_widget_ref (use_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "use_label", use_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (use_label);
  gtk_container_add (GTK_CONTAINER (use_col_frame), use_label);
  gtk_label_set_justify (GTK_LABEL (use_label), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (use_label), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (use_label), 3, 0);

  saver_col_frame = gtk_frame_new (NULL);
  gtk_widget_set_name (saver_col_frame, "saver_col_frame");
  gtk_widget_ref (saver_col_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "saver_col_frame", saver_col_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (saver_col_frame);
  gtk_box_pack_start (GTK_BOX (col_head_hbox), saver_col_frame, TRUE, TRUE, 0);
  gtk_frame_set_shadow_type (GTK_FRAME (saver_col_frame), GTK_SHADOW_OUT);

  saver_label = gtk_label_new (_("Screen Saver"));
  gtk_widget_set_name (saver_label, "saver_label");
  gtk_widget_ref (saver_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "saver_label", saver_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (saver_label);
  gtk_container_add (GTK_CONTAINER (saver_col_frame), saver_label);
  gtk_label_set_justify (GTK_LABEL (saver_label), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (saver_label), 0, 0.5);
  gtk_misc_set_padding (GTK_MISC (saver_label), 6, 0);

  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_end (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 screen saver in the 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 screen saver in the list in full-screen mode (click the mouse to return.)"), NULL);

  preview_frame = gtk_frame_new (_("Description"));
  gtk_widget_set_name (preview_frame, "preview_frame");
  gtk_widget_ref (preview_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "preview_frame", preview_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (preview_frame);
  gtk_table_attach (GTK_TABLE (demos_table), preview_frame, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 0, 6);

  preview_aspectframe = gtk_aspect_frame_new (NULL, 0.5, 0.5, 1.33, FALSE);
  gtk_widget_set_name (preview_aspectframe, "preview_aspectframe");
  gtk_widget_ref (preview_aspectframe);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "preview_aspectframe", preview_aspectframe,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (preview_aspectframe);
  gtk_container_add (GTK_CONTAINER (preview_frame), preview_aspectframe);
  gtk_container_set_border_width (GTK_CONTAINER (preview_aspectframe), 8);

  preview = gtk_drawing_area_new ();
  gtk_widget_set_name (preview, "preview");
  gtk_widget_ref (preview);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "preview", preview,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (preview);
  gtk_container_add (GTK_CONTAINER (preview_aspectframe), preview);

  demo_tab = gtk_label_new (_("Display Modes"));
  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_table = gtk_table_new (2, 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_container_add (GTK_CONTAINER (notebook), options_table);

  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), diag_frame, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (diag_frame), 10);

  diag_hbox = gtk_hbox_new (FALSE, 8);
  gtk_widget_set_name (diag_hbox, "diag_hbox");
  gtk_widget_ref (diag_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "diag_hbox", diag_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (diag_hbox);
  gtk_container_add (GTK_CONTAINER (diag_frame), diag_hbox);
  gtk_container_set_border_width (GTK_CONTAINER (diag_hbox), 8);

  diag_logo = create_pixmap (xscreensaver_demo, "screensaver-diagnostic.xpm");
  gtk_widget_set_name (diag_logo, "diag_logo");
  gtk_widget_ref (diag_logo);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "diag_logo", diag_logo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (diag_logo);
  gtk_box_pack_start (GTK_BOX (diag_hbox), diag_logo, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (diag_logo), 0.5, 0);

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

  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_box_pack_start (GTK_BOX (diag_vbox), verbose_button_eventbox, FALSE, FALSE, 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);

  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_box_pack_start (GTK_BOX (diag_vbox), capture_button_eventbox, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, capture_button_eventbox, _("Whether any error output of the display modes should be redirected to the screen."), 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);

  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_box_pack_start (GTK_BOX (diag_vbox), splash_button_eventbox, FALSE, FALSE, 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);

  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), cmap_frame, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (cmap_frame), 10);

  cmap_hbox = gtk_hbox_new (FALSE, 8);
  gtk_widget_set_name (cmap_hbox, "cmap_hbox");
  gtk_widget_ref (cmap_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmap_hbox", cmap_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmap_hbox);
  gtk_container_add (GTK_CONTAINER (cmap_frame), cmap_hbox);
  gtk_container_set_border_width (GTK_CONTAINER (cmap_hbox), 8);

  cmap_logo = create_pixmap (xscreensaver_demo, "screensaver-colorselector.xpm");
  gtk_widget_set_name (cmap_logo, "cmap_logo");
  gtk_widget_ref (cmap_logo);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "cmap_logo", cmap_logo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmap_logo);
  gtk_box_pack_start (GTK_BOX (cmap_hbox), cmap_logo, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (cmap_logo), 0.5, 0);

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

  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_box_pack_start (GTK_BOX (cmap_vbox), install_button_eventbox, FALSE, FALSE, 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);

  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_box_pack_start (GTK_BOX (cmap_vbox), cmap_hr, FALSE, FALSE, 4);

  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_box_pack_start (GTK_BOX (cmap_vbox), fade_button_eventbox, FALSE, FALSE, 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_box_pack_start (GTK_BOX (cmap_vbox), unfade_button_eventbox, FALSE, FALSE, 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);

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

  fade_dummy = gtk_label_new ("");
  gtk_widget_set_name (fade_dummy, "fade_dummy");
  gtk_widget_ref (fade_dummy);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "fade_dummy", fade_dummy,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fade_dummy);
  gtk_box_pack_start (GTK_BOX (fade_hbox), fade_dummy, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (fade_dummy), GTK_JUSTIFY_LEFT);
  gtk_misc_set_padding (GTK_MISC (fade_dummy), 3, 0);

  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_box_pack_start (GTK_BOX (fade_hbox), fade_label, FALSE, FALSE, 10);
  gtk_label_set_justify (GTK_LABEL (fade_label), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (fade_label), 0, 0.5);

  fade_spinbutton_adj = gtk_adjustment_new (0, 0, 10, 1, 1, 1);
  fade_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (fade_spinbutton_adj), 1, 0);
  gtk_widget_set_name (fade_spinbutton, "fade_spinbutton");
  gtk_widget_ref (fade_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "fade_spinbutton", fade_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fade_spinbutton);
  gtk_box_pack_start (GTK_BOX (fade_hbox), fade_spinbutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, fade_spinbutton, _("How long it should take for the screen to fade in and out."), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fade_spinbutton), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (fade_spinbutton), TRUE);

  fade_sec_label = gtk_label_new (_("seconds"));
  gtk_widget_set_name (fade_sec_label, "fade_sec_label");
  gtk_widget_ref (fade_sec_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "fade_sec_label", fade_sec_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (fade_sec_label);
  gtk_box_pack_start (GTK_BOX (fade_hbox), fade_sec_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (fade_sec_label), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (fade_sec_label), 0, 0.5);

  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), dpms_frame, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (dpms_frame), 10);

  dpms_hbox = gtk_hbox_new (FALSE, 8);
  gtk_widget_set_name (dpms_hbox, "dpms_hbox");
  gtk_widget_ref (dpms_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_hbox", dpms_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_hbox);
  gtk_container_add (GTK_CONTAINER (dpms_frame), dpms_hbox);
  gtk_container_set_border_width (GTK_CONTAINER (dpms_hbox), 8);

  dpms_logo = create_pixmap (xscreensaver_demo, "screensaver-power.xpm");
  gtk_widget_set_name (dpms_logo, "dpms_logo");
  gtk_widget_ref (dpms_logo);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_logo", dpms_logo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_logo);
  gtk_box_pack_start (GTK_BOX (dpms_hbox), dpms_logo, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (dpms_logo), 0.5, 0);

  dpms_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (dpms_vbox, "dpms_vbox");
  gtk_widget_ref (dpms_vbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_vbox", dpms_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_vbox);
  gtk_box_pack_start (GTK_BOX (dpms_hbox), dpms_vbox, FALSE, FALSE, 0);

  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_box_pack_start (GTK_BOX (dpms_vbox), dpms_button_eventbox, FALSE, FALSE, 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);

  dpms_table = gtk_table_new (3, 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_box_pack_start (GTK_BOX (dpms_vbox), dpms_table, FALSE, FALSE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (dpms_table), 2);

  dpms_standby_spinbutton_adj = gtk_adjustment_new (0, 0, 1440, 1, 30, 30);
  dpms_standby_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (dpms_standby_spinbutton_adj), 15, 0);
  gtk_widget_set_name (dpms_standby_spinbutton, "dpms_standby_spinbutton");
  gtk_widget_ref (dpms_standby_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_standby_spinbutton", dpms_standby_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_standby_spinbutton);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_standby_spinbutton, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, dpms_standby_spinbutton, _("How long before the monitor goes completely black."), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (dpms_standby_spinbutton), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (dpms_standby_spinbutton), TRUE);

  dpms_standby_mlabel = gtk_label_new (_("minutes"));
  gtk_widget_set_name (dpms_standby_mlabel, "dpms_standby_mlabel");
  gtk_widget_ref (dpms_standby_mlabel);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_standby_mlabel", dpms_standby_mlabel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_standby_mlabel);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_standby_mlabel, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (dpms_standby_mlabel), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (dpms_standby_mlabel), 0, 0.5);

  dpms_suspend_mlabel = gtk_label_new (_("minutes"));
  gtk_widget_set_name (dpms_suspend_mlabel, "dpms_suspend_mlabel");
  gtk_widget_ref (dpms_suspend_mlabel);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_suspend_mlabel", dpms_suspend_mlabel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_suspend_mlabel);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_suspend_mlabel, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (dpms_suspend_mlabel), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (dpms_suspend_mlabel), 0, 0.5);

  dpms_off_mlabel = gtk_label_new (_("minutes"));
  gtk_widget_set_name (dpms_off_mlabel, "dpms_off_mlabel");
  gtk_widget_ref (dpms_off_mlabel);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_off_mlabel", dpms_off_mlabel,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_off_mlabel);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_off_mlabel, 2, 3, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_justify (GTK_LABEL (dpms_off_mlabel), GTK_JUSTIFY_LEFT);
  gtk_misc_set_alignment (GTK_MISC (dpms_off_mlabel), 0, 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, 2, 3,
                    (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);
  gtk_misc_set_padding (GTK_MISC (dpms_off_label), 10, 0);

  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, 1, 2,
                    (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);
  gtk_misc_set_padding (GTK_MISC (dpms_suspend_label), 10, 0);

  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, 0, 1,
                    (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);
  gtk_misc_set_padding (GTK_MISC (dpms_standby_label), 10, 0);

  dpms_suspend_spinbutton_adj = gtk_adjustment_new (0, 0, 1440, 1, 30, 30);
  dpms_suspend_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (dpms_suspend_spinbutton_adj), 15, 0);
  gtk_widget_set_name (dpms_suspend_spinbutton, "dpms_suspend_spinbutton");
  gtk_widget_ref (dpms_suspend_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_suspend_spinbutton", dpms_suspend_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_suspend_spinbutton);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_suspend_spinbutton, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, dpms_suspend_spinbutton, _("How long until the monitor goes into power-saving mode."), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (dpms_suspend_spinbutton), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (dpms_suspend_spinbutton), TRUE);

  dpms_off_spinbutton_adj = gtk_adjustment_new (0, 0, 1440, 1, 30, 30);
  dpms_off_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (dpms_off_spinbutton_adj), 15, 0);
  gtk_widget_set_name (dpms_off_spinbutton, "dpms_off_spinbutton");
  gtk_widget_ref (dpms_off_spinbutton);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "dpms_off_spinbutton", dpms_off_spinbutton,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dpms_off_spinbutton);
  gtk_table_attach (GTK_TABLE (dpms_table), dpms_off_spinbutton, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, dpms_off_spinbutton, _("How long until the monitor powers down."), NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (dpms_off_spinbutton), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (dpms_off_spinbutton), TRUE);

  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), grab_frame, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (grab_frame), 10);

  grab_hbox = gtk_hbox_new (FALSE, 8);
  gtk_widget_set_name (grab_hbox, "grab_hbox");
  gtk_widget_ref (grab_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "grab_hbox", grab_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (grab_hbox);
  gtk_container_add (GTK_CONTAINER (grab_frame), grab_hbox);
  gtk_container_set_border_width (GTK_CONTAINER (grab_hbox), 8);

  img_logo = create_pixmap (xscreensaver_demo, "screensaver-snap.xpm");
  gtk_widget_set_name (img_logo, "img_logo");
  gtk_widget_ref (img_logo);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "img_logo", img_logo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (img_logo);
  gtk_box_pack_start (GTK_BOX (grab_hbox), img_logo, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (img_logo), 0.5, 0);

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

  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_box_pack_start (GTK_BOX (grab_vbox), grab_desk_eventbox, FALSE, FALSE, 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_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_box_pack_start (GTK_BOX (grab_vbox), grab_video_eventbox, FALSE, FALSE, 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_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_box_pack_start (GTK_BOX (grab_vbox), grab_image_eventbox, FALSE, FALSE, 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_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (image_hbox, "image_hbox");
  gtk_widget_ref (image_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_demo), "image_hbox", image_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (image_hbox);
  gtk_box_pack_start (GTK_BOX (grab_vbox), image_hbox, FALSE, FALSE, 0);

  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_box_pack_start (GTK_BOX (image_hbox), grab_dummy, FALSE, FALSE, 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_box_pack_start (GTK_BOX (image_hbox), image_text, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, image_text, _("The directory from which images will be randomly chosen."), NULL);

  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_box_pack_start (GTK_BOX (image_hbox), image_browse_button, FALSE, FALSE, 4);

  options_tab = gtk_label_new (_("Advanced"));
  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 (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 (switch_page_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_button), "toggled",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (timeout_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (timeout_spinbutton), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (timeout_spinbutton), "changed",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_spinbutton), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (lock_spinbutton), "changed",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cycle_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cycle_spinbutton), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cycle_spinbutton), "changed",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (demo), "clicked",
                      GTK_SIGNAL_FUNC (run_this_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (settings), "clicked",
                      GTK_SIGNAL_FUNC (settings_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 (verbose_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 (splash_button), "toggled",
                      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 (fade_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (fade_spinbutton), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (fade_spinbutton), "changed",
                      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 (dpms_standby_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_standby_spinbutton), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_standby_spinbutton), "changed",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_suspend_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_suspend_spinbutton), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_suspend_spinbutton), "changed",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_off_spinbutton), "activate",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_off_spinbutton), "focus_out_event",
                      GTK_SIGNAL_FUNC (pref_changed_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (dpms_off_spinbutton), "changed",
                      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 (grab_video_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_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 (image_browse_button), "clicked",
                      GTK_SIGNAL_FUNC (browse_image_dir_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;
}

GtkWidget*
create_xscreensaver_settings_dialog (void)
{
  GtkWidget *xscreensaver_settings_dialog;
  GtkWidget *dialog_vbox;
  GtkWidget *dialog_top_table;
  GtkWidget *opt_frame;
  GtkWidget *opt_notebook;
  GtkWidget *settings_vbox;
  GtkWidget *std_label;
  GtkWidget *opt_table;
  GtkWidget *cmd_logo;
  GtkWidget *visual_hbox;
  GtkWidget *visual;
  GtkWidget *visual_combo;
  GList *visual_combo_items = NULL;
  GtkWidget *combo_entry1;
  GtkWidget *cmd_label;
  GtkWidget *cmd_text;
  GtkWidget *adv_label;
  GtkWidget *doc_frame;
  GtkWidget *doc_vbox;
  GtkWidget *doc;
  GtkWidget *doc_hbuttonbox;
  GtkWidget *manual;
  GtkWidget *dialog_action_area;
  GtkWidget *actionarea_hbox;
  GtkWidget *dialog_hbuttonbox;
  GtkWidget *adv_button;
  GtkWidget *std_button;
  GtkWidget *ok_cancel_hbuttonbox;
  GtkWidget *ok_button;
  GtkWidget *cancel_button;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  xscreensaver_settings_dialog = gtk_dialog_new ();
  gtk_widget_set_name (xscreensaver_settings_dialog, "xscreensaver_settings_dialog");
  gtk_object_set_data (GTK_OBJECT (xscreensaver_settings_dialog), "xscreensaver_settings_dialog", xscreensaver_settings_dialog);
  gtk_window_set_title (GTK_WINDOW (xscreensaver_settings_dialog), _("XScreenSaver: Mode-Specific Settings"));
  GTK_WINDOW (xscreensaver_settings_dialog)->type = GTK_WINDOW_DIALOG;
  gtk_window_set_modal (GTK_WINDOW (xscreensaver_settings_dialog), TRUE);
  gtk_window_set_policy (GTK_WINDOW (xscreensaver_settings_dialog), TRUE, TRUE, FALSE);
  gtk_window_set_wmclass (GTK_WINDOW (xscreensaver_settings_dialog), "settings", "XScreenSaver");

  dialog_vbox = GTK_DIALOG (xscreensaver_settings_dialog)->vbox;
  gtk_widget_set_name (dialog_vbox, "dialog_vbox");
  gtk_object_set_data (GTK_OBJECT (xscreensaver_settings_dialog), "dialog_vbox", dialog_vbox);
  gtk_widget_show (dialog_vbox);

  dialog_top_table = gtk_table_new (1, 2, FALSE);
  gtk_widget_set_name (dialog_top_table, "dialog_top_table");
  gtk_widget_ref (dialog_top_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "dialog_top_table", dialog_top_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dialog_top_table);
  gtk_box_pack_start (GTK_BOX (dialog_vbox), dialog_top_table, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_top_table), 8);
  gtk_table_set_row_spacings (GTK_TABLE (dialog_top_table), 8);
  gtk_table_set_col_spacings (GTK_TABLE (dialog_top_table), 8);

  opt_frame = gtk_frame_new (_("Settings"));
  gtk_widget_set_name (opt_frame, "opt_frame");
  gtk_widget_ref (opt_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "opt_frame", opt_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (opt_frame);
  gtk_table_attach (GTK_TABLE (dialog_top_table), opt_frame, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 4, 8);

  opt_notebook = gtk_notebook_new ();
  gtk_widget_set_name (opt_notebook, "opt_notebook");
  gtk_widget_ref (opt_notebook);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "opt_notebook", opt_notebook,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (opt_notebook);
  gtk_container_add (GTK_CONTAINER (opt_frame), opt_notebook);
  gtk_container_set_border_width (GTK_CONTAINER (opt_notebook), 12);
  gtk_notebook_set_show_border (GTK_NOTEBOOK (opt_notebook), FALSE);
  gtk_notebook_set_tab_pos (GTK_NOTEBOOK (opt_notebook), GTK_POS_BOTTOM);

  settings_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (settings_vbox, "settings_vbox");
  gtk_widget_ref (settings_vbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "settings_vbox", settings_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (settings_vbox);
  gtk_container_add (GTK_CONTAINER (opt_notebook), settings_vbox);

  std_label = gtk_label_new (_("Standard"));
  gtk_widget_set_name (std_label, "std_label");
  gtk_widget_ref (std_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "std_label", std_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (std_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (opt_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (opt_notebook), 0), std_label);

  opt_table = gtk_table_new (4, 2, FALSE);
  gtk_widget_set_name (opt_table, "opt_table");
  gtk_widget_ref (opt_table);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "opt_table", opt_table,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (opt_table);
  gtk_container_add (GTK_CONTAINER (opt_notebook), opt_table);

  cmd_logo = create_pixmap (xscreensaver_settings_dialog, "screensaver-cmndln.xpm");
  gtk_widget_set_name (cmd_logo, "cmd_logo");
  gtk_widget_ref (cmd_logo);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "cmd_logo", cmd_logo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmd_logo);
  gtk_table_attach (GTK_TABLE (opt_table), cmd_logo, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_padding (GTK_MISC (cmd_logo), 4, 8);

  visual_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (visual_hbox, "visual_hbox");
  gtk_widget_ref (visual_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "visual_hbox", visual_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (visual_hbox);
  gtk_table_attach (GTK_TABLE (opt_table), visual_hbox, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  visual = gtk_label_new (_("Visual:"));
  gtk_widget_set_name (visual, "visual");
  gtk_widget_ref (visual);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "visual", visual,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (visual);
  gtk_box_pack_start (GTK_BOX (visual_hbox), 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), 4, 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_settings_dialog), "visual_combo", visual_combo,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (visual_combo);
  gtk_box_pack_start (GTK_BOX (visual_hbox), visual_combo, FALSE, FALSE, 0);
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("Any"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("Best"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("Default"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("Default-N"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("GL"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("TrueColor"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("PseudoColor"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("StaticGray"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("GrayScale"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("DirectColor"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("Color"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("Gray"));
  visual_combo_items = g_list_append (visual_combo_items, (gpointer) _("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_settings_dialog), "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"));

  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_settings_dialog), "cmd_label", cmd_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmd_label);
  gtk_table_attach (GTK_TABLE (opt_table), cmd_label, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 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_settings_dialog), "cmd_text", cmd_text,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cmd_text);
  gtk_table_attach (GTK_TABLE (opt_table), cmd_text, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_widget_set_usize (cmd_text, 80, -2);

  adv_label = gtk_label_new (_("Advanced"));
  gtk_widget_set_name (adv_label, "adv_label");
  gtk_widget_ref (adv_label);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "adv_label", adv_label,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (adv_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (opt_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (opt_notebook), 1), adv_label);

  doc_frame = gtk_frame_new (_("Description"));
  gtk_widget_set_name (doc_frame, "doc_frame");
  gtk_widget_ref (doc_frame);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "doc_frame", doc_frame,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (doc_frame);
  gtk_table_attach (GTK_TABLE (dialog_top_table), doc_frame, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_SHRINK | GTK_FILL), 4, 8);

  doc_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_set_name (doc_vbox, "doc_vbox");
  gtk_widget_ref (doc_vbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "doc_vbox", doc_vbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (doc_vbox);
  gtk_container_add (GTK_CONTAINER (doc_frame), doc_vbox);

  doc = gtk_label_new ("");
  gtk_widget_set_name (doc, "doc");
  gtk_widget_ref (doc);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "doc", doc,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (doc);
  gtk_box_pack_start (GTK_BOX (doc_vbox), doc, TRUE, TRUE, 0);
  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);

  doc_hbuttonbox = gtk_hbutton_box_new ();
  gtk_widget_set_name (doc_hbuttonbox, "doc_hbuttonbox");
  gtk_widget_ref (doc_hbuttonbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "doc_hbuttonbox", doc_hbuttonbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (doc_hbuttonbox);
  gtk_box_pack_end (GTK_BOX (doc_vbox), doc_hbuttonbox, FALSE, FALSE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (doc_hbuttonbox), 4);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (doc_hbuttonbox), GTK_BUTTONBOX_END);

  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_settings_dialog), "manual", manual,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (manual);
  gtk_container_add (GTK_CONTAINER (doc_hbuttonbox), 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);

  dialog_action_area = GTK_DIALOG (xscreensaver_settings_dialog)->action_area;
  gtk_widget_set_name (dialog_action_area, "dialog_action_area");
  gtk_object_set_data (GTK_OBJECT (xscreensaver_settings_dialog), "dialog_action_area", dialog_action_area);
  gtk_widget_show (dialog_action_area);
  gtk_container_set_border_width (GTK_CONTAINER (dialog_action_area), 10);

  actionarea_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_set_name (actionarea_hbox, "actionarea_hbox");
  gtk_widget_ref (actionarea_hbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "actionarea_hbox", actionarea_hbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (actionarea_hbox);
  gtk_box_pack_start (GTK_BOX (dialog_action_area), actionarea_hbox, TRUE, TRUE, 0);

  dialog_hbuttonbox = gtk_hbutton_box_new ();
  gtk_widget_set_name (dialog_hbuttonbox, "dialog_hbuttonbox");
  gtk_widget_ref (dialog_hbuttonbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "dialog_hbuttonbox", dialog_hbuttonbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (dialog_hbuttonbox);
  gtk_box_pack_start (GTK_BOX (actionarea_hbox), dialog_hbuttonbox, TRUE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_hbuttonbox), GTK_BUTTONBOX_SPREAD);

  adv_button = gtk_button_new_with_label (_("Advanced >>"));
  gtk_widget_set_name (adv_button, "adv_button");
  gtk_widget_ref (adv_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "adv_button", adv_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (adv_button);
  gtk_container_add (GTK_CONTAINER (dialog_hbuttonbox), adv_button);
  GTK_WIDGET_SET_FLAGS (adv_button, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, adv_button, _("Edit the command line directly."), NULL);

  std_button = gtk_button_new_with_label (_("Standard <<"));
  gtk_widget_set_name (std_button, "std_button");
  gtk_widget_ref (std_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "std_button", std_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (std_button);
  gtk_container_add (GTK_CONTAINER (dialog_hbuttonbox), std_button);
  GTK_WIDGET_SET_FLAGS (std_button, GTK_CAN_DEFAULT);
  gtk_tooltips_set_tip (tooltips, std_button, _("Back to the graphical configuration options."), NULL);

  ok_cancel_hbuttonbox = gtk_hbutton_box_new ();
  gtk_widget_set_name (ok_cancel_hbuttonbox, "ok_cancel_hbuttonbox");
  gtk_widget_ref (ok_cancel_hbuttonbox);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "ok_cancel_hbuttonbox", ok_cancel_hbuttonbox,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (ok_cancel_hbuttonbox);
  gtk_box_pack_start (GTK_BOX (actionarea_hbox), ok_cancel_hbuttonbox, TRUE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (ok_cancel_hbuttonbox), GTK_BUTTONBOX_END);

  ok_button = gtk_button_new_with_label (_("OK"));
  gtk_widget_set_name (ok_button, "ok_button");
  gtk_widget_ref (ok_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "ok_button", ok_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (ok_button);
  gtk_container_add (GTK_CONTAINER (ok_cancel_hbuttonbox), ok_button);
  GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);

  cancel_button = gtk_button_new_with_label (_("Cancel"));
  gtk_widget_set_name (cancel_button, "cancel_button");
  gtk_widget_ref (cancel_button);
  gtk_object_set_data_full (GTK_OBJECT (xscreensaver_settings_dialog), "cancel_button", cancel_button,
                            (GtkDestroyNotify) gtk_widget_unref);
  gtk_widget_show (cancel_button);
  gtk_container_add (GTK_CONTAINER (ok_cancel_hbuttonbox), cancel_button);
  GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);

  gtk_signal_connect (GTK_OBJECT (opt_notebook), "switch_page",
                      GTK_SIGNAL_FUNC (settings_switch_page_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (manual), "clicked",
                      GTK_SIGNAL_FUNC (manual_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (adv_button), "clicked",
                      GTK_SIGNAL_FUNC (settings_adv_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (std_button), "clicked",
                      GTK_SIGNAL_FUNC (settings_std_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (ok_button), "clicked",
                      GTK_SIGNAL_FUNC (settings_ok_cb),
                      NULL);
  gtk_signal_connect (GTK_OBJECT (cancel_button), "clicked",
                      GTK_SIGNAL_FUNC (settings_cancel_cb),
                      NULL);

  gtk_object_set_data (GTK_OBJECT (xscreensaver_settings_dialog), "tooltips", tooltips);

  return xscreensaver_settings_dialog;
}

