Logo Search packages:      
Sourcecode: cbrpager version File versions  Download package

interface.c

/*
 * 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 <bonobo.h>
#include <gnome.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_MainWindow (void)
{
  GtkWidget *MainWindow;
  GtkWidget *main_scroller;
  GtkWidget *main_canvas;

  MainWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_widget_set_size_request (MainWindow, 400, 500);
  gtk_window_set_title (GTK_WINDOW (MainWindow), _("CBR Pager"));

  main_scroller = gtk_scrolled_window_new (NULL, NULL);
  gtk_widget_show (main_scroller);
  gtk_container_add (GTK_CONTAINER (MainWindow), main_scroller);
  gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (main_scroller), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);

  main_canvas = gnome_canvas_new ();
  gtk_widget_show (main_canvas);
  gtk_container_add (GTK_CONTAINER (main_scroller), main_canvas);
  gnome_canvas_set_scroll_region (GNOME_CANVAS (main_canvas), 0, 0, 100, 100);

  g_signal_connect ((gpointer) MainWindow, "delete_event",
                    G_CALLBACK (on_MainWindow_delete_event),
                    NULL);
  g_signal_connect ((gpointer) MainWindow, "realize",
                    G_CALLBACK (on_MainWindow_realize),
                    NULL);
  g_signal_connect ((gpointer) MainWindow, "size_allocate",
                    G_CALLBACK (on_MainWindow_size_allocate),
                    NULL);
  g_signal_connect ((gpointer) main_canvas, "button_press_event",
                    G_CALLBACK (on_main_canvas_button_press_event),
                    NULL);
  g_signal_connect ((gpointer) main_canvas, "button_release_event",
                    G_CALLBACK (on_main_canvas_button_release_event),
                    NULL);
  g_signal_connect ((gpointer) main_canvas, "key_press_event",
                    G_CALLBACK (on_main_canvas_key_press_event),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (MainWindow, MainWindow, "MainWindow");
  GLADE_HOOKUP_OBJECT (MainWindow, main_scroller, "main_scroller");
  GLADE_HOOKUP_OBJECT (MainWindow, main_canvas, "main_canvas");

  return MainWindow;
}

GtkWidget*
create_nav_window (void)
{
  GtkWidget *nav_window;
  GtkWidget *nav_toolbar;
  GtkIconSize tmp_toolbar_icon_size;
  GtkWidget *toolitem1;
  GtkWidget *begin_btn;
  GtkWidget *image10;
  GtkWidget *toolitem2;
  GtkWidget *back_btn;
  GtkWidget *back_img;
  GtkWidget *toolitem3;
  GtkWidget *next_btn;
  GtkWidget *image12;
  GtkWidget *toolitem4;
  GtkWidget *last_btn;
  GtkWidget *image13;
  GtkWidget *toolitem5;
  GtkWidget *zoom_out_btn;
  GtkWidget *image4;
  GtkWidget *toolitem6;
  GtkWidget *zoom_in_btn;
  GtkWidget *image6;
  GtkWidget *toolitem7;
  GtkWidget *zoom_orig_btn;
  GtkWidget *image15;
  GtkWidget *toolitem8;
  GtkWidget *zoom_width_btn;
  GtkWidget *image16;
  GtkWidget *toolitem9;
  GtkWidget *zoom_fit_btn;
  GtkWidget *image5;
  GtkWidget *toolitem10;
  GtkWidget *open_btn;
  GtkWidget *image8;
  GtkWidget *toolitem11;
  GtkWidget *pref_btn;
  GtkWidget *image14;
  GtkWidget *toolitem12;
  GtkWidget *quit_btn;
  GtkWidget *image9;
  GtkTooltips *tooltips;

  tooltips = gtk_tooltips_new ();

  nav_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (nav_window), _("Navigation"));
  gtk_window_set_type_hint (GTK_WINDOW (nav_window), GDK_WINDOW_TYPE_HINT_TOOLBAR);

  nav_toolbar = gtk_toolbar_new ();
  gtk_widget_show (nav_toolbar);
  gtk_container_add (GTK_CONTAINER (nav_window), nav_toolbar);
  gtk_widget_set_size_request (nav_toolbar, 26, 300);
  gtk_toolbar_set_style (GTK_TOOLBAR (nav_toolbar), GTK_TOOLBAR_BOTH);
  gtk_toolbar_set_orientation (GTK_TOOLBAR (nav_toolbar), GTK_ORIENTATION_VERTICAL);
  tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (nav_toolbar));

  toolitem1 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem1);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem1);

  begin_btn = gtk_button_new ();
  gtk_widget_show (begin_btn);
  gtk_container_add (GTK_CONTAINER (toolitem1), begin_btn);
  gtk_tooltips_set_tip (tooltips, begin_btn, _("To first page"), NULL);
  gtk_button_set_relief (GTK_BUTTON (begin_btn), GTK_RELIEF_NONE);

  image10 = gtk_image_new_from_stock ("gtk-goto-first", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image10);
  gtk_container_add (GTK_CONTAINER (begin_btn), image10);

  toolitem2 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem2);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem2);

  back_btn = gtk_button_new ();
  gtk_widget_show (back_btn);
  gtk_container_add (GTK_CONTAINER (toolitem2), back_btn);
  gtk_tooltips_set_tip (tooltips, back_btn, _("Previous page"), NULL);
  gtk_button_set_relief (GTK_BUTTON (back_btn), GTK_RELIEF_NONE);

  back_img = gtk_image_new_from_stock ("gtk-go-back", GTK_ICON_SIZE_MENU);
  gtk_widget_show (back_img);
  gtk_container_add (GTK_CONTAINER (back_btn), back_img);

  toolitem3 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem3);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem3);

  next_btn = gtk_button_new ();
  gtk_widget_show (next_btn);
  gtk_container_add (GTK_CONTAINER (toolitem3), next_btn);
  gtk_tooltips_set_tip (tooltips, next_btn, _("Next page"), NULL);
  gtk_button_set_relief (GTK_BUTTON (next_btn), GTK_RELIEF_NONE);

  image12 = gtk_image_new_from_stock ("gtk-go-forward", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image12);
  gtk_container_add (GTK_CONTAINER (next_btn), image12);

  toolitem4 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem4);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem4);

  last_btn = gtk_button_new ();
  gtk_widget_show (last_btn);
  gtk_container_add (GTK_CONTAINER (toolitem4), last_btn);
  gtk_tooltips_set_tip (tooltips, last_btn, _("To last page"), NULL);
  gtk_button_set_relief (GTK_BUTTON (last_btn), GTK_RELIEF_NONE);

  image13 = gtk_image_new_from_stock ("gtk-goto-last", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image13);
  gtk_container_add (GTK_CONTAINER (last_btn), image13);

  toolitem5 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem5);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem5);

  zoom_out_btn = gtk_button_new ();
  gtk_widget_show (zoom_out_btn);
  gtk_container_add (GTK_CONTAINER (toolitem5), zoom_out_btn);
  gtk_tooltips_set_tip (tooltips, zoom_out_btn, _("Zoom out (10%)"), NULL);
  gtk_button_set_relief (GTK_BUTTON (zoom_out_btn), GTK_RELIEF_NONE);

  image4 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image4);
  gtk_container_add (GTK_CONTAINER (zoom_out_btn), image4);

  toolitem6 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem6);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem6);

  zoom_in_btn = gtk_button_new ();
  gtk_widget_show (zoom_in_btn);
  gtk_container_add (GTK_CONTAINER (toolitem6), zoom_in_btn);
  gtk_tooltips_set_tip (tooltips, zoom_in_btn, _("Zoom in (10%)"), NULL);
  gtk_button_set_relief (GTK_BUTTON (zoom_in_btn), GTK_RELIEF_NONE);

  image6 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image6);
  gtk_container_add (GTK_CONTAINER (zoom_in_btn), image6);

  toolitem7 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem7);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem7);

  zoom_orig_btn = gtk_button_new ();
  gtk_widget_show (zoom_orig_btn);
  gtk_container_add (GTK_CONTAINER (toolitem7), zoom_orig_btn);
  gtk_tooltips_set_tip (tooltips, zoom_orig_btn, _("Zoom to 1:1"), NULL);
  gtk_button_set_relief (GTK_BUTTON (zoom_orig_btn), GTK_RELIEF_NONE);

  image15 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image15);
  gtk_container_add (GTK_CONTAINER (zoom_orig_btn), image15);

  toolitem8 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem8);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem8);

  zoom_width_btn = gtk_button_new ();
  gtk_widget_show (zoom_width_btn);
  gtk_container_add (GTK_CONTAINER (toolitem8), zoom_width_btn);
  gtk_tooltips_set_tip (tooltips, zoom_width_btn, _("Zoom to page width"), NULL);
  gtk_button_set_relief (GTK_BUTTON (zoom_width_btn), GTK_RELIEF_NONE);

  image16 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_BUTTON);
  gtk_widget_show (image16);
  gtk_container_add (GTK_CONTAINER (zoom_width_btn), image16);

  toolitem9 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem9);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem9);

  zoom_fit_btn = gtk_button_new ();
  gtk_widget_show (zoom_fit_btn);
  gtk_container_add (GTK_CONTAINER (toolitem9), zoom_fit_btn);
  gtk_tooltips_set_tip (tooltips, zoom_fit_btn, _("Fit image to window"), NULL);
  gtk_button_set_relief (GTK_BUTTON (zoom_fit_btn), GTK_RELIEF_NONE);

  image5 = gtk_image_new_from_stock ("gtk-zoom-fit", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image5);
  gtk_container_add (GTK_CONTAINER (zoom_fit_btn), image5);

  toolitem10 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem10);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem10);

  open_btn = gtk_button_new ();
  gtk_widget_show (open_btn);
  gtk_container_add (GTK_CONTAINER (toolitem10), open_btn);
  gtk_tooltips_set_tip (tooltips, open_btn, _("Open a file..."), NULL);
  gtk_button_set_relief (GTK_BUTTON (open_btn), GTK_RELIEF_NONE);

  image8 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image8);
  gtk_container_add (GTK_CONTAINER (open_btn), image8);

  toolitem11 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem11);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem11);

  pref_btn = gtk_button_new ();
  gtk_widget_show (pref_btn);
  gtk_container_add (GTK_CONTAINER (toolitem11), pref_btn);
  gtk_tooltips_set_tip (tooltips, pref_btn, _("Preferences"), NULL);
  gtk_button_set_relief (GTK_BUTTON (pref_btn), GTK_RELIEF_NONE);

  image14 = gtk_image_new_from_stock ("gtk-preferences", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image14);
  gtk_container_add (GTK_CONTAINER (pref_btn), image14);

  toolitem12 = (GtkWidget*) gtk_tool_item_new ();
  gtk_widget_show (toolitem12);
  gtk_container_add (GTK_CONTAINER (nav_toolbar), toolitem12);

  quit_btn = gtk_button_new ();
  gtk_widget_show (quit_btn);
  gtk_container_add (GTK_CONTAINER (toolitem12), quit_btn);
  gtk_tooltips_set_tip (tooltips, quit_btn, _("Quit"), NULL);
  gtk_button_set_relief (GTK_BUTTON (quit_btn), GTK_RELIEF_NONE);

  image9 = gtk_image_new_from_stock ("gtk-quit", GTK_ICON_SIZE_MENU);
  gtk_widget_show (image9);
  gtk_container_add (GTK_CONTAINER (quit_btn), image9);

  g_signal_connect ((gpointer) nav_window, "delete_event",
                    G_CALLBACK (on_nav_window_delete_event),
                    NULL);
  g_signal_connect ((gpointer) begin_btn, "clicked",
                    G_CALLBACK (on_begin_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) back_btn, "clicked",
                    G_CALLBACK (on_back_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) next_btn, "clicked",
                    G_CALLBACK (on_next_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) last_btn, "clicked",
                    G_CALLBACK (on_last_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) zoom_out_btn, "clicked",
                    G_CALLBACK (on_zoom_out_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) zoom_in_btn, "clicked",
                    G_CALLBACK (on_zoom_in_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) zoom_orig_btn, "clicked",
                    G_CALLBACK (on_zoom_orig_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) zoom_width_btn, "clicked",
                    G_CALLBACK (on_zoom_width_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) zoom_fit_btn, "clicked",
                    G_CALLBACK (on_zoom_fit_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) open_btn, "clicked",
                    G_CALLBACK (on_open_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) pref_btn, "clicked",
                    G_CALLBACK (on_pref_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) quit_btn, "clicked",
                    G_CALLBACK (on_quit_btn_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (nav_window, nav_window, "nav_window");
  GLADE_HOOKUP_OBJECT (nav_window, nav_toolbar, "nav_toolbar");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem1, "toolitem1");
  GLADE_HOOKUP_OBJECT (nav_window, begin_btn, "begin_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image10, "image10");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem2, "toolitem2");
  GLADE_HOOKUP_OBJECT (nav_window, back_btn, "back_btn");
  GLADE_HOOKUP_OBJECT (nav_window, back_img, "back_img");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem3, "toolitem3");
  GLADE_HOOKUP_OBJECT (nav_window, next_btn, "next_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image12, "image12");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem4, "toolitem4");
  GLADE_HOOKUP_OBJECT (nav_window, last_btn, "last_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image13, "image13");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem5, "toolitem5");
  GLADE_HOOKUP_OBJECT (nav_window, zoom_out_btn, "zoom_out_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image4, "image4");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem6, "toolitem6");
  GLADE_HOOKUP_OBJECT (nav_window, zoom_in_btn, "zoom_in_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image6, "image6");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem7, "toolitem7");
  GLADE_HOOKUP_OBJECT (nav_window, zoom_orig_btn, "zoom_orig_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image15, "image15");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem8, "toolitem8");
  GLADE_HOOKUP_OBJECT (nav_window, zoom_width_btn, "zoom_width_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image16, "image16");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem9, "toolitem9");
  GLADE_HOOKUP_OBJECT (nav_window, zoom_fit_btn, "zoom_fit_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image5, "image5");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem10, "toolitem10");
  GLADE_HOOKUP_OBJECT (nav_window, open_btn, "open_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image8, "image8");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem11, "toolitem11");
  GLADE_HOOKUP_OBJECT (nav_window, pref_btn, "pref_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image14, "image14");
  GLADE_HOOKUP_OBJECT (nav_window, toolitem12, "toolitem12");
  GLADE_HOOKUP_OBJECT (nav_window, quit_btn, "quit_btn");
  GLADE_HOOKUP_OBJECT (nav_window, image9, "image9");
  GLADE_HOOKUP_OBJECT_NO_REF (nav_window, tooltips, "tooltips");

  return nav_window;
}

GtkWidget*
create_fileselection1 (void)
{
  GtkWidget *fileselection1;
  GtkWidget *ok_button1;
  GtkWidget *cancel_button1;

  fileselection1 = gtk_file_selection_new (_("Select File"));
  gtk_container_set_border_width (GTK_CONTAINER (fileselection1), 10);
  gtk_window_set_type_hint (GTK_WINDOW (fileselection1), GDK_WINDOW_TYPE_HINT_DIALOG);

  ok_button1 = GTK_FILE_SELECTION (fileselection1)->ok_button;
  gtk_widget_show (ok_button1);
  GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT);

  cancel_button1 = GTK_FILE_SELECTION (fileselection1)->cancel_button;
  gtk_widget_show (cancel_button1);
  GTK_WIDGET_SET_FLAGS (cancel_button1, GTK_CAN_DEFAULT);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (fileselection1, fileselection1, "fileselection1");
  GLADE_HOOKUP_OBJECT_NO_REF (fileselection1, ok_button1, "ok_button1");
  GLADE_HOOKUP_OBJECT_NO_REF (fileselection1, cancel_button1, "cancel_button1");

  return fileselection1;
}

GtkWidget*
create_config_window (void)
{
  GtkWidget *config_window;
  GtkWidget *vbox1;
  GtkWidget *frame3;
  GtkWidget *vbox4;
  GtkWidget *table4;
  GtkWidget *label14;
  GtkWidget *hbox5;
  GtkWidget *conf_1page_rbtn;
  GSList *conf_1page_rbtn_group = NULL;
  GtkWidget *conf_2page_rbtn;
  GtkWidget *hseparator3;
  GtkWidget *table1;
  GtkWidget *label2;
  GtkWidget *label3;
  GtkWidget *fwd_top_rbtn;
  GSList *fwd_top_rbtn_group = NULL;
  GtkWidget *fwd_btm_rbtn;
  GtkWidget *fwd_stay_rbtn;
  GtkWidget *back_top_rbtn;
  GSList *back_top_rbtn_group = NULL;
  GtkWidget *back_btm_rbtn;
  GtkWidget *back_stay_rbtn;
  GtkWidget *label13;
  GtkWidget *frame4;
  GtkWidget *table3;
  GtkWidget *conf_nav_hor_rbtn;
  GSList *conf_nav_hor_rbtn_group = NULL;
  GtkWidget *conf_nav_vert_rbtn;
  GtkWidget *label12;
  GtkWidget *label11;
  GtkWidget *conf_nav_nw_rbtn;
  GSList *conf_nav_nw_rbtn_group = NULL;
  GtkWidget *conf_nav_ne_rbtn;
  GtkWidget *conf_nav_se_rbtn;
  GtkWidget *conf_nav_sw_rbtn;
  GtkWidget *label16;
  GtkWidget *conf_nav_hide_cbtn;
  GtkWidget *label15;
  GtkWidget *frame2;
  GtkWidget *table2;
  GtkWidget *label5;
  GtkWidget *label8;
  GtkWidget *hseparator2;
  GtkWidget *hbox2;
  GtkWidget *conf_w_entry;
  GtkWidget *label6;
  GtkWidget *conf_h_entry;
  GtkWidget *label9;
  GtkWidget *vbox3;
  GtkWidget *conf_prevdir_rbtn;
  GSList *conf_prevdir_rbtn_group = NULL;
  GtkWidget *hbox3;
  GtkWidget *conf_goto_rbtn;
  GtkWidget *conf_goto_entry;
  GtkWidget *label4;
  GtkWidget *hbox1;
  GtkWidget *label10;
  GtkWidget *conf_cancel_btn;
  GtkWidget *conf_save_btn;

  config_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (config_window), _("Preferences"));

  vbox1 = gtk_vbox_new (FALSE, 4);
  gtk_widget_show (vbox1);
  gtk_container_add (GTK_CONTAINER (config_window), vbox1);
  gtk_container_set_border_width (GTK_CONTAINER (vbox1), 4);

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

  vbox4 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox4);
  gtk_container_add (GTK_CONTAINER (frame3), vbox4);

  table4 = gtk_table_new (1, 2, FALSE);
  gtk_widget_show (table4);
  gtk_box_pack_start (GTK_BOX (vbox4), table4, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (table4), 4);
  gtk_table_set_row_spacings (GTK_TABLE (table4), 2);
  gtk_table_set_col_spacings (GTK_TABLE (table4), 8);

  label14 = gtk_label_new (_("Size:"));
  gtk_widget_show (label14);
  gtk_table_attach (GTK_TABLE (table4), label14, 0, 1, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

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

  conf_1page_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("1 page"));
  gtk_widget_show (conf_1page_rbtn);
  gtk_box_pack_start (GTK_BOX (hbox5), conf_1page_rbtn, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_1page_rbtn), conf_1page_rbtn_group);
  conf_1page_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_1page_rbtn));

  conf_2page_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("2 pages"));
  gtk_widget_show (conf_2page_rbtn);
  gtk_box_pack_start (GTK_BOX (hbox5), conf_2page_rbtn, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_2page_rbtn), conf_1page_rbtn_group);
  conf_1page_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_2page_rbtn));

  hseparator3 = gtk_hseparator_new ();
  gtk_widget_show (hseparator3);
  gtk_box_pack_start (GTK_BOX (vbox4), hseparator3, TRUE, TRUE, 0);

  table1 = gtk_table_new (2, 4, FALSE);
  gtk_widget_show (table1);
  gtk_box_pack_start (GTK_BOX (vbox4), table1, TRUE, TRUE, 0);
  gtk_container_set_border_width (GTK_CONTAINER (table1), 4);
  gtk_table_set_col_spacings (GTK_TABLE (table1), 4);

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

  label3 = gtk_label_new (_("When paging backward:"));
  gtk_widget_show (label3);
  gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_misc_set_alignment (GTK_MISC (label3), 0, 0.5);

  fwd_top_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("go to top"));
  gtk_widget_show (fwd_top_rbtn);
  gtk_table_attach (GTK_TABLE (table1), fwd_top_rbtn, 1, 2, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (fwd_top_rbtn), fwd_top_rbtn_group);
  fwd_top_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (fwd_top_rbtn));

  fwd_btm_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("go to bottom"));
  gtk_widget_show (fwd_btm_rbtn);
  gtk_table_attach (GTK_TABLE (table1), fwd_btm_rbtn, 2, 3, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (fwd_btm_rbtn), fwd_top_rbtn_group);
  fwd_top_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (fwd_btm_rbtn));

  fwd_stay_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("don't change"));
  gtk_widget_show (fwd_stay_rbtn);
  gtk_table_attach (GTK_TABLE (table1), fwd_stay_rbtn, 3, 4, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (fwd_stay_rbtn), fwd_top_rbtn_group);
  fwd_top_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (fwd_stay_rbtn));

  back_top_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("go to top"));
  gtk_widget_show (back_top_rbtn);
  gtk_table_attach (GTK_TABLE (table1), back_top_rbtn, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (back_top_rbtn), back_top_rbtn_group);
  back_top_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (back_top_rbtn));

  back_btm_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("go to bottom"));
  gtk_widget_show (back_btm_rbtn);
  gtk_table_attach (GTK_TABLE (table1), back_btm_rbtn, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (back_btm_rbtn), back_top_rbtn_group);
  back_top_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (back_btm_rbtn));

  back_stay_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("don't change"));
  gtk_widget_show (back_stay_rbtn);
  gtk_table_attach (GTK_TABLE (table1), back_stay_rbtn, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (back_stay_rbtn), back_top_rbtn_group);
  back_top_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (back_stay_rbtn));

  label13 = gtk_label_new (_("<b>Appearance</b>"));
  gtk_widget_show (label13);
  gtk_frame_set_label_widget (GTK_FRAME (frame3), label13);
  gtk_label_set_use_markup (GTK_LABEL (label13), TRUE);

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

  table3 = gtk_table_new (3, 5, FALSE);
  gtk_widget_show (table3);
  gtk_container_add (GTK_CONTAINER (frame4), table3);
  gtk_container_set_border_width (GTK_CONTAINER (table3), 4);
  gtk_table_set_row_spacings (GTK_TABLE (table3), 1);
  gtk_table_set_col_spacings (GTK_TABLE (table3), 25);

  conf_nav_hor_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("Horizontal"));
  gtk_widget_show (conf_nav_hor_rbtn);
  gtk_table_attach (GTK_TABLE (table3), conf_nav_hor_rbtn, 1, 3, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_nav_hor_rbtn), conf_nav_hor_rbtn_group);
  conf_nav_hor_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_nav_hor_rbtn));

  conf_nav_vert_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("Vertical"));
  gtk_widget_show (conf_nav_vert_rbtn);
  gtk_table_attach (GTK_TABLE (table3), conf_nav_vert_rbtn, 3, 5, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_nav_vert_rbtn), conf_nav_hor_rbtn_group);
  conf_nav_hor_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_nav_vert_rbtn));

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

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

  conf_nav_nw_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("NW"));
  gtk_widget_show (conf_nav_nw_rbtn);
  gtk_table_attach (GTK_TABLE (table3), conf_nav_nw_rbtn, 1, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_nav_nw_rbtn), conf_nav_nw_rbtn_group);
  conf_nav_nw_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_nav_nw_rbtn));

  conf_nav_ne_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("NE"));
  gtk_widget_show (conf_nav_ne_rbtn);
  gtk_table_attach (GTK_TABLE (table3), conf_nav_ne_rbtn, 2, 3, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_nav_ne_rbtn), conf_nav_nw_rbtn_group);
  conf_nav_nw_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_nav_ne_rbtn));

  conf_nav_se_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("SE"));
  gtk_widget_show (conf_nav_se_rbtn);
  gtk_table_attach (GTK_TABLE (table3), conf_nav_se_rbtn, 3, 4, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_nav_se_rbtn), conf_nav_nw_rbtn_group);
  conf_nav_nw_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_nav_se_rbtn));

  conf_nav_sw_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("SW"));
  gtk_widget_show (conf_nav_sw_rbtn);
  gtk_table_attach (GTK_TABLE (table3), conf_nav_sw_rbtn, 4, 5, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_nav_sw_rbtn), conf_nav_nw_rbtn_group);
  conf_nav_nw_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_nav_sw_rbtn));

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

  conf_nav_hide_cbtn = gtk_check_button_new_with_mnemonic (_("Hidden"));
  gtk_widget_show (conf_nav_hide_cbtn);
  gtk_table_attach (GTK_TABLE (table3), conf_nav_hide_cbtn, 1, 5, 0, 1,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (0), 0, 0);

  label15 = gtk_label_new (_("<b>Navigator bar</b>"));
  gtk_widget_show (label15);
  gtk_frame_set_label_widget (GTK_FRAME (frame4), label15);
  gtk_label_set_use_markup (GTK_LABEL (label15), TRUE);

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

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

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

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

  hseparator2 = gtk_hseparator_new ();
  gtk_widget_show (hseparator2);
  gtk_table_attach (GTK_TABLE (table2), hseparator2, 0, 2, 1, 2,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);

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

  conf_w_entry = gtk_entry_new ();
  gtk_widget_show (conf_w_entry);
  gtk_box_pack_start (GTK_BOX (hbox2), conf_w_entry, FALSE, TRUE, 0);
  gtk_widget_set_size_request (conf_w_entry, 70, -1);

  label6 = gtk_label_new (_("  Height:"));
  gtk_widget_show (label6);
  gtk_box_pack_start (GTK_BOX (hbox2), label6, FALSE, FALSE, 0);
  gtk_misc_set_alignment (GTK_MISC (label6), 0, 0.5);

  conf_h_entry = gtk_entry_new ();
  gtk_widget_show (conf_h_entry);
  gtk_box_pack_start (GTK_BOX (hbox2), conf_h_entry, FALSE, TRUE, 0);
  gtk_widget_set_size_request (conf_h_entry, 70, -1);

  label9 = gtk_label_new ("");
  gtk_widget_show (label9);
  gtk_box_pack_start (GTK_BOX (hbox2), label9, TRUE, TRUE, 0);
  gtk_misc_set_alignment (GTK_MISC (label9), 0, 0.5);

  vbox3 = gtk_vbox_new (FALSE, 0);
  gtk_widget_show (vbox3);
  gtk_table_attach (GTK_TABLE (table2), vbox3, 1, 2, 2, 3,
                    (GtkAttachOptions) (GTK_FILL),
                    (GtkAttachOptions) (GTK_FILL), 0, 1);

  conf_prevdir_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("Remember previous"));
  gtk_widget_show (conf_prevdir_rbtn);
  gtk_box_pack_start (GTK_BOX (vbox3), conf_prevdir_rbtn, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_prevdir_rbtn), conf_prevdir_rbtn_group);
  conf_prevdir_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_prevdir_rbtn));

  hbox3 = gtk_hbox_new (FALSE, 0);
  gtk_widget_show (hbox3);
  gtk_box_pack_start (GTK_BOX (vbox3), hbox3, TRUE, TRUE, 0);

  conf_goto_rbtn = gtk_radio_button_new_with_mnemonic (NULL, _("Always go to:"));
  gtk_widget_show (conf_goto_rbtn);
  gtk_box_pack_start (GTK_BOX (hbox3), conf_goto_rbtn, FALSE, FALSE, 0);
  gtk_radio_button_set_group (GTK_RADIO_BUTTON (conf_goto_rbtn), conf_prevdir_rbtn_group);
  conf_prevdir_rbtn_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (conf_goto_rbtn));

  conf_goto_entry = gtk_entry_new ();
  gtk_widget_show (conf_goto_entry);
  gtk_box_pack_start (GTK_BOX (hbox3), conf_goto_entry, TRUE, TRUE, 0);
  gtk_widget_set_size_request (conf_goto_entry, 70, -1);

  label4 = gtk_label_new (_("<b>Program startup</b>"));
  gtk_widget_show (label4);
  gtk_frame_set_label_widget (GTK_FRAME (frame2), label4);
  gtk_label_set_use_markup (GTK_LABEL (label4), TRUE);

  hbox1 = gtk_hbox_new (FALSE, 8);
  gtk_widget_show (hbox1);
  gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);

  label10 = gtk_label_new ("");
  gtk_widget_show (label10);
  gtk_box_pack_start (GTK_BOX (hbox1), label10, TRUE, FALSE, 0);

  conf_cancel_btn = gtk_button_new_with_mnemonic (_("Cancel"));
  gtk_widget_show (conf_cancel_btn);
  gtk_box_pack_start (GTK_BOX (hbox1), conf_cancel_btn, FALSE, FALSE, 0);
  gtk_widget_set_size_request (conf_cancel_btn, 90, -1);

  conf_save_btn = gtk_button_new_with_mnemonic (_("Save"));
  gtk_widget_show (conf_save_btn);
  gtk_box_pack_start (GTK_BOX (hbox1), conf_save_btn, FALSE, FALSE, 0);
  gtk_widget_set_size_request (conf_save_btn, 90, -1);

  g_signal_connect ((gpointer) config_window, "realize",
                    G_CALLBACK (on_config_window_realize),
                    NULL);
  g_signal_connect ((gpointer) conf_cancel_btn, "clicked",
                    G_CALLBACK (on_conf_cancel_btn_clicked),
                    NULL);
  g_signal_connect ((gpointer) conf_save_btn, "clicked",
                    G_CALLBACK (on_conf_save_btn_clicked),
                    NULL);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (config_window, config_window, "config_window");
  GLADE_HOOKUP_OBJECT (config_window, vbox1, "vbox1");
  GLADE_HOOKUP_OBJECT (config_window, frame3, "frame3");
  GLADE_HOOKUP_OBJECT (config_window, vbox4, "vbox4");
  GLADE_HOOKUP_OBJECT (config_window, table4, "table4");
  GLADE_HOOKUP_OBJECT (config_window, label14, "label14");
  GLADE_HOOKUP_OBJECT (config_window, hbox5, "hbox5");
  GLADE_HOOKUP_OBJECT (config_window, conf_1page_rbtn, "conf_1page_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, conf_2page_rbtn, "conf_2page_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, hseparator3, "hseparator3");
  GLADE_HOOKUP_OBJECT (config_window, table1, "table1");
  GLADE_HOOKUP_OBJECT (config_window, label2, "label2");
  GLADE_HOOKUP_OBJECT (config_window, label3, "label3");
  GLADE_HOOKUP_OBJECT (config_window, fwd_top_rbtn, "fwd_top_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, fwd_btm_rbtn, "fwd_btm_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, fwd_stay_rbtn, "fwd_stay_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, back_top_rbtn, "back_top_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, back_btm_rbtn, "back_btm_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, back_stay_rbtn, "back_stay_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, label13, "label13");
  GLADE_HOOKUP_OBJECT (config_window, frame4, "frame4");
  GLADE_HOOKUP_OBJECT (config_window, table3, "table3");
  GLADE_HOOKUP_OBJECT (config_window, conf_nav_hor_rbtn, "conf_nav_hor_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, conf_nav_vert_rbtn, "conf_nav_vert_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, label12, "label12");
  GLADE_HOOKUP_OBJECT (config_window, label11, "label11");
  GLADE_HOOKUP_OBJECT (config_window, conf_nav_nw_rbtn, "conf_nav_nw_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, conf_nav_ne_rbtn, "conf_nav_ne_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, conf_nav_se_rbtn, "conf_nav_se_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, conf_nav_sw_rbtn, "conf_nav_sw_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, label16, "label16");
  GLADE_HOOKUP_OBJECT (config_window, conf_nav_hide_cbtn, "conf_nav_hide_cbtn");
  GLADE_HOOKUP_OBJECT (config_window, label15, "label15");
  GLADE_HOOKUP_OBJECT (config_window, frame2, "frame2");
  GLADE_HOOKUP_OBJECT (config_window, table2, "table2");
  GLADE_HOOKUP_OBJECT (config_window, label5, "label5");
  GLADE_HOOKUP_OBJECT (config_window, label8, "label8");
  GLADE_HOOKUP_OBJECT (config_window, hseparator2, "hseparator2");
  GLADE_HOOKUP_OBJECT (config_window, hbox2, "hbox2");
  GLADE_HOOKUP_OBJECT (config_window, conf_w_entry, "conf_w_entry");
  GLADE_HOOKUP_OBJECT (config_window, label6, "label6");
  GLADE_HOOKUP_OBJECT (config_window, conf_h_entry, "conf_h_entry");
  GLADE_HOOKUP_OBJECT (config_window, label9, "label9");
  GLADE_HOOKUP_OBJECT (config_window, vbox3, "vbox3");
  GLADE_HOOKUP_OBJECT (config_window, conf_prevdir_rbtn, "conf_prevdir_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, hbox3, "hbox3");
  GLADE_HOOKUP_OBJECT (config_window, conf_goto_rbtn, "conf_goto_rbtn");
  GLADE_HOOKUP_OBJECT (config_window, conf_goto_entry, "conf_goto_entry");
  GLADE_HOOKUP_OBJECT (config_window, label4, "label4");
  GLADE_HOOKUP_OBJECT (config_window, hbox1, "hbox1");
  GLADE_HOOKUP_OBJECT (config_window, label10, "label10");
  GLADE_HOOKUP_OBJECT (config_window, conf_cancel_btn, "conf_cancel_btn");
  GLADE_HOOKUP_OBJECT (config_window, conf_save_btn, "conf_save_btn");

  return config_window;
}

static GnomeUIInfo help_popup_uiinfo[] =
{
  {
    GNOME_APP_UI_ITEM, N_("Advance 1 page"),
    NULL,
    (gpointer) on_advance_1_page1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Advance 2 pages"),
    NULL,
    (gpointer) on_advance_2_pages1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Go to end"),
    NULL,
    (gpointer) on_go_to_end1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_SEPARATOR,
  {
    GNOME_APP_UI_ITEM, N_("Backup 1 page"),
    NULL,
    (gpointer) on_backup_1_page1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Backup 2 pages"),
    NULL,
    (gpointer) on_backup_2_pages1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Go to start"),
    NULL,
    (gpointer) on_go_to_start1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_SEPARATOR,
  {
    GNOME_APP_UI_ITEM, N_("Zoom to fit"),
    NULL,
    (gpointer) on_zoom_to_fit1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Enlarge"),
    NULL,
    (gpointer) on_enlarge1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Reduce"),
    NULL,
    (gpointer) on_reduce1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Original size (1:1)"),
    NULL,
    (gpointer) on_original_size1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  {
    GNOME_APP_UI_ITEM, N_("Fit to page width"),
    NULL,
    (gpointer) on_fit_to_page_width1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_SEPARATOR,
  {
    GNOME_APP_UI_ITEM, N_("Configuration window"),
    NULL,
    (gpointer) on_configuration_window1_activate, NULL, NULL,
    GNOME_APP_PIXMAP_NONE, NULL,
    0, (GdkModifierType) 0, NULL
  },
  GNOMEUIINFO_END
};

GtkWidget*
create_help_popup (void)
{
  GtkWidget *help_popup;
  GtkAccelGroup *accel_group;

  accel_group = gtk_accel_group_new ();

  help_popup = gtk_menu_new ();
  gnome_app_fill_menu (GTK_MENU_SHELL (help_popup), help_popup_uiinfo,
                       accel_group, FALSE, 0);

  /* Store pointers to all widgets, for use by lookup_widget(). */
  GLADE_HOOKUP_OBJECT_NO_REF (help_popup, help_popup, "help_popup");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[0].widget, "advance_1_page1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[1].widget, "advance_2_pages1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[2].widget, "go_to_end1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[3].widget, "separator2");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[4].widget, "backup_1_page1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[5].widget, "backup_2_pages1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[6].widget, "go_to_start1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[7].widget, "separator3");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[8].widget, "zoom_to_fit1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[9].widget, "enlarge1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[10].widget, "reduce1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[11].widget, "original_size1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[12].widget, "fit_to_page_width1");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[13].widget, "separator4");
  GLADE_HOOKUP_OBJECT (help_popup, help_popup_uiinfo[14].widget, "configuration_window1");

  gtk_menu_set_accel_group (GTK_MENU (help_popup), accel_group);

  return help_popup;
}


Generated by  Doxygen 1.6.0   Back to index