Search
lxdream.org :: lxdream/src/gui/interface.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/interface.c
changeset 35:21a4be098304
prev18:9a1b5d75703f
next180:e6dcf9b65658
author nkeynes
date Sun Jan 01 08:09:17 2006 +0000 (15 years ago)
permissions -rw-r--r--
last change Remove sh4core.h reference
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 (4);
   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_set_column_width (GTK_CLIST (output_list), 3, 80);
   362   gtk_clist_column_titles_hide (GTK_CLIST (output_list));
   364   label26 = gtk_label_new ("");
   365   gtk_widget_show (label26);
   366   gtk_clist_set_column_widget (GTK_CLIST (output_list), 0, label26);
   368   label31 = gtk_label_new ("");
   369   gtk_widget_show (label31);
   370   gtk_clist_set_column_widget (GTK_CLIST (output_list), 1, label31);
   372   label32 = gtk_label_new ("");
   373   gtk_widget_show (label32);
   374   gtk_clist_set_column_widget (GTK_CLIST (output_list), 2, label32);
   376   debug_appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
   377   gtk_widget_show (debug_appbar);
   378   gnome_app_set_statusbar (GNOME_APP (debug_win), debug_appbar);
   380   g_signal_connect ((gpointer) debug_win, "delete_event",
   381                     G_CALLBACK (on_debug_win_delete_event),
   382                     NULL);
   383   gnome_app_install_menu_hints (GNOME_APP (debug_win), menubar1_uiinfo);
   384   g_signal_connect ((gpointer) load_btn, "clicked",
   385                     G_CALLBACK (on_load_btn_clicked),
   386                     NULL);
   387   g_signal_connect ((gpointer) reset_btn, "clicked",
   388                     G_CALLBACK (on_reset_btn_clicked),
   389                     NULL);
   390   g_signal_connect ((gpointer) stop_btn, "clicked",
   391                     G_CALLBACK (on_stop_btn_clicked),
   392                     NULL);
   393   g_signal_connect ((gpointer) step_btn, "clicked",
   394                     G_CALLBACK (on_step_btn_clicked),
   395                     NULL);
   396   g_signal_connect ((gpointer) run_btn, "clicked",
   397                     G_CALLBACK (on_run_btn_clicked),
   398                     NULL);
   399   g_signal_connect ((gpointer) runto_btn, "clicked",
   400                     G_CALLBACK (on_runto_btn_clicked),
   401                     NULL);
   402   g_signal_connect ((gpointer) break_btn, "clicked",
   403                     G_CALLBACK (on_break_btn_clicked),
   404                     NULL);
   405   g_signal_connect ((gpointer) loadstate_button, "clicked",
   406                     G_CALLBACK (on_loadstate_button_clicked),
   407                     NULL);
   408   g_signal_connect ((gpointer) savestate_button, "clicked",
   409                     G_CALLBACK (on_savestate_button_clicked),
   410                     NULL);
   411   g_signal_connect ((gpointer) page_field, "key_press_event",
   412                     G_CALLBACK (on_page_field_key_press_event),
   413                     NULL);
   414   g_signal_connect ((gpointer) page_locked_btn, "toggled",
   415                     G_CALLBACK (on_page_locked_btn_toggled),
   416                     NULL);
   417   g_signal_connect ((gpointer) jump_pc_btn, "clicked",
   418                     G_CALLBACK (on_jump_pc_btn_clicked),
   419                     NULL);
   420   g_signal_connect ((gpointer) mode_field, "changed",
   421                     G_CALLBACK (on_mode_field_changed),
   422                     NULL);
   423   g_signal_connect ((gpointer) disasm_list, "select_row",
   424                     G_CALLBACK (on_disasm_list_select_row),
   425                     NULL);
   426   g_signal_connect ((gpointer) disasm_list, "unselect_row",
   427                     G_CALLBACK (on_disasm_list_unselect_row),
   428                     NULL);
   429   g_signal_connect ((gpointer) output_list, "select_row",
   430                     G_CALLBACK (on_output_list_select_row),
   431                     NULL);
   433   /* Store pointers to all widgets, for use by lookup_widget(). */
   434   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, debug_win, "debug_win");
   435   GLADE_HOOKUP_OBJECT (debug_win, dock1, "dock1");
   436   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[0].widget, "file1");
   437   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[0].widget, "new_file1");
   438   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[1].widget, "open1");
   439   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[2].widget, "save1");
   440   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[3].widget, "save_as1");
   441   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[4].widget, "separator1");
   442   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[5].widget, "exit1");
   443   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[1].widget, "view1");
   444   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[0].widget, "view_memory");
   445   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[1].widget, "mem_mapped_regs1");
   446   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[2].widget, "settings1");
   447   GLADE_HOOKUP_OBJECT (debug_win, settings1_menu_uiinfo[0].widget, "preferences1");
   448   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[3].widget, "help1");
   449   GLADE_HOOKUP_OBJECT (debug_win, help1_menu_uiinfo[0].widget, "about1");
   450   GLADE_HOOKUP_OBJECT (debug_win, toolbar1, "toolbar1");
   451   GLADE_HOOKUP_OBJECT (debug_win, load_btn, "load_btn");
   452   GLADE_HOOKUP_OBJECT (debug_win, reset_btn, "reset_btn");
   453   GLADE_HOOKUP_OBJECT (debug_win, stop_btn, "stop_btn");
   454   GLADE_HOOKUP_OBJECT (debug_win, step_btn, "step_btn");
   455   GLADE_HOOKUP_OBJECT (debug_win, run_btn, "run_btn");
   456   GLADE_HOOKUP_OBJECT (debug_win, runto_btn, "runto_btn");
   457   GLADE_HOOKUP_OBJECT (debug_win, break_btn, "break_btn");
   458   GLADE_HOOKUP_OBJECT (debug_win, loadstate_button, "loadstate_button");
   459   GLADE_HOOKUP_OBJECT (debug_win, savestate_button, "savestate_button");
   460   GLADE_HOOKUP_OBJECT (debug_win, vpaned1, "vpaned1");
   461   GLADE_HOOKUP_OBJECT (debug_win, hpaned1, "hpaned1");
   462   GLADE_HOOKUP_OBJECT (debug_win, vbox2, "vbox2");
   463   GLADE_HOOKUP_OBJECT (debug_win, hbox1, "hbox1");
   464   GLADE_HOOKUP_OBJECT (debug_win, label21, "label21");
   465   GLADE_HOOKUP_OBJECT (debug_win, page_field, "page_field");
   466   GLADE_HOOKUP_OBJECT (debug_win, page_locked_btn, "page_locked_btn");
   467   GLADE_HOOKUP_OBJECT (debug_win, jump_pc_btn, "jump_pc_btn");
   468   GLADE_HOOKUP_OBJECT (debug_win, label22, "label22");
   469   GLADE_HOOKUP_OBJECT (debug_win, mode_box, "mode_box");
   470   GLADE_HOOKUP_OBJECT (debug_win, mode_field, "mode_field");
   471   GLADE_HOOKUP_OBJECT (debug_win, label23, "label23");
   472   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow7, "scrolledwindow7");
   473   GLADE_HOOKUP_OBJECT (debug_win, disasm_list, "disasm_list");
   474   GLADE_HOOKUP_OBJECT (debug_win, label24, "label24");
   475   GLADE_HOOKUP_OBJECT (debug_win, label27, "label27");
   476   GLADE_HOOKUP_OBJECT (debug_win, label28, "label28");
   477   GLADE_HOOKUP_OBJECT (debug_win, label29, "label29");
   478   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow4, "scrolledwindow4");
   479   GLADE_HOOKUP_OBJECT (debug_win, reg_list, "reg_list");
   480   GLADE_HOOKUP_OBJECT (debug_win, label25, "label25");
   481   GLADE_HOOKUP_OBJECT (debug_win, label30, "label30");
   482   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow8, "scrolledwindow8");
   483   GLADE_HOOKUP_OBJECT (debug_win, output_list, "output_list");
   484   GLADE_HOOKUP_OBJECT (debug_win, label26, "label26");
   485   GLADE_HOOKUP_OBJECT (debug_win, label31, "label31");
   486   GLADE_HOOKUP_OBJECT (debug_win, label32, "label32");
   487   GLADE_HOOKUP_OBJECT (debug_win, debug_appbar, "debug_appbar");
   488   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, tooltips, "tooltips");
   490   return debug_win;
   491 }
   493 GtkWidget*
   494 create_mmr_win (void)
   495 {
   496   GtkWidget *mmr_win;
   497   GtkWidget *vbox1;
   498   GtkWidget *mmr_notebook;
   499   GtkWidget *empty_notebook_page;
   500   GtkWidget *label16;
   501   GtkWidget *hbuttonbox1;
   502   GtkWidget *mmr_close;
   504   mmr_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   505   gtk_window_set_title (GTK_WINDOW (mmr_win), _("DreamOn! - Memory-Mapped Registers"));
   506   gtk_window_set_default_size (GTK_WINDOW (mmr_win), 600, 600);
   508   vbox1 = gtk_vbox_new (FALSE, 0);
   509   gtk_widget_show (vbox1);
   510   gtk_container_add (GTK_CONTAINER (mmr_win), vbox1);
   512   mmr_notebook = gtk_notebook_new ();
   513   gtk_widget_show (mmr_notebook);
   514   gtk_box_pack_start (GTK_BOX (vbox1), mmr_notebook, TRUE, TRUE, 0);
   515   gtk_notebook_set_tab_pos (GTK_NOTEBOOK (mmr_notebook), GTK_POS_LEFT);
   517   empty_notebook_page = gtk_vbox_new (FALSE, 0);
   518   gtk_widget_show (empty_notebook_page);
   519   gtk_container_add (GTK_CONTAINER (mmr_notebook), empty_notebook_page);
   521   label16 = gtk_label_new (_("label16"));
   522   gtk_widget_show (label16);
   523   gtk_notebook_set_tab_label (GTK_NOTEBOOK (mmr_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (mmr_notebook), 0), label16);
   524   gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_CENTER);
   526   hbuttonbox1 = gtk_hbutton_box_new ();
   527   gtk_widget_show (hbuttonbox1);
   528   gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
   529   gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
   531   mmr_close = gtk_button_new_with_mnemonic (_("Close"));
   532   gtk_widget_show (mmr_close);
   533   gtk_container_add (GTK_CONTAINER (hbuttonbox1), mmr_close);
   534   GTK_WIDGET_SET_FLAGS (mmr_close, GTK_CAN_DEFAULT);
   536   g_signal_connect ((gpointer) mmr_win, "delete_event",
   537                     G_CALLBACK (on_mmr_win_delete_event),
   538                     NULL);
   539   g_signal_connect ((gpointer) mmr_close, "clicked",
   540                     G_CALLBACK (on_mmr_close_clicked),
   541                     NULL);
   543   /* Store pointers to all widgets, for use by lookup_widget(). */
   544   GLADE_HOOKUP_OBJECT_NO_REF (mmr_win, mmr_win, "mmr_win");
   545   GLADE_HOOKUP_OBJECT (mmr_win, vbox1, "vbox1");
   546   GLADE_HOOKUP_OBJECT (mmr_win, mmr_notebook, "mmr_notebook");
   547   GLADE_HOOKUP_OBJECT (mmr_win, label16, "label16");
   548   GLADE_HOOKUP_OBJECT (mmr_win, hbuttonbox1, "hbuttonbox1");
   549   GLADE_HOOKUP_OBJECT (mmr_win, mmr_close, "mmr_close");
   551   return mmr_win;
   552 }
   554 GtkWidget*
   555 create_about_win (void)
   556 {
   557   const gchar *authors[] = {
   558     "Nathan Keynes",
   559     NULL
   560   };
   561   const gchar *documenters[] = { NULL };
   562   /* TRANSLATORS: Replace this string with your names, one name per line. */
   563   gchar *translators = _("translator_credits");
   564   GdkPixbuf *about_win_logo_pixbuf;
   565   GtkWidget *about_win;
   567   if (!strcmp (translators, "translator_credits"))
   568     translators = NULL;
   569   about_win_logo_pixbuf = create_pixbuf ("dream/dcemu.gif");
   570   about_win = gnome_about_new ("Dream", VERSION,
   571                         _("Copyright(c) 2002 Nathan Keynes"),
   572                         "",
   573                         authors,
   574                         documenters,
   575                         translators,
   576                         about_win_logo_pixbuf);
   577   gtk_container_set_border_width (GTK_CONTAINER (about_win), 1);
   578   gtk_window_set_type_hint (GTK_WINDOW (about_win), GDK_WINDOW_TYPE_HINT_DIALOG);
   580   /* Store pointers to all widgets, for use by lookup_widget(). */
   581   GLADE_HOOKUP_OBJECT_NO_REF (about_win, about_win, "about_win");
   583   return about_win;
   584 }
   586 GtkWidget*
   587 create_dump_win (void)
   588 {
   589   GtkWidget *dump_win;
   590   GtkWidget *vbox3;
   591   GtkWidget *hbox2;
   592   GtkWidget *label34;
   593   GtkWidget *dump_from;
   594   GtkWidget *label35;
   595   GtkWidget *dump_to;
   596   GtkWidget *dump_view_button;
   597   GtkWidget *label36;
   598   GtkWidget *scrolledwindow9;
   599   GtkWidget *dump_text;
   601   dump_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   602   gtk_window_set_title (GTK_WINDOW (dump_win), _("Memory dump"));
   604   vbox3 = gtk_vbox_new (FALSE, 0);
   605   gtk_widget_show (vbox3);
   606   gtk_container_add (GTK_CONTAINER (dump_win), vbox3);
   608   hbox2 = gtk_hbox_new (FALSE, 0);
   609   gtk_widget_show (hbox2);
   610   gtk_box_pack_start (GTK_BOX (vbox3), hbox2, FALSE, TRUE, 3);
   612   label34 = gtk_label_new (_(" From "));
   613   gtk_widget_show (label34);
   614   gtk_box_pack_start (GTK_BOX (hbox2), label34, FALSE, FALSE, 0);
   616   dump_from = gtk_entry_new ();
   617   gtk_widget_show (dump_from);
   618   gtk_box_pack_start (GTK_BOX (hbox2), dump_from, FALSE, TRUE, 0);
   620   label35 = gtk_label_new (_(" To "));
   621   gtk_widget_show (label35);
   622   gtk_box_pack_start (GTK_BOX (hbox2), label35, FALSE, FALSE, 0);
   624   dump_to = gtk_entry_new ();
   625   gtk_widget_show (dump_to);
   626   gtk_box_pack_start (GTK_BOX (hbox2), dump_to, FALSE, TRUE, 0);
   628   dump_view_button = gtk_button_new_with_mnemonic (_("View"));
   629   gtk_widget_show (dump_view_button);
   630   gtk_box_pack_start (GTK_BOX (hbox2), dump_view_button, FALSE, FALSE, 0);
   632   label36 = gtk_label_new (_("   "));
   633   gtk_widget_show (label36);
   634   gtk_box_pack_start (GTK_BOX (hbox2), label36, TRUE, TRUE, 0);
   636   scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL);
   637   gtk_widget_show (scrolledwindow9);
   638   gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow9, TRUE, TRUE, 0);
   639   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN);
   641   dump_text = gtk_text_view_new ();
   642   gtk_widget_show (dump_text);
   643   gtk_container_add (GTK_CONTAINER (scrolledwindow9), dump_text);
   645   /* Store pointers to all widgets, for use by lookup_widget(). */
   646   GLADE_HOOKUP_OBJECT_NO_REF (dump_win, dump_win, "dump_win");
   647   GLADE_HOOKUP_OBJECT (dump_win, vbox3, "vbox3");
   648   GLADE_HOOKUP_OBJECT (dump_win, hbox2, "hbox2");
   649   GLADE_HOOKUP_OBJECT (dump_win, label34, "label34");
   650   GLADE_HOOKUP_OBJECT (dump_win, dump_from, "dump_from");
   651   GLADE_HOOKUP_OBJECT (dump_win, label35, "label35");
   652   GLADE_HOOKUP_OBJECT (dump_win, dump_to, "dump_to");
   653   GLADE_HOOKUP_OBJECT (dump_win, dump_view_button, "dump_view_button");
   654   GLADE_HOOKUP_OBJECT (dump_win, label36, "label36");
   655   GLADE_HOOKUP_OBJECT (dump_win, scrolledwindow9, "scrolledwindow9");
   656   GLADE_HOOKUP_OBJECT (dump_win, dump_text, "dump_text");
   658   return dump_win;
   659 }
   661 GtkWidget*
   662 create_watch_win (void)
   663 {
   664   GtkWidget *watch_win;
   665   GtkWidget *vbox4;
   666   GtkWidget *hbox4;
   667   GtkWidget *label37;
   668   GtkWidget *watch_start_addr;
   669   GtkWidget *label38;
   670   GtkWidget *watch_end_addr;
   671   GtkWidget *label39;
   672   GtkWidget *combo1;
   673   GtkWidget *watch_type;
   674   GtkWidget *button_add_watch;
   675   GtkWidget *scrolledwindow10;
   676   GtkWidget *treeview1;
   677   GtkWidget *hbox5;
   678   GtkWidget *label40;
   679   GtkWidget *button_clear_all;
   680   GtkWidget *button_close;
   682   watch_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   683   gtk_window_set_title (GTK_WINDOW (watch_win), _("Watchpoints"));
   685   vbox4 = gtk_vbox_new (FALSE, 0);
   686   gtk_widget_show (vbox4);
   687   gtk_container_add (GTK_CONTAINER (watch_win), vbox4);
   689   hbox4 = gtk_hbox_new (FALSE, 0);
   690   gtk_widget_show (hbox4);
   691   gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, TRUE, 3);
   693   label37 = gtk_label_new (_("Start addr "));
   694   gtk_widget_show (label37);
   695   gtk_box_pack_start (GTK_BOX (hbox4), label37, FALSE, FALSE, 3);
   697   watch_start_addr = gtk_entry_new ();
   698   gtk_widget_show (watch_start_addr);
   699   gtk_box_pack_start (GTK_BOX (hbox4), watch_start_addr, FALSE, TRUE, 0);
   701   label38 = gtk_label_new (_("End addr"));
   702   gtk_widget_show (label38);
   703   gtk_box_pack_start (GTK_BOX (hbox4), label38, FALSE, FALSE, 3);
   705   watch_end_addr = gtk_entry_new ();
   706   gtk_widget_show (watch_end_addr);
   707   gtk_box_pack_start (GTK_BOX (hbox4), watch_end_addr, FALSE, TRUE, 0);
   709   label39 = gtk_label_new (_("Type"));
   710   gtk_widget_show (label39);
   711   gtk_box_pack_start (GTK_BOX (hbox4), label39, FALSE, FALSE, 3);
   713   combo1 = gtk_combo_new ();
   714   g_object_set_data (G_OBJECT (GTK_COMBO (combo1)->popwin),
   715                      "GladeParentKey", combo1);
   716   gtk_widget_show (combo1);
   717   gtk_box_pack_start (GTK_BOX (hbox4), combo1, TRUE, TRUE, 0);
   719   watch_type = GTK_COMBO (combo1)->entry;
   720   gtk_widget_show (watch_type);
   722   button_add_watch = gtk_button_new_with_mnemonic (_("Add Watch"));
   723   gtk_widget_show (button_add_watch);
   724   gtk_box_pack_start (GTK_BOX (hbox4), button_add_watch, FALSE, FALSE, 3);
   726   scrolledwindow10 = gtk_scrolled_window_new (NULL, NULL);
   727   gtk_widget_show (scrolledwindow10);
   728   gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow10, TRUE, TRUE, 0);
   730   treeview1 = gtk_tree_view_new ();
   731   gtk_widget_show (treeview1);
   732   gtk_container_add (GTK_CONTAINER (scrolledwindow10), treeview1);
   733   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview1), FALSE);
   735   hbox5 = gtk_hbox_new (FALSE, 0);
   736   gtk_widget_show (hbox5);
   737   gtk_box_pack_start (GTK_BOX (vbox4), hbox5, FALSE, TRUE, 3);
   739   label40 = gtk_label_new ("");
   740   gtk_widget_show (label40);
   741   gtk_box_pack_start (GTK_BOX (hbox5), label40, TRUE, TRUE, 0);
   743   button_clear_all = gtk_button_new_with_mnemonic (_("Clear all"));
   744   gtk_widget_show (button_clear_all);
   745   gtk_box_pack_start (GTK_BOX (hbox5), button_clear_all, FALSE, FALSE, 3);
   747   button_close = gtk_button_new_with_mnemonic (_("Close"));
   748   gtk_widget_show (button_close);
   749   gtk_box_pack_start (GTK_BOX (hbox5), button_close, FALSE, FALSE, 5);
   751   g_signal_connect ((gpointer) button_add_watch, "clicked",
   752                     G_CALLBACK (on_button_add_watch_clicked),
   753                     NULL);
   754   g_signal_connect ((gpointer) button_clear_all, "clicked",
   755                     G_CALLBACK (on_button_clear_all_clicked),
   756                     NULL);
   757   g_signal_connect ((gpointer) button_close, "clicked",
   758                     G_CALLBACK (on_button_close_clicked),
   759                     NULL);
   761   /* Store pointers to all widgets, for use by lookup_widget(). */
   762   GLADE_HOOKUP_OBJECT_NO_REF (watch_win, watch_win, "watch_win");
   763   GLADE_HOOKUP_OBJECT (watch_win, vbox4, "vbox4");
   764   GLADE_HOOKUP_OBJECT (watch_win, hbox4, "hbox4");
   765   GLADE_HOOKUP_OBJECT (watch_win, label37, "label37");
   766   GLADE_HOOKUP_OBJECT (watch_win, watch_start_addr, "watch_start_addr");
   767   GLADE_HOOKUP_OBJECT (watch_win, label38, "label38");
   768   GLADE_HOOKUP_OBJECT (watch_win, watch_end_addr, "watch_end_addr");
   769   GLADE_HOOKUP_OBJECT (watch_win, label39, "label39");
   770   GLADE_HOOKUP_OBJECT (watch_win, combo1, "combo1");
   771   GLADE_HOOKUP_OBJECT (watch_win, watch_type, "watch_type");
   772   GLADE_HOOKUP_OBJECT (watch_win, button_add_watch, "button_add_watch");
   773   GLADE_HOOKUP_OBJECT (watch_win, scrolledwindow10, "scrolledwindow10");
   774   GLADE_HOOKUP_OBJECT (watch_win, treeview1, "treeview1");
   775   GLADE_HOOKUP_OBJECT (watch_win, hbox5, "hbox5");
   776   GLADE_HOOKUP_OBJECT (watch_win, label40, "label40");
   777   GLADE_HOOKUP_OBJECT (watch_win, button_clear_all, "button_clear_all");
   778   GLADE_HOOKUP_OBJECT (watch_win, button_close, "button_close");
   780   return watch_win;
   781 }
.