view src/crossfade/interface-2.0.c @ 3143:40e5d243971e

readd op_config_string
author Michal Lipski <tallica@o2.pl>
date Sat, 09 May 2009 17:57:43 +0200
parents a9593b76cf19
children 7b80d4fb493d
line wrap: on
line source

/*
 * DO NOT EDIT THIS FILE - it is generated by Glade.
 */

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

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

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

#include "callbacks.h"
#include "interface-2.0.h"
#include "support-2.0.h"

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

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

GtkWidget*
create_config_win (void)
{
  GtkWidget *config_win;
  GtkWidget *config_vbox;
  GtkWidget *config_notebook;
  GtkWidget *config_output_page;
  GtkWidget *output_plugin_vbox;
  GtkWidget *op_plugin_frame;
  GtkWidget *op_plugin_vbox;
  GtkWidget *op_plugin_optionmenu;
  GtkWidget *op_plugin_optionmenu_menu;
  GtkWidget *op_plugin_optionmenu_dummy;
  GtkWidget *op_plugin_buttonbox;
  GtkWidget *op_configure_button;
  GtkWidget *op_about_button;
  GtkWidget *label8;
  GtkWidget *op_options_frame;
  GtkWidget *op_options_vbox;
  GtkWidget *op_throttle_check;
  GtkWidget *op_maxblock_hbox;
  GtkWidget *op_maxblock_check;
  GtkObject *op_maxblock_spin_adj;
  GtkWidget *op_maxblock_spin;
  GtkWidget *op_forcereopen_check;
  GtkWidget *label9;
  GtkWidget *empty_notebook_page;
  GtkWidget *output_help_label;
  GtkWidget *config_devices_label;
  GtkWidget *config_crossfader_page;
  GtkWidget *xf_bufsize_hbox;
  GtkWidget *xf_bufsize_label;
  GtkObject *xf_buffer_spin_adj;
  GtkWidget *xf_buffer_spin;
  GtkWidget *xf_autobuf_check;
  GtkWidget *xf_config_hbox;
  GtkWidget *xf_config_label;
  GtkWidget *xf_config_optionmenu;
  GtkWidget *xf_config_optionmenu_menu;
  GtkWidget *xf_config_optionmenu_dummy;
  GtkWidget *xf_type_hbox;
  GtkWidget *xf_type_label;
  GtkWidget *xf_type_optionmenu;
  GtkWidget *xf_type_optionmenu_menu;
  GtkWidget *xf_type_optionmenu_dummy;
  GtkWidget *xf_type_notebook;
  GtkWidget *xft_reopen_label;
  GtkWidget *xft_flush_page;
  GtkWidget *xftf_pause_frame;
  GtkWidget *xftf_pause_table;
  GtkWidget *xftfp_length_label;
  GtkObject *xftfp_length_spin_adj;
  GtkWidget *xftfp_length_spin;
  GtkWidget *xftfp_enable_check;
  GtkWidget *label12;
  GtkWidget *xftf_fadein_frame;
  GtkWidget *xftf_fadein_table;
  GtkWidget *xftffi_length_hbox;
  GtkWidget *xftffi_length_label;
  GtkWidget *xftffi_volume_hbox;
  GtkWidget *xftffi_volume_label;
  GtkObject *xftffi_length_spin_adj;
  GtkWidget *xftffi_length_spin;
  GtkWidget *xftffi_enable_check;
  GtkObject *xftffi_volume_spin_adj;
  GtkWidget *xftffi_volume_spin;
  GtkWidget *label13;
  GtkWidget *xft_flush_label;
  GtkWidget *xft_none_label;
  GtkWidget *xft_pause_page;
  GtkWidget *xf_pause_frame;
  GtkWidget *xf_pause_table;
  GtkWidget *pause_length_hbox;
  GtkWidget *pause_length_label;
  GtkObject *pause_length_spin_adj;
  GtkWidget *pause_length_spin;
  GtkWidget *label14;
  GtkWidget *xft_pause_label;
  GtkWidget *xft_simplexf_page;
  GtkWidget *xf_simple_frame;
  GtkWidget *xf_simple_table;
  GtkWidget *simple_length_hbox;
  GtkWidget *simple_length_label;
  GtkObject *simple_length_spin_adj;
  GtkWidget *simple_length_spin;
  GtkWidget *label15;
  GtkWidget *xft_simplexf_label;
  GtkWidget *xft_advancedxf_page;
  GtkWidget *xf_fadeout_frame;
  GtkWidget *xf_fadeout_table;
  GtkWidget *fadeout_length_hbox;
  GtkWidget *fadeout_length_label;
  GtkObject *fadeout_length_spin_adj;
  GtkWidget *fadeout_length_spin;
  GtkWidget *fadeout_volume_hbox;
  GtkWidget *fadeout_volume_label;
  GtkObject *fadeout_volume_spin_adj;
  GtkWidget *fadeout_volume_spin;
  GtkWidget *fadeout_options_hbox;
  GtkWidget *fadeout_enable_check;
  GtkWidget *label16;
  GtkWidget *xf_offset_frame;
  GtkWidget *xf_offset_table;
  GtkWidget *xfofs_custom_hbox;
  GtkWidget *xfofs_custom_radiobutton;
  GSList *xfofs_custom_radiobutton_group = NULL;
  GtkObject *xfofs_custom_spin_adj;
  GtkWidget *xfofs_custom_spin;
  GtkWidget *xfofs_none_radiobutton;
  GtkWidget *xfofs_lockout_radiobutton;
  GtkWidget *xfofs_lockin_radiobutton;
  GtkWidget *label17;
  GtkWidget *xf_fadein_frame;
  GtkWidget *xf_fadein_table;
  GtkWidget *fadein_length_hbox;
  GtkWidget *fadein_length_label;
  GtkWidget *fadein_volume_hbox;
  GtkWidget *fadein_volume_label;
  GtkObject *fadein_length_spin_adj;
  GtkWidget *fadein_length_spin;
  GtkWidget *fadein_enable_check;
  GtkWidget *fadein_lock_check;
  GtkObject *fadein_volume_spin_adj;
  GtkWidget *fadein_volume_spin;
  GtkWidget *label18;
  GtkWidget *xft_advancedxf_label;
  GtkWidget *xft_fadein_page;
  GtkWidget *xftfi_fadein_frame;
  GtkWidget *xftfi_fadein_table;
  GtkWidget *xftfi_length_hbox;
  GtkWidget *xftfi_length_label;
  GtkWidget *xftfi_volume_hbox;
  GtkWidget *xftfi_volume_label;
  GtkObject *xftfi_length_spin_adj;
  GtkWidget *xftfi_length_spin;
  GtkObject *xftfi_volume_spin_adj;
  GtkWidget *xftfi_volume_spin;
  GtkWidget *label19;
  GtkWidget *xft_fadein_label;
  GtkWidget *xft_fadeout_page;
  GtkWidget *xftfo_fadeout_frame;
  GtkWidget *xftfo_fadeout_table;
  GtkWidget *xftfo_length_hbox;
  GtkWidget *xftfo_length_label;
  GtkObject *xftfo_length_spin_adj;
  GtkWidget *xftfo_length_spin;
  GtkWidget *xftfo_volume_hbox;
  GtkWidget *xftfo_volume_label;
  GtkObject *xftfo_volume_spin_adj;
  GtkWidget *xftfo_volume_spin;
  GtkWidget *label20;
  GtkWidget *xftfo_silence_frame;
  GtkWidget *xftfo_silence_table;
  GtkWidget *xftfo_silence_hbox;
  GtkWidget *xftfo_silence_label;
  GtkObject *xftfo_silence_spin_adj;
  GtkWidget *xftfo_silence_spin;
  GtkWidget *label21;
  GtkWidget *xft_fadeout_label;
  GtkWidget *xft_pause_none_label;
  GtkWidget *xft_pause_adv_page;
  GtkWidget *xft_fadeoutin_frame;
  GtkWidget *xft_fadeoutin_table;
  GtkObject *xftfoi_fadeout_spin_adj;
  GtkWidget *xftfoi_fadeout_spin;
  GtkObject *xftfoi_silence_spin_adj;
  GtkWidget *xftfoi_silence_spin;
  GtkObject *xftfoi_fadein_spin_adj;
  GtkWidget *xftfoi_fadein_spin;
  GtkWidget *xftfoi_fadein_hbox;
  GtkWidget *xftfoi_fadein_label;
  GtkWidget *xftfoi_silence_hbox;
  GtkWidget *xftfoi_silence_label;
  GtkWidget *xftfoi_fadeout_hbox;
  GtkWidget *xftfoi_fadeout_label;
  GtkWidget *label22;
  GtkWidget *xft_pause_adv_label;
  GtkWidget *config_crossfade_label;
  GtkWidget *config_gapkiller_page;
  GtkWidget *gap_leading_frame;
  GtkWidget *gap_leading_table;
  GtkObject *lgap_length_spin_adj;
  GtkWidget *lgap_length_spin;
  GtkObject *lgap_level_spin_adj;
  GtkWidget *lgap_level_spin;
  GtkWidget *lgap_length_hbox;
  GtkWidget *lgap_length_label;
  GtkWidget *lgap_level_hbox;
  GtkWidget *lgap_level_label;
  GtkWidget *lgap_enable_check;
  GtkWidget *label23;
  GtkWidget *gap_trailing_frame;
  GtkWidget *gap_trailing_table;
  GtkWidget *tgap_length_hbox;
  GtkWidget *tgap_length_label;
  GtkWidget *tgap_level_hbox;
  GtkWidget *tgap_level_label;
  GtkObject *tgap_length_spin_adj;
  GtkWidget *tgap_length_spin;
  GtkObject *tgap_level_spin_adj;
  GtkWidget *tgap_level_spin;
  GtkWidget *tgap_lock_check;
  GtkWidget *tgap_enable_check;
  GtkWidget *label24;
  GtkWidget *gap_advanced_frame;
  GtkWidget *gap_advanced_vbox;
  GtkWidget *gadv_crossing_check;
  GtkWidget *label25;
  GtkWidget *config_gapkiller_label;
  GtkWidget *config_misc_page;
  GtkWidget *misc_debug_frame;
  GtkWidget *misc_debug_vbox;
  GtkWidget *debug_stderr_check;
  GtkWidget *label26;
  GtkWidget *misc_mixopt_frame;
  GtkWidget *misc_mixopt_vbox;
  GtkWidget *mixopt_enable_check;
  GtkWidget *mixopt_reverse_check;
  GtkWidget *mixopt_software_check;
  GtkWidget *label27;
  GtkWidget *misc_other_frame;
  GtkWidget *misc_other_vbox;
  GtkWidget *moth_songchange_hbox;
  GtkWidget *moth_songchange_label;
  GtkObject *moth_songchange_spin_adj;
  GtkWidget *moth_songchange_spin;
  GtkWidget *moth_preload_hbox;
  GtkWidget *moth_preload_label;
  GtkObject *moth_preload_spin_adj;
  GtkWidget *moth_preload_spin;
  GtkWidget *moth_noxf_hbox;
  GtkWidget *moth_noxf_label;
  GtkWidget *noxf_album_check;
  GtkWidget *noxf_samefile_check;
  GtkWidget *moth_httpworkaround_check;
  GtkWidget *moth_opmaxused_hbox;
  GtkWidget *moth_opmaxused_check;
  GtkObject *moth_opmaxused_spin_adj;
  GtkWidget *moth_opmaxused_spin;
  GtkWidget *moth_quantaudio_check;
  GtkWidget *moth_outputkeepopened_check;
  GtkWidget *label28;
  GtkWidget *config_misc_label;
  GtkWidget *config_presets_page;
  GtkWidget *presets_name_hbox;
  GtkWidget *presets_name_entry;
  GtkWidget *presets_delete_button;
  GtkWidget *presets_new_button;
  GtkWidget *presets_list_scrolledwindow;
  GtkWidget *presets_list_list;
  GtkWidget *presets_list_bbox;
  GtkWidget *presets_load_button;
  GtkWidget *presets_save_button;
  GtkWidget *config_presets_label;
  GtkWidget *config_bbox;
  GtkWidget *config_ok;
  GtkWidget *config_cancel;
  GtkWidget *config_apply;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  config_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (config_win), "Crossfade Configuration");
  gtk_window_set_type_hint(GTK_WINDOW(config_win), GDK_WINDOW_TYPE_HINT_DIALOG); 

  config_vbox = gtk_vbox_new (FALSE, 10);
  gtk_widget_show (config_vbox);
  gtk_container_add (GTK_CONTAINER (config_win), config_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (config_vbox), 10);

  config_notebook = gtk_notebook_new ();
  gtk_widget_show (config_notebook);
  gtk_box_pack_start (GTK_BOX (config_vbox), config_notebook, TRUE, TRUE, 0);

  config_output_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (config_output_page);
  gtk_container_add (GTK_CONTAINER (config_notebook), config_output_page);
  gtk_container_set_border_width (GTK_CONTAINER (config_output_page), 5);

  output_plugin_vbox = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (output_plugin_vbox);
  gtk_container_add (GTK_CONTAINER (config_output_page), output_plugin_vbox);

  op_plugin_frame = gtk_frame_new (NULL);
  gtk_widget_show (op_plugin_frame);
  gtk_box_pack_start (GTK_BOX (output_plugin_vbox), op_plugin_frame, FALSE, TRUE, 0);

  op_plugin_vbox = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (op_plugin_vbox);
  gtk_container_add (GTK_CONTAINER (op_plugin_frame), op_plugin_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (op_plugin_vbox), 5);

  op_plugin_optionmenu = gtk_option_menu_new ();
  gtk_widget_show (op_plugin_optionmenu);
  gtk_box_pack_start (GTK_BOX (op_plugin_vbox), op_plugin_optionmenu, FALSE, FALSE, 0);

  op_plugin_optionmenu_menu = gtk_menu_new ();

  op_plugin_optionmenu_dummy = gtk_menu_item_new_with_mnemonic ("dummy");
  gtk_widget_show (op_plugin_optionmenu_dummy);
  gtk_container_add (GTK_CONTAINER (op_plugin_optionmenu_menu), op_plugin_optionmenu_dummy);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (op_plugin_optionmenu), op_plugin_optionmenu_menu);

  op_plugin_buttonbox = gtk_hbutton_box_new ();
  gtk_widget_show (op_plugin_buttonbox);
  gtk_box_pack_start (GTK_BOX (op_plugin_vbox), op_plugin_buttonbox, FALSE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (op_plugin_buttonbox), GTK_BUTTONBOX_START);
  gtk_box_set_spacing (GTK_BOX (op_plugin_buttonbox), 5);

  op_configure_button = gtk_button_new_with_mnemonic ("Configure");
  gtk_widget_show (op_configure_button);
  gtk_container_add (GTK_CONTAINER (op_plugin_buttonbox), op_configure_button);
  GTK_WIDGET_SET_FLAGS (op_configure_button, GTK_CAN_DEFAULT);

  op_about_button = gtk_button_new_with_mnemonic ("About");
  gtk_widget_show (op_about_button);
  gtk_container_add (GTK_CONTAINER (op_plugin_buttonbox), op_about_button);
  GTK_WIDGET_SET_FLAGS (op_about_button, GTK_CAN_DEFAULT);

  label8 = gtk_label_new ("Output plugin");
  gtk_widget_show (label8);
  gtk_frame_set_label_widget (GTK_FRAME (op_plugin_frame), label8);

  op_options_frame = gtk_frame_new (NULL);
  gtk_widget_show (op_options_frame);
  gtk_box_pack_start (GTK_BOX (output_plugin_vbox), op_options_frame, FALSE, TRUE, 0);

  op_options_vbox = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (op_options_vbox);
  gtk_container_add (GTK_CONTAINER (op_options_frame), op_options_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (op_options_vbox), 5);

  op_throttle_check = gtk_check_button_new_with_mnemonic ("Throttle Output");
  gtk_widget_show (op_throttle_check);
  gtk_box_pack_start (GTK_BOX (op_options_vbox), op_throttle_check, FALSE, FALSE, 0);

  op_maxblock_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (op_maxblock_hbox);
  gtk_box_pack_start (GTK_BOX (op_options_vbox), op_maxblock_hbox, TRUE, TRUE, 0);

  op_maxblock_check = gtk_check_button_new_with_mnemonic ("Max block size (bytes):");
  gtk_widget_show (op_maxblock_check);
  gtk_box_pack_start (GTK_BOX (op_maxblock_hbox), op_maxblock_check, FALSE, FALSE, 0);

  op_maxblock_spin_adj = gtk_adjustment_new (1024, 4, 1048580, 4, 16, 10);
  op_maxblock_spin = gtk_spin_button_new (GTK_ADJUSTMENT (op_maxblock_spin_adj), 10, 0);
  gtk_widget_show (op_maxblock_spin);
  gtk_box_pack_start (GTK_BOX (op_maxblock_hbox), op_maxblock_spin, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (op_maxblock_spin), TRUE);
  gtk_spin_button_set_snap_to_ticks (GTK_SPIN_BUTTON (op_maxblock_spin), TRUE);

  op_forcereopen_check = gtk_check_button_new_with_mnemonic ("Force close/reopen on songchange");
  gtk_widget_show (op_forcereopen_check);
  gtk_box_pack_start (GTK_BOX (op_options_vbox), op_forcereopen_check, FALSE, FALSE, 0);

  label9 = gtk_label_new ("Plugin compatibility options");
  gtk_widget_show (label9);
  gtk_frame_set_label_widget (GTK_FRAME (op_options_frame), label9);

  output_help_label = gtk_label_new ("When modifying the Output Options or the Mixing buffer size, you need to stop/restart playback for the settings to take effect.");
  gtk_widget_show (output_help_label);
  gtk_box_pack_start (GTK_BOX (config_output_page), output_help_label, TRUE, TRUE, 0);
  gtk_label_set_line_wrap (GTK_LABEL (output_help_label), TRUE);

  config_devices_label = gtk_label_new ("Output");
  gtk_widget_show (config_devices_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (config_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (config_notebook), 0), config_devices_label);
  gtk_label_set_justify (GTK_LABEL (config_devices_label), GTK_JUSTIFY_CENTER);

  config_crossfader_page = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (config_crossfader_page);
  gtk_container_add (GTK_CONTAINER (config_notebook), config_crossfader_page);
  gtk_container_set_border_width (GTK_CONTAINER (config_crossfader_page), 5);

  xf_bufsize_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (xf_bufsize_hbox);
  gtk_box_pack_start (GTK_BOX (config_crossfader_page), xf_bufsize_hbox, FALSE, FALSE, 0);

  xf_bufsize_label = gtk_label_new ("Mixing buffer size (ms):");
  gtk_widget_show (xf_bufsize_label);
  gtk_box_pack_start (GTK_BOX (xf_bufsize_hbox), xf_bufsize_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (xf_bufsize_label), GTK_JUSTIFY_CENTER);

  xf_buffer_spin_adj = gtk_adjustment_new (8500, 0, 60000, 100, 1000, 10);
  xf_buffer_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xf_buffer_spin_adj), 0, 0);
  gtk_widget_show (xf_buffer_spin);
  gtk_box_pack_start (GTK_BOX (xf_bufsize_hbox), xf_buffer_spin, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, xf_buffer_spin, "Specify the size of the mixing buffer. Mixing buffer space is required for pauses, fade-outs, offsetting (i.e. interleaving the end and beginning of two songs) and killing trailing gaps. Fade-ins and killing leading gaps are done on-the-fly and do not depend on mixing buffer space.\nDefault: n/a - calculated automatically", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xf_buffer_spin), TRUE);

  xf_autobuf_check = gtk_check_button_new_with_mnemonic ("auto");
  gtk_widget_show (xf_autobuf_check);
  gtk_box_pack_start (GTK_BOX (xf_bufsize_hbox), xf_autobuf_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, xf_autobuf_check, "Automatically calculate an optimal buffer size.\nDefault: On", NULL);

  xf_config_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (xf_config_hbox);
  gtk_box_pack_start (GTK_BOX (config_crossfader_page), xf_config_hbox, FALSE, FALSE, 0);

  xf_config_label = gtk_label_new ("Set parameters for:");
  gtk_widget_show (xf_config_label);
  gtk_box_pack_start (GTK_BOX (xf_config_hbox), xf_config_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (xf_config_label), GTK_JUSTIFY_CENTER);

  xf_config_optionmenu = gtk_option_menu_new ();
  gtk_widget_show (xf_config_optionmenu);
  gtk_box_pack_start (GTK_BOX (xf_config_hbox), xf_config_optionmenu, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, xf_config_optionmenu, "Select the type of songchange you want to configure:\n* Start of playback: When starting playback by pressing PLAY\n* Automatic songchange: When reaching the end of a song and the playlist advances to the next song\n* Manual songchange: When manually selecting another song, for example by pressing NEXT/PREV\n* Manual stop: When pressing the STOP button\n* End of playlist: After the last song in the playlist has been played\n* Seeking: When seeking within the current song", NULL);

  xf_config_optionmenu_menu = gtk_menu_new ();

  xf_config_optionmenu_dummy = gtk_menu_item_new_with_mnemonic ("dummy");
  gtk_widget_show (xf_config_optionmenu_dummy);
  gtk_container_add (GTK_CONTAINER (xf_config_optionmenu_menu), xf_config_optionmenu_dummy);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (xf_config_optionmenu), xf_config_optionmenu_menu);

  xf_type_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (xf_type_hbox);
  gtk_box_pack_start (GTK_BOX (config_crossfader_page), xf_type_hbox, FALSE, FALSE, 0);

  xf_type_label = gtk_label_new ("Crossfade/Transition type:");
  gtk_widget_show (xf_type_label);
  gtk_box_pack_start (GTK_BOX (xf_type_hbox), xf_type_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (xf_type_label), GTK_JUSTIFY_CENTER);

  xf_type_optionmenu = gtk_option_menu_new ();
  gtk_widget_show (xf_type_optionmenu);
  gtk_box_pack_start (GTK_BOX (xf_type_hbox), xf_type_optionmenu, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, xf_type_optionmenu, "Select the transition to be used for the songchange type selected above:\n* Fade-in: Fade-in at 'Start of playback'\n* Reopen output device: Force a close/open on the output plugin. This will most certainly re-introduce gaps and clicks, but might be usefull with some plugins.\n* Flush output device: Keeps the output plugin opened, but flushes its buffers. This will give you almost instant reaction when pressing NEXT/PREV.\n* None (gapless/off): Gapless mode. Keeps the device opened, but does not do any fading.\n* Simple crossfade: Does a simple crossfade between the previous and the next song.\n* Advanced crossfade: Allows you to configure the crossfade in more detail.\n* Fade-out: Fade-out at 'Manual stop' or 'End of playlist'.", NULL);

  xf_type_optionmenu_menu = gtk_menu_new ();

  xf_type_optionmenu_dummy = gtk_menu_item_new_with_mnemonic ("dummy");
  gtk_widget_show (xf_type_optionmenu_dummy);
  gtk_container_add (GTK_CONTAINER (xf_type_optionmenu_menu), xf_type_optionmenu_dummy);

  gtk_option_menu_set_menu (GTK_OPTION_MENU (xf_type_optionmenu), xf_type_optionmenu_menu);

  xf_type_notebook = gtk_notebook_new ();
  gtk_widget_show (xf_type_notebook);
  gtk_box_pack_start (GTK_BOX (config_crossfader_page), xf_type_notebook, FALSE, FALSE, 0);
  GTK_WIDGET_UNSET_FLAGS (xf_type_notebook, GTK_CAN_FOCUS);
  gtk_notebook_set_show_tabs (GTK_NOTEBOOK (xf_type_notebook), FALSE);
  gtk_notebook_set_show_border (GTK_NOTEBOOK (xf_type_notebook), FALSE);

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

  xft_reopen_label = gtk_label_new ("Reopen");
  gtk_widget_show (xft_reopen_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 0), xft_reopen_label);
  gtk_label_set_justify (GTK_LABEL (xft_reopen_label), GTK_JUSTIFY_CENTER);

  xft_flush_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (xft_flush_page);
  gtk_container_add (GTK_CONTAINER (xf_type_notebook), xft_flush_page);

  xftf_pause_frame = gtk_frame_new (NULL);
  gtk_widget_show (xftf_pause_frame);
  gtk_box_pack_start (GTK_BOX (xft_flush_page), xftf_pause_frame, FALSE, FALSE, 0);

  xftf_pause_table = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (xftf_pause_table);
  gtk_container_add (GTK_CONTAINER (xftf_pause_frame), xftf_pause_table);
  gtk_container_set_border_width (GTK_CONTAINER (xftf_pause_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xftf_pause_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xftf_pause_table), 5);

  xftfp_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (xftfp_length_label);
  gtk_table_attach (GTK_TABLE (xftf_pause_table), xftfp_length_label, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  xftfp_length_spin_adj = gtk_adjustment_new (1000, 0, 60000, 100, 1000, 10);
  xftfp_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfp_length_spin_adj), 0, 0);
  gtk_widget_show (xftfp_length_spin);
  gtk_table_attach (GTK_TABLE (xftf_pause_table), xftfp_length_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfp_length_spin, "Specify the length of the silence to be inserted between the tracks.\nDefault: 2000", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfp_length_spin), TRUE);

  xftfp_enable_check = gtk_check_button_new_with_mnemonic ("Enable");
  gtk_widget_show (xftfp_enable_check);
  gtk_table_attach (GTK_TABLE (xftf_pause_table), xftfp_enable_check, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label12 = gtk_label_new ("Pause");
  gtk_widget_show (label12);
  gtk_frame_set_label_widget (GTK_FRAME (xftf_pause_frame), label12);

  xftf_fadein_frame = gtk_frame_new (NULL);
  gtk_widget_show (xftf_fadein_frame);
  gtk_box_pack_start (GTK_BOX (xft_flush_page), xftf_fadein_frame, FALSE, FALSE, 0);

  xftf_fadein_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (xftf_fadein_table);
  gtk_container_add (GTK_CONTAINER (xftf_fadein_frame), xftf_fadein_table);
  gtk_container_set_border_width (GTK_CONTAINER (xftf_fadein_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xftf_fadein_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xftf_fadein_table), 5);

  xftffi_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftffi_length_hbox);
  gtk_table_attach (GTK_TABLE (xftf_fadein_table), xftffi_length_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xftffi_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (xftffi_length_label);
  gtk_box_pack_start (GTK_BOX (xftffi_length_hbox), xftffi_length_label, FALSE, FALSE, 0);

  xftffi_volume_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftffi_volume_hbox);
  gtk_table_attach (GTK_TABLE (xftf_fadein_table), xftffi_volume_hbox, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xftffi_volume_label = gtk_label_new ("Start volume (%):");
  gtk_widget_show (xftffi_volume_label);
  gtk_box_pack_start (GTK_BOX (xftffi_volume_hbox), xftffi_volume_label, FALSE, FALSE, 0);

  xftffi_length_spin_adj = gtk_adjustment_new (1000, 0, 60000, 100, 1000, 10);
  xftffi_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftffi_length_spin_adj), 0, 0);
  gtk_widget_show (xftffi_length_spin);
  gtk_table_attach (GTK_TABLE (xftf_fadein_table), xftffi_length_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftffi_length_spin, "Set the duration for the fadein of the next song.", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftffi_length_spin), TRUE);

  xftffi_enable_check = gtk_check_button_new_with_mnemonic ("Enable");
  gtk_widget_show (xftffi_enable_check);
  gtk_table_attach (GTK_TABLE (xftf_fadein_table), xftffi_enable_check, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  xftffi_volume_spin_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
  xftffi_volume_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftffi_volume_spin_adj), 0, 0);
  gtk_widget_show (xftffi_volume_spin);
  gtk_table_attach (GTK_TABLE (xftf_fadein_table), xftffi_volume_spin, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftffi_volume_spin, "Set the start volume. XMMS-crossfade will fade from this volume to 100% during the time specified above.\nDefault: 0", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftffi_volume_spin), TRUE);

  label13 = gtk_label_new ("Fade in");
  gtk_widget_show (label13);
  gtk_frame_set_label_widget (GTK_FRAME (xftf_fadein_frame), label13);

  xft_flush_label = gtk_label_new ("Flush");
  gtk_widget_show (xft_flush_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 1), xft_flush_label);
  gtk_label_set_justify (GTK_LABEL (xft_flush_label), GTK_JUSTIFY_CENTER);

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

  xft_none_label = gtk_label_new ("None");
  gtk_widget_show (xft_none_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 2), xft_none_label);
  gtk_label_set_justify (GTK_LABEL (xft_none_label), GTK_JUSTIFY_CENTER);

  xft_pause_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (xft_pause_page);
  gtk_container_add (GTK_CONTAINER (xf_type_notebook), xft_pause_page);

  xf_pause_frame = gtk_frame_new (NULL);
  gtk_widget_show (xf_pause_frame);
  gtk_box_pack_start (GTK_BOX (xft_pause_page), xf_pause_frame, FALSE, FALSE, 0);

  xf_pause_table = gtk_table_new (1, 2, FALSE);
  gtk_widget_show (xf_pause_table);
  gtk_container_add (GTK_CONTAINER (xf_pause_frame), xf_pause_table);
  gtk_container_set_border_width (GTK_CONTAINER (xf_pause_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xf_pause_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xf_pause_table), 5);

  pause_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (pause_length_hbox);
  gtk_table_attach (GTK_TABLE (xf_pause_table), pause_length_hbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  pause_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (pause_length_label);
  gtk_box_pack_start (GTK_BOX (pause_length_hbox), pause_length_label, FALSE, FALSE, 0);

  pause_length_spin_adj = gtk_adjustment_new (1000, 0, 60000, 100, 1000, 10);
  pause_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (pause_length_spin_adj), 0, 0);
  gtk_widget_show (pause_length_spin);
  gtk_table_attach (GTK_TABLE (xf_pause_table), pause_length_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, pause_length_spin, "Specify the length of the silence to be inserted between the tracks.\nDefault: 2000", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (pause_length_spin), TRUE);

  label14 = gtk_label_new ("Pause");
  gtk_widget_show (label14);
  gtk_frame_set_label_widget (GTK_FRAME (xf_pause_frame), label14);

  xft_pause_label = gtk_label_new ("Pause");
  gtk_widget_show (xft_pause_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 3), xft_pause_label);
  gtk_label_set_justify (GTK_LABEL (xft_pause_label), GTK_JUSTIFY_CENTER);

  xft_simplexf_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (xft_simplexf_page);
  gtk_container_add (GTK_CONTAINER (xf_type_notebook), xft_simplexf_page);

  xf_simple_frame = gtk_frame_new (NULL);
  gtk_widget_show (xf_simple_frame);
  gtk_box_pack_start (GTK_BOX (xft_simplexf_page), xf_simple_frame, FALSE, FALSE, 0);

  xf_simple_table = gtk_table_new (1, 2, FALSE);
  gtk_widget_show (xf_simple_table);
  gtk_container_add (GTK_CONTAINER (xf_simple_frame), xf_simple_table);
  gtk_container_set_border_width (GTK_CONTAINER (xf_simple_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xf_simple_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xf_simple_table), 5);

  simple_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (simple_length_hbox);
  gtk_table_attach (GTK_TABLE (xf_simple_table), simple_length_hbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  simple_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (simple_length_label);
  gtk_box_pack_start (GTK_BOX (simple_length_hbox), simple_length_label, FALSE, FALSE, 0);

  simple_length_spin_adj = gtk_adjustment_new (1500, 0, 60000, 100, 1000, 10);
  simple_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (simple_length_spin_adj), 0, 0);
  gtk_widget_show (simple_length_spin);
  gtk_table_attach (GTK_TABLE (xf_simple_table), simple_length_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, simple_length_spin, "Specify the length of the crosssfade.\nDefault: depends on songchange type", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (simple_length_spin), TRUE);

  label15 = gtk_label_new ("Crossfade");
  gtk_widget_show (label15);
  gtk_frame_set_label_widget (GTK_FRAME (xf_simple_frame), label15);

  xft_simplexf_label = gtk_label_new ("Simple XF");
  gtk_widget_show (xft_simplexf_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 4), xft_simplexf_label);
  gtk_label_set_justify (GTK_LABEL (xft_simplexf_label), GTK_JUSTIFY_CENTER);

  xft_advancedxf_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (xft_advancedxf_page);
  gtk_container_add (GTK_CONTAINER (xf_type_notebook), xft_advancedxf_page);

  xf_fadeout_frame = gtk_frame_new (NULL);
  gtk_widget_show (xf_fadeout_frame);
  gtk_box_pack_start (GTK_BOX (xft_advancedxf_page), xf_fadeout_frame, FALSE, FALSE, 0);

  xf_fadeout_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (xf_fadeout_table);
  gtk_container_add (GTK_CONTAINER (xf_fadeout_frame), xf_fadeout_table);
  gtk_container_set_border_width (GTK_CONTAINER (xf_fadeout_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xf_fadeout_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xf_fadeout_table), 5);

  fadeout_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (fadeout_length_hbox);
  gtk_table_attach (GTK_TABLE (xf_fadeout_table), fadeout_length_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  fadeout_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (fadeout_length_label);
  gtk_box_pack_start (GTK_BOX (fadeout_length_hbox), fadeout_length_label, FALSE, FALSE, 0);

  fadeout_length_spin_adj = gtk_adjustment_new (1000, 0, 60000, 100, 1000, 10);
  fadeout_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (fadeout_length_spin_adj), 0, 0);
  gtk_widget_show (fadeout_length_spin);
  gtk_table_attach (GTK_TABLE (xf_fadeout_table), fadeout_length_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, fadeout_length_spin, "Set the duration for the fadeout of the previous song.", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fadeout_length_spin), TRUE);

  fadeout_volume_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (fadeout_volume_hbox);
  gtk_table_attach (GTK_TABLE (xf_fadeout_table), fadeout_volume_hbox, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  fadeout_volume_label = gtk_label_new ("End volume (%):");
  gtk_widget_show (fadeout_volume_label);
  gtk_box_pack_start (GTK_BOX (fadeout_volume_hbox), fadeout_volume_label, FALSE, FALSE, 0);

  fadeout_volume_spin_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
  fadeout_volume_spin = gtk_spin_button_new (GTK_ADJUSTMENT (fadeout_volume_spin_adj), 0, 0);
  gtk_widget_show (fadeout_volume_spin);
  gtk_table_attach (GTK_TABLE (xf_fadeout_table), fadeout_volume_spin, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, fadeout_volume_spin, "Set the end volume. XMMS-crossfade will fade from 100% to this volume during the time specified above.\nDefault: 0", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fadeout_volume_spin), TRUE);

  fadeout_options_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (fadeout_options_hbox);
  gtk_table_attach (GTK_TABLE (xf_fadeout_table), fadeout_options_hbox, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  fadeout_enable_check = gtk_check_button_new_with_mnemonic ("Enable");
  gtk_widget_show (fadeout_enable_check);
  gtk_box_pack_start (GTK_BOX (fadeout_options_hbox), fadeout_enable_check, FALSE, FALSE, 0);

  label16 = gtk_label_new ("Fade out");
  gtk_widget_show (label16);
  gtk_frame_set_label_widget (GTK_FRAME (xf_fadeout_frame), label16);

  xf_offset_frame = gtk_frame_new (NULL);
  gtk_widget_show (xf_offset_frame);
  gtk_box_pack_start (GTK_BOX (xft_advancedxf_page), xf_offset_frame, FALSE, FALSE, 0);

  xf_offset_table = gtk_table_new (4, 1, FALSE);
  gtk_widget_show (xf_offset_table);
  gtk_container_add (GTK_CONTAINER (xf_offset_frame), xf_offset_table);
  gtk_container_set_border_width (GTK_CONTAINER (xf_offset_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xf_offset_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xf_offset_table), 5);

  xfofs_custom_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (xfofs_custom_hbox);
  gtk_table_attach (GTK_TABLE (xf_offset_table), xfofs_custom_hbox, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xfofs_custom_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, "Custom (ms):");
  gtk_widget_show (xfofs_custom_radiobutton);
  gtk_box_pack_start (GTK_BOX (xfofs_custom_hbox), xfofs_custom_radiobutton, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, xfofs_custom_radiobutton, "Set a custom offset.", NULL);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (xfofs_custom_radiobutton), xfofs_custom_radiobutton_group);
  xfofs_custom_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (xfofs_custom_radiobutton));

  xfofs_custom_spin_adj = gtk_adjustment_new (-2000, -60000, 60000, 100, 1000, 10);
  xfofs_custom_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xfofs_custom_spin_adj), 0, 0);
  gtk_widget_show (xfofs_custom_spin);
  gtk_box_pack_start (GTK_BOX (xfofs_custom_hbox), xfofs_custom_spin, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, xfofs_custom_spin, "Set how much the end of the previous and the beginning of the next song should overlap.\n* Negative values indicate that the next song should start before the previous has reached the end.\n* A value of 0 means that the songs are concatenated seamlessly.\n* Positive values will yield insert silence inbetween..", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xfofs_custom_spin), TRUE);

  xfofs_none_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, "None (0 ms)");
  gtk_widget_show (xfofs_none_radiobutton);
  gtk_table_attach (GTK_TABLE (xf_offset_table), xfofs_none_radiobutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xfofs_none_radiobutton, "Don't overlap the two songs. The next song will start immediatelly after the previous has ended.", NULL);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (xfofs_none_radiobutton), xfofs_custom_radiobutton_group);
  xfofs_custom_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (xfofs_none_radiobutton));

  xfofs_lockout_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, "Lock to fadeout length");
  gtk_widget_show (xfofs_lockout_radiobutton);
  gtk_table_attach (GTK_TABLE (xf_offset_table), xfofs_lockout_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xfofs_lockout_radiobutton, "Overlap by the fadeout duration specified above.", NULL);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (xfofs_lockout_radiobutton), xfofs_custom_radiobutton_group);
  xfofs_custom_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (xfofs_lockout_radiobutton));

  xfofs_lockin_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, "Lock to fadein length");
  gtk_widget_show (xfofs_lockin_radiobutton);
  gtk_table_attach (GTK_TABLE (xf_offset_table), xfofs_lockin_radiobutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xfofs_lockin_radiobutton, "Overlap by the fadein duration specified below..", NULL);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (xfofs_lockin_radiobutton), xfofs_custom_radiobutton_group);
  xfofs_custom_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (xfofs_lockin_radiobutton));

  label17 = gtk_label_new ("Offset");
  gtk_widget_show (label17);
  gtk_frame_set_label_widget (GTK_FRAME (xf_offset_frame), label17);

  xf_fadein_frame = gtk_frame_new (NULL);
  gtk_widget_show (xf_fadein_frame);
  gtk_box_pack_start (GTK_BOX (xft_advancedxf_page), xf_fadein_frame, FALSE, FALSE, 0);

  xf_fadein_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (xf_fadein_table);
  gtk_container_add (GTK_CONTAINER (xf_fadein_frame), xf_fadein_table);
  gtk_container_set_border_width (GTK_CONTAINER (xf_fadein_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xf_fadein_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xf_fadein_table), 5);

  fadein_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (fadein_length_hbox);
  gtk_table_attach (GTK_TABLE (xf_fadein_table), fadein_length_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  fadein_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (fadein_length_label);
  gtk_box_pack_start (GTK_BOX (fadein_length_hbox), fadein_length_label, FALSE, FALSE, 0);

  fadein_volume_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (fadein_volume_hbox);
  gtk_table_attach (GTK_TABLE (xf_fadein_table), fadein_volume_hbox, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  fadein_volume_label = gtk_label_new ("Start volume (%):");
  gtk_widget_show (fadein_volume_label);
  gtk_box_pack_start (GTK_BOX (fadein_volume_hbox), fadein_volume_label, FALSE, FALSE, 0);

  fadein_length_spin_adj = gtk_adjustment_new (1000, 0, 60000, 100, 1000, 10);
  fadein_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (fadein_length_spin_adj), 0, 0);
  gtk_widget_show (fadein_length_spin);
  gtk_table_attach (GTK_TABLE (xf_fadein_table), fadein_length_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, fadein_length_spin, "Set the duration for the fadein of the next song.", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fadein_length_spin), TRUE);

  fadein_enable_check = gtk_check_button_new_with_mnemonic (" Enable");
  gtk_widget_show (fadein_enable_check);
  gtk_table_attach (GTK_TABLE (xf_fadein_table), fadein_enable_check, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  fadein_lock_check = gtk_check_button_new_with_mnemonic ("Lock to Fade-out");
  gtk_widget_show (fadein_lock_check);
  gtk_table_attach (GTK_TABLE (xf_fadein_table), fadein_lock_check, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, fadein_lock_check, "Use the same settings as fade-out.", NULL);

  fadein_volume_spin_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
  fadein_volume_spin = gtk_spin_button_new (GTK_ADJUSTMENT (fadein_volume_spin_adj), 0, 0);
  gtk_widget_show (fadein_volume_spin);
  gtk_table_attach (GTK_TABLE (xf_fadein_table), fadein_volume_spin, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, fadein_volume_spin, "Set the start volume. XMMS-crossfade will fade from this volume to 100% during the time specified above.\nDefault: 0", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (fadein_volume_spin), TRUE);

  label18 = gtk_label_new ("Fade in");
  gtk_widget_show (label18);
  gtk_frame_set_label_widget (GTK_FRAME (xf_fadein_frame), label18);

  xft_advancedxf_label = gtk_label_new ("Advanced XF");
  gtk_widget_show (xft_advancedxf_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 5), xft_advancedxf_label);
  gtk_label_set_justify (GTK_LABEL (xft_advancedxf_label), GTK_JUSTIFY_CENTER);

  xft_fadein_page = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (xft_fadein_page);
  gtk_container_add (GTK_CONTAINER (xf_type_notebook), xft_fadein_page);

  xftfi_fadein_frame = gtk_frame_new (NULL);
  gtk_widget_show (xftfi_fadein_frame);
  gtk_box_pack_start (GTK_BOX (xft_fadein_page), xftfi_fadein_frame, FALSE, FALSE, 0);

  xftfi_fadein_table = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (xftfi_fadein_table);
  gtk_container_add (GTK_CONTAINER (xftfi_fadein_frame), xftfi_fadein_table);
  gtk_container_set_border_width (GTK_CONTAINER (xftfi_fadein_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xftfi_fadein_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xftfi_fadein_table), 5);

  xftfi_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfi_length_hbox);
  gtk_table_attach (GTK_TABLE (xftfi_fadein_table), xftfi_length_hbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xftfi_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (xftfi_length_label);
  gtk_box_pack_start (GTK_BOX (xftfi_length_hbox), xftfi_length_label, FALSE, FALSE, 0);

  xftfi_volume_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfi_volume_hbox);
  gtk_table_attach (GTK_TABLE (xftfi_fadein_table), xftfi_volume_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xftfi_volume_label = gtk_label_new ("Start volume (%):");
  gtk_widget_show (xftfi_volume_label);
  gtk_box_pack_start (GTK_BOX (xftfi_volume_hbox), xftfi_volume_label, FALSE, FALSE, 0);

  xftfi_length_spin_adj = gtk_adjustment_new (1000, 0, 60000, 10, 100, 10);
  xftfi_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfi_length_spin_adj), 0, 0);
  gtk_widget_show (xftfi_length_spin);
  gtk_table_attach (GTK_TABLE (xftfi_fadein_table), xftfi_length_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfi_length_spin, "Set the duration for the fadein when starting playback.", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfi_length_spin), TRUE);

  xftfi_volume_spin_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
  xftfi_volume_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfi_volume_spin_adj), 0, 0);
  gtk_widget_show (xftfi_volume_spin);
  gtk_table_attach (GTK_TABLE (xftfi_fadein_table), xftfi_volume_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfi_volume_spin, "Set the start volume. XMMS-crossfade will fade from this volume to 100% during the time specified above.\nDefault: 0", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfi_volume_spin), TRUE);

  label19 = gtk_label_new ("Fade in");
  gtk_widget_show (label19);
  gtk_frame_set_label_widget (GTK_FRAME (xftfi_fadein_frame), label19);

  xft_fadein_label = gtk_label_new ("Fade in");
  gtk_widget_show (xft_fadein_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 6), xft_fadein_label);
  gtk_label_set_justify (GTK_LABEL (xft_fadein_label), GTK_JUSTIFY_CENTER);

  xft_fadeout_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (xft_fadeout_page);
  gtk_container_add (GTK_CONTAINER (xf_type_notebook), xft_fadeout_page);

  xftfo_fadeout_frame = gtk_frame_new (NULL);
  gtk_widget_show (xftfo_fadeout_frame);
  gtk_box_pack_start (GTK_BOX (xft_fadeout_page), xftfo_fadeout_frame, FALSE, FALSE, 0);

  xftfo_fadeout_table = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (xftfo_fadeout_table);
  gtk_container_add (GTK_CONTAINER (xftfo_fadeout_frame), xftfo_fadeout_table);
  gtk_container_set_border_width (GTK_CONTAINER (xftfo_fadeout_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xftfo_fadeout_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xftfo_fadeout_table), 5);

  xftfo_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfo_length_hbox);
  gtk_table_attach (GTK_TABLE (xftfo_fadeout_table), xftfo_length_hbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xftfo_length_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (xftfo_length_label);
  gtk_box_pack_start (GTK_BOX (xftfo_length_hbox), xftfo_length_label, FALSE, FALSE, 0);

  xftfo_length_spin_adj = gtk_adjustment_new (500, 0, 60000, 10, 100, 10);
  xftfo_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfo_length_spin_adj), 0, 0);
  gtk_widget_show (xftfo_length_spin);
  gtk_table_attach (GTK_TABLE (xftfo_fadeout_table), xftfo_length_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfo_length_spin, "Set the duration for the fadeout of the last song.", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfo_length_spin), TRUE);

  xftfo_volume_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfo_volume_hbox);
  gtk_table_attach (GTK_TABLE (xftfo_fadeout_table), xftfo_volume_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xftfo_volume_label = gtk_label_new ("End volume (%):");
  gtk_widget_show (xftfo_volume_label);
  gtk_box_pack_start (GTK_BOX (xftfo_volume_hbox), xftfo_volume_label, FALSE, FALSE, 0);

  xftfo_volume_spin_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10);
  xftfo_volume_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfo_volume_spin_adj), 0, 0);
  gtk_widget_show (xftfo_volume_spin);
  gtk_table_attach (GTK_TABLE (xftfo_fadeout_table), xftfo_volume_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfo_volume_spin, "Set the end volume. XMMS-crossfade will fade from 100% to this volume during the time specified above.\nDefault: 0", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfo_volume_spin), TRUE);

  label20 = gtk_label_new ("Fade out");
  gtk_widget_show (label20);
  gtk_frame_set_label_widget (GTK_FRAME (xftfo_fadeout_frame), label20);

  xftfo_silence_frame = gtk_frame_new (NULL);
  gtk_widget_show (xftfo_silence_frame);
  gtk_box_pack_start (GTK_BOX (xft_fadeout_page), xftfo_silence_frame, FALSE, FALSE, 0);

  xftfo_silence_table = gtk_table_new (1, 2, FALSE);
  gtk_widget_show (xftfo_silence_table);
  gtk_container_add (GTK_CONTAINER (xftfo_silence_frame), xftfo_silence_table);
  gtk_container_set_border_width (GTK_CONTAINER (xftfo_silence_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xftfo_silence_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xftfo_silence_table), 5);

  xftfo_silence_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfo_silence_hbox);
  gtk_table_attach (GTK_TABLE (xftfo_silence_table), xftfo_silence_hbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  xftfo_silence_label = gtk_label_new ("Length (ms):");
  gtk_widget_show (xftfo_silence_label);
  gtk_box_pack_start (GTK_BOX (xftfo_silence_hbox), xftfo_silence_label, FALSE, FALSE, 0);

  xftfo_silence_spin_adj = gtk_adjustment_new (100, 0, 60000, 10, 100, 10);
  xftfo_silence_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfo_silence_spin_adj), 0, 0);
  gtk_widget_show (xftfo_silence_spin);
  gtk_table_attach (GTK_TABLE (xftfo_silence_table), xftfo_silence_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfo_silence_spin, "Set how much additional silence should be played after the end of the last song. This way, you can avoid the clicks some soundcards produce when being shut down during playback.\nDefault: 500", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfo_silence_spin), TRUE);

  label21 = gtk_label_new ("Additional silence");
  gtk_widget_show (label21);
  gtk_frame_set_label_widget (GTK_FRAME (xftfo_silence_frame), label21);

  xft_fadeout_label = gtk_label_new ("Fade out");
  gtk_widget_show (xft_fadeout_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 7), xft_fadeout_label);
  gtk_label_set_justify (GTK_LABEL (xft_fadeout_label), GTK_JUSTIFY_CENTER);

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

  xft_pause_none_label = gtk_label_new ("None");
  gtk_widget_show (xft_pause_none_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 8), xft_pause_none_label);
  gtk_label_set_justify (GTK_LABEL (xft_pause_none_label), GTK_JUSTIFY_CENTER);

  xft_pause_adv_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (xft_pause_adv_page);
  gtk_container_add (GTK_CONTAINER (xf_type_notebook), xft_pause_adv_page);

  xft_fadeoutin_frame = gtk_frame_new (NULL);
  gtk_widget_show (xft_fadeoutin_frame);
  gtk_box_pack_start (GTK_BOX (xft_pause_adv_page), xft_fadeoutin_frame, FALSE, FALSE, 0);

  xft_fadeoutin_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (xft_fadeoutin_table);
  gtk_container_add (GTK_CONTAINER (xft_fadeoutin_frame), xft_fadeoutin_table);
  gtk_container_set_border_width (GTK_CONTAINER (xft_fadeoutin_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (xft_fadeoutin_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (xft_fadeoutin_table), 5);

  xftfoi_fadeout_spin_adj = gtk_adjustment_new (100, 0, 60000, 10, 100, 10);
  xftfoi_fadeout_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfoi_fadeout_spin_adj), 0, 0);
  gtk_widget_show (xftfoi_fadeout_spin);
  gtk_table_attach (GTK_TABLE (xft_fadeoutin_table), xftfoi_fadeout_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfoi_fadeout_spin, "Set the duration for the fadeout when pausing.\nDefault: 100", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfoi_fadeout_spin), TRUE);

  xftfoi_silence_spin_adj = gtk_adjustment_new (100, 0, 60000, 10, 100, 10);
  xftfoi_silence_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfoi_silence_spin_adj), 0, 0);
  gtk_widget_show (xftfoi_silence_spin);
  gtk_table_attach (GTK_TABLE (xft_fadeoutin_table), xftfoi_silence_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfoi_silence_spin, "Set how much additional silence should be played after pausing. This way, you can avoid the clicks some soundcards produce when entering pause.\nDefault: 100", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfoi_silence_spin), TRUE);

  xftfoi_fadein_spin_adj = gtk_adjustment_new (100, 0, 60000, 10, 100, 10);
  xftfoi_fadein_spin = gtk_spin_button_new (GTK_ADJUSTMENT (xftfoi_fadein_spin_adj), 0, 0);
  gtk_widget_show (xftfoi_fadein_spin);
  gtk_table_attach (GTK_TABLE (xft_fadeoutin_table), xftfoi_fadein_spin, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, xftfoi_fadein_spin, "Set the duration for the fadein when unpausing.\nDefault: 100", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (xftfoi_fadein_spin), TRUE);

  xftfoi_fadein_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfoi_fadein_hbox);
  gtk_table_attach (GTK_TABLE (xft_fadeoutin_table), xftfoi_fadein_hbox, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  xftfoi_fadein_label = gtk_label_new ("Fade out (ms):");
  gtk_widget_show (xftfoi_fadein_label);
  gtk_box_pack_start (GTK_BOX (xftfoi_fadein_hbox), xftfoi_fadein_label, FALSE, FALSE, 0);

  xftfoi_silence_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfoi_silence_hbox);
  gtk_table_attach (GTK_TABLE (xft_fadeoutin_table), xftfoi_silence_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  xftfoi_silence_label = gtk_label_new ("Silence (ms):");
  gtk_widget_show (xftfoi_silence_label);
  gtk_box_pack_start (GTK_BOX (xftfoi_silence_hbox), xftfoi_silence_label, FALSE, FALSE, 0);

  xftfoi_fadeout_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (xftfoi_fadeout_hbox);
  gtk_table_attach (GTK_TABLE (xft_fadeoutin_table), xftfoi_fadeout_hbox, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  xftfoi_fadeout_label = gtk_label_new ("Fade in (ms):");
  gtk_widget_show (xftfoi_fadeout_label);
  gtk_box_pack_start (GTK_BOX (xftfoi_fadeout_hbox), xftfoi_fadeout_label, FALSE, FALSE, 0);

  label22 = gtk_label_new ("Fade out / Fade in");
  gtk_widget_show (label22);
  gtk_frame_set_label_widget (GTK_FRAME (xft_fadeoutin_frame), label22);

  xft_pause_adv_label = gtk_label_new ("Fade out / Fade in");
  gtk_widget_show (xft_pause_adv_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (xf_type_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (xf_type_notebook), 9), xft_pause_adv_label);
  gtk_label_set_justify (GTK_LABEL (xft_pause_adv_label), GTK_JUSTIFY_CENTER);

  config_crossfade_label = gtk_label_new ("Crossfader");
  gtk_widget_show (config_crossfade_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (config_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (config_notebook), 1), config_crossfade_label);
  gtk_label_set_justify (GTK_LABEL (config_crossfade_label), GTK_JUSTIFY_CENTER);

  config_gapkiller_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (config_gapkiller_page);
  gtk_container_add (GTK_CONTAINER (config_notebook), config_gapkiller_page);
  gtk_container_set_border_width (GTK_CONTAINER (config_gapkiller_page), 5);

  gap_leading_frame = gtk_frame_new (NULL);
  gtk_widget_show (gap_leading_frame);
  gtk_box_pack_start (GTK_BOX (config_gapkiller_page), gap_leading_frame, FALSE, TRUE, 0);

  gap_leading_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (gap_leading_table);
  gtk_container_add (GTK_CONTAINER (gap_leading_frame), gap_leading_table);
  gtk_container_set_border_width (GTK_CONTAINER (gap_leading_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (gap_leading_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (gap_leading_table), 5);

  lgap_length_spin_adj = gtk_adjustment_new (500, 0, 60000, 10, 100, 10);
  lgap_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (lgap_length_spin_adj), 0, 0);
  gtk_widget_show (lgap_length_spin);
  gtk_table_attach (GTK_TABLE (gap_leading_table), lgap_length_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, lgap_length_spin, "Set the maximum length for gaps at the beginning of a stream.\nDefault: 500", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lgap_length_spin), TRUE);

  lgap_level_spin_adj = gtk_adjustment_new (512, 0, 32767, 16, 256, 10);
  lgap_level_spin = gtk_spin_button_new (GTK_ADJUSTMENT (lgap_level_spin_adj), 0, 0);
  gtk_widget_show (lgap_level_spin);
  gtk_table_attach (GTK_TABLE (gap_leading_table), lgap_level_spin, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, lgap_level_spin, "Set the maximum volume for gaps at the beginning of a stream. All samples below this value are considered as silent.\nDefault: 512", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (lgap_level_spin), TRUE);

  lgap_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (lgap_length_hbox);
  gtk_table_attach (GTK_TABLE (gap_leading_table), lgap_length_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  lgap_length_label = gtk_label_new ("Max. length (ms):");
  gtk_widget_show (lgap_length_label);
  gtk_box_pack_start (GTK_BOX (lgap_length_hbox), lgap_length_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (lgap_length_label), GTK_JUSTIFY_CENTER);

  lgap_level_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (lgap_level_hbox);
  gtk_table_attach (GTK_TABLE (gap_leading_table), lgap_level_hbox, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  lgap_level_label = gtk_label_new ("Max. level (16bit sample):");
  gtk_widget_show (lgap_level_label);
  gtk_box_pack_start (GTK_BOX (lgap_level_hbox), lgap_level_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (lgap_level_label), GTK_JUSTIFY_CENTER);

  lgap_enable_check = gtk_check_button_new_with_mnemonic ("Enable");
  gtk_widget_show (lgap_enable_check);
  gtk_table_attach (GTK_TABLE (gap_leading_table), lgap_enable_check, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label23 = gtk_label_new ("Leading gap killer");
  gtk_widget_show (label23);
  gtk_frame_set_label_widget (GTK_FRAME (gap_leading_frame), label23);

  gap_trailing_frame = gtk_frame_new (NULL);
  gtk_widget_show (gap_trailing_frame);
  gtk_box_pack_start (GTK_BOX (config_gapkiller_page), gap_trailing_frame, FALSE, TRUE, 0);

  gap_trailing_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (gap_trailing_table);
  gtk_container_add (GTK_CONTAINER (gap_trailing_frame), gap_trailing_table);
  gtk_container_set_border_width (GTK_CONTAINER (gap_trailing_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (gap_trailing_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (gap_trailing_table), 5);

  tgap_length_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (tgap_length_hbox);
  gtk_table_attach (GTK_TABLE (gap_trailing_table), tgap_length_hbox, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  tgap_length_label = gtk_label_new ("Max. length (ms):");
  gtk_widget_show (tgap_length_label);
  gtk_box_pack_start (GTK_BOX (tgap_length_hbox), tgap_length_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (tgap_length_label), GTK_JUSTIFY_CENTER);

  tgap_level_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (tgap_level_hbox);
  gtk_table_attach (GTK_TABLE (gap_trailing_table), tgap_level_hbox, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  tgap_level_label = gtk_label_new ("Max. level (16bit sample):");
  gtk_widget_show (tgap_level_label);
  gtk_box_pack_start (GTK_BOX (tgap_level_hbox), tgap_level_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (tgap_level_label), GTK_JUSTIFY_CENTER);

  tgap_length_spin_adj = gtk_adjustment_new (500, 0, 60000, 10, 100, 10);
  tgap_length_spin = gtk_spin_button_new (GTK_ADJUSTMENT (tgap_length_spin_adj), 0, 0);
  gtk_widget_show (tgap_length_spin);
  gtk_table_attach (GTK_TABLE (gap_trailing_table), tgap_length_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, tgap_length_spin, "Set the maximum length for gaps at the end of a stream.\nDefault: 500", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tgap_length_spin), TRUE);

  tgap_level_spin_adj = gtk_adjustment_new (512, 0, 32767, 1, 16, 10);
  tgap_level_spin = gtk_spin_button_new (GTK_ADJUSTMENT (tgap_level_spin_adj), 0, 0);
  gtk_widget_show (tgap_level_spin);
  gtk_table_attach (GTK_TABLE (gap_trailing_table), tgap_level_spin, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, tgap_level_spin, "Set the maximum volume for gaps at the end of a stream. All samples below this value are considered as silent.\nDefault: 512", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (tgap_level_spin), TRUE);

  tgap_lock_check = gtk_check_button_new_with_mnemonic ("Lock to Leading");
  gtk_widget_show (tgap_lock_check);
  gtk_table_attach (GTK_TABLE (gap_trailing_table), tgap_lock_check, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_tooltips_set_tip (tooltips, tgap_lock_check, "Use the same settings as above.", NULL);

  tgap_enable_check = gtk_check_button_new_with_mnemonic ("Enable");
  gtk_widget_show (tgap_enable_check);
  gtk_table_attach (GTK_TABLE (gap_trailing_table), tgap_enable_check, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label24 = gtk_label_new ("Trailing gap killer");
  gtk_widget_show (label24);
  gtk_frame_set_label_widget (GTK_FRAME (gap_trailing_frame), label24);

  gap_advanced_frame = gtk_frame_new (NULL);
  gtk_widget_show (gap_advanced_frame);
  gtk_box_pack_start (GTK_BOX (config_gapkiller_page), gap_advanced_frame, FALSE, FALSE, 0);

  gap_advanced_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (gap_advanced_vbox);
  gtk_container_add (GTK_CONTAINER (gap_advanced_frame), gap_advanced_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (gap_advanced_vbox), 5);

  gadv_crossing_check = gtk_check_button_new_with_mnemonic ("Skip to next zero crossing");
  gtk_widget_show (gadv_crossing_check);
  gtk_box_pack_start (GTK_BOX (gap_advanced_vbox), gadv_crossing_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, gadv_crossing_check, "If enabled, XMMS-crossfade will take additional care to avoid clicks with pre-faded (gapless) tracks. XMMS-crossfade will cut off the end of the previous song (the beginning of the next song) only at a zero-crossing of the sample values.\nDefault: On", NULL);

  label25 = gtk_label_new ("Advanced");
  gtk_widget_show (label25);
  gtk_frame_set_label_widget (GTK_FRAME (gap_advanced_frame), label25);

  config_gapkiller_label = gtk_label_new ("Gap Killer");
  gtk_widget_show (config_gapkiller_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (config_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (config_notebook), 2), config_gapkiller_label);
  gtk_label_set_justify (GTK_LABEL (config_gapkiller_label), GTK_JUSTIFY_CENTER);

  config_misc_page = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (config_misc_page);
  gtk_container_add (GTK_CONTAINER (config_notebook), config_misc_page);
  gtk_container_set_border_width (GTK_CONTAINER (config_misc_page), 5);

  misc_debug_frame = gtk_frame_new (NULL);
  gtk_widget_show (misc_debug_frame);
  gtk_box_pack_start (GTK_BOX (config_misc_page), misc_debug_frame, FALSE, FALSE, 0);

  misc_debug_vbox = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (misc_debug_vbox);
  gtk_container_add (GTK_CONTAINER (misc_debug_frame), misc_debug_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (misc_debug_vbox), 5);

  debug_stderr_check = gtk_check_button_new_with_mnemonic ("Write debug output to <stderr>");
  gtk_widget_show (debug_stderr_check);
  gtk_box_pack_start (GTK_BOX (misc_debug_vbox), debug_stderr_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, debug_stderr_check, "Monitors what is going on in XMMS-crossfade. If you think you found a bug in XMMS-crossfade, please enable this option and send me the output.\nNote that you should disable debug output if you start XMMS from within Netscape. Netscape will spam you with dialogs containing the debug output captured from <stderr>.\nDefault: Off", NULL);

  label26 = gtk_label_new ("Debug options");
  gtk_widget_show (label26);
  gtk_frame_set_label_widget (GTK_FRAME (misc_debug_frame), label26);

  misc_mixopt_frame = gtk_frame_new (NULL);
  gtk_widget_show (misc_mixopt_frame);
  gtk_box_pack_start (GTK_BOX (config_misc_page), misc_mixopt_frame, FALSE, FALSE, 0);

  misc_mixopt_vbox = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (misc_mixopt_vbox);
  gtk_container_add (GTK_CONTAINER (misc_mixopt_frame), misc_mixopt_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (misc_mixopt_vbox), 5);

  mixopt_enable_check = gtk_check_button_new_with_mnemonic ("Enable volume control");
  gtk_widget_show (mixopt_enable_check);
  gtk_box_pack_start (GTK_BOX (misc_mixopt_vbox), mixopt_enable_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, mixopt_enable_check, "Enables/disables XMMS volume and balance controls.\nDefault: On", NULL);

  mixopt_reverse_check = gtk_check_button_new_with_mnemonic ("Reverse balance");
  gtk_widget_show (mixopt_reverse_check);
  gtk_box_pack_start (GTK_BOX (misc_mixopt_vbox), mixopt_reverse_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, mixopt_reverse_check, "Reverses left and right with the balance control.\nDefault: Off", NULL);

  mixopt_software_check = gtk_check_button_new_with_mnemonic ("Software Mixer");
  gtk_widget_show (mixopt_software_check);
  gtk_box_pack_start (GTK_BOX (misc_mixopt_vbox), mixopt_software_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, mixopt_software_check, "Enable software mixer. Usefull for output plugins without mixer support.\nDefault: Off", NULL);

  label27 = gtk_label_new ("Volume control options");
  gtk_widget_show (label27);
  gtk_frame_set_label_widget (GTK_FRAME (misc_mixopt_frame), label27);

  misc_other_frame = gtk_frame_new (NULL);
  gtk_widget_show (misc_other_frame);
  gtk_box_pack_start (GTK_BOX (config_misc_page), misc_other_frame, FALSE, TRUE, 0);

  misc_other_vbox = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (misc_other_vbox);
  gtk_container_add (GTK_CONTAINER (misc_other_frame), misc_other_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (misc_other_vbox), 5);

  moth_songchange_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (moth_songchange_hbox);
  gtk_box_pack_start (GTK_BOX (misc_other_vbox), moth_songchange_hbox, TRUE, TRUE, 0);

  moth_songchange_label = gtk_label_new ("Songchange timeout (ms):");
  gtk_widget_show (moth_songchange_label);
  gtk_box_pack_start (GTK_BOX (moth_songchange_hbox), moth_songchange_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (moth_songchange_label), GTK_JUSTIFY_CENTER);

  moth_songchange_spin_adj = gtk_adjustment_new (100, 0, 5000, 10, 100, 10);
  moth_songchange_spin = gtk_spin_button_new (GTK_ADJUSTMENT (moth_songchange_spin_adj), 0, 0);
  gtk_widget_show (moth_songchange_spin);
  gtk_box_pack_start (GTK_BOX (moth_songchange_hbox), moth_songchange_spin, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, moth_songchange_spin, "The songchange timeout is the maximum time XMMS-crossfade waits for the next song. If this timeout is exceeded, the output plugin/device is closed.\nDefault: 100", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (moth_songchange_spin), TRUE);

  moth_preload_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (moth_preload_hbox);
  gtk_box_pack_start (GTK_BOX (misc_other_vbox), moth_preload_hbox, TRUE, TRUE, 0);

  moth_preload_label = gtk_label_new ("Mixing buffer preload (ms):");
  gtk_widget_show (moth_preload_label);
  gtk_box_pack_start (GTK_BOX (moth_preload_hbox), moth_preload_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (moth_preload_label), GTK_JUSTIFY_CENTER);

  moth_preload_spin_adj = gtk_adjustment_new (0, 0, 60000, 10, 100, 10);
  moth_preload_spin = gtk_spin_button_new (GTK_ADJUSTMENT (moth_preload_spin_adj), 0, 0);
  gtk_widget_show (moth_preload_spin);
  gtk_box_pack_start (GTK_BOX (moth_preload_hbox), moth_preload_spin, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, moth_preload_spin, "Tells XMMS-crossfade how much data it should buffer before it starts writing to the output plugin/device. Usually, this value can be set to 0, because the output plugin does preloading on its own.\nDefault: 0", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (moth_preload_spin), TRUE);

  moth_noxf_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (moth_noxf_hbox);
  gtk_box_pack_start (GTK_BOX (misc_other_vbox), moth_noxf_hbox, FALSE, FALSE, 0);

  moth_noxf_label = gtk_label_new ("Don't  crossfade");
  gtk_widget_show (moth_noxf_label);
  gtk_box_pack_start (GTK_BOX (moth_noxf_hbox), moth_noxf_label, FALSE, FALSE, 0);
  gtk_label_set_justify (GTK_LABEL (moth_noxf_label), GTK_JUSTIFY_CENTER);

  noxf_album_check = gtk_check_button_new_with_mnemonic ("successive tracks");
  gtk_widget_show (noxf_album_check);
  gtk_box_pack_start (GTK_BOX (moth_noxf_hbox), noxf_album_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, noxf_album_check, "This option enables the automatic detection of pre-faded or gapless tracks, like the tracks on some compilations or on most live albums. If such tracks are detected, crossfading will be disabled and only the gapkiller (if enabled) will be used for the songchange.\nDefault: On", NULL);

  noxf_samefile_check = gtk_check_button_new_with_mnemonic ("same file");
  gtk_widget_show (noxf_samefile_check);
  gtk_box_pack_start (GTK_BOX (moth_noxf_hbox), noxf_samefile_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, noxf_samefile_check, "This option disables crossfading between the same file. This can happen if you have only one file in the playlist and 'repeat' turned on.\nDefault: Off", NULL);

  moth_httpworkaround_check = gtk_check_button_new_with_mnemonic ("Enable HTTP buffer underrun workaround");
  gtk_widget_show (moth_httpworkaround_check);
  gtk_box_pack_start (GTK_BOX (misc_other_vbox), moth_httpworkaround_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, moth_httpworkaround_check, "Enable this when you have problems playing internet HTTP audio streams. Unfortunatelly, it also breaks crossfading.\nDefault: Off", NULL);

  moth_opmaxused_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (moth_opmaxused_hbox);
  gtk_box_pack_start (GTK_BOX (misc_other_vbox), moth_opmaxused_hbox, TRUE, TRUE, 0);

  moth_opmaxused_check = gtk_check_button_new_with_mnemonic ("Limit OP buffer usage (ms):");
  gtk_widget_show (moth_opmaxused_check);
  gtk_box_pack_start (GTK_BOX (moth_opmaxused_hbox), moth_opmaxused_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, moth_opmaxused_check, "With this option enabled, XMMS-crossfade will limit the amount of data being buffered by the output plugin. This way, you can decrease the latency between pressing STOP/NEXT/PREV and the new song actually being played. \nDefault: Off", NULL);

  moth_opmaxused_spin_adj = gtk_adjustment_new (500, 10, 10000, 10, 100, 10);
  moth_opmaxused_spin = gtk_spin_button_new (GTK_ADJUSTMENT (moth_opmaxused_spin_adj), 0, 0);
  gtk_widget_show (moth_opmaxused_spin);
  gtk_box_pack_start (GTK_BOX (moth_opmaxused_hbox), moth_opmaxused_spin, TRUE, TRUE, 0);
  gtk_tooltips_set_tip (tooltips, moth_opmaxused_spin, "Beware that setting this value too low also increases the chance of buffer underruns.\nDefault: 250", NULL);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (moth_opmaxused_spin), TRUE);

  moth_quantaudio_check = gtk_check_button_new_with_mnemonic ("Use Quantaudio timing comments");
  gtk_box_pack_start (GTK_BOX (misc_other_vbox), moth_quantaudio_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, moth_quantaudio_check, "Enable this when you have problems playing internet HTTP audio streams. Unfortunatelly, it also breaks crossfading.\nDefault: Off", NULL);

  moth_outputkeepopened_check = gtk_check_button_new_with_mnemonic ("Keep output opened");
  gtk_widget_show (moth_outputkeepopened_check);
  gtk_box_pack_start (GTK_BOX (misc_other_vbox), moth_outputkeepopened_check, FALSE, FALSE, 0);
  gtk_tooltips_set_tip (tooltips, moth_outputkeepopened_check, "Keep the output device opened all the time, even if XMMS is stopped. This way, you can avoid clicks caused by the soundcard when the device is opened or closed\nDefault: Off", NULL);

  label28 = gtk_label_new ("Advanced options");
  gtk_widget_show (label28);
  gtk_frame_set_label_widget (GTK_FRAME (misc_other_frame), label28);

  config_misc_label = gtk_label_new ("Advanced");
  gtk_widget_show (config_misc_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (config_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (config_notebook), 3), config_misc_label);
  gtk_label_set_justify (GTK_LABEL (config_misc_label), GTK_JUSTIFY_CENTER);

  config_presets_page = gtk_vbox_new (FALSE, 5);
  gtk_container_add (GTK_CONTAINER (config_notebook), config_presets_page);
  gtk_container_set_border_width (GTK_CONTAINER (config_presets_page), 5);

  presets_name_hbox = gtk_hbox_new (FALSE, 5);
  gtk_widget_show (presets_name_hbox);
  gtk_box_pack_start (GTK_BOX (config_presets_page), presets_name_hbox, FALSE, FALSE, 0);

  presets_name_entry = gtk_entry_new ();
  gtk_widget_show (presets_name_entry);
  gtk_box_pack_start (GTK_BOX (presets_name_hbox), presets_name_entry, TRUE, TRUE, 0);

  presets_delete_button = gtk_button_new_with_mnemonic ("Delete");
  gtk_widget_show (presets_delete_button);
  gtk_box_pack_start (GTK_BOX (presets_name_hbox), presets_delete_button, FALSE, FALSE, 0);

  presets_new_button = gtk_button_new_with_mnemonic ("New");
  gtk_widget_show (presets_new_button);
  gtk_box_pack_start (GTK_BOX (presets_name_hbox), presets_new_button, FALSE, FALSE, 0);

  presets_list_scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (presets_list_scrolledwindow);
  gtk_box_pack_start (GTK_BOX (config_presets_page), presets_list_scrolledwindow, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (presets_list_scrolledwindow, GTK_CAN_FOCUS);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (presets_list_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (presets_list_scrolledwindow), GTK_SHADOW_IN);

  presets_list_list = gtk_tree_view_new ();
  gtk_widget_show (presets_list_list);
  gtk_container_add (GTK_CONTAINER (presets_list_scrolledwindow), presets_list_list);

  presets_list_bbox = gtk_hbutton_box_new ();
  gtk_widget_show (presets_list_bbox);
  gtk_box_pack_start (GTK_BOX (config_presets_page), presets_list_bbox, FALSE, FALSE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (presets_list_bbox), GTK_BUTTONBOX_END);
  gtk_box_set_spacing (GTK_BOX (presets_list_bbox), 5);

  presets_load_button = gtk_button_new_with_mnemonic ("Load");
  gtk_widget_show (presets_load_button);
  gtk_container_add (GTK_CONTAINER (presets_list_bbox), presets_load_button);
  GTK_WIDGET_SET_FLAGS (presets_load_button, GTK_CAN_DEFAULT);

  presets_save_button = gtk_button_new_with_mnemonic ("Save");
  gtk_widget_show (presets_save_button);
  gtk_container_add (GTK_CONTAINER (presets_list_bbox), presets_save_button);
  GTK_WIDGET_SET_FLAGS (presets_save_button, GTK_CAN_DEFAULT);

  config_presets_label = gtk_label_new ("Presets");
  gtk_widget_show (config_presets_label);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (config_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (config_notebook), 5), config_presets_label);
  gtk_label_set_justify (GTK_LABEL (config_presets_label), GTK_JUSTIFY_CENTER);

  config_bbox = gtk_hbutton_box_new ();
  gtk_widget_show (config_bbox);
  gtk_box_pack_start (GTK_BOX (config_vbox), config_bbox, FALSE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (config_bbox), GTK_BUTTONBOX_END);
  gtk_box_set_spacing (GTK_BOX (config_bbox), 5);

  config_ok = gtk_button_new_with_mnemonic ("OK");
  gtk_widget_show (config_ok);
  gtk_container_add (GTK_CONTAINER (config_bbox), config_ok);
  GTK_WIDGET_SET_FLAGS (config_ok, GTK_CAN_DEFAULT);

  config_cancel = gtk_button_new_with_mnemonic ("Cancel");
  gtk_widget_show (config_cancel);
  gtk_container_add (GTK_CONTAINER (config_bbox), config_cancel);
  GTK_WIDGET_SET_FLAGS (config_cancel, GTK_CAN_DEFAULT);

  config_apply = gtk_button_new_with_mnemonic ("Apply");
  gtk_widget_show (config_apply);
  gtk_container_add (GTK_CONTAINER (config_bbox), config_apply);
  GTK_WIDGET_SET_FLAGS (config_apply, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) op_configure_button, "clicked",
                    G_CALLBACK (on_output_plugin_configure_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) op_about_button, "clicked",
                    G_CALLBACK (on_output_plugin_about_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) op_throttle_check, "toggled",
                    G_CALLBACK (on_op_throttle_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) op_maxblock_check, "toggled",
                    G_CALLBACK (on_op_maxblock_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) op_maxblock_spin, "changed",
                    G_CALLBACK (on_op_maxblock_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) op_forcereopen_check, "toggled",
                    G_CALLBACK (on_op_forcereopen_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) xf_buffer_spin, "changed",
                    G_CALLBACK (on_xf_buffer_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xf_autobuf_check, "toggled",
                    G_CALLBACK (on_xf_autobuf_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) xftfp_length_spin, "changed",
                    G_CALLBACK (on_xftfp_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfp_enable_check, "toggled",
                    G_CALLBACK (on_xftfp_enable_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) xftffi_length_spin, "changed",
                    G_CALLBACK (on_xftffi_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftffi_enable_check, "toggled",
                    G_CALLBACK (on_xftffi_enable_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) xftffi_volume_spin, "changed",
                    G_CALLBACK (on_xftffi_volume_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) pause_length_spin, "changed",
                    G_CALLBACK (on_pause_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) simple_length_spin, "changed",
                    G_CALLBACK (on_simple_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) fadeout_length_spin, "changed",
                    G_CALLBACK (on_fadeout_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) fadeout_volume_spin, "changed",
                    G_CALLBACK (on_fadeout_volume_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) fadeout_enable_check, "toggled",
                    G_CALLBACK (on_fadeout_enable_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) xfofs_custom_radiobutton, "toggled",
                    G_CALLBACK (on_xfofs_custom_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) xfofs_custom_radiobutton, "clicked",
                    G_CALLBACK (on_xfofs_custom_radiobutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) xfofs_custom_spin, "changed",
                    G_CALLBACK (on_xfofs_custom_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xfofs_none_radiobutton, "clicked",
                    G_CALLBACK (on_xfofs_none_radiobutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) xfofs_none_radiobutton, "toggled",
                    G_CALLBACK (on_xfofs_none_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) xfofs_lockout_radiobutton, "toggled",
                    G_CALLBACK (on_xfofs_lockout_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) xfofs_lockout_radiobutton, "clicked",
                    G_CALLBACK (on_xfofs_lockout_radiobutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) xfofs_lockin_radiobutton, "toggled",
                    G_CALLBACK (on_xfofs_lockin_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) xfofs_lockin_radiobutton, "clicked",
                    G_CALLBACK (on_xfofs_lockin_radiobutton_clicked),
                    NULL);
  g_signal_connect ((gpointer) fadein_length_spin, "changed",
                    G_CALLBACK (on_fadein_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) fadein_enable_check, "toggled",
                    G_CALLBACK (on_fadein_enable_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) fadein_lock_check, "toggled",
                    G_CALLBACK (on_fadein_lock_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) fadein_volume_spin, "changed",
                    G_CALLBACK (on_fadein_volume_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfi_length_spin, "changed",
                    G_CALLBACK (on_fadein_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfi_volume_spin, "changed",
                    G_CALLBACK (on_fadein_volume_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfo_length_spin, "changed",
                    G_CALLBACK (on_fadeout_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfo_volume_spin, "changed",
                    G_CALLBACK (on_fadeout_volume_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfo_silence_spin, "changed",
                    G_CALLBACK (on_xfofs_custom_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfoi_fadeout_spin, "changed",
                    G_CALLBACK (on_fadeout_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfoi_silence_spin, "changed",
                    G_CALLBACK (on_xfofs_custom_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) xftfoi_fadein_spin, "changed",
                    G_CALLBACK (on_fadein_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) lgap_length_spin, "changed",
                    G_CALLBACK (on_lgap_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) lgap_level_spin, "changed",
                    G_CALLBACK (on_lgap_level_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) lgap_enable_check, "toggled",
                    G_CALLBACK (on_lgap_enable_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) tgap_length_spin, "changed",
                    G_CALLBACK (on_tgap_length_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) tgap_level_spin, "changed",
                    G_CALLBACK (on_tgap_level_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) tgap_lock_check, "toggled",
                    G_CALLBACK (on_tgap_lock_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) tgap_enable_check, "toggled",
                    G_CALLBACK (on_tgap_enable_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) mixopt_enable_check, "toggled",
                    G_CALLBACK (on_config_mixopt_enable_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) moth_songchange_spin, "changed",
                    G_CALLBACK (on_moth_songchange_spin_changed),
                    NULL);
  g_signal_connect ((gpointer) moth_opmaxused_check, "toggled",
                    G_CALLBACK (on_moth_opmaxused_check_toggled),
                    NULL);
  g_signal_connect ((gpointer) config_ok, "clicked",
                    G_CALLBACK (on_config_ok_clicked),
                    NULL);
  g_signal_connect_swapped ((gpointer) config_cancel, "clicked",
                            G_CALLBACK (gtk_widget_destroy),
                            GTK_OBJECT (config_win));
  g_signal_connect ((gpointer) config_apply, "clicked",
                    G_CALLBACK (on_config_apply_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (config_win, config_win, "config_win");
  GLADE_HOOKUP_OBJECT (config_win, config_vbox, "config_vbox");
  GLADE_HOOKUP_OBJECT (config_win, config_notebook, "config_notebook");
  GLADE_HOOKUP_OBJECT (config_win, config_output_page, "config_output_page");
  GLADE_HOOKUP_OBJECT (config_win, output_plugin_vbox, "output_plugin_vbox");
  GLADE_HOOKUP_OBJECT (config_win, op_plugin_frame, "op_plugin_frame");
  GLADE_HOOKUP_OBJECT (config_win, op_plugin_vbox, "op_plugin_vbox");
  GLADE_HOOKUP_OBJECT (config_win, op_plugin_optionmenu, "op_plugin_optionmenu");
  GLADE_HOOKUP_OBJECT (config_win, op_plugin_optionmenu_menu, "op_plugin_optionmenu_menu");
  GLADE_HOOKUP_OBJECT (config_win, op_plugin_optionmenu_dummy, "op_plugin_optionmenu_dummy");
  GLADE_HOOKUP_OBJECT (config_win, op_plugin_buttonbox, "op_plugin_buttonbox");
  GLADE_HOOKUP_OBJECT (config_win, op_configure_button, "op_configure_button");
  GLADE_HOOKUP_OBJECT (config_win, op_about_button, "op_about_button");
  GLADE_HOOKUP_OBJECT (config_win, label8, "label8");
  GLADE_HOOKUP_OBJECT (config_win, op_options_frame, "op_options_frame");
  GLADE_HOOKUP_OBJECT (config_win, op_options_vbox, "op_options_vbox");
  GLADE_HOOKUP_OBJECT (config_win, op_throttle_check, "op_throttle_check");
  GLADE_HOOKUP_OBJECT (config_win, op_maxblock_hbox, "op_maxblock_hbox");
  GLADE_HOOKUP_OBJECT (config_win, op_maxblock_check, "op_maxblock_check");
  GLADE_HOOKUP_OBJECT (config_win, op_maxblock_spin, "op_maxblock_spin");
  GLADE_HOOKUP_OBJECT (config_win, op_forcereopen_check, "op_forcereopen_check");
  GLADE_HOOKUP_OBJECT (config_win, label9, "label9");
  GLADE_HOOKUP_OBJECT (config_win, output_help_label, "output_help_label");
  GLADE_HOOKUP_OBJECT (config_win, config_devices_label, "config_devices_label");
  GLADE_HOOKUP_OBJECT (config_win, config_crossfader_page, "config_crossfader_page");
  GLADE_HOOKUP_OBJECT (config_win, xf_bufsize_hbox, "xf_bufsize_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xf_bufsize_label, "xf_bufsize_label");
  GLADE_HOOKUP_OBJECT (config_win, xf_buffer_spin, "xf_buffer_spin");
  GLADE_HOOKUP_OBJECT (config_win, xf_autobuf_check, "xf_autobuf_check");
  GLADE_HOOKUP_OBJECT (config_win, xf_config_hbox, "xf_config_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xf_config_label, "xf_config_label");
  GLADE_HOOKUP_OBJECT (config_win, xf_config_optionmenu, "xf_config_optionmenu");
  GLADE_HOOKUP_OBJECT (config_win, xf_config_optionmenu_menu, "xf_config_optionmenu_menu");
  GLADE_HOOKUP_OBJECT (config_win, xf_config_optionmenu_dummy, "xf_config_optionmenu_dummy");
  GLADE_HOOKUP_OBJECT (config_win, xf_type_hbox, "xf_type_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xf_type_label, "xf_type_label");
  GLADE_HOOKUP_OBJECT (config_win, xf_type_optionmenu, "xf_type_optionmenu");
  GLADE_HOOKUP_OBJECT (config_win, xf_type_optionmenu_menu, "xf_type_optionmenu_menu");
  GLADE_HOOKUP_OBJECT (config_win, xf_type_optionmenu_dummy, "xf_type_optionmenu_dummy");
  GLADE_HOOKUP_OBJECT (config_win, xf_type_notebook, "xf_type_notebook");
  GLADE_HOOKUP_OBJECT (config_win, xft_reopen_label, "xft_reopen_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_flush_page, "xft_flush_page");
  GLADE_HOOKUP_OBJECT (config_win, xftf_pause_frame, "xftf_pause_frame");
  GLADE_HOOKUP_OBJECT (config_win, xftf_pause_table, "xftf_pause_table");
  GLADE_HOOKUP_OBJECT (config_win, xftfp_length_label, "xftfp_length_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfp_length_spin, "xftfp_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, xftfp_enable_check, "xftfp_enable_check");
  GLADE_HOOKUP_OBJECT (config_win, label12, "label12");
  GLADE_HOOKUP_OBJECT (config_win, xftf_fadein_frame, "xftf_fadein_frame");
  GLADE_HOOKUP_OBJECT (config_win, xftf_fadein_table, "xftf_fadein_table");
  GLADE_HOOKUP_OBJECT (config_win, xftffi_length_hbox, "xftffi_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftffi_length_label, "xftffi_length_label");
  GLADE_HOOKUP_OBJECT (config_win, xftffi_volume_hbox, "xftffi_volume_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftffi_volume_label, "xftffi_volume_label");
  GLADE_HOOKUP_OBJECT (config_win, xftffi_length_spin, "xftffi_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, xftffi_enable_check, "xftffi_enable_check");
  GLADE_HOOKUP_OBJECT (config_win, xftffi_volume_spin, "xftffi_volume_spin");
  GLADE_HOOKUP_OBJECT (config_win, label13, "label13");
  GLADE_HOOKUP_OBJECT (config_win, xft_flush_label, "xft_flush_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_none_label, "xft_none_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_pause_page, "xft_pause_page");
  GLADE_HOOKUP_OBJECT (config_win, xf_pause_frame, "xf_pause_frame");
  GLADE_HOOKUP_OBJECT (config_win, xf_pause_table, "xf_pause_table");
  GLADE_HOOKUP_OBJECT (config_win, pause_length_hbox, "pause_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, pause_length_label, "pause_length_label");
  GLADE_HOOKUP_OBJECT (config_win, pause_length_spin, "pause_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, label14, "label14");
  GLADE_HOOKUP_OBJECT (config_win, xft_pause_label, "xft_pause_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_simplexf_page, "xft_simplexf_page");
  GLADE_HOOKUP_OBJECT (config_win, xf_simple_frame, "xf_simple_frame");
  GLADE_HOOKUP_OBJECT (config_win, xf_simple_table, "xf_simple_table");
  GLADE_HOOKUP_OBJECT (config_win, simple_length_hbox, "simple_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, simple_length_label, "simple_length_label");
  GLADE_HOOKUP_OBJECT (config_win, simple_length_spin, "simple_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, label15, "label15");
  GLADE_HOOKUP_OBJECT (config_win, xft_simplexf_label, "xft_simplexf_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_advancedxf_page, "xft_advancedxf_page");
  GLADE_HOOKUP_OBJECT (config_win, xf_fadeout_frame, "xf_fadeout_frame");
  GLADE_HOOKUP_OBJECT (config_win, xf_fadeout_table, "xf_fadeout_table");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_length_hbox, "fadeout_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_length_label, "fadeout_length_label");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_length_spin, "fadeout_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_volume_hbox, "fadeout_volume_hbox");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_volume_label, "fadeout_volume_label");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_volume_spin, "fadeout_volume_spin");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_options_hbox, "fadeout_options_hbox");
  GLADE_HOOKUP_OBJECT (config_win, fadeout_enable_check, "fadeout_enable_check");
  GLADE_HOOKUP_OBJECT (config_win, label16, "label16");
  GLADE_HOOKUP_OBJECT (config_win, xf_offset_frame, "xf_offset_frame");
  GLADE_HOOKUP_OBJECT (config_win, xf_offset_table, "xf_offset_table");
  GLADE_HOOKUP_OBJECT (config_win, xfofs_custom_hbox, "xfofs_custom_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xfofs_custom_radiobutton, "xfofs_custom_radiobutton");
  GLADE_HOOKUP_OBJECT (config_win, xfofs_custom_spin, "xfofs_custom_spin");
  GLADE_HOOKUP_OBJECT (config_win, xfofs_none_radiobutton, "xfofs_none_radiobutton");
  GLADE_HOOKUP_OBJECT (config_win, xfofs_lockout_radiobutton, "xfofs_lockout_radiobutton");
  GLADE_HOOKUP_OBJECT (config_win, xfofs_lockin_radiobutton, "xfofs_lockin_radiobutton");
  GLADE_HOOKUP_OBJECT (config_win, label17, "label17");
  GLADE_HOOKUP_OBJECT (config_win, xf_fadein_frame, "xf_fadein_frame");
  GLADE_HOOKUP_OBJECT (config_win, xf_fadein_table, "xf_fadein_table");
  GLADE_HOOKUP_OBJECT (config_win, fadein_length_hbox, "fadein_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, fadein_length_label, "fadein_length_label");
  GLADE_HOOKUP_OBJECT (config_win, fadein_volume_hbox, "fadein_volume_hbox");
  GLADE_HOOKUP_OBJECT (config_win, fadein_volume_label, "fadein_volume_label");
  GLADE_HOOKUP_OBJECT (config_win, fadein_length_spin, "fadein_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, fadein_enable_check, "fadein_enable_check");
  GLADE_HOOKUP_OBJECT (config_win, fadein_lock_check, "fadein_lock_check");
  GLADE_HOOKUP_OBJECT (config_win, fadein_volume_spin, "fadein_volume_spin");
  GLADE_HOOKUP_OBJECT (config_win, label18, "label18");
  GLADE_HOOKUP_OBJECT (config_win, xft_advancedxf_label, "xft_advancedxf_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_fadein_page, "xft_fadein_page");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_fadein_frame, "xftfi_fadein_frame");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_fadein_table, "xftfi_fadein_table");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_length_hbox, "xftfi_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_length_label, "xftfi_length_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_volume_hbox, "xftfi_volume_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_volume_label, "xftfi_volume_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_length_spin, "xftfi_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, xftfi_volume_spin, "xftfi_volume_spin");
  GLADE_HOOKUP_OBJECT (config_win, label19, "label19");
  GLADE_HOOKUP_OBJECT (config_win, xft_fadein_label, "xft_fadein_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_fadeout_page, "xft_fadeout_page");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_fadeout_frame, "xftfo_fadeout_frame");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_fadeout_table, "xftfo_fadeout_table");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_length_hbox, "xftfo_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_length_label, "xftfo_length_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_length_spin, "xftfo_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_volume_hbox, "xftfo_volume_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_volume_label, "xftfo_volume_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_volume_spin, "xftfo_volume_spin");
  GLADE_HOOKUP_OBJECT (config_win, label20, "label20");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_silence_frame, "xftfo_silence_frame");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_silence_table, "xftfo_silence_table");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_silence_hbox, "xftfo_silence_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_silence_label, "xftfo_silence_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfo_silence_spin, "xftfo_silence_spin");
  GLADE_HOOKUP_OBJECT (config_win, label21, "label21");
  GLADE_HOOKUP_OBJECT (config_win, xft_fadeout_label, "xft_fadeout_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_pause_none_label, "xft_pause_none_label");
  GLADE_HOOKUP_OBJECT (config_win, xft_pause_adv_page, "xft_pause_adv_page");
  GLADE_HOOKUP_OBJECT (config_win, xft_fadeoutin_frame, "xft_fadeoutin_frame");
  GLADE_HOOKUP_OBJECT (config_win, xft_fadeoutin_table, "xft_fadeoutin_table");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_fadeout_spin, "xftfoi_fadeout_spin");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_silence_spin, "xftfoi_silence_spin");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_fadein_spin, "xftfoi_fadein_spin");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_fadein_hbox, "xftfoi_fadein_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_fadein_label, "xftfoi_fadein_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_silence_hbox, "xftfoi_silence_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_silence_label, "xftfoi_silence_label");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_fadeout_hbox, "xftfoi_fadeout_hbox");
  GLADE_HOOKUP_OBJECT (config_win, xftfoi_fadeout_label, "xftfoi_fadeout_label");
  GLADE_HOOKUP_OBJECT (config_win, label22, "label22");
  GLADE_HOOKUP_OBJECT (config_win, xft_pause_adv_label, "xft_pause_adv_label");
  GLADE_HOOKUP_OBJECT (config_win, config_crossfade_label, "config_crossfade_label");
  GLADE_HOOKUP_OBJECT (config_win, config_gapkiller_page, "config_gapkiller_page");
  GLADE_HOOKUP_OBJECT (config_win, gap_leading_frame, "gap_leading_frame");
  GLADE_HOOKUP_OBJECT (config_win, gap_leading_table, "gap_leading_table");
  GLADE_HOOKUP_OBJECT (config_win, lgap_length_spin, "lgap_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, lgap_level_spin, "lgap_level_spin");
  GLADE_HOOKUP_OBJECT (config_win, lgap_length_hbox, "lgap_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, lgap_length_label, "lgap_length_label");
  GLADE_HOOKUP_OBJECT (config_win, lgap_level_hbox, "lgap_level_hbox");
  GLADE_HOOKUP_OBJECT (config_win, lgap_level_label, "lgap_level_label");
  GLADE_HOOKUP_OBJECT (config_win, lgap_enable_check, "lgap_enable_check");
  GLADE_HOOKUP_OBJECT (config_win, label23, "label23");
  GLADE_HOOKUP_OBJECT (config_win, gap_trailing_frame, "gap_trailing_frame");
  GLADE_HOOKUP_OBJECT (config_win, gap_trailing_table, "gap_trailing_table");
  GLADE_HOOKUP_OBJECT (config_win, tgap_length_hbox, "tgap_length_hbox");
  GLADE_HOOKUP_OBJECT (config_win, tgap_length_label, "tgap_length_label");
  GLADE_HOOKUP_OBJECT (config_win, tgap_level_hbox, "tgap_level_hbox");
  GLADE_HOOKUP_OBJECT (config_win, tgap_level_label, "tgap_level_label");
  GLADE_HOOKUP_OBJECT (config_win, tgap_length_spin, "tgap_length_spin");
  GLADE_HOOKUP_OBJECT (config_win, tgap_level_spin, "tgap_level_spin");
  GLADE_HOOKUP_OBJECT (config_win, tgap_lock_check, "tgap_lock_check");
  GLADE_HOOKUP_OBJECT (config_win, tgap_enable_check, "tgap_enable_check");
  GLADE_HOOKUP_OBJECT (config_win, label24, "label24");
  GLADE_HOOKUP_OBJECT (config_win, gap_advanced_frame, "gap_advanced_frame");
  GLADE_HOOKUP_OBJECT (config_win, gap_advanced_vbox, "gap_advanced_vbox");
  GLADE_HOOKUP_OBJECT (config_win, gadv_crossing_check, "gadv_crossing_check");
  GLADE_HOOKUP_OBJECT (config_win, label25, "label25");
  GLADE_HOOKUP_OBJECT (config_win, config_gapkiller_label, "config_gapkiller_label");
  GLADE_HOOKUP_OBJECT (config_win, config_misc_page, "config_misc_page");
  GLADE_HOOKUP_OBJECT (config_win, misc_debug_frame, "misc_debug_frame");
  GLADE_HOOKUP_OBJECT (config_win, misc_debug_vbox, "misc_debug_vbox");
  GLADE_HOOKUP_OBJECT (config_win, debug_stderr_check, "debug_stderr_check");
  GLADE_HOOKUP_OBJECT (config_win, label26, "label26");
  GLADE_HOOKUP_OBJECT (config_win, misc_mixopt_frame, "misc_mixopt_frame");
  GLADE_HOOKUP_OBJECT (config_win, misc_mixopt_vbox, "misc_mixopt_vbox");
  GLADE_HOOKUP_OBJECT (config_win, mixopt_enable_check, "mixopt_enable_check");
  GLADE_HOOKUP_OBJECT (config_win, mixopt_reverse_check, "mixopt_reverse_check");
  GLADE_HOOKUP_OBJECT (config_win, mixopt_software_check, "mixopt_software_check");
  GLADE_HOOKUP_OBJECT (config_win, label27, "label27");
  GLADE_HOOKUP_OBJECT (config_win, misc_other_frame, "misc_other_frame");
  GLADE_HOOKUP_OBJECT (config_win, misc_other_vbox, "misc_other_vbox");
  GLADE_HOOKUP_OBJECT (config_win, moth_songchange_hbox, "moth_songchange_hbox");
  GLADE_HOOKUP_OBJECT (config_win, moth_songchange_label, "moth_songchange_label");
  GLADE_HOOKUP_OBJECT (config_win, moth_songchange_spin, "moth_songchange_spin");
  GLADE_HOOKUP_OBJECT (config_win, moth_preload_hbox, "moth_preload_hbox");
  GLADE_HOOKUP_OBJECT (config_win, moth_preload_label, "moth_preload_label");
  GLADE_HOOKUP_OBJECT (config_win, moth_preload_spin, "moth_preload_spin");
  GLADE_HOOKUP_OBJECT (config_win, moth_noxf_hbox, "moth_noxf_hbox");
  GLADE_HOOKUP_OBJECT (config_win, moth_noxf_label, "moth_noxf_label");
  GLADE_HOOKUP_OBJECT (config_win, noxf_album_check, "noxf_album_check");
  GLADE_HOOKUP_OBJECT (config_win, noxf_samefile_check, "noxf_samefile_check");
  GLADE_HOOKUP_OBJECT (config_win, moth_httpworkaround_check, "moth_httpworkaround_check");
  GLADE_HOOKUP_OBJECT (config_win, moth_opmaxused_hbox, "moth_opmaxused_hbox");
  GLADE_HOOKUP_OBJECT (config_win, moth_opmaxused_check, "moth_opmaxused_check");
  GLADE_HOOKUP_OBJECT (config_win, moth_opmaxused_spin, "moth_opmaxused_spin");
  GLADE_HOOKUP_OBJECT (config_win, moth_quantaudio_check, "moth_quantaudio_check");
  GLADE_HOOKUP_OBJECT (config_win, moth_outputkeepopened_check, "moth_outputkeepopened_check");
  GLADE_HOOKUP_OBJECT (config_win, label28, "label28");
  GLADE_HOOKUP_OBJECT (config_win, config_misc_label, "config_misc_label");
  GLADE_HOOKUP_OBJECT (config_win, config_presets_page, "config_presets_page");
  GLADE_HOOKUP_OBJECT (config_win, presets_name_hbox, "presets_name_hbox");
  GLADE_HOOKUP_OBJECT (config_win, presets_name_entry, "presets_name_entry");
  GLADE_HOOKUP_OBJECT (config_win, presets_delete_button, "presets_delete_button");
  GLADE_HOOKUP_OBJECT (config_win, presets_new_button, "presets_new_button");
  GLADE_HOOKUP_OBJECT (config_win, presets_list_scrolledwindow, "presets_list_scrolledwindow");
  GLADE_HOOKUP_OBJECT (config_win, presets_list_list, "presets_list_list");
  GLADE_HOOKUP_OBJECT (config_win, presets_list_bbox, "presets_list_bbox");
  GLADE_HOOKUP_OBJECT (config_win, presets_load_button, "presets_load_button");
  GLADE_HOOKUP_OBJECT (config_win, presets_save_button, "presets_save_button");
  GLADE_HOOKUP_OBJECT (config_win, config_presets_label, "config_presets_label");
  GLADE_HOOKUP_OBJECT (config_win, config_bbox, "config_bbox");
  GLADE_HOOKUP_OBJECT (config_win, config_ok, "config_ok");
  GLADE_HOOKUP_OBJECT (config_win, config_cancel, "config_cancel");
  GLADE_HOOKUP_OBJECT (config_win, config_apply, "config_apply");
  GLADE_HOOKUP_OBJECT_NO_REF (config_win, tooltips, "tooltips");

  return config_win;
}

GtkWidget*
create_help_win (void)
{
  GtkWidget *help_win;
  GtkWidget *help_vbox;
  GtkWidget *help_scrolledwindow;
  GtkWidget *help_text;
  GtkWidget *help_buttonbox;
  GtkWidget *help_close_button;

  help_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (help_win), "Help");

  help_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (help_vbox);
  gtk_container_add (GTK_CONTAINER (help_win), help_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (help_vbox), 5);

  help_scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (help_scrolledwindow);
  gtk_box_pack_start (GTK_BOX (help_vbox), help_scrolledwindow, TRUE, TRUE, 0);
  GTK_WIDGET_UNSET_FLAGS (help_scrolledwindow, GTK_CAN_FOCUS);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (help_scrolledwindow), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (help_scrolledwindow), GTK_SHADOW_IN);

  help_text = gtk_text_view_new ();
  gtk_widget_show (help_text);
  gtk_container_add (GTK_CONTAINER (help_scrolledwindow), help_text);
  gtk_text_view_set_editable (GTK_TEXT_VIEW (help_text), FALSE);
  gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (help_text), GTK_WRAP_WORD);
  gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (help_text)), "<dummy>\n", -1);

  help_buttonbox = gtk_hbutton_box_new ();
  gtk_widget_show (help_buttonbox);
  gtk_box_pack_start (GTK_BOX (help_vbox), help_buttonbox, FALSE, FALSE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (help_buttonbox), GTK_BUTTONBOX_END);
  gtk_box_set_spacing (GTK_BOX (help_buttonbox), 30);

  help_close_button = gtk_button_new_with_mnemonic ("Close");
  gtk_widget_show (help_close_button);
  gtk_container_add (GTK_CONTAINER (help_buttonbox), help_close_button);
  GTK_WIDGET_SET_FLAGS (help_close_button, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) help_close_button, "clicked",
                    G_CALLBACK (on_help_close_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (help_win, help_win, "help_win");
  GLADE_HOOKUP_OBJECT (help_win, help_vbox, "help_vbox");
  GLADE_HOOKUP_OBJECT (help_win, help_scrolledwindow, "help_scrolledwindow");
  GLADE_HOOKUP_OBJECT (help_win, help_text, "help_text");
  GLADE_HOOKUP_OBJECT (help_win, help_buttonbox, "help_buttonbox");
  GLADE_HOOKUP_OBJECT (help_win, help_close_button, "help_close_button");

  return help_win;
}