/*
 * 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.h"
#include "support.h"

#define GLADE_HOOKUP_OBJECT(component,widget,name) \
  g_object_set_data_full (G_OBJECT (component), name, \
    g_object_ref(G_OBJECT(widget)), (GDestroyNotify) g_object_unref)

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

GtkWidget*
create_config_dialog (void)
{
  GtkWidget *config_dialog;
  GtkWidget *dialog_vbox1;
  GtkWidget *hbox1;
  GtkWidget *vbox1;
  GtkWidget *frame1;
  GtkWidget *alignment1;
  GtkWidget *table1;
  GtkWidget *label1;
  GtkWidget *label2;
  GObject *notes_min_spin_adj;
  GtkWidget *notes_min_spin;
  GObject *notes_max_spin_adj;
  GtkWidget *notes_max_spin;
  GtkWidget *hbox2;
  GObject *amp_min_spin_adj;
  GtkWidget *amp_min_spin;
  GtkWidget *label5;
  GtkWidget *hbox3;
  GObject *amp_max_spin_adj;
  GtkWidget *amp_max_spin;
  GtkWidget *label24;
  GtkWidget *label7;
  GtkWidget *label9;
  GtkWidget *label10;
  GObject *interval_spin_adj;
  GtkWidget *interval_spin;
  GtkWidget *label11;
  GObject *pitch_spin_adj;
  GtkWidget *pitch_spin;
  GObject *transpose_spin_adj;
  GtkWidget *transpose_spin;
  GtkWidget *label12;
  GtkWidget *label13;
  GtkWidget *label14;
  GtkWidget *label15;
  GtkWidget *label16;
  GtkWidget *label3;
  GtkWidget *label4;
  GObject *fft_spin_adj;
  GtkWidget *fft_spin;
  GtkWidget *window_combo;
  GtkWidget *channel_button;
  GtkWidget *label8;
  GtkWidget *label100;
  GtkWidget *frame2;
  GtkWidget *alignment2;
  GtkWidget *table2;
  GtkWidget *label18;
  GtkWidget *label19;
  GObject *peaks_gravity_spin_adj;
  GtkWidget *peaks_gravity_spin;
  GObject *peaks_htime_spin_adj;
  GtkWidget *peaks_htime_spin;
  GtkWidget *label22;
  GtkWidget *label23;
  GtkWidget *peaks_check;
  GtkWidget *frame3;
  GtkWidget *alignment3;
  GtkWidget *table3;
  GtkWidget *label25;
  GtkWidget *label26;
  GObject *amplitudes_gravity_spin_adj;
  GtkWidget *amplitudes_gravity_spin;
  GObject *amplitudes_htime_spin_adj;
  GtkWidget *amplitudes_htime_spin;
  GtkWidget *label27;
  GtkWidget *label28;
  GtkWidget *amplitudes_check;
  GtkWidget *frame4;
  GtkWidget *alignment4;
  GtkWidget *vbox2;
  GtkWidget *table5;
  GtkWidget *label107;
  GtkWidget *label106;
  GtkWidget *vbox3;
  GtkWidget *llabel_check;
  GtkWidget *rlabel_check;
  GtkWidget *vbox4;
  GtkWidget *blabel_check;
  GtkWidget *tlabel_check;
  GtkWidget *vbox5;
  GtkWidget *hgrid_check;
  GtkWidget *vgrid_check;
  GtkWidget *ogrid_check;
  GtkWidget *vbox7;
  GtkWidget *white_keys_check;
  GtkWidget *black_keys_check;
  GtkWidget *fill_spectrum_check;
  GtkWidget *interpolate_check;
  GtkWidget *tooltip_check;
  GtkWidget *font_tooltip_button;
  GtkWidget *font_button;
  GtkWidget *mode_combo;
  GtkWidget *label31;
  GtkWidget *musical_box;
  GtkWidget *alignment17;
  GtkWidget *musical_vbox;
  GtkWidget *table6;
  GtkWidget *label108;
  GObject *barw_spin_adj;
  GtkWidget *barw_spin;
  GtkWidget *label30;
  GtkWidget *alignment_combo;
  GtkWidget *spacing_check;
  GtkWidget *gaps_check;
  GtkWidget *led_check;
  GtkWidget *label29;
  GtkWidget *frame6;
  GtkWidget *alignment14;
  GtkWidget *table4;
  GtkWidget *label33;
  GtkWidget *label34;
  GtkWidget *wkeys_color;
  GtkWidget *bkeys_color;
  GtkWidget *peaks_color;
  GtkWidget *hgrid_color;
  GtkWidget *vgrid_color;
  GtkWidget *ogrid_color;
  GtkWidget *label35;
  GtkWidget *gradient_combo;
  GtkWidget *vbox6;
  GtkWidget *color_add;
  GtkWidget *color_remove;
  GtkWidget *color_reverse;
  GtkWidget *hbox7;
  GtkWidget *frame7;
  GtkWidget *alignment15;
  GtkWidget *gradient_preview;
  GtkWidget *scrolledwindow1;
  GtkWidget *viewport1;
  GtkWidget *color_box;
  GtkWidget *label101;
  GtkWidget *label102;
  GtkWidget *label103;
  GtkWidget *label104;
  GtkWidget *label105;
  GtkWidget *alignment16;
  GtkWidget *peaks_color_check;
  GtkWidget *background_color;
  GtkWidget *text_color;
  GtkWidget *label32;
  GtkWidget *dialog_action_area1;
  GtkWidget *applybutton1;
  GtkWidget *cancelbutton1;
  GtkWidget *okbutton1;

  config_dialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (config_dialog), _("Spectrum options"));
  gtk_window_set_type_hint (GTK_WINDOW (config_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
  gtk_dialog_set_has_separator (GTK_DIALOG (config_dialog), FALSE);

  dialog_vbox1 = gtk_dialog_get_content_area (GTK_DIALOG (config_dialog));
  gtk_widget_show (dialog_vbox1);

  hbox1 = gtk_hbox_new (FALSE, 12);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox1), hbox1, TRUE, TRUE, 4);

  vbox1 = gtk_vbox_new (FALSE, 4);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (hbox1), vbox1, TRUE, TRUE, 0);

  frame1 = gtk_frame_new (NULL);
  gtk_widget_show (frame1);
  gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);

  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment1);
  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment1), 0, 8, 12, 8);

  table1 = gtk_table_new (8, 4, FALSE);
  gtk_widget_show (table1);
  gtk_container_add (GTK_CONTAINER (alignment1), table1);
  gtk_table_set_row_spacings (GTK_TABLE (table1), 4);
  gtk_table_set_col_spacings (GTK_TABLE (table1), 4);

  label1 = gtk_label_new (_("Notes:"));
  gtk_widget_show (label1);
  gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label1), 1, 0.5);

  label2 = gtk_label_new (_("Amplitude:"));
  gtk_widget_show (label2);
  gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label2), 1, 0.5);

  notes_min_spin_adj = G_OBJECT(gtk_adjustment_new (0, 0, 143, 1, 1, 0));
  notes_min_spin = gtk_spin_button_new (GTK_ADJUSTMENT (notes_min_spin_adj), 1, 0);
  gtk_widget_show (notes_min_spin);
  gtk_table_attach (GTK_TABLE (table1), notes_min_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  notes_max_spin_adj = G_OBJECT(gtk_adjustment_new (0, 0, 143, 1, 1, 0));
  notes_max_spin = gtk_spin_button_new (GTK_ADJUSTMENT (notes_max_spin_adj), 1, 0);
  gtk_widget_show (notes_max_spin);
  gtk_table_attach (GTK_TABLE (table1), notes_max_spin, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  hbox2 = gtk_hbox_new (FALSE, 4);
  gtk_widget_show (hbox2);
  gtk_table_attach (GTK_TABLE (table1), hbox2, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  amp_min_spin_adj = G_OBJECT(gtk_adjustment_new (-60, -120, -10, 10, 10, 0));
  amp_min_spin = gtk_spin_button_new (GTK_ADJUSTMENT (amp_min_spin_adj), 10, 0);
  gtk_widget_show (amp_min_spin);
  gtk_box_pack_start (GTK_BOX (hbox2), amp_min_spin, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (amp_min_spin), TRUE);

  label5 = gtk_label_new (_("<i>dB</i>"));
  gtk_widget_show (label5);
  gtk_box_pack_start (GTK_BOX (hbox2), label5, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label5), TRUE);

  hbox3 = gtk_hbox_new (FALSE, 4);
  gtk_widget_show (hbox3);
  gtk_table_attach (GTK_TABLE (table1), hbox3, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  amp_max_spin_adj = G_OBJECT(gtk_adjustment_new (0, 0, 120, 10, 10, 0));
  amp_max_spin = gtk_spin_button_new (GTK_ADJUSTMENT (amp_max_spin_adj), 10, 0);
  gtk_widget_show (amp_max_spin);
  gtk_box_pack_start (GTK_BOX (hbox3), amp_max_spin, TRUE, TRUE, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (amp_max_spin), TRUE);

  label24 = gtk_label_new (_("<i>dB</i>"));
  gtk_widget_show (label24);
  gtk_box_pack_start (GTK_BOX (hbox3), label24, FALSE, FALSE, 0);
  gtk_label_set_use_markup (GTK_LABEL (label24), TRUE);

  label7 = gtk_label_new (_("Interval:"));
  gtk_widget_show (label7);
  gtk_table_attach (GTK_TABLE (table1), label7, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label7), 1, 0.5);

  label9 = gtk_label_new (_("Pitch (A4):"));
  gtk_widget_show (label9);
  gtk_table_attach (GTK_TABLE (table1), label9, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label9), 1, 0.5);

  label10 = gtk_label_new (_("Transpose:"));
  gtk_widget_show (label10);
  gtk_table_attach (GTK_TABLE (table1), label10, 0, 1, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label10), 1, 0.5);

  interval_spin_adj = G_OBJECT(gtk_adjustment_new (25, 8, 1000, 1, 10, 0));
  interval_spin = gtk_spin_button_new (GTK_ADJUSTMENT (interval_spin_adj), 1, 0);
  gtk_widget_show (interval_spin);
  gtk_table_attach (GTK_TABLE (table1), interval_spin, 1, 3, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label11 = gtk_label_new (_("<i>ms</i>"));
  gtk_widget_show (label11);
  gtk_table_attach (GTK_TABLE (table1), label11, 3, 4, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label11), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label11), 0, 0.5);

  pitch_spin_adj = G_OBJECT(gtk_adjustment_new (440, 220, 880, 1, 10, 0));
  pitch_spin = gtk_spin_button_new (GTK_ADJUSTMENT (pitch_spin_adj), 1, 0);
  gtk_widget_show (pitch_spin);
  gtk_table_attach (GTK_TABLE (table1), pitch_spin, 1, 3, 5, 6,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  transpose_spin_adj = G_OBJECT(gtk_adjustment_new (0, -12, 12, 1, 2, 0));
  transpose_spin = gtk_spin_button_new (GTK_ADJUSTMENT (transpose_spin_adj), 1, 0);
  gtk_widget_show (transpose_spin);
  gtk_table_attach (GTK_TABLE (table1), transpose_spin, 1, 3, 6, 7,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transpose_spin), TRUE);

  label12 = gtk_label_new (_("<i>samples</i>"));
  gtk_widget_show (label12);
  gtk_table_attach (GTK_TABLE (table1), label12, 3, 4, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label12), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5);

  label13 = gtk_label_new (_("<i>Hz</i>"));
  gtk_widget_show (label13);
  gtk_table_attach (GTK_TABLE (table1), label13, 3, 4, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label13), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5);

  label14 = gtk_label_new (_("<i>semitones</i>"));
  gtk_widget_show (label14);
  gtk_table_attach (GTK_TABLE (table1), label14, 3, 4, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label14), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5);

  label15 = gtk_label_new (_("Channels:"));
  gtk_widget_show (label15);
  gtk_table_attach (GTK_TABLE (table1), label15, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label15), 1, 0.5);

  label16 = gtk_label_new (_("Window:"));
  gtk_widget_show (label16);
  gtk_table_attach (GTK_TABLE (table1), label16, 0, 1, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label16), 1, 0.5);

  label3 = gtk_label_new (_("-"));
  gtk_widget_show (label3);
  gtk_table_attach (GTK_TABLE (table1), label3, 2, 3, 0, 1,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5);

  label4 = gtk_label_new (_("-"));
  gtk_widget_show (label4);
  gtk_table_attach (GTK_TABLE (table1), label4, 2, 3, 1, 2,
                    (GtkAttachOptions) (0),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label4), 0, 0.5);

  fft_spin_adj = G_OBJECT(gtk_adjustment_new (0, 0, 6, 1, 1, 0));
  fft_spin = gtk_spin_button_new (GTK_ADJUSTMENT (fft_spin_adj), 1, 0);
  gtk_widget_show (fft_spin);
  gtk_table_attach (GTK_TABLE (table1), fft_spin, 1, 3, 4, 5,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  window_combo = gtk_combo_box_text_new ();
  gtk_widget_show (window_combo);
  gtk_table_attach (GTK_TABLE (table1), window_combo, 1, 4, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  channel_button = gtk_button_new_with_mnemonic (_("All Channels"));
  gtk_widget_show (channel_button);
  gtk_table_attach (GTK_TABLE (table1), channel_button, 1, 4, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label8 = gtk_label_new (_("FFT size:"));
  gtk_widget_show (label8);
  gtk_table_attach (GTK_TABLE (table1), label8, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label8), 1, 0.5);

  label100 = gtk_label_new (_("<b>Processing</b>"));
  gtk_widget_show (label100);
  gtk_frame_set_label_widget (GTK_FRAME (frame1), label100);
  gtk_label_set_use_markup (GTK_LABEL (label100), TRUE);

  frame2 = gtk_frame_new (NULL);
  gtk_widget_show (frame2);
  gtk_box_pack_start (GTK_BOX (vbox1), frame2, TRUE, TRUE, 0);

  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment2);
  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment2), 0, 8, 12, 8);

  table2 = gtk_table_new (2, 3, FALSE);
  gtk_widget_show (table2);
  gtk_container_add (GTK_CONTAINER (alignment2), table2);
  gtk_table_set_row_spacings (GTK_TABLE (table2), 4);
  gtk_table_set_col_spacings (GTK_TABLE (table2), 4);

  label18 = gtk_label_new (_("Hold time:"));
  gtk_widget_show (label18);
  gtk_table_attach (GTK_TABLE (table2), label18, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);

  label19 = gtk_label_new (_("Gravity:"));
  gtk_widget_show (label19);
  gtk_table_attach (GTK_TABLE (table2), label19, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label19), 1, 0.5);

  peaks_gravity_spin_adj = G_OBJECT(gtk_adjustment_new (50, 0, 1000, 1, 10, 10));
  peaks_gravity_spin = gtk_spin_button_new (GTK_ADJUSTMENT (peaks_gravity_spin_adj), 1, 0);
  gtk_widget_show (peaks_gravity_spin);
  gtk_table_attach (GTK_TABLE (table2), peaks_gravity_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  peaks_htime_spin_adj = G_OBJECT(gtk_adjustment_new (500, 0, 1000, 1, 10, 10));
  peaks_htime_spin = gtk_spin_button_new (GTK_ADJUSTMENT (peaks_htime_spin_adj), 1, 0);
  gtk_widget_show (peaks_htime_spin);
  gtk_table_attach (GTK_TABLE (table2), peaks_htime_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label22 = gtk_label_new (_("<i>ms</i>"));
  gtk_widget_show (label22);
  gtk_table_attach (GTK_TABLE (table2), label22, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label22), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label22), 0, 0.5);

  label23 = gtk_label_new (_("<i>dB/s\302\262</i>"));
  gtk_widget_show (label23);
  gtk_table_attach (GTK_TABLE (table2), label23, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label23), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label23), 0, 0.5);

  peaks_check = gtk_check_button_new_with_mnemonic (_("Peaks"));
  gtk_widget_show (peaks_check);
  gtk_frame_set_label_widget (GTK_FRAME (frame2), peaks_check);

  frame3 = gtk_frame_new (NULL);
  gtk_widget_show (frame3);
  gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0);

  alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment3);
  gtk_container_add (GTK_CONTAINER (frame3), alignment3);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment3), 0, 8, 12, 8);

  table3 = gtk_table_new (2, 3, FALSE);
  gtk_widget_show (table3);
  gtk_container_add (GTK_CONTAINER (alignment3), table3);
  gtk_table_set_row_spacings (GTK_TABLE (table3), 4);
  gtk_table_set_col_spacings (GTK_TABLE (table3), 4);

  label25 = gtk_label_new (_("Hold time:"));
  gtk_widget_show (label25);
  gtk_table_attach (GTK_TABLE (table3), label25, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label25), 0, 0.5);

  label26 = gtk_label_new (_("Gravity:"));
  gtk_widget_show (label26);
  gtk_table_attach (GTK_TABLE (table3), label26, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label26), 1, 0.5);

  amplitudes_gravity_spin_adj = G_OBJECT(gtk_adjustment_new (50, 0, 1000, 1, 10, 10));
  amplitudes_gravity_spin = gtk_spin_button_new (GTK_ADJUSTMENT (amplitudes_gravity_spin_adj), 1, 0);
  gtk_widget_show (amplitudes_gravity_spin);
  gtk_table_attach (GTK_TABLE (table3), amplitudes_gravity_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  amplitudes_htime_spin_adj = G_OBJECT(gtk_adjustment_new (500, 0, 1000, 1, 10, 10));
  amplitudes_htime_spin = gtk_spin_button_new (GTK_ADJUSTMENT (amplitudes_htime_spin_adj), 1, 0);
  gtk_widget_show (amplitudes_htime_spin);
  gtk_table_attach (GTK_TABLE (table3), amplitudes_htime_spin, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label27 = gtk_label_new (_("<i>ms</i>"));
  gtk_widget_show (label27);
  gtk_table_attach (GTK_TABLE (table3), label27, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label27), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5);

  label28 = gtk_label_new (_("<i>dB/s\302\262</i>"));
  gtk_widget_show (label28);
  gtk_table_attach (GTK_TABLE (table3), label28, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (label28), TRUE);
  gtk_misc_set_alignment (GTK_MISC (label28), 0, 0.5);

  amplitudes_check = gtk_check_button_new_with_mnemonic (_("Amplitudes"));
  gtk_widget_show (amplitudes_check);
  gtk_frame_set_label_widget (GTK_FRAME (frame3), amplitudes_check);

  frame4 = gtk_frame_new (NULL);
  gtk_widget_show (frame4);
  gtk_box_pack_start (GTK_BOX (hbox1), frame4, TRUE, TRUE, 0);

  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment4);
  gtk_container_add (GTK_CONTAINER (frame4), alignment4);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 8, 12, 8);

  vbox2 = gtk_vbox_new (FALSE, 12);
  gtk_widget_show (vbox2);
  gtk_container_add (GTK_CONTAINER (alignment4), vbox2);

  table5 = gtk_table_new (11, 2, FALSE);
  gtk_widget_show (table5);
  gtk_box_pack_start (GTK_BOX (vbox2), table5, FALSE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table5), 10);
  gtk_table_set_col_spacings (GTK_TABLE (table5), 4);

  label107 = gtk_label_new (_("Tooltip:"));
  gtk_widget_show (label107);
  gtk_table_attach (GTK_TABLE (table5), label107, 0, 1, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label107), 1, 0.5);

  label106 = gtk_label_new (_("Labels:"));
  gtk_widget_show (label106);
  gtk_table_attach (GTK_TABLE (table5), label106, 0, 1, 8, 9,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label106), 1, 0.5);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
  gtk_table_attach (GTK_TABLE (table5), vbox3, 0, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  llabel_check = gtk_check_button_new_with_mnemonic (_("Left labels"));
  gtk_widget_show (llabel_check);
  gtk_box_pack_start (GTK_BOX (vbox3), llabel_check, FALSE, FALSE, 0);

  rlabel_check = gtk_check_button_new_with_mnemonic (_("Right labels"));
  gtk_widget_show (rlabel_check);
  gtk_box_pack_start (GTK_BOX (vbox3), rlabel_check, FALSE, FALSE, 0);

  vbox4 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox4);
  gtk_table_attach (GTK_TABLE (table5), vbox4, 0, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  blabel_check = gtk_check_button_new_with_mnemonic (_("Bottom labels"));
  gtk_widget_show (blabel_check);
  gtk_box_pack_start (GTK_BOX (vbox4), blabel_check, FALSE, FALSE, 0);

  tlabel_check = gtk_check_button_new_with_mnemonic (_("Top labels"));
  gtk_widget_show (tlabel_check);
  gtk_box_pack_start (GTK_BOX (vbox4), tlabel_check, FALSE, FALSE, 0);

  vbox5 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox5);
  gtk_table_attach (GTK_TABLE (table5), vbox5, 0, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  hgrid_check = gtk_check_button_new_with_mnemonic (_("Horizontal gridlines"));
  gtk_widget_show (hgrid_check);
  gtk_box_pack_start (GTK_BOX (vbox5), hgrid_check, FALSE, FALSE, 0);

  vgrid_check = gtk_check_button_new_with_mnemonic (_("Vertical gridlines"));
  gtk_widget_show (vgrid_check);
  gtk_box_pack_start (GTK_BOX (vbox5), vgrid_check, FALSE, FALSE, 0);

  ogrid_check = gtk_check_button_new_with_mnemonic (_("Octave gridlines"));
  gtk_widget_show (ogrid_check);
  gtk_box_pack_start (GTK_BOX (vbox5), ogrid_check, FALSE, FALSE, 0);

  vbox7 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox7);
  gtk_table_attach (GTK_TABLE (table5), vbox7, 0, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  white_keys_check = gtk_check_button_new_with_mnemonic (_("White keys"));
  gtk_widget_show (white_keys_check);
  gtk_box_pack_start (GTK_BOX (vbox7), white_keys_check, FALSE, FALSE, 0);

  black_keys_check = gtk_check_button_new_with_mnemonic (_("Black keys"));
  gtk_widget_show (black_keys_check);
  gtk_box_pack_start (GTK_BOX (vbox7), black_keys_check, FALSE, FALSE, 0);

  fill_spectrum_check = gtk_check_button_new_with_mnemonic (_("Fill spectrum"));
  gtk_widget_show (fill_spectrum_check);
  gtk_table_attach (GTK_TABLE (table5), fill_spectrum_check, 0, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  interpolate_check = gtk_check_button_new_with_mnemonic (_("Interpolate"));
  gtk_widget_show (interpolate_check);
  gtk_table_attach (GTK_TABLE (table5), interpolate_check, 0, 2, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  tooltip_check = gtk_check_button_new_with_mnemonic (_("Tooltip"));
  gtk_widget_show (tooltip_check);
  gtk_table_attach (GTK_TABLE (table5), tooltip_check, 0, 2, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  font_tooltip_button = gtk_font_button_new ();
  gtk_widget_show (font_tooltip_button);
  gtk_table_attach (GTK_TABLE (table5), font_tooltip_button, 1, 2, 7, 8,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  font_button = gtk_font_button_new ();
  gtk_widget_show (font_button);
  gtk_table_attach (GTK_TABLE (table5), font_button, 1, 2, 8, 9,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  mode_combo = gtk_combo_box_text_new ();
  gtk_widget_show (mode_combo);
  gtk_table_attach (GTK_TABLE (table5), mode_combo, 1, 2, 9, 10,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  label31 = gtk_label_new (_("Style:"));
  gtk_widget_show (label31);
  gtk_table_attach (GTK_TABLE (table5), label31, 0, 1, 9, 10,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label31), 1, 0.5);

  musical_box = gtk_frame_new (NULL);
  gtk_widget_show (musical_box);
  gtk_table_attach (GTK_TABLE (table5), musical_box, 1, 2, 10, 11,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  alignment17 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment17);
  gtk_container_add (GTK_CONTAINER (musical_box), alignment17);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment17), 6, 6, 6, 6);

  musical_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (musical_vbox);
  gtk_container_add (GTK_CONTAINER (alignment17), musical_vbox);

  table6 = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (table6);
  gtk_box_pack_start (GTK_BOX (musical_vbox), table6, TRUE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (table6), 4);
  gtk_table_set_col_spacings (GTK_TABLE (table6), 4);

  label108 = gtk_label_new (_("Bar width:"));
  gtk_widget_show (label108);
  gtk_table_attach (GTK_TABLE (table6), label108, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label108), 1, 0.5);

  barw_spin_adj = G_OBJECT(gtk_adjustment_new (1, 0, 100, 1, 10, 10));
  barw_spin = gtk_spin_button_new (GTK_ADJUSTMENT (barw_spin_adj), 1, 0);
  gtk_widget_show (barw_spin);
  gtk_table_attach (GTK_TABLE (table6), barw_spin, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label30 = gtk_label_new (_("Alignment:"));
  gtk_widget_show (label30);
  gtk_table_attach (GTK_TABLE (table6), label30, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label30), 1, 0.5);

  alignment_combo = gtk_combo_box_text_new ();
  gtk_widget_show (alignment_combo);
  gtk_table_attach (GTK_TABLE (table6), alignment_combo, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  spacing_check = gtk_check_button_new_with_mnemonic (_("Show spacing"));
  gtk_widget_show (spacing_check);
  gtk_box_pack_start (GTK_BOX (musical_vbox), spacing_check, FALSE, FALSE, 0);

  gaps_check = gtk_check_button_new_with_mnemonic (_("Show gaps"));
  gtk_widget_show (gaps_check);
  gtk_box_pack_start (GTK_BOX (musical_vbox), gaps_check, FALSE, FALSE, 0);

  led_check = gtk_check_button_new_with_mnemonic (_("LED style"));
  gtk_widget_show (led_check);
  gtk_box_pack_start (GTK_BOX (musical_vbox), led_check, FALSE, FALSE, 0);

  label29 = gtk_label_new (_("<b>Styles</b>"));
  gtk_widget_show (label29);
  gtk_frame_set_label_widget (GTK_FRAME (frame4), label29);
  gtk_label_set_use_markup (GTK_LABEL (label29), TRUE);

  frame6 = gtk_frame_new (NULL);
  gtk_widget_show (frame6);
  gtk_box_pack_start (GTK_BOX (hbox1), frame6, TRUE, TRUE, 0);

  alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment14);
  gtk_container_add (GTK_CONTAINER (frame6), alignment14);
  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 8, 12, 8);

  table4 = gtk_table_new (10, 2, FALSE);
  gtk_widget_show (table4);
  gtk_container_add (GTK_CONTAINER (alignment14), table4);
  gtk_table_set_row_spacings (GTK_TABLE (table4), 4);
  gtk_table_set_col_spacings (GTK_TABLE (table4), 4);

  label33 = gtk_label_new (_("Text:"));
  gtk_widget_show (label33);
  gtk_table_attach (GTK_TABLE (table4), label33, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label33), 1, 0.5);

  label34 = gtk_label_new (_("Background:"));
  gtk_widget_show (label34);
  gtk_table_attach (GTK_TABLE (table4), label34, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label34), 1, 0.5);

  wkeys_color = gtk_color_button_new ();
  gtk_widget_show (wkeys_color);
  gtk_table_attach (GTK_TABLE (table4), wkeys_color, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  bkeys_color = gtk_color_button_new ();
  gtk_widget_show (bkeys_color);
  gtk_table_attach (GTK_TABLE (table4), bkeys_color, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  peaks_color = gtk_color_button_new ();
  gtk_widget_show (peaks_color);
  gtk_table_attach (GTK_TABLE (table4), peaks_color, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  hgrid_color = gtk_color_button_new ();
  gtk_widget_show (hgrid_color);
  gtk_table_attach (GTK_TABLE (table4), hgrid_color, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  vgrid_color = gtk_color_button_new ();
  gtk_widget_show (vgrid_color);
  gtk_table_attach (GTK_TABLE (table4), vgrid_color, 1, 2, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  ogrid_color = gtk_color_button_new ();
  gtk_widget_show (ogrid_color);
  gtk_table_attach (GTK_TABLE (table4), ogrid_color, 1, 2, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label35 = gtk_label_new (_("Gradient orientation:"));
  gtk_widget_show (label35);
  gtk_table_attach (GTK_TABLE (table4), label35, 0, 1, 8, 9,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label35), 1, 0.5);

  gradient_combo = gtk_combo_box_text_new ();
  gtk_widget_show (gradient_combo);
  gtk_table_attach (GTK_TABLE (table4), gradient_combo, 1, 2, 8, 9,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  vbox6 = gtk_vbox_new (FALSE, 4);
  gtk_widget_show (vbox6);
  gtk_table_attach (GTK_TABLE (table4), vbox6, 0, 1, 9, 10,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  color_add = gtk_button_new_with_mnemonic (_("Add"));
  gtk_widget_show (color_add);
  gtk_box_pack_start (GTK_BOX (vbox6), color_add, FALSE, FALSE, 0);

  color_remove = gtk_button_new_with_mnemonic (_("Remove"));
  gtk_widget_show (color_remove);
  gtk_box_pack_start (GTK_BOX (vbox6), color_remove, FALSE, FALSE, 0);

  color_reverse = gtk_button_new_with_mnemonic (_("Reverse"));
  gtk_widget_show (color_reverse);
  gtk_box_pack_start (GTK_BOX (vbox6), color_reverse, FALSE, FALSE, 0);

  hbox7 = gtk_hbox_new (FALSE, 4);
  gtk_widget_show (hbox7);
  gtk_table_attach (GTK_TABLE (table4), hbox7, 1, 2, 9, 10,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

  frame7 = gtk_frame_new (NULL);
  gtk_widget_show (frame7);
  gtk_box_pack_start (GTK_BOX (hbox7), frame7, TRUE, TRUE, 0);

  alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1);
  gtk_widget_show (alignment15);
  gtk_container_add (GTK_CONTAINER (frame7), alignment15);

  gradient_preview = gtk_drawing_area_new ();
  gtk_widget_show (gradient_preview);
  gtk_container_add (GTK_CONTAINER (alignment15), gradient_preview);
  gtk_widget_set_size_request (gradient_preview, 40, -1);

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow1);
  gtk_box_pack_start (GTK_BOX (hbox7), scrolledwindow1, TRUE, TRUE, 0);
  gtk_widget_set_size_request (scrolledwindow1, 60, 220);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  viewport1 = gtk_viewport_new (NULL, NULL);
  gtk_widget_show (viewport1);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1);

  color_box = gtk_vbox_new (TRUE, 0);
  gtk_widget_show (color_box);
  gtk_container_add (GTK_CONTAINER (viewport1), color_box);

  label101 = gtk_label_new (_("Horizontal gridlines:"));
  gtk_widget_show (label101);
  gtk_table_attach (GTK_TABLE (table4), label101, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label101), 1, 0.5);

  label102 = gtk_label_new (_("Vertical gridlines:"));
  gtk_widget_show (label102);
  gtk_table_attach (GTK_TABLE (table4), label102, 0, 1, 6, 7,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label102), 1, 0.5);

  label103 = gtk_label_new (_("Octave gridlines:"));
  gtk_widget_show (label103);
  gtk_table_attach (GTK_TABLE (table4), label103, 0, 1, 7, 8,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label103), 1, 0.5);

  label104 = gtk_label_new (_("White keys:"));
  gtk_widget_show (label104);
  gtk_table_attach (GTK_TABLE (table4), label104, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label104), 1, 0.5);

  label105 = gtk_label_new (_("Black keys:"));
  gtk_widget_show (label105);
  gtk_table_attach (GTK_TABLE (table4), label105, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label105), 1, 0.5);

  alignment16 = gtk_alignment_new (1, 0.5, 0, 1);
  gtk_widget_show (alignment16);
  gtk_table_attach (GTK_TABLE (table4), alignment16, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  peaks_color_check = gtk_check_button_new_with_mnemonic (_("Peaks:"));
  gtk_widget_show (peaks_color_check);
  gtk_container_add (GTK_CONTAINER (alignment16), peaks_color_check);

  background_color = gtk_color_button_new ();
  gtk_widget_show (background_color);
  gtk_table_attach (GTK_TABLE (table4), background_color, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  text_color = gtk_color_button_new ();
  gtk_widget_show (text_color);
  gtk_table_attach (GTK_TABLE (table4), text_color, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label32 = gtk_label_new (_("<b>Colors</b>"));
  gtk_widget_show (label32);
  gtk_frame_set_label_widget (GTK_FRAME (frame6), label32);
  gtk_label_set_use_markup (GTK_LABEL (label32), TRUE);

  dialog_action_area1 = gtk_dialog_get_action_area (GTK_DIALOG (config_dialog));
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);

  applybutton1 = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (applybutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (config_dialog), applybutton1, GTK_RESPONSE_APPLY);
  gtk_widget_set_can_default(applybutton1, TRUE);

  cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (config_dialog), cancelbutton1, GTK_RESPONSE_CANCEL);
  gtk_widget_set_can_default(cancelbutton1, TRUE);

  okbutton1 = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton1);
  gtk_dialog_add_action_widget (GTK_DIALOG (config_dialog), okbutton1, GTK_RESPONSE_OK);
  gtk_widget_set_can_default(okbutton1, TRUE);

  g_signal_connect ((gpointer) notes_min_spin, "output",
                    G_CALLBACK (on_notes_min_spin_output),
                    NULL);
  g_signal_connect ((gpointer) notes_min_spin, "input",
                    G_CALLBACK (on_notes_min_spin_input),
                    NULL);
  g_signal_connect ((gpointer) notes_max_spin, "output",
                    G_CALLBACK (on_notes_max_spin_output),
                    NULL);
  g_signal_connect ((gpointer) notes_max_spin, "input",
                    G_CALLBACK (on_notes_max_spin_input),
                    NULL);
  g_signal_connect ((gpointer) fft_spin, "input",
                    G_CALLBACK (on_fft_spin_input),
                    NULL);
  g_signal_connect ((gpointer) fft_spin, "output",
                    G_CALLBACK (on_fft_spin_output),
                    NULL);
  g_signal_connect ((gpointer) mode_combo, "changed",
                    G_CALLBACK (on_mode_combo_changed),
                    NULL);
  g_signal_connect ((gpointer) barw_spin, "output",
                    G_CALLBACK (on_barw_spin_output),
                    NULL);
  g_signal_connect ((gpointer) gradient_combo, "changed",
                    G_CALLBACK (on_gradient_combo_changed),
                    NULL);
  g_signal_connect ((gpointer) color_add, "clicked",
                    G_CALLBACK (on_color_add_clicked),
                    NULL);
  g_signal_connect ((gpointer) color_remove, "clicked",
                    G_CALLBACK (on_color_remove_clicked),
                    NULL);
  g_signal_connect ((gpointer) color_reverse, "clicked",
                    G_CALLBACK (on_color_reverse_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (config_dialog, config_dialog, "config_dialog");
  GLADE_HOOKUP_OBJECT_NO_REF (config_dialog, dialog_vbox1, "dialog_vbox1");
  GLADE_HOOKUP_OBJECT (config_dialog, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (config_dialog, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (config_dialog, frame1, "frame1");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment1, "alignment1");
  GLADE_HOOKUP_OBJECT (config_dialog, table1, "table1");
  GLADE_HOOKUP_OBJECT (config_dialog, label1, "label1");
  GLADE_HOOKUP_OBJECT (config_dialog, label2, "label2");
  GLADE_HOOKUP_OBJECT (config_dialog, notes_min_spin, "notes_min_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, notes_max_spin, "notes_max_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (config_dialog, amp_min_spin, "amp_min_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, label5, "label5");
  GLADE_HOOKUP_OBJECT (config_dialog, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (config_dialog, amp_max_spin, "amp_max_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, label24, "label24");
  GLADE_HOOKUP_OBJECT (config_dialog, label7, "label7");
  GLADE_HOOKUP_OBJECT (config_dialog, label9, "label9");
  GLADE_HOOKUP_OBJECT (config_dialog, label10, "label10");
  GLADE_HOOKUP_OBJECT (config_dialog, interval_spin, "interval_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, label11, "label11");
  GLADE_HOOKUP_OBJECT (config_dialog, pitch_spin, "pitch_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, transpose_spin, "transpose_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, label12, "label12");
  GLADE_HOOKUP_OBJECT (config_dialog, label13, "label13");
  GLADE_HOOKUP_OBJECT (config_dialog, label14, "label14");
  GLADE_HOOKUP_OBJECT (config_dialog, label15, "label15");
  GLADE_HOOKUP_OBJECT (config_dialog, label16, "label16");
  GLADE_HOOKUP_OBJECT (config_dialog, label3, "label3");
  GLADE_HOOKUP_OBJECT (config_dialog, label4, "label4");
  GLADE_HOOKUP_OBJECT (config_dialog, fft_spin, "fft_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, window_combo, "window_combo");
  GLADE_HOOKUP_OBJECT (config_dialog, channel_button, "channel_button");
  GLADE_HOOKUP_OBJECT (config_dialog, label8, "label8");
  GLADE_HOOKUP_OBJECT (config_dialog, label100, "label100");
  GLADE_HOOKUP_OBJECT (config_dialog, frame2, "frame2");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment2, "alignment2");
  GLADE_HOOKUP_OBJECT (config_dialog, table2, "table2");
  GLADE_HOOKUP_OBJECT (config_dialog, label18, "label18");
  GLADE_HOOKUP_OBJECT (config_dialog, label19, "label19");
  GLADE_HOOKUP_OBJECT (config_dialog, peaks_gravity_spin, "peaks_gravity_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, peaks_htime_spin, "peaks_htime_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, label22, "label22");
  GLADE_HOOKUP_OBJECT (config_dialog, label23, "label23");
  GLADE_HOOKUP_OBJECT (config_dialog, peaks_check, "peaks_check");
  GLADE_HOOKUP_OBJECT (config_dialog, frame3, "frame3");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment3, "alignment3");
  GLADE_HOOKUP_OBJECT (config_dialog, table3, "table3");
  GLADE_HOOKUP_OBJECT (config_dialog, label25, "label25");
  GLADE_HOOKUP_OBJECT (config_dialog, label26, "label26");
  GLADE_HOOKUP_OBJECT (config_dialog, amplitudes_gravity_spin, "amplitudes_gravity_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, amplitudes_htime_spin, "amplitudes_htime_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, label27, "label27");
  GLADE_HOOKUP_OBJECT (config_dialog, label28, "label28");
  GLADE_HOOKUP_OBJECT (config_dialog, amplitudes_check, "amplitudes_check");
  GLADE_HOOKUP_OBJECT (config_dialog, frame4, "frame4");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment4, "alignment4");
  GLADE_HOOKUP_OBJECT (config_dialog, vbox2, "vbox2");
  GLADE_HOOKUP_OBJECT (config_dialog, table5, "table5");
  GLADE_HOOKUP_OBJECT (config_dialog, label107, "label107");
  GLADE_HOOKUP_OBJECT (config_dialog, label106, "label106");
  GLADE_HOOKUP_OBJECT (config_dialog, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (config_dialog, llabel_check, "llabel_check");
  GLADE_HOOKUP_OBJECT (config_dialog, rlabel_check, "rlabel_check");
  GLADE_HOOKUP_OBJECT (config_dialog, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (config_dialog, blabel_check, "blabel_check");
  GLADE_HOOKUP_OBJECT (config_dialog, tlabel_check, "tlabel_check");
  GLADE_HOOKUP_OBJECT (config_dialog, vbox5, "vbox5");
  GLADE_HOOKUP_OBJECT (config_dialog, hgrid_check, "hgrid_check");
  GLADE_HOOKUP_OBJECT (config_dialog, vgrid_check, "vgrid_check");
  GLADE_HOOKUP_OBJECT (config_dialog, ogrid_check, "ogrid_check");
  GLADE_HOOKUP_OBJECT (config_dialog, vbox7, "vbox7");
  GLADE_HOOKUP_OBJECT (config_dialog, white_keys_check, "white_keys_check");
  GLADE_HOOKUP_OBJECT (config_dialog, black_keys_check, "black_keys_check");
  GLADE_HOOKUP_OBJECT (config_dialog, fill_spectrum_check, "fill_spectrum_check");
  GLADE_HOOKUP_OBJECT (config_dialog, interpolate_check, "interpolate_check");
  GLADE_HOOKUP_OBJECT (config_dialog, tooltip_check, "tooltip_check");
  GLADE_HOOKUP_OBJECT (config_dialog, font_tooltip_button, "font_tooltip_button");
  GLADE_HOOKUP_OBJECT (config_dialog, font_button, "font_button");
  GLADE_HOOKUP_OBJECT (config_dialog, mode_combo, "mode_combo");
  GLADE_HOOKUP_OBJECT (config_dialog, label31, "label31");
  GLADE_HOOKUP_OBJECT (config_dialog, musical_box, "musical_box");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment17, "alignment17");
  GLADE_HOOKUP_OBJECT (config_dialog, musical_vbox, "musical_vbox");
  GLADE_HOOKUP_OBJECT (config_dialog, table6, "table6");
  GLADE_HOOKUP_OBJECT (config_dialog, label108, "label108");
  GLADE_HOOKUP_OBJECT (config_dialog, barw_spin, "barw_spin");
  GLADE_HOOKUP_OBJECT (config_dialog, label30, "label30");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment_combo, "alignment_combo");
  GLADE_HOOKUP_OBJECT (config_dialog, spacing_check, "spacing_check");
  GLADE_HOOKUP_OBJECT (config_dialog, gaps_check, "gaps_check");
  GLADE_HOOKUP_OBJECT (config_dialog, led_check, "led_check");
  GLADE_HOOKUP_OBJECT (config_dialog, label29, "label29");
  GLADE_HOOKUP_OBJECT (config_dialog, frame6, "frame6");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment14, "alignment14");
  GLADE_HOOKUP_OBJECT (config_dialog, table4, "table4");
  GLADE_HOOKUP_OBJECT (config_dialog, label33, "label33");
  GLADE_HOOKUP_OBJECT (config_dialog, label34, "label34");
  GLADE_HOOKUP_OBJECT (config_dialog, wkeys_color, "wkeys_color");
  GLADE_HOOKUP_OBJECT (config_dialog, bkeys_color, "bkeys_color");
  GLADE_HOOKUP_OBJECT (config_dialog, peaks_color, "peaks_color");
  GLADE_HOOKUP_OBJECT (config_dialog, hgrid_color, "hgrid_color");
  GLADE_HOOKUP_OBJECT (config_dialog, vgrid_color, "vgrid_color");
  GLADE_HOOKUP_OBJECT (config_dialog, ogrid_color, "ogrid_color");
  GLADE_HOOKUP_OBJECT (config_dialog, label35, "label35");
  GLADE_HOOKUP_OBJECT (config_dialog, gradient_combo, "gradient_combo");
  GLADE_HOOKUP_OBJECT (config_dialog, vbox6, "vbox6");
  GLADE_HOOKUP_OBJECT (config_dialog, color_add, "color_add");
  GLADE_HOOKUP_OBJECT (config_dialog, color_remove, "color_remove");
  GLADE_HOOKUP_OBJECT (config_dialog, color_reverse, "color_reverse");
  GLADE_HOOKUP_OBJECT (config_dialog, hbox7, "hbox7");
  GLADE_HOOKUP_OBJECT (config_dialog, frame7, "frame7");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment15, "alignment15");
  GLADE_HOOKUP_OBJECT (config_dialog, gradient_preview, "gradient_preview");
  GLADE_HOOKUP_OBJECT (config_dialog, scrolledwindow1, "scrolledwindow1");
  GLADE_HOOKUP_OBJECT (config_dialog, viewport1, "viewport1");
  GLADE_HOOKUP_OBJECT (config_dialog, color_box, "color_box");
  GLADE_HOOKUP_OBJECT (config_dialog, label101, "label101");
  GLADE_HOOKUP_OBJECT (config_dialog, label102, "label102");
  GLADE_HOOKUP_OBJECT (config_dialog, label103, "label103");
  GLADE_HOOKUP_OBJECT (config_dialog, label104, "label104");
  GLADE_HOOKUP_OBJECT (config_dialog, label105, "label105");
  GLADE_HOOKUP_OBJECT (config_dialog, alignment16, "alignment16");
  GLADE_HOOKUP_OBJECT (config_dialog, peaks_color_check, "peaks_color_check");
  GLADE_HOOKUP_OBJECT (config_dialog, background_color, "background_color");
  GLADE_HOOKUP_OBJECT (config_dialog, text_color, "text_color");
  GLADE_HOOKUP_OBJECT (config_dialog, label32, "label32");
  GLADE_HOOKUP_OBJECT_NO_REF (config_dialog, dialog_action_area1, "dialog_action_area1");
  GLADE_HOOKUP_OBJECT (config_dialog, applybutton1, "applybutton1");
  GLADE_HOOKUP_OBJECT (config_dialog, cancelbutton1, "cancelbutton1");
  GLADE_HOOKUP_OBJECT (config_dialog, okbutton1, "okbutton1");

  return config_dialog;
}

GtkWidget*
create_channel_menu (void)
{
  GtkWidget *channel_menu;
  GtkWidget *all_channels;
  GtkWidget *separator1;
  GtkWidget *front_left;
  GtkWidget *front_right;
  GtkWidget *front_center;
  GtkWidget *low_frequency;
  GtkWidget *back_left;
  GtkWidget *back_right;
  GtkWidget *front_left_of_center;
  GtkWidget *front_right_of_center;
  GtkWidget *back_center;
  GtkWidget *side_left;
  GtkWidget *side_right;
  GtkWidget *top_center;
  GtkWidget *top_front_left;
  GtkWidget *top_front_center;
  GtkWidget *top_front_right;
  GtkWidget *top_back_left;
  GtkWidget *top_back_center;
  GtkWidget *top_back_right;

  channel_menu = gtk_menu_new ();

  all_channels = gtk_check_menu_item_new_with_mnemonic (_("All Channels"));
  gtk_widget_show (all_channels);
  gtk_container_add (GTK_CONTAINER (channel_menu), all_channels);

  separator1 = gtk_separator_menu_item_new ();
  gtk_widget_show (separator1);
  gtk_container_add (GTK_CONTAINER (channel_menu), separator1);
  gtk_widget_set_sensitive (separator1, FALSE);

  front_left = gtk_check_menu_item_new_with_mnemonic (_("Front Left"));
  gtk_widget_show (front_left);
  gtk_container_add (GTK_CONTAINER (channel_menu), front_left);

  front_right = gtk_check_menu_item_new_with_mnemonic (_("Front Right"));
  gtk_widget_show (front_right);
  gtk_container_add (GTK_CONTAINER (channel_menu), front_right);

  front_center = gtk_check_menu_item_new_with_mnemonic (_("Front Center"));
  gtk_widget_show (front_center);
  gtk_container_add (GTK_CONTAINER (channel_menu), front_center);

  low_frequency = gtk_check_menu_item_new_with_mnemonic (_("Low Frequency"));
  gtk_widget_show (low_frequency);
  gtk_container_add (GTK_CONTAINER (channel_menu), low_frequency);

  back_left = gtk_check_menu_item_new_with_mnemonic (_("Back Left"));
  gtk_widget_show (back_left);
  gtk_container_add (GTK_CONTAINER (channel_menu), back_left);

  back_right = gtk_check_menu_item_new_with_mnemonic (_("Back Right"));
  gtk_widget_show (back_right);
  gtk_container_add (GTK_CONTAINER (channel_menu), back_right);

  front_left_of_center = gtk_check_menu_item_new_with_mnemonic (_("Front Left of Center"));
  gtk_widget_show (front_left_of_center);
  gtk_container_add (GTK_CONTAINER (channel_menu), front_left_of_center);

  front_right_of_center = gtk_check_menu_item_new_with_mnemonic (_("Front Right of Center"));
  gtk_widget_show (front_right_of_center);
  gtk_container_add (GTK_CONTAINER (channel_menu), front_right_of_center);

  back_center = gtk_check_menu_item_new_with_mnemonic (_("Back Center"));
  gtk_widget_show (back_center);
  gtk_container_add (GTK_CONTAINER (channel_menu), back_center);

  side_left = gtk_check_menu_item_new_with_mnemonic (_("Side Left"));
  gtk_widget_show (side_left);
  gtk_container_add (GTK_CONTAINER (channel_menu), side_left);

  side_right = gtk_check_menu_item_new_with_mnemonic (_("Side Right"));
  gtk_widget_show (side_right);
  gtk_container_add (GTK_CONTAINER (channel_menu), side_right);

  top_center = gtk_check_menu_item_new_with_mnemonic (_("Top Center"));
  gtk_widget_show (top_center);
  gtk_container_add (GTK_CONTAINER (channel_menu), top_center);

  top_front_left = gtk_check_menu_item_new_with_mnemonic (_("Top Front Left"));
  gtk_widget_show (top_front_left);
  gtk_container_add (GTK_CONTAINER (channel_menu), top_front_left);

  top_front_center = gtk_check_menu_item_new_with_mnemonic (_("Top Front Center"));
  gtk_widget_show (top_front_center);
  gtk_container_add (GTK_CONTAINER (channel_menu), top_front_center);

  top_front_right = gtk_check_menu_item_new_with_mnemonic (_("Top Front Right"));
  gtk_widget_show (top_front_right);
  gtk_container_add (GTK_CONTAINER (channel_menu), top_front_right);

  top_back_left = gtk_check_menu_item_new_with_mnemonic (_("Top Back Left"));
  gtk_widget_show (top_back_left);
  gtk_container_add (GTK_CONTAINER (channel_menu), top_back_left);

  top_back_center = gtk_check_menu_item_new_with_mnemonic (_("Top Back Center"));
  gtk_widget_show (top_back_center);
  gtk_container_add (GTK_CONTAINER (channel_menu), top_back_center);

  top_back_right = gtk_check_menu_item_new_with_mnemonic (_("Top Back Right"));
  gtk_widget_show (top_back_right);
  gtk_container_add (GTK_CONTAINER (channel_menu), top_back_right);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (channel_menu, channel_menu, "channel_menu");
  GLADE_HOOKUP_OBJECT (channel_menu, all_channels, "all_channels");
  GLADE_HOOKUP_OBJECT (channel_menu, separator1, "separator1");
  GLADE_HOOKUP_OBJECT (channel_menu, front_left, "front_left");
  GLADE_HOOKUP_OBJECT (channel_menu, front_right, "front_right");
  GLADE_HOOKUP_OBJECT (channel_menu, front_center, "front_center");
  GLADE_HOOKUP_OBJECT (channel_menu, low_frequency, "low_frequency");
  GLADE_HOOKUP_OBJECT (channel_menu, back_left, "back_left");
  GLADE_HOOKUP_OBJECT (channel_menu, back_right, "back_right");
  GLADE_HOOKUP_OBJECT (channel_menu, front_left_of_center, "front_left_of_center");
  GLADE_HOOKUP_OBJECT (channel_menu, front_right_of_center, "front_right_of_center");
  GLADE_HOOKUP_OBJECT (channel_menu, back_center, "back_center");
  GLADE_HOOKUP_OBJECT (channel_menu, side_left, "side_left");
  GLADE_HOOKUP_OBJECT (channel_menu, side_right, "side_right");
  GLADE_HOOKUP_OBJECT (channel_menu, top_center, "top_center");
  GLADE_HOOKUP_OBJECT (channel_menu, top_front_left, "top_front_left");
  GLADE_HOOKUP_OBJECT (channel_menu, top_front_center, "top_front_center");
  GLADE_HOOKUP_OBJECT (channel_menu, top_front_right, "top_front_right");
  GLADE_HOOKUP_OBJECT (channel_menu, top_back_left, "top_back_left");
  GLADE_HOOKUP_OBJECT (channel_menu, top_back_center, "top_back_center");
  GLADE_HOOKUP_OBJECT (channel_menu, top_back_right, "top_back_right");

  return channel_menu;
}

