/*
 * 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, \
    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_main_window (void)
{
  GtkWidget *main_window;
  GdkPixbuf *main_window_icon_pixbuf;
  GtkWidget *main_vbox;
  GtkWidget *logo_image;
  GtkWidget *main_notebook;
  GtkWidget *key_settings_hbox;
  GtkWidget *key_treeview_vbox;
  GtkWidget *keys_label;
  GtkWidget *key_treeview_scrolledwindow;
  GtkWidget *key_treeview;
  GtkWidget *key_settings_frame;
  GtkWidget *key_settings_table;
  GtkWidget *key_label;
  GtkWidget *key_image;
  GtkWidget *runs_table;
  GtkWidget *default_radiobutton;
  GSList *default_radiobutton_group = NULL;
  GtkWidget *program_radiobutton;
  GtkWidget *default_entry;
  GtkWidget *special_action_table;
  GtkWidget *plugin_combo;
  GtkWidget *plugin_combo_entry;
  GtkWidget *plugin_function_combo;
  GtkWidget *plugin_function_combo_entry;
  GtkWidget *plugin_label;
  GtkWidget *plugin_function_label;
  GtkWidget *special_action_radiobutton;
  GtkWidget *hbox9;
  GtkWidget *program_entry;
  GtkWidget *choose_program_button;
  GtkWidget *key_name_label;
  GtkWidget *runs_image;
  GtkWidget *runs_label;
  GtkWidget *key_settings_frame_label;
  GtkWidget *key_settings_label_hbox;
  GtkWidget *key_settings_image;
  GtkWidget *key_settings_label;
  GtkWidget *keyboard_vbox;
  GtkWidget *current_keyboard_table;
  GtkWidget *keyboard_manufacture_label;
  GtkWidget *keyboard_model_label;
  GtkWidget *keyboard_manufacturer_entry;
  GtkWidget *keyboard_model_entry;
  GtkWidget *keyboard_hbuttonbox;
  GtkWidget *change_button;
  GtkWidget *keyboard_hbox;
  GtkWidget *keyboard_image;
  GtkWidget *keyboard_label;
  GtkWidget *preferencesvbox;
  GtkWidget *special_action_plugin_frame;
  GtkWidget *special_action_plugins_vbox;
  GtkWidget *available_plugins_label;
  GtkWidget *plugin_treeview_scrolledwindow;
  GtkWidget *plugin_treeview;
  GtkWidget *plugin_import_hbuttonbox;
  GtkWidget *plugin_download_button;
  GtkWidget *alignment6;
  GtkWidget *hbox7;
  GtkWidget *image8;
  GtkWidget *label37;
  GtkWidget *plugin_info_button;
  GtkWidget *alignment7;
  GtkWidget *hbox14;
  GtkWidget *image9;
  GtkWidget *label41;
  GtkWidget *plugin_remove_button;
  GtkWidget *plugin_import_button;
  GtkWidget *alignment5;
  GtkWidget *hbox6;
  GtkWidget *image7;
  GtkWidget *label36;
  GtkWidget *special_action_plugin_label;
  GtkWidget *user_settings_frame;
  GtkWidget *user_settings_table;
  GtkWidget *mixer_channel_label;
  GtkWidget *home_page_label;
  GtkWidget *search_page_label;
  GtkWidget *home_page_entry;
  GtkWidget *search_page_entry;
  GtkWidget *mixer_channel_combobox;
  GtkWidget *user_settings_label;
  GtkWidget *external_programs_frame;
  GtkWidget *external_programs_table;
  GtkWidget *browser_label;
  GtkWidget *email_program_label;
  GtkWidget *chat_label;
  GtkWidget *hbox12;
  GtkWidget *email_prog_entry;
  GtkWidget *email_prog_choose_button;
  GtkWidget *hbox13;
  GtkWidget *chat_entry;
  GtkWidget *chat_choose_button;
  GtkWidget *hbox11;
  GtkWidget *browser_entry;
  GtkWidget *browser_choose_button;
  GtkWidget *extranal_programs_label;
  GtkWidget *preferences_hbox;
  GtkWidget *preferences_image;
  GtkWidget *preferences_label;
  GtkWidget *help_about_vbox;
  GtkWidget *about_frame;
  GtkWidget *about_table;
  GtkWidget *version_label;
  GtkWidget *developer_label;
  GtkWidget *license_label;
  GtkWidget *site_label;
  GtkWidget *contact_label;
  GtkWidget *contact_val_label;
  GtkWidget *site_val_label;
  GtkWidget *license_val_label;
  GtkWidget *version_val_label;
  GtkWidget *developer_val_label;
  GtkWidget *about_label;
  GtkWidget *help_hbuttonbox;
  GtkWidget *help_button;
  GtkWidget *help_about_hbox;
  GtkWidget *help_about_image;
  GtkWidget *help_about_label;
  GtkWidget *control_hbuttonbox;
  GtkWidget *ok_button;
  GtkWidget *apply_button;
  GtkWidget *cancel_button;

  main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (main_window), "keyTouch 2.3");
  main_window_icon_pixbuf = create_pixbuf ("icon.png");
  if (main_window_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (main_window), main_window_icon_pixbuf);
      gdk_pixbuf_unref (main_window_icon_pixbuf);
    }

  main_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (main_vbox);
  gtk_container_add (GTK_CONTAINER (main_window), main_vbox);

  logo_image = create_pixmap (main_window, "keytouch.png");
  gtk_widget_show (logo_image);
  gtk_box_pack_start (GTK_BOX (main_vbox), logo_image, FALSE, FALSE, 0);

  main_notebook = gtk_notebook_new ();
  gtk_widget_show (main_notebook);
  gtk_box_pack_start (GTK_BOX (main_vbox), main_notebook, TRUE, TRUE, 0);

  key_settings_hbox = gtk_hbox_new (FALSE, 9);
  gtk_widget_show (key_settings_hbox);
  gtk_container_add (GTK_CONTAINER (main_notebook), key_settings_hbox);
  gtk_container_set_border_width (GTK_CONTAINER (key_settings_hbox), 8);

  key_treeview_vbox = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (key_treeview_vbox);
  gtk_box_pack_start (GTK_BOX (key_settings_hbox), key_treeview_vbox, FALSE, TRUE, 0);
  gtk_widget_set_size_request (key_treeview_vbox, 185, -1);

  keys_label = gtk_label_new (_("Keys:"));
  gtk_widget_show (keys_label);
  gtk_box_pack_start (GTK_BOX (key_treeview_vbox), keys_label, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (keys_label), 0, 0.5);

  key_treeview_scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (key_treeview_scrolledwindow);
  gtk_box_pack_start (GTK_BOX (key_treeview_vbox), key_treeview_scrolledwindow, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (key_treeview_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (key_treeview_scrolledwindow), GTK_SHADOW_ETCHED_IN);

  key_treeview = gtk_tree_view_new ();
  gtk_widget_show (key_treeview);
  gtk_container_add (GTK_CONTAINER (key_treeview_scrolledwindow), key_treeview);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (key_treeview), FALSE);

  key_settings_frame = gtk_frame_new (NULL);
  gtk_widget_show (key_settings_frame);
  gtk_box_pack_start (GTK_BOX (key_settings_hbox), key_settings_frame, TRUE, TRUE, 0);

  key_settings_table = gtk_table_new (2, 3, FALSE);
  gtk_widget_show (key_settings_table);
  gtk_container_add (GTK_CONTAINER (key_settings_frame), key_settings_table);
  gtk_container_set_border_width (GTK_CONTAINER (key_settings_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (key_settings_table), 5);
  gtk_table_set_col_spacings (GTK_TABLE (key_settings_table), 6);

  key_label = gtk_label_new (_("Key:"));
  gtk_widget_show (key_label);
  gtk_table_attach (GTK_TABLE (key_settings_table), key_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (key_label), 0, 0.5);

  key_image = create_pixmap (main_window, "key.png");
  gtk_widget_show (key_image);
  gtk_table_attach (GTK_TABLE (key_settings_table), key_image, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (key_image), 1, 0);

  runs_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (runs_table);
  gtk_table_attach (GTK_TABLE (key_settings_table), runs_table, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_table_set_row_spacings (GTK_TABLE (runs_table), 3);
  gtk_table_set_col_spacings (GTK_TABLE (runs_table), 3);

  default_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("_Default setting:"));
  gtk_widget_show (default_radiobutton);
  gtk_table_attach (GTK_TABLE (runs_table), default_radiobutton, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (default_radiobutton), default_radiobutton_group);
  default_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (default_radiobutton));

  program_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("_Program:"));
  gtk_widget_show (program_radiobutton);
  gtk_table_attach (GTK_TABLE (runs_table), program_radiobutton, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (program_radiobutton), default_radiobutton_group);
  default_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (program_radiobutton));

  default_entry = gtk_entry_new ();
  gtk_widget_show (default_entry);
  gtk_table_attach (GTK_TABLE (runs_table), default_entry, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_editable_set_editable (GTK_EDITABLE (default_entry), FALSE);

  special_action_table = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (special_action_table);
  gtk_table_attach (GTK_TABLE (runs_table), special_action_table, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_container_set_border_width (GTK_CONTAINER (special_action_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (special_action_table), 5);

  plugin_combo = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (plugin_combo)->popwin),
                     "GladeParentKey", plugin_combo);
  gtk_widget_show (plugin_combo);
  gtk_table_attach (GTK_TABLE (special_action_table), plugin_combo, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  plugin_combo_entry = GTK_COMBO (plugin_combo)->entry;
  gtk_widget_show (plugin_combo_entry);
  gtk_editable_set_editable (GTK_EDITABLE (plugin_combo_entry), FALSE);

  plugin_function_combo = gtk_combo_new ();
  g_object_set_data (G_OBJECT (GTK_COMBO (plugin_function_combo)->popwin),
                     "GladeParentKey", plugin_function_combo);
  gtk_widget_show (plugin_function_combo);
  gtk_table_attach (GTK_TABLE (special_action_table), plugin_function_combo, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  plugin_function_combo_entry = GTK_COMBO (plugin_function_combo)->entry;
  gtk_widget_show (plugin_function_combo_entry);
  gtk_editable_set_editable (GTK_EDITABLE (plugin_function_combo_entry), FALSE);

  plugin_label = gtk_label_new (_("Plugin:"));
  gtk_widget_show (plugin_label);
  gtk_table_attach (GTK_TABLE (special_action_table), plugin_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_label), 0, 0.5);

  plugin_function_label = gtk_label_new (_("Function:"));
  gtk_widget_show (plugin_function_label);
  gtk_table_attach (GTK_TABLE (special_action_table), plugin_function_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_function_label), 0, 0.5);

  special_action_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Sp_ecial action:"));
  gtk_widget_show (special_action_radiobutton);
  gtk_table_attach (GTK_TABLE (runs_table), special_action_radiobutton, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (special_action_radiobutton), default_radiobutton_group);
  default_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (special_action_radiobutton));

  hbox9 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox9);
  gtk_table_attach (GTK_TABLE (runs_table), hbox9, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  program_entry = gtk_entry_new ();
  gtk_widget_show (program_entry);
  gtk_box_pack_start (GTK_BOX (hbox9), program_entry, TRUE, TRUE, 0);

  choose_program_button = gtk_button_new_with_mnemonic (_("Ch_oose..."));
  gtk_widget_show (choose_program_button);
  gtk_box_pack_start (GTK_BOX (hbox9), choose_program_button, FALSE, FALSE, 0);

  key_name_label = gtk_label_new ("-");
  gtk_widget_show (key_name_label);
  gtk_table_attach (GTK_TABLE (key_settings_table), key_name_label, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (key_name_label), 0, 0.5);

  runs_image = gtk_image_new_from_stock ("gtk-execute", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (runs_image);
  gtk_table_attach (GTK_TABLE (key_settings_table), runs_image, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (runs_image), 1, 0);

  runs_label = gtk_label_new (_("Runs:"));
  gtk_widget_show (runs_label);
  gtk_table_attach (GTK_TABLE (key_settings_table), runs_label, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (runs_label), 0, 0);

  key_settings_frame_label = gtk_label_new (_("Key settings"));
  gtk_widget_show (key_settings_frame_label);
  gtk_frame_set_label_widget (GTK_FRAME (key_settings_frame), key_settings_frame_label);

  key_settings_label_hbox = gtk_hbox_new (FALSE, 3);
  gtk_widget_show (key_settings_label_hbox);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_notebook), 0), key_settings_label_hbox);

  key_settings_image = create_pixmap (main_window, "key2.png");
  gtk_widget_show (key_settings_image);
  gtk_box_pack_start (GTK_BOX (key_settings_label_hbox), key_settings_image, TRUE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (key_settings_image), 1, 0);

  key_settings_label = gtk_label_new_with_mnemonic (_("Key _settings"));
  gtk_widget_show (key_settings_label);
  gtk_box_pack_start (GTK_BOX (key_settings_label_hbox), key_settings_label, FALSE, FALSE, 0);

  keyboard_vbox = gtk_vbox_new (FALSE, 5);
  gtk_widget_show (keyboard_vbox);
  gtk_container_add (GTK_CONTAINER (main_notebook), keyboard_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (keyboard_vbox), 8);

  current_keyboard_table = gtk_table_new (2, 2, FALSE);
  gtk_widget_show (current_keyboard_table);
  gtk_box_pack_start (GTK_BOX (keyboard_vbox), current_keyboard_table, FALSE, TRUE, 0);
  gtk_table_set_row_spacings (GTK_TABLE (current_keyboard_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (current_keyboard_table), 6);

  keyboard_manufacture_label = gtk_label_new (_("Keyboard manufacturer:"));
  gtk_widget_show (keyboard_manufacture_label);
  gtk_table_attach (GTK_TABLE (current_keyboard_table), keyboard_manufacture_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (keyboard_manufacture_label), 0, 0.5);

  keyboard_model_label = gtk_label_new (_("Keyboard model:"));
  gtk_widget_show (keyboard_model_label);
  gtk_table_attach (GTK_TABLE (current_keyboard_table), keyboard_model_label, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (keyboard_model_label), 0, 0.5);

  keyboard_manufacturer_entry = gtk_entry_new ();
  gtk_widget_show (keyboard_manufacturer_entry);
  gtk_table_attach (GTK_TABLE (current_keyboard_table), keyboard_manufacturer_entry, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_editable_set_editable (GTK_EDITABLE (keyboard_manufacturer_entry), FALSE);

  keyboard_model_entry = gtk_entry_new ();
  gtk_widget_show (keyboard_model_entry);
  gtk_table_attach (GTK_TABLE (current_keyboard_table), keyboard_model_entry, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_editable_set_editable (GTK_EDITABLE (keyboard_model_entry), FALSE);

  keyboard_hbuttonbox = gtk_hbutton_box_new ();
  gtk_widget_show (keyboard_hbuttonbox);
  gtk_box_pack_start (GTK_BOX (keyboard_vbox), keyboard_hbuttonbox, FALSE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (keyboard_hbuttonbox), GTK_BUTTONBOX_END);

  change_button = gtk_button_new_with_mnemonic (_("Chang_e..."));
  gtk_widget_show (change_button);
  gtk_container_add (GTK_CONTAINER (keyboard_hbuttonbox), change_button);
  GTK_WIDGET_SET_FLAGS (change_button, GTK_CAN_DEFAULT);

  keyboard_hbox = gtk_hbox_new (FALSE, 3);
  gtk_widget_show (keyboard_hbox);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_notebook), 1), keyboard_hbox);

  keyboard_image = create_pixmap (main_window, "keyboard.png");
  gtk_widget_show (keyboard_image);
  gtk_box_pack_start (GTK_BOX (keyboard_hbox), keyboard_image, TRUE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (keyboard_image), 1, 0);

  keyboard_label = gtk_label_new_with_mnemonic (_("_Keyboard"));
  gtk_widget_show (keyboard_label);
  gtk_box_pack_start (GTK_BOX (keyboard_hbox), keyboard_label, FALSE, FALSE, 0);

  preferencesvbox = gtk_vbox_new (FALSE, 4);
  gtk_widget_show (preferencesvbox);
  gtk_container_add (GTK_CONTAINER (main_notebook), preferencesvbox);
  gtk_container_set_border_width (GTK_CONTAINER (preferencesvbox), 8);

  special_action_plugin_frame = gtk_frame_new (NULL);
  gtk_widget_show (special_action_plugin_frame);
  gtk_box_pack_start (GTK_BOX (preferencesvbox), special_action_plugin_frame, TRUE, TRUE, 0);

  special_action_plugins_vbox = gtk_vbox_new (FALSE, 2);
  gtk_widget_show (special_action_plugins_vbox);
  gtk_container_add (GTK_CONTAINER (special_action_plugin_frame), special_action_plugins_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (special_action_plugins_vbox), 5);

  available_plugins_label = gtk_label_new (_("Available plugins:"));
  gtk_widget_show (available_plugins_label);
  gtk_box_pack_start (GTK_BOX (special_action_plugins_vbox), available_plugins_label, FALSE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (available_plugins_label), 0, 0.5);

  plugin_treeview_scrolledwindow = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (plugin_treeview_scrolledwindow);
  gtk_box_pack_start (GTK_BOX (special_action_plugins_vbox), plugin_treeview_scrolledwindow, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (plugin_treeview_scrolledwindow), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (plugin_treeview_scrolledwindow), GTK_SHADOW_ETCHED_IN);

  plugin_treeview = gtk_tree_view_new ();
  gtk_widget_show (plugin_treeview);
  gtk_container_add (GTK_CONTAINER (plugin_treeview_scrolledwindow), plugin_treeview);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (plugin_treeview), FALSE);

  plugin_import_hbuttonbox = gtk_hbutton_box_new ();
  gtk_widget_show (plugin_import_hbuttonbox);
  gtk_box_pack_start (GTK_BOX (special_action_plugins_vbox), plugin_import_hbuttonbox, FALSE, FALSE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (plugin_import_hbuttonbox), GTK_BUTTONBOX_END);

  plugin_download_button = gtk_button_new ();
  gtk_widget_show (plugin_download_button);
  gtk_container_add (GTK_CONTAINER (plugin_import_hbuttonbox), plugin_download_button);
  GTK_WIDGET_SET_FLAGS (plugin_download_button, GTK_CAN_DEFAULT);

  alignment6 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment6);
  gtk_container_add (GTK_CONTAINER (plugin_download_button), alignment6);

  hbox7 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox7);
  gtk_container_add (GTK_CONTAINER (alignment6), hbox7);

  image8 = create_pixmap (main_window, "internet.png");
  gtk_widget_show (image8);
  gtk_box_pack_start (GTK_BOX (hbox7), image8, FALSE, FALSE, 0);

  label37 = gtk_label_new_with_mnemonic (_("_Download..."));
  gtk_widget_show (label37);
  gtk_box_pack_start (GTK_BOX (hbox7), label37, FALSE, FALSE, 0);

  plugin_info_button = gtk_button_new ();
  gtk_widget_show (plugin_info_button);
  gtk_container_add (GTK_CONTAINER (plugin_import_hbuttonbox), plugin_info_button);
  GTK_WIDGET_SET_FLAGS (plugin_info_button, GTK_CAN_DEFAULT);

  alignment7 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment7);
  gtk_container_add (GTK_CONTAINER (plugin_info_button), alignment7);

  hbox14 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox14);
  gtk_container_add (GTK_CONTAINER (alignment7), hbox14);

  image9 = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image9);
  gtk_box_pack_start (GTK_BOX (hbox14), image9, FALSE, FALSE, 0);

  label41 = gtk_label_new_with_mnemonic (_("_Information..."));
  gtk_widget_show (label41);
  gtk_box_pack_start (GTK_BOX (hbox14), label41, FALSE, FALSE, 0);

  plugin_remove_button = gtk_button_new_from_stock ("gtk-remove");
  gtk_widget_show (plugin_remove_button);
  gtk_container_add (GTK_CONTAINER (plugin_import_hbuttonbox), plugin_remove_button);
  GTK_WIDGET_SET_FLAGS (plugin_remove_button, GTK_CAN_DEFAULT);

  plugin_import_button = gtk_button_new ();
  gtk_widget_show (plugin_import_button);
  gtk_container_add (GTK_CONTAINER (plugin_import_hbuttonbox), plugin_import_button);
  GTK_WIDGET_SET_FLAGS (plugin_import_button, GTK_CAN_DEFAULT);

  alignment5 = gtk_alignment_new (0.5, 0.5, 0, 0);
  gtk_widget_show (alignment5);
  gtk_container_add (GTK_CONTAINER (plugin_import_button), alignment5);

  hbox6 = gtk_hbox_new (FALSE, 2);
  gtk_widget_show (hbox6);
  gtk_container_add (GTK_CONTAINER (alignment5), hbox6);

  image7 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image7);
  gtk_box_pack_start (GTK_BOX (hbox6), image7, FALSE, FALSE, 0);

  label36 = gtk_label_new_with_mnemonic (_("_Import..."));
  gtk_widget_show (label36);
  gtk_box_pack_start (GTK_BOX (hbox6), label36, FALSE, FALSE, 0);

  special_action_plugin_label = gtk_label_new (_("Special action plugins"));
  gtk_widget_show (special_action_plugin_label);
  gtk_frame_set_label_widget (GTK_FRAME (special_action_plugin_frame), special_action_plugin_label);

  user_settings_frame = gtk_frame_new (NULL);
  gtk_widget_show (user_settings_frame);
  gtk_box_pack_start (GTK_BOX (preferencesvbox), user_settings_frame, FALSE, TRUE, 0);

  user_settings_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (user_settings_table);
  gtk_container_add (GTK_CONTAINER (user_settings_frame), user_settings_table);
  gtk_container_set_border_width (GTK_CONTAINER (user_settings_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (user_settings_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (user_settings_table), 6);

  mixer_channel_label = gtk_label_new (_("Mixer channel:"));
  gtk_widget_show (mixer_channel_label);
  gtk_table_attach (GTK_TABLE (user_settings_table), mixer_channel_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_label_set_use_markup (GTK_LABEL (mixer_channel_label), TRUE);
  gtk_misc_set_alignment (GTK_MISC (mixer_channel_label), 0, 0.49);

  home_page_label = gtk_label_new (_("Home page:"));
  gtk_widget_show (home_page_label);
  gtk_table_attach (GTK_TABLE (user_settings_table), home_page_label, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (home_page_label), 0, 0.5);

  search_page_label = gtk_label_new (_("Search page:"));
  gtk_widget_show (search_page_label);
  gtk_table_attach (GTK_TABLE (user_settings_table), search_page_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (search_page_label), 0, 0.5);

  home_page_entry = gtk_entry_new ();
  gtk_widget_show (home_page_entry);
  gtk_table_attach (GTK_TABLE (user_settings_table), home_page_entry, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  search_page_entry = gtk_entry_new ();
  gtk_widget_show (search_page_entry);
  gtk_table_attach (GTK_TABLE (user_settings_table), search_page_entry, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  mixer_channel_combobox = gtk_combo_box_new_text ();
  gtk_widget_show (mixer_channel_combobox);
  gtk_table_attach (GTK_TABLE (user_settings_table), mixer_channel_combobox, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);

  user_settings_label = gtk_label_new (_("User settings"));
  gtk_widget_show (user_settings_label);
  gtk_frame_set_label_widget (GTK_FRAME (user_settings_frame), user_settings_label);

  external_programs_frame = gtk_frame_new (NULL);
  gtk_widget_show (external_programs_frame);
  gtk_box_pack_start (GTK_BOX (preferencesvbox), external_programs_frame, FALSE, TRUE, 0);

  external_programs_table = gtk_table_new (3, 2, FALSE);
  gtk_widget_show (external_programs_table);
  gtk_container_add (GTK_CONTAINER (external_programs_frame), external_programs_table);
  gtk_container_set_border_width (GTK_CONTAINER (external_programs_table), 5);
  gtk_table_set_row_spacings (GTK_TABLE (external_programs_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (external_programs_table), 6);

  browser_label = gtk_label_new (_("Internet browser:"));
  gtk_widget_show (browser_label);
  gtk_table_attach (GTK_TABLE (external_programs_table), browser_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (browser_label), 0, 0.5);

  email_program_label = gtk_label_new (_("E-mail program:"));
  gtk_widget_show (email_program_label);
  gtk_table_attach (GTK_TABLE (external_programs_table), email_program_label, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (email_program_label), 0, 0.5);

  chat_label = gtk_label_new (_("Chat program:"));
  gtk_widget_show (chat_label);
  gtk_table_attach (GTK_TABLE (external_programs_table), chat_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (chat_label), 0, 0.5);

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

  email_prog_entry = gtk_entry_new ();
  gtk_widget_show (email_prog_entry);
  gtk_box_pack_start (GTK_BOX (hbox12), email_prog_entry, TRUE, TRUE, 0);

  email_prog_choose_button = gtk_button_new_with_mnemonic (_("Ch_oose..."));
  gtk_widget_show (email_prog_choose_button);
  gtk_box_pack_start (GTK_BOX (hbox12), email_prog_choose_button, FALSE, FALSE, 0);

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

  chat_entry = gtk_entry_new ();
  gtk_widget_show (chat_entry);
  gtk_box_pack_start (GTK_BOX (hbox13), chat_entry, TRUE, TRUE, 0);

  chat_choose_button = gtk_button_new_with_mnemonic (_("Ch_oose..."));
  gtk_widget_show (chat_choose_button);
  gtk_box_pack_start (GTK_BOX (hbox13), chat_choose_button, FALSE, FALSE, 0);

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

  browser_entry = gtk_entry_new ();
  gtk_widget_show (browser_entry);
  gtk_box_pack_start (GTK_BOX (hbox11), browser_entry, TRUE, TRUE, 0);

  browser_choose_button = gtk_button_new_with_mnemonic (_("Ch_oose..."));
  gtk_widget_show (browser_choose_button);
  gtk_box_pack_start (GTK_BOX (hbox11), browser_choose_button, FALSE, FALSE, 0);

  extranal_programs_label = gtk_label_new (_("External programs"));
  gtk_widget_show (extranal_programs_label);
  gtk_frame_set_label_widget (GTK_FRAME (external_programs_frame), extranal_programs_label);

  preferences_hbox = gtk_hbox_new (FALSE, 3);
  gtk_widget_show (preferences_hbox);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_notebook), 2), preferences_hbox);

  preferences_image = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_SMALL_TOOLBAR);
  gtk_widget_show (preferences_image);
  gtk_box_pack_start (GTK_BOX (preferences_hbox), preferences_image, TRUE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (preferences_image), 1, 0);

  preferences_label = gtk_label_new_with_mnemonic (_("Pre_ferences"));
  gtk_widget_show (preferences_label);
  gtk_box_pack_start (GTK_BOX (preferences_hbox), preferences_label, FALSE, FALSE, 0);

  help_about_vbox = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (help_about_vbox);
  gtk_container_add (GTK_CONTAINER (main_notebook), help_about_vbox);
  gtk_container_set_border_width (GTK_CONTAINER (help_about_vbox), 8);

  about_frame = gtk_frame_new (NULL);
  gtk_widget_show (about_frame);
  gtk_box_pack_start (GTK_BOX (help_about_vbox), about_frame, FALSE, TRUE, 0);

  about_table = gtk_table_new (5, 2, FALSE);
  gtk_widget_show (about_table);
  gtk_container_add (GTK_CONTAINER (about_frame), about_table);
  gtk_container_set_border_width (GTK_CONTAINER (about_table), 7);
  gtk_table_set_row_spacings (GTK_TABLE (about_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (about_table), 6);

  version_label = gtk_label_new (_("Version:"));
  gtk_widget_show (version_label);
  gtk_table_attach (GTK_TABLE (about_table), version_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (version_label), 0, 0.5);

  developer_label = gtk_label_new (_("Developer:"));
  gtk_widget_show (developer_label);
  gtk_table_attach (GTK_TABLE (about_table), developer_label, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (developer_label), 0, 0.5);

  license_label = gtk_label_new (_("License:"));
  gtk_widget_show (license_label);
  gtk_table_attach (GTK_TABLE (about_table), license_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (license_label), 0, 0.5);

  site_label = gtk_label_new (_("Site:"));
  gtk_widget_show (site_label);
  gtk_table_attach (GTK_TABLE (about_table), site_label, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (site_label), 0, 0.5);

  contact_label = gtk_label_new (_("Contact:"));
  gtk_widget_show (contact_label);
  gtk_table_attach (GTK_TABLE (about_table), contact_label, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (contact_label), 0, 0.5);

  contact_val_label = gtk_label_new ("marvinr@users.sf.net");
  gtk_widget_show (contact_val_label);
  gtk_table_attach (GTK_TABLE (about_table), contact_val_label, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (contact_val_label), 0, 0.5);

  site_val_label = gtk_label_new (_("http://keytouch.sf.net"));
  gtk_widget_show (site_val_label);
  gtk_table_attach (GTK_TABLE (about_table), site_val_label, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (site_val_label), 0, 0.5);

  license_val_label = gtk_label_new (_("GPL 2 or higher"));
  gtk_widget_show (license_val_label);
  gtk_table_attach (GTK_TABLE (about_table), license_val_label, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (license_val_label), 0, 0.5);

  version_val_label = gtk_label_new ("-");
  gtk_widget_show (version_val_label);
  gtk_table_attach (GTK_TABLE (about_table), version_val_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (version_val_label), 0, 0.5);

  developer_val_label = gtk_label_new ("Marvin Raaijmakers");
  gtk_widget_show (developer_val_label);
  gtk_table_attach (GTK_TABLE (about_table), developer_val_label, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (developer_val_label), 0, 0.5);

  about_label = gtk_label_new (_("About"));
  gtk_widget_show (about_label);
  gtk_frame_set_label_widget (GTK_FRAME (about_frame), about_label);

  help_hbuttonbox = gtk_hbutton_box_new ();
  gtk_widget_show (help_hbuttonbox);
  gtk_box_pack_start (GTK_BOX (help_about_vbox), help_hbuttonbox, FALSE, TRUE, 0);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (help_hbuttonbox), GTK_BUTTONBOX_SPREAD);

  help_button = gtk_button_new_from_stock ("gtk-help");
  gtk_widget_show (help_button);
  gtk_container_add (GTK_CONTAINER (help_hbuttonbox), help_button);
  GTK_WIDGET_SET_FLAGS (help_button, GTK_CAN_DEFAULT);

  help_about_hbox = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (help_about_hbox);
  gtk_notebook_set_tab_label (GTK_NOTEBOOK (main_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (main_notebook), 3), help_about_hbox);

  help_about_image = gtk_image_new_from_stock ("gtk-dialog-info", GTK_ICON_SIZE_SMALL_TOOLBAR);
  gtk_widget_show (help_about_image);
  gtk_box_pack_start (GTK_BOX (help_about_hbox), help_about_image, TRUE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (help_about_image), 1, 0);

  help_about_label = gtk_label_new_with_mnemonic (_("Help & A_bout"));
  gtk_widget_show (help_about_label);
  gtk_box_pack_start (GTK_BOX (help_about_hbox), help_about_label, FALSE, FALSE, 0);

  control_hbuttonbox = gtk_hbutton_box_new ();
  gtk_widget_show (control_hbuttonbox);
  gtk_box_pack_start (GTK_BOX (main_vbox), control_hbuttonbox, FALSE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (control_hbuttonbox), 3);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (control_hbuttonbox), GTK_BUTTONBOX_END);

  ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (ok_button);
  gtk_container_add (GTK_CONTAINER (control_hbuttonbox), ok_button);
  GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT);

  apply_button = gtk_button_new_from_stock ("gtk-apply");
  gtk_widget_show (apply_button);
  gtk_container_add (GTK_CONTAINER (control_hbuttonbox), apply_button);
  GTK_WIDGET_SET_FLAGS (apply_button, GTK_CAN_DEFAULT);

  cancel_button = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancel_button);
  gtk_container_add (GTK_CONTAINER (control_hbuttonbox), cancel_button);
  GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) main_window, "delete_event",
                    G_CALLBACK (on_main_window_delete_event),
                    NULL);
  g_signal_connect ((gpointer) default_radiobutton, "toggled",
                    G_CALLBACK (on_default_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) program_radiobutton, "toggled",
                    G_CALLBACK (on_program_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) plugin_combo_entry, "changed",
                    G_CALLBACK (on_plugin_combo_entry_changed),
                    NULL);
  g_signal_connect ((gpointer) plugin_function_combo_entry, "changed",
                    G_CALLBACK (on_plugin_function_combo_entry_changed),
                    NULL);
  g_signal_connect ((gpointer) special_action_radiobutton, "toggled",
                    G_CALLBACK (on_special_action_radiobutton_toggled),
                    NULL);
  g_signal_connect ((gpointer) program_entry, "changed",
                    G_CALLBACK (on_program_entry_changed),
                    NULL);
  g_signal_connect ((gpointer) choose_program_button, "clicked",
                    G_CALLBACK (on_choose_program_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) change_button, "clicked",
                    G_CALLBACK (on_change_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) plugin_download_button, "clicked",
                    G_CALLBACK (on_plugin_download_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) plugin_info_button, "clicked",
                    G_CALLBACK (on_plugin_info_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) plugin_remove_button, "clicked",
                    G_CALLBACK (on_plugin_remove_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) plugin_import_button, "clicked",
                    G_CALLBACK (on_plugin_import_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) email_prog_choose_button, "clicked",
                    G_CALLBACK (on_email_prog_choose_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) chat_choose_button, "clicked",
                    G_CALLBACK (on_chat_choose_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) browser_choose_button, "clicked",
                    G_CALLBACK (on_browser_choose_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) help_button, "clicked",
                    G_CALLBACK (on_help_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) ok_button, "clicked",
                    G_CALLBACK (on_ok_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) apply_button, "clicked",
                    G_CALLBACK (on_apply_button_clicked),
                    NULL);
  g_signal_connect ((gpointer) cancel_button, "clicked",
                    G_CALLBACK (on_cancel_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (main_window, main_window, "main_window");
  GLADE_HOOKUP_OBJECT (main_window, main_vbox, "main_vbox");
  GLADE_HOOKUP_OBJECT (main_window, logo_image, "logo_image");
  GLADE_HOOKUP_OBJECT (main_window, main_notebook, "main_notebook");
  GLADE_HOOKUP_OBJECT (main_window, key_settings_hbox, "key_settings_hbox");
  GLADE_HOOKUP_OBJECT (main_window, key_treeview_vbox, "key_treeview_vbox");
  GLADE_HOOKUP_OBJECT (main_window, keys_label, "keys_label");
  GLADE_HOOKUP_OBJECT (main_window, key_treeview_scrolledwindow, "key_treeview_scrolledwindow");
  GLADE_HOOKUP_OBJECT (main_window, key_treeview, "key_treeview");
  GLADE_HOOKUP_OBJECT (main_window, key_settings_frame, "key_settings_frame");
  GLADE_HOOKUP_OBJECT (main_window, key_settings_table, "key_settings_table");
  GLADE_HOOKUP_OBJECT (main_window, key_label, "key_label");
  GLADE_HOOKUP_OBJECT (main_window, key_image, "key_image");
  GLADE_HOOKUP_OBJECT (main_window, runs_table, "runs_table");
  GLADE_HOOKUP_OBJECT (main_window, default_radiobutton, "default_radiobutton");
  GLADE_HOOKUP_OBJECT (main_window, program_radiobutton, "program_radiobutton");
  GLADE_HOOKUP_OBJECT (main_window, default_entry, "default_entry");
  GLADE_HOOKUP_OBJECT (main_window, special_action_table, "special_action_table");
  GLADE_HOOKUP_OBJECT (main_window, plugin_combo, "plugin_combo");
  GLADE_HOOKUP_OBJECT (main_window, plugin_combo_entry, "plugin_combo_entry");
  GLADE_HOOKUP_OBJECT (main_window, plugin_function_combo, "plugin_function_combo");
  GLADE_HOOKUP_OBJECT (main_window, plugin_function_combo_entry, "plugin_function_combo_entry");
  GLADE_HOOKUP_OBJECT (main_window, plugin_label, "plugin_label");
  GLADE_HOOKUP_OBJECT (main_window, plugin_function_label, "plugin_function_label");
  GLADE_HOOKUP_OBJECT (main_window, special_action_radiobutton, "special_action_radiobutton");
  GLADE_HOOKUP_OBJECT (main_window, hbox9, "hbox9");
  GLADE_HOOKUP_OBJECT (main_window, program_entry, "program_entry");
  GLADE_HOOKUP_OBJECT (main_window, choose_program_button, "choose_program_button");
  GLADE_HOOKUP_OBJECT (main_window, key_name_label, "key_name_label");
  GLADE_HOOKUP_OBJECT (main_window, runs_image, "runs_image");
  GLADE_HOOKUP_OBJECT (main_window, runs_label, "runs_label");
  GLADE_HOOKUP_OBJECT (main_window, key_settings_frame_label, "key_settings_frame_label");
  GLADE_HOOKUP_OBJECT (main_window, key_settings_label_hbox, "key_settings_label_hbox");
  GLADE_HOOKUP_OBJECT (main_window, key_settings_image, "key_settings_image");
  GLADE_HOOKUP_OBJECT (main_window, key_settings_label, "key_settings_label");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_vbox, "keyboard_vbox");
  GLADE_HOOKUP_OBJECT (main_window, current_keyboard_table, "current_keyboard_table");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_manufacture_label, "keyboard_manufacture_label");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_model_label, "keyboard_model_label");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_manufacturer_entry, "keyboard_manufacturer_entry");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_model_entry, "keyboard_model_entry");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_hbuttonbox, "keyboard_hbuttonbox");
  GLADE_HOOKUP_OBJECT (main_window, change_button, "change_button");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_hbox, "keyboard_hbox");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_image, "keyboard_image");
  GLADE_HOOKUP_OBJECT (main_window, keyboard_label, "keyboard_label");
  GLADE_HOOKUP_OBJECT (main_window, preferencesvbox, "preferencesvbox");
  GLADE_HOOKUP_OBJECT (main_window, special_action_plugin_frame, "special_action_plugin_frame");
  GLADE_HOOKUP_OBJECT (main_window, special_action_plugins_vbox, "special_action_plugins_vbox");
  GLADE_HOOKUP_OBJECT (main_window, available_plugins_label, "available_plugins_label");
  GLADE_HOOKUP_OBJECT (main_window, plugin_treeview_scrolledwindow, "plugin_treeview_scrolledwindow");
  GLADE_HOOKUP_OBJECT (main_window, plugin_treeview, "plugin_treeview");
  GLADE_HOOKUP_OBJECT (main_window, plugin_import_hbuttonbox, "plugin_import_hbuttonbox");
  GLADE_HOOKUP_OBJECT (main_window, plugin_download_button, "plugin_download_button");
  GLADE_HOOKUP_OBJECT (main_window, alignment6, "alignment6");
  GLADE_HOOKUP_OBJECT (main_window, hbox7, "hbox7");
  GLADE_HOOKUP_OBJECT (main_window, image8, "image8");
  GLADE_HOOKUP_OBJECT (main_window, label37, "label37");
  GLADE_HOOKUP_OBJECT (main_window, plugin_info_button, "plugin_info_button");
  GLADE_HOOKUP_OBJECT (main_window, alignment7, "alignment7");
  GLADE_HOOKUP_OBJECT (main_window, hbox14, "hbox14");
  GLADE_HOOKUP_OBJECT (main_window, image9, "image9");
  GLADE_HOOKUP_OBJECT (main_window, label41, "label41");
  GLADE_HOOKUP_OBJECT (main_window, plugin_remove_button, "plugin_remove_button");
  GLADE_HOOKUP_OBJECT (main_window, plugin_import_button, "plugin_import_button");
  GLADE_HOOKUP_OBJECT (main_window, alignment5, "alignment5");
  GLADE_HOOKUP_OBJECT (main_window, hbox6, "hbox6");
  GLADE_HOOKUP_OBJECT (main_window, image7, "image7");
  GLADE_HOOKUP_OBJECT (main_window, label36, "label36");
  GLADE_HOOKUP_OBJECT (main_window, special_action_plugin_label, "special_action_plugin_label");
  GLADE_HOOKUP_OBJECT (main_window, user_settings_frame, "user_settings_frame");
  GLADE_HOOKUP_OBJECT (main_window, user_settings_table, "user_settings_table");
  GLADE_HOOKUP_OBJECT (main_window, mixer_channel_label, "mixer_channel_label");
  GLADE_HOOKUP_OBJECT (main_window, home_page_label, "home_page_label");
  GLADE_HOOKUP_OBJECT (main_window, search_page_label, "search_page_label");
  GLADE_HOOKUP_OBJECT (main_window, home_page_entry, "home_page_entry");
  GLADE_HOOKUP_OBJECT (main_window, search_page_entry, "search_page_entry");
  GLADE_HOOKUP_OBJECT (main_window, mixer_channel_combobox, "mixer_channel_combobox");
  GLADE_HOOKUP_OBJECT (main_window, user_settings_label, "user_settings_label");
  GLADE_HOOKUP_OBJECT (main_window, external_programs_frame, "external_programs_frame");
  GLADE_HOOKUP_OBJECT (main_window, external_programs_table, "external_programs_table");
  GLADE_HOOKUP_OBJECT (main_window, browser_label, "browser_label");
  GLADE_HOOKUP_OBJECT (main_window, email_program_label, "email_program_label");
  GLADE_HOOKUP_OBJECT (main_window, chat_label, "chat_label");
  GLADE_HOOKUP_OBJECT (main_window, hbox12, "hbox12");
  GLADE_HOOKUP_OBJECT (main_window, email_prog_entry, "email_prog_entry");
  GLADE_HOOKUP_OBJECT (main_window, email_prog_choose_button, "email_prog_choose_button");
  GLADE_HOOKUP_OBJECT (main_window, hbox13, "hbox13");
  GLADE_HOOKUP_OBJECT (main_window, chat_entry, "chat_entry");
  GLADE_HOOKUP_OBJECT (main_window, chat_choose_button, "chat_choose_button");
  GLADE_HOOKUP_OBJECT (main_window, hbox11, "hbox11");
  GLADE_HOOKUP_OBJECT (main_window, browser_entry, "browser_entry");
  GLADE_HOOKUP_OBJECT (main_window, browser_choose_button, "browser_choose_button");
  GLADE_HOOKUP_OBJECT (main_window, extranal_programs_label, "extranal_programs_label");
  GLADE_HOOKUP_OBJECT (main_window, preferences_hbox, "preferences_hbox");
  GLADE_HOOKUP_OBJECT (main_window, preferences_image, "preferences_image");
  GLADE_HOOKUP_OBJECT (main_window, preferences_label, "preferences_label");
  GLADE_HOOKUP_OBJECT (main_window, help_about_vbox, "help_about_vbox");
  GLADE_HOOKUP_OBJECT (main_window, about_frame, "about_frame");
  GLADE_HOOKUP_OBJECT (main_window, about_table, "about_table");
  GLADE_HOOKUP_OBJECT (main_window, version_label, "version_label");
  GLADE_HOOKUP_OBJECT (main_window, developer_label, "developer_label");
  GLADE_HOOKUP_OBJECT (main_window, license_label, "license_label");
  GLADE_HOOKUP_OBJECT (main_window, site_label, "site_label");
  GLADE_HOOKUP_OBJECT (main_window, contact_label, "contact_label");
  GLADE_HOOKUP_OBJECT (main_window, contact_val_label, "contact_val_label");
  GLADE_HOOKUP_OBJECT (main_window, site_val_label, "site_val_label");
  GLADE_HOOKUP_OBJECT (main_window, license_val_label, "license_val_label");
  GLADE_HOOKUP_OBJECT (main_window, version_val_label, "version_val_label");
  GLADE_HOOKUP_OBJECT (main_window, developer_val_label, "developer_val_label");
  GLADE_HOOKUP_OBJECT (main_window, about_label, "about_label");
  GLADE_HOOKUP_OBJECT (main_window, help_hbuttonbox, "help_hbuttonbox");
  GLADE_HOOKUP_OBJECT (main_window, help_button, "help_button");
  GLADE_HOOKUP_OBJECT (main_window, help_about_hbox, "help_about_hbox");
  GLADE_HOOKUP_OBJECT (main_window, help_about_image, "help_about_image");
  GLADE_HOOKUP_OBJECT (main_window, help_about_label, "help_about_label");
  GLADE_HOOKUP_OBJECT (main_window, control_hbuttonbox, "control_hbuttonbox");
  GLADE_HOOKUP_OBJECT (main_window, ok_button, "ok_button");
  GLADE_HOOKUP_OBJECT (main_window, apply_button, "apply_button");
  GLADE_HOOKUP_OBJECT (main_window, cancel_button, "cancel_button");

  return main_window;
}

GtkWidget*
create_plugin_info_dialog (void)
{
  GtkWidget *plugin_info_dialog;
  GdkPixbuf *plugin_info_dialog_icon_pixbuf;
  GtkWidget *dialog_vbox2;
  GtkWidget *plugin_info_table;
  GtkWidget *plugin_name_label;
  GtkWidget *plugin_authorlabel;
  GtkWidget *plugin_version_label;
  GtkWidget *plugin_license_label;
  GtkWidget *plugin_name_value_label;
  GtkWidget *plugin_author_value_label;
  GtkWidget *plugin_version_value_label;
  GtkWidget *plugin_license_value_label;
  GtkWidget *plugin_description_value_label;
  GtkWidget *plugin_functions_value_label;
  GtkWidget *plugin_functions_label;
  GtkWidget *plugin_description_label;
  GtkWidget *dialog_action_area2;
  GtkWidget *plugin_info_ok_button;

  plugin_info_dialog = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (plugin_info_dialog), _("Plugin Information"));
  gtk_window_set_modal (GTK_WINDOW (plugin_info_dialog), TRUE);
  gtk_window_set_resizable (GTK_WINDOW (plugin_info_dialog), FALSE);
  plugin_info_dialog_icon_pixbuf = create_pixbuf ("icon.png");
  if (plugin_info_dialog_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (plugin_info_dialog), plugin_info_dialog_icon_pixbuf);
      gdk_pixbuf_unref (plugin_info_dialog_icon_pixbuf);
    }
  gtk_window_set_type_hint (GTK_WINDOW (plugin_info_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox2 = GTK_DIALOG (plugin_info_dialog)->vbox;
  gtk_widget_show (dialog_vbox2);

  plugin_info_table = gtk_table_new (6, 2, FALSE);
  gtk_widget_show (plugin_info_table);
  gtk_box_pack_start (GTK_BOX (dialog_vbox2), plugin_info_table, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (plugin_info_table), 10);
  gtk_table_set_row_spacings (GTK_TABLE (plugin_info_table), 2);
  gtk_table_set_col_spacings (GTK_TABLE (plugin_info_table), 6);

  plugin_name_label = gtk_label_new (_("Plugin name:"));
  gtk_widget_show (plugin_name_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_name_label, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_name_label), 0, 0.5);

  plugin_authorlabel = gtk_label_new (_("Author:"));
  gtk_widget_show (plugin_authorlabel);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_authorlabel, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_authorlabel), 0, 0.5);

  plugin_version_label = gtk_label_new (_("Version:"));
  gtk_widget_show (plugin_version_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_version_label, 0, 1, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_version_label), 0, 0.5);

  plugin_license_label = gtk_label_new (_("License:"));
  gtk_widget_show (plugin_license_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_license_label, 0, 1, 3, 4,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_license_label), 0, 0.5);

  plugin_name_value_label = gtk_label_new (_("-"));
  gtk_widget_show (plugin_name_value_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_name_value_label, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_name_value_label), 0, 0.5);

  plugin_author_value_label = gtk_label_new (_("-"));
  gtk_widget_show (plugin_author_value_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_author_value_label, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_author_value_label), 0, 0.5);

  plugin_version_value_label = gtk_label_new (_("-"));
  gtk_widget_show (plugin_version_value_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_version_value_label, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_version_value_label), 0, 0.5);

  plugin_license_value_label = gtk_label_new (_("-"));
  gtk_widget_show (plugin_license_value_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_license_value_label, 1, 2, 3, 4,
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_license_value_label), 0, 0.5);

  plugin_description_value_label = gtk_label_new (_("-\n\n"));
  gtk_widget_show (plugin_description_value_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_description_value_label, 1, 2, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_description_value_label), 0, 0.5);

  plugin_functions_value_label = gtk_label_new (_("-"));
  gtk_widget_show (plugin_functions_value_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_functions_value_label, 1, 2, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_functions_value_label), 0, 0.5);

  plugin_functions_label = gtk_label_new (_("Functions:"));
  gtk_widget_show (plugin_functions_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_functions_label, 0, 1, 4, 5,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_functions_label), 0, 0.5);

  plugin_description_label = gtk_label_new (_("Description:"));
  gtk_widget_show (plugin_description_label);
  gtk_table_attach (GTK_TABLE (plugin_info_table), plugin_description_label, 0, 1, 5, 6,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (plugin_description_label), 0, 0);

  dialog_action_area2 = GTK_DIALOG (plugin_info_dialog)->action_area;
  gtk_widget_show (dialog_action_area2);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);

  plugin_info_ok_button = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (plugin_info_ok_button);
  gtk_dialog_add_action_widget (GTK_DIALOG (plugin_info_dialog), plugin_info_ok_button, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (plugin_info_ok_button, GTK_CAN_DEFAULT);

  g_signal_connect ((gpointer) plugin_info_dialog, "show",
                    G_CALLBACK (on_plugin_info_dialog_show),
                    NULL);
  g_signal_connect ((gpointer) plugin_info_ok_button, "clicked",
                    G_CALLBACK (on_plugin_info_ok_button_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (plugin_info_dialog, plugin_info_dialog, "plugin_info_dialog");
  GLADE_HOOKUP_OBJECT_NO_REF (plugin_info_dialog, dialog_vbox2, "dialog_vbox2");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_info_table, "plugin_info_table");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_name_label, "plugin_name_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_authorlabel, "plugin_authorlabel");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_version_label, "plugin_version_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_license_label, "plugin_license_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_name_value_label, "plugin_name_value_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_author_value_label, "plugin_author_value_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_version_value_label, "plugin_version_value_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_license_value_label, "plugin_license_value_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_description_value_label, "plugin_description_value_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_functions_value_label, "plugin_functions_value_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_functions_label, "plugin_functions_label");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_description_label, "plugin_description_label");
  GLADE_HOOKUP_OBJECT_NO_REF (plugin_info_dialog, dialog_action_area2, "dialog_action_area2");
  GLADE_HOOKUP_OBJECT (plugin_info_dialog, plugin_info_ok_button, "plugin_info_ok_button");

  return plugin_info_dialog;
}

GtkWidget*
create_application_dialog (void)
{
  GtkWidget *application_dialog;
  GdkPixbuf *application_dialog_icon_pixbuf;
  GtkWidget *dialog_vbox3;
  GtkWidget *vbox1;
  GtkWidget *label39;
  GtkWidget *scrolledwindow1;
  GtkWidget *app_treeview;
  GtkWidget *hbox10;
  GtkWidget *label40;
  GtkWidget *app_command_entry;
  GtkWidget *dialog_action_area3;
  GtkWidget *cancelbutton;
  GtkWidget *okbutton;

  application_dialog = gtk_dialog_new ();
  gtk_widget_set_size_request (application_dialog, 470, 410);
  gtk_window_set_title (GTK_WINDOW (application_dialog), _("Choose application"));
  application_dialog_icon_pixbuf = create_pixbuf ("icon.png");
  if (application_dialog_icon_pixbuf)
    {
      gtk_window_set_icon (GTK_WINDOW (application_dialog), application_dialog_icon_pixbuf);
      gdk_pixbuf_unref (application_dialog_icon_pixbuf);
    }
  gtk_window_set_type_hint (GTK_WINDOW (application_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);

  dialog_vbox3 = GTK_DIALOG (application_dialog)->vbox;
  gtk_widget_show (dialog_vbox3);

  vbox1 = gtk_vbox_new (FALSE, 7);
  gtk_widget_show (vbox1);
  gtk_box_pack_start (GTK_BOX (dialog_vbox3), vbox1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 6);

  label39 = gtk_label_new (_("Select the application:"));
  gtk_widget_show (label39);
  gtk_box_pack_start (GTK_BOX (vbox1), label39, FALSE, FALSE, 0);

  scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (scrolledwindow1);
  gtk_box_pack_start (GTK_BOX (vbox1), scrolledwindow1, TRUE, TRUE, 0);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow1), GTK_SHADOW_IN);

  app_treeview = gtk_tree_view_new ();
  gtk_widget_show (app_treeview);
  gtk_container_add (GTK_CONTAINER (scrolledwindow1), app_treeview);
  gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (app_treeview), FALSE);

  hbox10 = gtk_hbox_new (FALSE, 6);
  gtk_widget_show (hbox10);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox10, FALSE, TRUE, 0);

  label40 = gtk_label_new (_("Application command:"));
  gtk_widget_show (label40);
  gtk_box_pack_start (GTK_BOX (hbox10), label40, FALSE, FALSE, 0);

  app_command_entry = gtk_entry_new ();
  gtk_widget_show (app_command_entry);
  gtk_box_pack_start (GTK_BOX (hbox10), app_command_entry, TRUE, TRUE, 0);
  gtk_entry_set_activates_default (GTK_ENTRY (app_command_entry), TRUE);

  dialog_action_area3 = GTK_DIALOG (application_dialog)->action_area;
  gtk_widget_show (dialog_action_area3);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area3), GTK_BUTTONBOX_END);

  cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
  gtk_widget_show (cancelbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (application_dialog), cancelbutton, GTK_RESPONSE_CANCEL);
  GTK_WIDGET_SET_FLAGS (cancelbutton, GTK_CAN_DEFAULT);

  okbutton = gtk_button_new_from_stock ("gtk-ok");
  gtk_widget_show (okbutton);
  gtk_dialog_add_action_widget (GTK_DIALOG (application_dialog), okbutton, GTK_RESPONSE_OK);
  GTK_WIDGET_SET_FLAGS (okbutton, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (application_dialog, application_dialog, "application_dialog");
  GLADE_HOOKUP_OBJECT_NO_REF (application_dialog, dialog_vbox3, "dialog_vbox3");
  GLADE_HOOKUP_OBJECT (application_dialog, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (application_dialog, label39, "label39");
  GLADE_HOOKUP_OBJECT (application_dialog, scrolledwindow1, "scrolledwindow1");
  GLADE_HOOKUP_OBJECT (application_dialog, app_treeview, "app_treeview");
  GLADE_HOOKUP_OBJECT (application_dialog, hbox10, "hbox10");
  GLADE_HOOKUP_OBJECT (application_dialog, label40, "label40");
  GLADE_HOOKUP_OBJECT (application_dialog, app_command_entry, "app_command_entry");
  GLADE_HOOKUP_OBJECT_NO_REF (application_dialog, dialog_action_area3, "dialog_action_area3");
  GLADE_HOOKUP_OBJECT (application_dialog, cancelbutton, "cancelbutton");
  GLADE_HOOKUP_OBJECT (application_dialog, okbutton, "okbutton");

  gtk_widget_grab_default (okbutton);
  return application_dialog;
}

