Search
lxdream.org :: lxdream/src/gui/interface.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/interface.c
changeset 18:9a1b5d75703f
prev10:c898b37506e0
next35:21a4be098304
author nkeynes
date Sat Dec 24 08:02:18 2005 +0000 (16 years ago)
permissions -rw-r--r--
last change More structure reorgs/fixes
view annotate diff log raw
     1 /*
     2  * DO NOT EDIT THIS FILE - it is generated by Glade.
     3  */
     5 #ifdef HAVE_CONFIG_H
     6 #  include <config.h>
     7 #endif
     9 #include <sys/types.h>
    10 #include <sys/stat.h>
    11 #include <unistd.h>
    12 #include <string.h>
    13 #include <stdio.h>
    15 #include <bonobo.h>
    16 #include <gnome.h>
    18 #include "callbacks.h"
    19 #include "interface.h"
    20 #include "support.h"
    22 #define GLADE_HOOKUP_OBJECT(component,widget,name) \
    23   g_object_set_data_full (G_OBJECT (component), name, \
    24     gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
    26 #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
    27   g_object_set_data (G_OBJECT (component), name, widget)
    29 static GnomeUIInfo file1_menu_uiinfo[] =
    30 {
    31   GNOMEUIINFO_MENU_NEW_ITEM (N_("_New"), NULL, on_new_file1_activate, NULL),
    32   GNOMEUIINFO_MENU_OPEN_ITEM (on_open1_activate, NULL),
    33   GNOMEUIINFO_MENU_SAVE_ITEM (on_save1_activate, NULL),
    34   GNOMEUIINFO_MENU_SAVE_AS_ITEM (on_save_as1_activate, NULL),
    35   GNOMEUIINFO_SEPARATOR,
    36   GNOMEUIINFO_MENU_EXIT_ITEM (on_exit1_activate, NULL),
    37   GNOMEUIINFO_END
    38 };
    40 static GnomeUIInfo view1_menu_uiinfo[] =
    41 {
    42   {
    43     GNOME_APP_UI_ITEM, N_("Memory..."),
    44     NULL,
    45     (gpointer) on_view_memory_activate, NULL, NULL,
    46     GNOME_APP_PIXMAP_NONE, NULL,
    47     0, (GdkModifierType) 0, NULL
    48   },
    49   {
    50     GNOME_APP_UI_ITEM, N_("Mem mapped Regs..."),
    51     NULL,
    52     (gpointer) on_mem_mapped_regs1_activate, NULL, NULL,
    53     GNOME_APP_PIXMAP_NONE, NULL,
    54     0, (GdkModifierType) 0, NULL
    55   },
    56   GNOMEUIINFO_END
    57 };
    59 static GnomeUIInfo settings1_menu_uiinfo[] =
    60 {
    61   GNOMEUIINFO_MENU_PREFERENCES_ITEM (on_preferences1_activate, NULL),
    62   GNOMEUIINFO_END
    63 };
    65 static GnomeUIInfo help1_menu_uiinfo[] =
    66 {
    67   GNOMEUIINFO_MENU_ABOUT_ITEM (on_about1_activate, NULL),
    68   GNOMEUIINFO_END
    69 };
    71 static GnomeUIInfo menubar1_uiinfo[] =
    72 {
    73   {
    74     GNOME_APP_UI_SUBTREE, N_("_File"),
    75     NULL,
    76     file1_menu_uiinfo, NULL, NULL,
    77     GNOME_APP_PIXMAP_NONE, NULL,
    78     0, (GdkModifierType) 0, NULL
    79   },
    80   {
    81     GNOME_APP_UI_SUBTREE, N_("_View"),
    82     NULL,
    83     view1_menu_uiinfo, NULL, NULL,
    84     GNOME_APP_PIXMAP_NONE, NULL,
    85     0, (GdkModifierType) 0, NULL
    86   },
    87   {
    88     GNOME_APP_UI_SUBTREE, N_("_Settings"),
    89     NULL,
    90     settings1_menu_uiinfo, NULL, NULL,
    91     GNOME_APP_PIXMAP_NONE, NULL,
    92     0, (GdkModifierType) 0, NULL
    93   },
    94   {
    95     GNOME_APP_UI_SUBTREE, N_("_Help"),
    96     NULL,
    97     help1_menu_uiinfo, NULL, NULL,
    98     GNOME_APP_PIXMAP_NONE, NULL,
    99     0, (GdkModifierType) 0, NULL
   100   },
   101   GNOMEUIINFO_END
   102 };
   104 GtkWidget*
   105 create_debug_win (void)
   106 {
   107   GtkWidget *debug_win;
   108   GtkWidget *dock1;
   109   GtkWidget *toolbar1;
   110   GtkIconSize tmp_toolbar_icon_size;
   111   GtkWidget *tmp_image;
   112   GtkWidget *load_btn;
   113   GtkWidget *reset_btn;
   114   GtkWidget *stop_btn;
   115   GtkWidget *step_btn;
   116   GtkWidget *run_btn;
   117   GtkWidget *runto_btn;
   118   GtkWidget *break_btn;
   119   GtkWidget *loadstate_button;
   120   GtkWidget *savestate_button;
   121   GtkWidget *vpaned1;
   122   GtkWidget *hpaned1;
   123   GtkWidget *vbox2;
   124   GtkWidget *hbox1;
   125   GtkWidget *label21;
   126   GtkWidget *page_field;
   127   GtkWidget *page_locked_btn;
   128   GtkWidget *jump_pc_btn;
   129   GtkWidget *label22;
   130   GtkWidget *mode_box;
   131   GList *mode_box_items = NULL;
   132   GtkWidget *mode_field;
   133   GtkWidget *label23;
   134   GtkWidget *scrolledwindow7;
   135   GtkWidget *disasm_list;
   136   GtkWidget *label24;
   137   GtkWidget *label27;
   138   GtkWidget *label28;
   139   GtkWidget *label29;
   140   GtkWidget *scrolledwindow4;
   141   GtkWidget *reg_list;
   142   GtkWidget *label25;
   143   GtkWidget *label30;
   144   GtkWidget *scrolledwindow8;
   145   GtkWidget *output_list;
   146   GtkWidget *label26;
   147   GtkWidget *label31;
   148   GtkWidget *label32;
   149   GtkWidget *debug_appbar;
   150   GtkTooltips *tooltips;
   152   tooltips = gtk_tooltips_new ();
   154   debug_win = gnome_app_new ("Dream", _("DreamOn! Debugger"));
   155   gtk_window_set_default_size (GTK_WINDOW (debug_win), 1000, 700);
   157   dock1 = GNOME_APP (debug_win)->dock;
   158   gtk_widget_show (dock1);
   160   gnome_app_create_menus (GNOME_APP (debug_win), menubar1_uiinfo);
   162   toolbar1 = gtk_toolbar_new ();
   163   gtk_widget_show (toolbar1);
   164   gnome_app_add_toolbar (GNOME_APP (debug_win), GTK_TOOLBAR (toolbar1), "toolbar1",
   165                                 BONOBO_DOCK_ITEM_BEH_EXCLUSIVE,
   166                                 BONOBO_DOCK_TOP, 1, 0, 0);
   167   gtk_container_set_border_width (GTK_CONTAINER (toolbar1), 1);
   168   gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
   169   tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));
   171   tmp_image = gtk_image_new_from_stock ("gtk-cdrom", tmp_toolbar_icon_size);
   172   gtk_widget_show (tmp_image);
   173   load_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Mount"));
   174   gtk_widget_show (load_btn);
   175   gtk_container_add (GTK_CONTAINER (toolbar1), load_btn);
   176   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (load_btn), tooltips, _("Mount CD-Rom"), NULL);
   178   tmp_image = gtk_image_new_from_stock ("gtk-refresh", tmp_toolbar_icon_size);
   179   gtk_widget_show (tmp_image);
   180   reset_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Reset"));
   181   gtk_widget_show (reset_btn);
   182   gtk_container_add (GTK_CONTAINER (toolbar1), reset_btn);
   183   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (reset_btn), tooltips, _("Reset emulator"), NULL);
   185   tmp_image = gtk_image_new_from_stock ("gtk-stop", tmp_toolbar_icon_size);
   186   gtk_widget_show (tmp_image);
   187   stop_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Stop"));
   188   gtk_widget_show (stop_btn);
   189   gtk_container_add (GTK_CONTAINER (toolbar1), stop_btn);
   190   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (stop_btn), tooltips, _("Stop"), NULL);
   192   tmp_image = gtk_image_new_from_stock ("gtk-redo", tmp_toolbar_icon_size);
   193   gtk_widget_show (tmp_image);
   194   step_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Step"));
   195   gtk_widget_show (step_btn);
   196   gtk_container_add (GTK_CONTAINER (toolbar1), step_btn);
   197   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (step_btn), tooltips, _("Single step"), NULL);
   199   tmp_image = gtk_image_new_from_stock ("gtk-go-forward", tmp_toolbar_icon_size);
   200   gtk_widget_show (tmp_image);
   201   run_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run"));
   202   gtk_widget_show (run_btn);
   203   gtk_container_add (GTK_CONTAINER (toolbar1), run_btn);
   204   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (run_btn), tooltips, _("Run"), NULL);
   206   tmp_image = gtk_image_new_from_stock ("gtk-goto-last", tmp_toolbar_icon_size);
   207   gtk_widget_show (tmp_image);
   208   runto_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run to"));
   209   gtk_widget_show (runto_btn);
   210   gtk_container_add (GTK_CONTAINER (toolbar1), runto_btn);
   211   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (runto_btn), tooltips, _("Run to current selection"), NULL);
   213   tmp_image = gtk_image_new_from_stock ("gtk-close", tmp_toolbar_icon_size);
   214   gtk_widget_show (tmp_image);
   215   break_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Break"));
   216   gtk_widget_show (break_btn);
   217   gtk_container_add (GTK_CONTAINER (toolbar1), break_btn);
   218   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (break_btn), tooltips, _("Set breakpoint"), NULL);
   220   tmp_image = gtk_image_new_from_stock ("gtk-open", tmp_toolbar_icon_size);
   221   gtk_widget_show (tmp_image);
   222   loadstate_button = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Load"));
   223   gtk_widget_show (loadstate_button);
   224   gtk_container_add (GTK_CONTAINER (toolbar1), loadstate_button);
   225   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (loadstate_button), tooltips, _("Load save-state file"), NULL);
   227   tmp_image = gtk_image_new_from_stock ("gtk-save", tmp_toolbar_icon_size);
   228   gtk_widget_show (tmp_image);
   229   savestate_button = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Save"));
   230   gtk_widget_show (savestate_button);
   231   gtk_container_add (GTK_CONTAINER (toolbar1), savestate_button);
   232   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (savestate_button), tooltips, _("Save save-state file"), NULL);
   234   vpaned1 = gtk_vpaned_new ();
   235   gtk_widget_show (vpaned1);
   236   gnome_app_set_contents (GNOME_APP (debug_win), vpaned1);
   237   gtk_paned_set_position (GTK_PANED (vpaned1), 430);
   239   hpaned1 = gtk_hpaned_new ();
   240   gtk_widget_show (hpaned1);
   241   gtk_paned_pack1 (GTK_PANED (vpaned1), hpaned1, TRUE, TRUE);
   242   gtk_paned_set_position (GTK_PANED (hpaned1), 800);
   244   vbox2 = gtk_vbox_new (FALSE, 0);
   245   gtk_widget_show (vbox2);
   246   gtk_paned_pack1 (GTK_PANED (hpaned1), vbox2, FALSE, TRUE);
   248   hbox1 = gtk_hbox_new (FALSE, 0);
   249   gtk_widget_show (hbox1);
   250   gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 3);
   252   label21 = gtk_label_new (_("Page"));
   253   gtk_widget_show (label21);
   254   gtk_box_pack_start (GTK_BOX (hbox1), label21, FALSE, FALSE, 4);
   255   gtk_label_set_justify (GTK_LABEL (label21), GTK_JUSTIFY_CENTER);
   257   page_field = gtk_entry_new ();
   258   gtk_widget_show (page_field);
   259   gtk_box_pack_start (GTK_BOX (hbox1), page_field, FALSE, TRUE, 0);
   261   page_locked_btn = gtk_check_button_new_with_mnemonic (_("Locked"));
   262   gtk_widget_show (page_locked_btn);
   263   gtk_box_pack_start (GTK_BOX (hbox1), page_locked_btn, FALSE, FALSE, 5);
   265   jump_pc_btn = gtk_button_new_with_mnemonic (_(" Jump to PC "));
   266   gtk_widget_show (jump_pc_btn);
   267   gtk_box_pack_start (GTK_BOX (hbox1), jump_pc_btn, FALSE, FALSE, 4);
   269   label22 = gtk_label_new (_("Mode"));
   270   gtk_widget_show (label22);
   271   gtk_box_pack_start (GTK_BOX (hbox1), label22, FALSE, FALSE, 5);
   272   gtk_label_set_justify (GTK_LABEL (label22), GTK_JUSTIFY_RIGHT);
   273   gtk_misc_set_alignment (GTK_MISC (label22), 1, 0.5);
   275   mode_box = gtk_combo_new ();
   276   g_object_set_data (G_OBJECT (GTK_COMBO (mode_box)->popwin),
   277                      "GladeParentKey", mode_box);
   278   gtk_widget_show (mode_box);
   279   gtk_box_pack_start (GTK_BOX (hbox1), mode_box, FALSE, FALSE, 0);
   280   mode_box_items = g_list_append (mode_box_items, (gpointer) _("SH4"));
   281   mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7"));
   282   mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7T"));
   283   gtk_combo_set_popdown_strings (GTK_COMBO (mode_box), mode_box_items);
   284   g_list_free (mode_box_items);
   286   mode_field = GTK_COMBO (mode_box)->entry;
   287   gtk_widget_show (mode_field);
   288   gtk_editable_set_editable (GTK_EDITABLE (mode_field), FALSE);
   290   label23 = gtk_label_new ("");
   291   gtk_widget_show (label23);
   292   gtk_box_pack_start (GTK_BOX (hbox1), label23, TRUE, TRUE, 4);
   293   gtk_label_set_justify (GTK_LABEL (label23), GTK_JUSTIFY_CENTER);
   295   scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
   296   gtk_widget_show (scrolledwindow7);
   297   gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow7, TRUE, TRUE, 0);
   298   GTK_WIDGET_UNSET_FLAGS (scrolledwindow7, GTK_CAN_FOCUS);
   299   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN);
   301   disasm_list = gtk_clist_new (4);
   302   gtk_widget_show (disasm_list);
   303   gtk_container_add (GTK_CONTAINER (scrolledwindow7), disasm_list);
   304   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 0, 80);
   305   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 1, 80);
   306   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 2, 80);
   307   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 3, 80);
   308   gtk_clist_column_titles_hide (GTK_CLIST (disasm_list));
   310   label24 = gtk_label_new ("");
   311   gtk_widget_show (label24);
   312   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 0, label24);
   314   label27 = gtk_label_new ("");
   315   gtk_widget_show (label27);
   316   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 1, label27);
   318   label28 = gtk_label_new ("");
   319   gtk_widget_show (label28);
   320   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 2, label28);
   322   label29 = gtk_label_new ("");
   323   gtk_widget_show (label29);
   324   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 3, label29);
   326   scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
   327   gtk_widget_show (scrolledwindow4);
   328   gtk_paned_pack2 (GTK_PANED (hpaned1), scrolledwindow4, FALSE, TRUE);
   329   GTK_WIDGET_UNSET_FLAGS (scrolledwindow4, GTK_CAN_FOCUS);
   330   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
   331   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
   333   reg_list = gtk_clist_new (2);
   334   gtk_widget_show (reg_list);
   335   gtk_container_add (GTK_CONTAINER (scrolledwindow4), reg_list);
   336   gtk_clist_set_column_width (GTK_CLIST (reg_list), 0, 80);
   337   gtk_clist_set_column_width (GTK_CLIST (reg_list), 1, 80);
   338   gtk_clist_column_titles_hide (GTK_CLIST (reg_list));
   340   label25 = gtk_label_new ("");
   341   gtk_widget_show (label25);
   342   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 0, label25);
   344   label30 = gtk_label_new ("");
   345   gtk_widget_show (label30);
   346   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 1, label30);
   348   scrolledwindow8 = gtk_scrolled_window_new (NULL, NULL);
   349   gtk_widget_show (scrolledwindow8);
   350   gtk_paned_pack2 (GTK_PANED (vpaned1), scrolledwindow8, FALSE, TRUE);
   351   GTK_WIDGET_UNSET_FLAGS (scrolledwindow8, GTK_CAN_FOCUS);
   352   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
   353   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_SHADOW_IN);
   355   output_list = gtk_clist_new (3);
   356   gtk_widget_show (output_list);
   357   gtk_container_add (GTK_CONTAINER (scrolledwindow8), output_list);
   358   gtk_clist_set_column_width (GTK_CLIST (output_list), 0, 80);
   359   gtk_clist_set_column_width (GTK_CLIST (output_list), 1, 80);
   360   gtk_clist_set_column_width (GTK_CLIST (output_list), 2, 80);
   361   gtk_clist_column_titles_hide (GTK_CLIST (output_list));
   363   label26 = gtk_label_new ("");
   364   gtk_widget_show (label26);
   365   gtk_clist_set_column_widget (GTK_CLIST (output_list), 0, label26);
   367   label31 = gtk_label_new ("");
   368   gtk_widget_show (label31);
   369   gtk_clist_set_column_widget (GTK_CLIST (output_list), 1, label31);
   371   label32 = gtk_label_new ("");
   372   gtk_widget_show (label32);
   373   gtk_clist_set_column_widget (GTK_CLIST (output_list), 2, label32);
   375   debug_appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
   376   gtk_widget_show (debug_appbar);
   377   gnome_app_set_statusbar (GNOME_APP (debug_win), debug_appbar);
   379   g_signal_connect ((gpointer) debug_win, "delete_event",
   380                     G_CALLBACK (on_debug_win_delete_event),
   381                     NULL);
   382   gnome_app_install_menu_hints (GNOME_APP (debug_win), menubar1_uiinfo);
   383   g_signal_connect ((gpointer) load_btn, "clicked",
   384                     G_CALLBACK (on_load_btn_clicked),
   385                     NULL);
   386   g_signal_connect ((gpointer) reset_btn, "clicked",
   387                     G_CALLBACK (on_reset_btn_clicked),
   388                     NULL);
   389   g_signal_connect ((gpointer) stop_btn, "clicked",
   390                     G_CALLBACK (on_stop_btn_clicked),
   391                     NULL);
   392   g_signal_connect ((gpointer) step_btn, "clicked",
   393                     G_CALLBACK (on_step_btn_clicked),
   394                     NULL);
   395   g_signal_connect ((gpointer) run_btn, "clicked",
   396                     G_CALLBACK (on_run_btn_clicked),
   397                     NULL);
   398   g_signal_connect ((gpointer) runto_btn, "clicked",
   399                     G_CALLBACK (on_runto_btn_clicked),
   400                     NULL);
   401   g_signal_connect ((gpointer) break_btn, "clicked",
   402                     G_CALLBACK (on_break_btn_clicked),
   403                     NULL);
   404   g_signal_connect ((gpointer) loadstate_button, "clicked",
   405                     G_CALLBACK (on_loadstate_button_clicked),
   406                     NULL);
   407   g_signal_connect ((gpointer) savestate_button, "clicked",
   408                     G_CALLBACK (on_savestate_button_clicked),
   409                     NULL);
   410   g_signal_connect ((gpointer) page_field, "key_press_event",
   411                     G_CALLBACK (on_page_field_key_press_event),
   412                     NULL);
   413   g_signal_connect ((gpointer) page_locked_btn, "toggled",
   414                     G_CALLBACK (on_page_locked_btn_toggled),
   415                     NULL);
   416   g_signal_connect ((gpointer) jump_pc_btn, "clicked",
   417                     G_CALLBACK (on_jump_pc_btn_clicked),
   418                     NULL);
   419   g_signal_connect ((gpointer) mode_field, "changed",
   420                     G_CALLBACK (on_mode_field_changed),
   421                     NULL);
   422   g_signal_connect ((gpointer) disasm_list, "select_row",
   423                     G_CALLBACK (on_disasm_list_select_row),
   424                     NULL);
   425   g_signal_connect ((gpointer) disasm_list, "unselect_row",
   426                     G_CALLBACK (on_disasm_list_unselect_row),
   427                     NULL);
   428   g_signal_connect ((gpointer) output_list, "select_row",
   429                     G_CALLBACK (on_output_list_select_row),
   430                     NULL);
   432   /* Store pointers to all widgets, for use by lookup_widget(). */
   433   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, debug_win, "debug_win");
   434   GLADE_HOOKUP_OBJECT (debug_win, dock1, "dock1");
   435   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[0].widget, "file1");
   436   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[0].widget, "new_file1");
   437   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[1].widget, "open1");
   438   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[2].widget, "save1");
   439   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[3].widget, "save_as1");
   440   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[4].widget, "separator1");
   441   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[5].widget, "exit1");
   442   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[1].widget, "view1");
   443   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[0].widget, "view_memory");
   444   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[1].widget, "mem_mapped_regs1");
   445   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[2].widget, "settings1");
   446   GLADE_HOOKUP_OBJECT (debug_win, settings1_menu_uiinfo[0].widget, "preferences1");
   447   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[3].widget, "help1");
   448   GLADE_HOOKUP_OBJECT (debug_win, help1_menu_uiinfo[0].widget, "about1");
   449   GLADE_HOOKUP_OBJECT (debug_win, toolbar1, "toolbar1");
   450   GLADE_HOOKUP_OBJECT (debug_win, load_btn, "load_btn");
   451   GLADE_HOOKUP_OBJECT (debug_win, reset_btn, "reset_btn");
   452   GLADE_HOOKUP_OBJECT (debug_win, stop_btn, "stop_btn");
   453   GLADE_HOOKUP_OBJECT (debug_win, step_btn, "step_btn");
   454   GLADE_HOOKUP_OBJECT (debug_win, run_btn, "run_btn");
   455   GLADE_HOOKUP_OBJECT (debug_win, runto_btn, "runto_btn");
   456   GLADE_HOOKUP_OBJECT (debug_win, break_btn, "break_btn");
   457   GLADE_HOOKUP_OBJECT (debug_win, loadstate_button, "loadstate_button");
   458   GLADE_HOOKUP_OBJECT (debug_win, savestate_button, "savestate_button");
   459   GLADE_HOOKUP_OBJECT (debug_win, vpaned1, "vpaned1");
   460   GLADE_HOOKUP_OBJECT (debug_win, hpaned1, "hpaned1");
   461   GLADE_HOOKUP_OBJECT (debug_win, vbox2, "vbox2");
   462   GLADE_HOOKUP_OBJECT (debug_win, hbox1, "hbox1");
   463   GLADE_HOOKUP_OBJECT (debug_win, label21, "label21");
   464   GLADE_HOOKUP_OBJECT (debug_win, page_field, "page_field");
   465   GLADE_HOOKUP_OBJECT (debug_win, page_locked_btn, "page_locked_btn");
   466   GLADE_HOOKUP_OBJECT (debug_win, jump_pc_btn, "jump_pc_btn");
   467   GLADE_HOOKUP_OBJECT (debug_win, label22, "label22");
   468   GLADE_HOOKUP_OBJECT (debug_win, mode_box, "mode_box");
   469   GLADE_HOOKUP_OBJECT (debug_win, mode_field, "mode_field");
   470   GLADE_HOOKUP_OBJECT (debug_win, label23, "label23");
   471   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow7, "scrolledwindow7");
   472   GLADE_HOOKUP_OBJECT (debug_win, disasm_list, "disasm_list");
   473   GLADE_HOOKUP_OBJECT (debug_win, label24, "label24");
   474   GLADE_HOOKUP_OBJECT (debug_win, label27, "label27");
   475   GLADE_HOOKUP_OBJECT (debug_win, label28, "label28");
   476   GLADE_HOOKUP_OBJECT (debug_win, label29, "label29");
   477   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow4, "scrolledwindow4");
   478   GLADE_HOOKUP_OBJECT (debug_win, reg_list, "reg_list");
   479   GLADE_HOOKUP_OBJECT (debug_win, label25, "label25");
   480   GLADE_HOOKUP_OBJECT (debug_win, label30, "label30");
   481   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow8, "scrolledwindow8");
   482   GLADE_HOOKUP_OBJECT (debug_win, output_list, "output_list");
   483   GLADE_HOOKUP_OBJECT (debug_win, label26, "label26");
   484   GLADE_HOOKUP_OBJECT (debug_win, label31, "label31");
   485   GLADE_HOOKUP_OBJECT (debug_win, label32, "label32");
   486   GLADE_HOOKUP_OBJECT (debug_win, debug_appbar, "debug_appbar");
   487   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, tooltips, "tooltips");
   489   return debug_win;
   490 }
   492 GtkWidget*
   493 create_mmr_win (void)
   494 {
   495   GtkWidget *mmr_win;
   496   GtkWidget *vbox1;
   497   GtkWidget *mmr_notebook;
   498   GtkWidget *empty_notebook_page;
   499   GtkWidget *label16;
   500   GtkWidget *hbuttonbox1;
   501   GtkWidget *mmr_close;
   503   mmr_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   504   gtk_window_set_title (GTK_WINDOW (mmr_win), _("DreamOn! - Memory-Mapped Registers"));
   505   gtk_window_set_default_size (GTK_WINDOW (mmr_win), 600, 600);
   507   vbox1 = gtk_vbox_new (FALSE, 0);
   508   gtk_widget_show (vbox1);
   509   gtk_container_add (GTK_CONTAINER (mmr_win), vbox1);
   511   mmr_notebook = gtk_notebook_new ();
   512   gtk_widget_show (mmr_notebook);
   513   gtk_box_pack_start (GTK_BOX (vbox1), mmr_notebook, TRUE, TRUE, 0);
   514   gtk_notebook_set_tab_pos (GTK_NOTEBOOK (mmr_notebook), GTK_POS_LEFT);
   516   empty_notebook_page = gtk_vbox_new (FALSE, 0);
   517   gtk_widget_show (empty_notebook_page);
   518   gtk_container_add (GTK_CONTAINER (mmr_notebook), empty_notebook_page);
   520   label16 = gtk_label_new (_("label16"));
   521   gtk_widget_show (label16);
   522   gtk_notebook_set_tab_label (GTK_NOTEBOOK (mmr_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (mmr_notebook), 0), label16);
   523   gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_CENTER);
   525   hbuttonbox1 = gtk_hbutton_box_new ();
   526   gtk_widget_show (hbuttonbox1);
   527   gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
   528   gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
   530   mmr_close = gtk_button_new_with_mnemonic (_("Close"));
   531   gtk_widget_show (mmr_close);
   532   gtk_container_add (GTK_CONTAINER (hbuttonbox1), mmr_close);
   533   GTK_WIDGET_SET_FLAGS (mmr_close, GTK_CAN_DEFAULT);
   535   g_signal_connect ((gpointer) mmr_win, "delete_event",
   536                     G_CALLBACK (on_mmr_win_delete_event),
   537                     NULL);
   538   g_signal_connect ((gpointer) mmr_close, "clicked",
   539                     G_CALLBACK (on_mmr_close_clicked),
   540                     NULL);
   542   /* Store pointers to all widgets, for use by lookup_widget(). */
   543   GLADE_HOOKUP_OBJECT_NO_REF (mmr_win, mmr_win, "mmr_win");
   544   GLADE_HOOKUP_OBJECT (mmr_win, vbox1, "vbox1");
   545   GLADE_HOOKUP_OBJECT (mmr_win, mmr_notebook, "mmr_notebook");
   546   GLADE_HOOKUP_OBJECT (mmr_win, label16, "label16");
   547   GLADE_HOOKUP_OBJECT (mmr_win, hbuttonbox1, "hbuttonbox1");
   548   GLADE_HOOKUP_OBJECT (mmr_win, mmr_close, "mmr_close");
   550   return mmr_win;
   551 }
   553 GtkWidget*
   554 create_about_win (void)
   555 {
   556   const gchar *authors[] = {
   557     "Nathan Keynes",
   558     NULL
   559   };
   560   const gchar *documenters[] = { NULL };
   561   /* TRANSLATORS: Replace this string with your names, one name per line. */
   562   gchar *translators = _("translator_credits");
   563   GdkPixbuf *about_win_logo_pixbuf;
   564   GtkWidget *about_win;
   566   if (!strcmp (translators, "translator_credits"))
   567     translators = NULL;
   568   about_win_logo_pixbuf = create_pixbuf ("dream/dcemu.gif");
   569   about_win = gnome_about_new ("Dream", VERSION,
   570                         _("Copyright(c) 2002 Nathan Keynes"),
   571                         "",
   572                         authors,
   573                         documenters,
   574                         translators,
   575                         about_win_logo_pixbuf);
   576   gtk_container_set_border_width (GTK_CONTAINER (about_win), 1);
   577   gtk_window_set_type_hint (GTK_WINDOW (about_win), GDK_WINDOW_TYPE_HINT_DIALOG);
   579   /* Store pointers to all widgets, for use by lookup_widget(). */
   580   GLADE_HOOKUP_OBJECT_NO_REF (about_win, about_win, "about_win");
   582   return about_win;
   583 }
   585 GtkWidget*
   586 create_dump_win (void)
   587 {
   588   GtkWidget *dump_win;
   589   GtkWidget *vbox3;
   590   GtkWidget *hbox2;
   591   GtkWidget *label34;
   592   GtkWidget *dump_from;
   593   GtkWidget *label35;
   594   GtkWidget *dump_to;
   595   GtkWidget *dump_view_button;
   596   GtkWidget *label36;
   597   GtkWidget *scrolledwindow9;
   598   GtkWidget *dump_text;
   600   dump_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   601   gtk_window_set_title (GTK_WINDOW (dump_win), _("Memory dump"));
   603   vbox3 = gtk_vbox_new (FALSE, 0);
   604   gtk_widget_show (vbox3);
   605   gtk_container_add (GTK_CONTAINER (dump_win), vbox3);
   607   hbox2 = gtk_hbox_new (FALSE, 0);
   608   gtk_widget_show (hbox2);
   609   gtk_box_pack_start (GTK_BOX (vbox3), hbox2, FALSE, TRUE, 3);
   611   label34 = gtk_label_new (_(" From "));
   612   gtk_widget_show (label34);
   613   gtk_box_pack_start (GTK_BOX (hbox2), label34, FALSE, FALSE, 0);
   615   dump_from = gtk_entry_new ();
   616   gtk_widget_show (dump_from);
   617   gtk_box_pack_start (GTK_BOX (hbox2), dump_from, FALSE, TRUE, 0);
   619   label35 = gtk_label_new (_(" To "));
   620   gtk_widget_show (label35);
   621   gtk_box_pack_start (GTK_BOX (hbox2), label35, FALSE, FALSE, 0);
   623   dump_to = gtk_entry_new ();
   624   gtk_widget_show (dump_to);
   625   gtk_box_pack_start (GTK_BOX (hbox2), dump_to, FALSE, TRUE, 0);
   627   dump_view_button = gtk_button_new_with_mnemonic (_("View"));
   628   gtk_widget_show (dump_view_button);
   629   gtk_box_pack_start (GTK_BOX (hbox2), dump_view_button, FALSE, FALSE, 0);
   631   label36 = gtk_label_new (_("   "));
   632   gtk_widget_show (label36);
   633   gtk_box_pack_start (GTK_BOX (hbox2), label36, TRUE, TRUE, 0);
   635   scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL);
   636   gtk_widget_show (scrolledwindow9);
   637   gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow9, TRUE, TRUE, 0);
   638   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN);
   640   dump_text = gtk_text_view_new ();
   641   gtk_widget_show (dump_text);
   642   gtk_container_add (GTK_CONTAINER (scrolledwindow9), dump_text);
   644   /* Store pointers to all widgets, for use by lookup_widget(). */
   645   GLADE_HOOKUP_OBJECT_NO_REF (dump_win, dump_win, "dump_win");
   646   GLADE_HOOKUP_OBJECT (dump_win, vbox3, "vbox3");
   647   GLADE_HOOKUP_OBJECT (dump_win, hbox2, "hbox2");
   648   GLADE_HOOKUP_OBJECT (dump_win, label34, "label34");
   649   GLADE_HOOKUP_OBJECT (dump_win, dump_from, "dump_from");
   650   GLADE_HOOKUP_OBJECT (dump_win, label35, "label35");
   651   GLADE_HOOKUP_OBJECT (dump_win, dump_to, "dump_to");
   652   GLADE_HOOKUP_OBJECT (dump_win, dump_view_button, "dump_view_button");
   653   GLADE_HOOKUP_OBJECT (dump_win, label36, "label36");
   654   GLADE_HOOKUP_OBJECT (dump_win, scrolledwindow9, "scrolledwindow9");
   655   GLADE_HOOKUP_OBJECT (dump_win, dump_text, "dump_text");
   657   return dump_win;
   658 }
   660 GtkWidget*
   661 create_watch_win (void)
   662 {
   663   GtkWidget *watch_win;
   664   GtkWidget *vbox4;
   665   GtkWidget *hbox4;
   666   GtkWidget *label37;
   667   GtkWidget *watch_start_addr;
   668   GtkWidget *label38;
   669   GtkWidget *watch_end_addr;
   670   GtkWidget *label39;
   671   GtkWidget *combo1;
   672   GtkWidget *watch_type;
   673   GtkWidget *button_add_watch;
   674   GtkWidget *scrolledwindow10;
   675   GtkWidget *treeview1;
   676   GtkWidget *hbox5;
   677   GtkWidget *label40;
   678   GtkWidget *button_clear_all;
   679   GtkWidget *button_close;
   681   watch_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   682   gtk_window_set_title (GTK_WINDOW (watch_win), _("Watchpoints"));
   684   vbox4 = gtk_vbox_new (FALSE, 0);
   685   gtk_widget_show (vbox4);
   686   gtk_container_add (GTK_CONTAINER (watch_win), vbox4);
   688   hbox4 = gtk_hbox_new (FALSE, 0);
   689   gtk_widget_show (hbox4);
   690   gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, TRUE, 3);
   692   label37 = gtk_label_new (_("Start addr "));
   693   gtk_widget_show (label37);
   694   gtk_box_pack_start (GTK_BOX (hbox4), label37, FALSE, FALSE, 3);
   696   watch_start_addr = gtk_entry_new ();
   697   gtk_widget_show (watch_start_addr);
   698   gtk_box_pack_start (GTK_BOX (hbox4), watch_start_addr, FALSE, TRUE, 0);
   700   label38 = gtk_label_new (_("End addr"));
   701   gtk_widget_show (label38);
   702   gtk_box_pack_start (GTK_BOX (hbox4), label38, FALSE, FALSE, 3);
   704   watch_end_addr = gtk_entry_new ();
   705   gtk_widget_show (watch_end_addr);
   706   gtk_box_pack_start (GTK_BOX (hbox4), watch_end_addr, FALSE, TRUE, 0);
   708   label39 = gtk_label_new (_("Type"));
   709   gtk_widget_show (label39);
   710   gtk_box_pack_start (GTK_BOX (hbox4), label39, FALSE, FALSE, 3);
   712   combo1 = gtk_combo_new ();
   713   g_object_set_data (G_OBJECT (GTK_COMBO (combo1)->popwin),
   714                      "GladeParentKey", combo1);
   715   gtk_widget_show (combo1);
   716   gtk_box_pack_start (GTK_BOX (hbox4), combo1, TRUE, TRUE, 0);
   718   watch_type = GTK_COMBO (combo1)->entry;
   719   gtk_widget_show (watch_type);
   721   button_add_watch = gtk_button_new_with_mnemonic (_("Add Watch"));
   722   gtk_widget_show (button_add_watch);
   723   gtk_box_pack_start (GTK_BOX (hbox4), button_add_watch, FALSE, FALSE, 3);
   725   scrolledwindow10 = gtk_scrolled_window_new (NULL, NULL);
   726   gtk_widget_show (scrolledwindow10);
   727   gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow10, TRUE, TRUE, 0);
   729   treeview1 = gtk_tree_view_new ();
   730   gtk_widget_show (treeview1);
   731   gtk_container_add (GTK_CONTAINER (scrolledwindow10), treeview1);
   732   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview1), FALSE);
   734   hbox5 = gtk_hbox_new (FALSE, 0);
   735   gtk_widget_show (hbox5);
   736   gtk_box_pack_start (GTK_BOX (vbox4), hbox5, FALSE, TRUE, 3);
   738   label40 = gtk_label_new ("");
   739   gtk_widget_show (label40);
   740   gtk_box_pack_start (GTK_BOX (hbox5), label40, TRUE, TRUE, 0);
   742   button_clear_all = gtk_button_new_with_mnemonic (_("Clear all"));
   743   gtk_widget_show (button_clear_all);
   744   gtk_box_pack_start (GTK_BOX (hbox5), button_clear_all, FALSE, FALSE, 3);
   746   button_close = gtk_button_new_with_mnemonic (_("Close"));
   747   gtk_widget_show (button_close);
   748   gtk_box_pack_start (GTK_BOX (hbox5), button_close, FALSE, FALSE, 5);
   750   g_signal_connect ((gpointer) button_add_watch, "clicked",
   751                     G_CALLBACK (on_button_add_watch_clicked),
   752                     NULL);
   753   g_signal_connect ((gpointer) button_clear_all, "clicked",
   754                     G_CALLBACK (on_button_clear_all_clicked),
   755                     NULL);
   756   g_signal_connect ((gpointer) button_close, "clicked",
   757                     G_CALLBACK (on_button_close_clicked),
   758                     NULL);
   760   /* Store pointers to all widgets, for use by lookup_widget(). */
   761   GLADE_HOOKUP_OBJECT_NO_REF (watch_win, watch_win, "watch_win");
   762   GLADE_HOOKUP_OBJECT (watch_win, vbox4, "vbox4");
   763   GLADE_HOOKUP_OBJECT (watch_win, hbox4, "hbox4");
   764   GLADE_HOOKUP_OBJECT (watch_win, label37, "label37");
   765   GLADE_HOOKUP_OBJECT (watch_win, watch_start_addr, "watch_start_addr");
   766   GLADE_HOOKUP_OBJECT (watch_win, label38, "label38");
   767   GLADE_HOOKUP_OBJECT (watch_win, watch_end_addr, "watch_end_addr");
   768   GLADE_HOOKUP_OBJECT (watch_win, label39, "label39");
   769   GLADE_HOOKUP_OBJECT (watch_win, combo1, "combo1");
   770   GLADE_HOOKUP_OBJECT (watch_win, watch_type, "watch_type");
   771   GLADE_HOOKUP_OBJECT (watch_win, button_add_watch, "button_add_watch");
   772   GLADE_HOOKUP_OBJECT (watch_win, scrolledwindow10, "scrolledwindow10");
   773   GLADE_HOOKUP_OBJECT (watch_win, treeview1, "treeview1");
   774   GLADE_HOOKUP_OBJECT (watch_win, hbox5, "hbox5");
   775   GLADE_HOOKUP_OBJECT (watch_win, label40, "label40");
   776   GLADE_HOOKUP_OBJECT (watch_win, button_clear_all, "button_clear_all");
   777   GLADE_HOOKUP_OBJECT (watch_win, button_close, "button_close");
   779   return watch_win;
   780 }
.