Search
lxdream.org :: lxdream/src/gui/interface.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/interface.c
changeset 10:c898b37506e0
prev2:42349f6ea216
next18:9a1b5d75703f
author nkeynes
date Mon Dec 12 10:37:41 2005 +0000 (15 years ago)
permissions -rw-r--r--
last change Use cpu-specific is_valid_page function
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 *vpaned1;
   120   GtkWidget *hpaned1;
   121   GtkWidget *vbox2;
   122   GtkWidget *hbox1;
   123   GtkWidget *label21;
   124   GtkWidget *page_field;
   125   GtkWidget *page_locked_btn;
   126   GtkWidget *jump_pc_btn;
   127   GtkWidget *label22;
   128   GtkWidget *mode_box;
   129   GList *mode_box_items = NULL;
   130   GtkWidget *mode_field;
   131   GtkWidget *label23;
   132   GtkWidget *scrolledwindow7;
   133   GtkWidget *disasm_list;
   134   GtkWidget *label24;
   135   GtkWidget *label27;
   136   GtkWidget *label28;
   137   GtkWidget *label29;
   138   GtkWidget *scrolledwindow4;
   139   GtkWidget *reg_list;
   140   GtkWidget *label25;
   141   GtkWidget *label30;
   142   GtkWidget *scrolledwindow8;
   143   GtkWidget *output_list;
   144   GtkWidget *label26;
   145   GtkWidget *label31;
   146   GtkWidget *label32;
   147   GtkWidget *debug_appbar;
   148   GtkTooltips *tooltips;
   150   tooltips = gtk_tooltips_new ();
   152   debug_win = gnome_app_new ("Dream", _("DreamOn! Debugger"));
   153   gtk_window_set_default_size (GTK_WINDOW (debug_win), 1000, 700);
   155   dock1 = GNOME_APP (debug_win)->dock;
   156   gtk_widget_show (dock1);
   158   gnome_app_create_menus (GNOME_APP (debug_win), menubar1_uiinfo);
   160   toolbar1 = gtk_toolbar_new ();
   161   gtk_widget_show (toolbar1);
   162   gnome_app_add_toolbar (GNOME_APP (debug_win), GTK_TOOLBAR (toolbar1), "toolbar1",
   163                                 BONOBO_DOCK_ITEM_BEH_EXCLUSIVE,
   164                                 BONOBO_DOCK_TOP, 1, 0, 0);
   165   gtk_container_set_border_width (GTK_CONTAINER (toolbar1), 1);
   166   gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
   167   tmp_toolbar_icon_size = gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1));
   169   tmp_image = gtk_image_new_from_stock ("gtk-open", tmp_toolbar_icon_size);
   170   gtk_widget_show (tmp_image);
   171   load_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Load"));
   172   gtk_widget_show (load_btn);
   173   gtk_container_add (GTK_CONTAINER (toolbar1), load_btn);
   174   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (load_btn), tooltips, _("New File"), NULL);
   176   tmp_image = gtk_image_new_from_stock ("gtk-refresh", tmp_toolbar_icon_size);
   177   gtk_widget_show (tmp_image);
   178   reset_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Reset"));
   179   gtk_widget_show (reset_btn);
   180   gtk_container_add (GTK_CONTAINER (toolbar1), reset_btn);
   181   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (reset_btn), tooltips, _("Open File"), NULL);
   183   tmp_image = gtk_image_new_from_stock ("gtk-stop", tmp_toolbar_icon_size);
   184   gtk_widget_show (tmp_image);
   185   stop_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Stop"));
   186   gtk_widget_show (stop_btn);
   187   gtk_container_add (GTK_CONTAINER (toolbar1), stop_btn);
   188   gtk_tool_item_set_tooltip (GTK_TOOL_ITEM (stop_btn), tooltips, _("Save File"), NULL);
   190   tmp_image = gtk_image_new_from_stock ("gtk-redo", tmp_toolbar_icon_size);
   191   gtk_widget_show (tmp_image);
   192   step_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Step"));
   193   gtk_widget_show (step_btn);
   194   gtk_container_add (GTK_CONTAINER (toolbar1), step_btn);
   196   tmp_image = gtk_image_new_from_stock ("gtk-go-forward", tmp_toolbar_icon_size);
   197   gtk_widget_show (tmp_image);
   198   run_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run"));
   199   gtk_widget_show (run_btn);
   200   gtk_container_add (GTK_CONTAINER (toolbar1), run_btn);
   202   tmp_image = gtk_image_new_from_stock ("gtk-goto-last", tmp_toolbar_icon_size);
   203   gtk_widget_show (tmp_image);
   204   runto_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Run to"));
   205   gtk_widget_show (runto_btn);
   206   gtk_container_add (GTK_CONTAINER (toolbar1), runto_btn);
   208   tmp_image = gtk_image_new_from_stock ("gtk-close", tmp_toolbar_icon_size);
   209   gtk_widget_show (tmp_image);
   210   break_btn = (GtkWidget*) gtk_tool_button_new (tmp_image, _("Break"));
   211   gtk_widget_show (break_btn);
   212   gtk_container_add (GTK_CONTAINER (toolbar1), break_btn);
   214   vpaned1 = gtk_vpaned_new ();
   215   gtk_widget_show (vpaned1);
   216   gnome_app_set_contents (GNOME_APP (debug_win), vpaned1);
   217   gtk_paned_set_position (GTK_PANED (vpaned1), 430);
   219   hpaned1 = gtk_hpaned_new ();
   220   gtk_widget_show (hpaned1);
   221   gtk_paned_pack1 (GTK_PANED (vpaned1), hpaned1, TRUE, TRUE);
   222   gtk_paned_set_position (GTK_PANED (hpaned1), 800);
   224   vbox2 = gtk_vbox_new (FALSE, 0);
   225   gtk_widget_show (vbox2);
   226   gtk_paned_pack1 (GTK_PANED (hpaned1), vbox2, FALSE, TRUE);
   228   hbox1 = gtk_hbox_new (FALSE, 0);
   229   gtk_widget_show (hbox1);
   230   gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 3);
   232   label21 = gtk_label_new (_("Page"));
   233   gtk_widget_show (label21);
   234   gtk_box_pack_start (GTK_BOX (hbox1), label21, FALSE, FALSE, 4);
   235   gtk_label_set_justify (GTK_LABEL (label21), GTK_JUSTIFY_CENTER);
   237   page_field = gtk_entry_new ();
   238   gtk_widget_show (page_field);
   239   gtk_box_pack_start (GTK_BOX (hbox1), page_field, FALSE, TRUE, 0);
   241   page_locked_btn = gtk_check_button_new_with_mnemonic (_("Locked"));
   242   gtk_widget_show (page_locked_btn);
   243   gtk_box_pack_start (GTK_BOX (hbox1), page_locked_btn, FALSE, FALSE, 5);
   245   jump_pc_btn = gtk_button_new_with_mnemonic (_(" Jump to PC "));
   246   gtk_widget_show (jump_pc_btn);
   247   gtk_box_pack_start (GTK_BOX (hbox1), jump_pc_btn, FALSE, FALSE, 4);
   249   label22 = gtk_label_new (_("Mode"));
   250   gtk_widget_show (label22);
   251   gtk_box_pack_start (GTK_BOX (hbox1), label22, FALSE, FALSE, 5);
   252   gtk_label_set_justify (GTK_LABEL (label22), GTK_JUSTIFY_RIGHT);
   253   gtk_misc_set_alignment (GTK_MISC (label22), 1, 0.5);
   255   mode_box = gtk_combo_new ();
   256   g_object_set_data (G_OBJECT (GTK_COMBO (mode_box)->popwin),
   257                      "GladeParentKey", mode_box);
   258   gtk_widget_show (mode_box);
   259   gtk_box_pack_start (GTK_BOX (hbox1), mode_box, FALSE, FALSE, 0);
   260   mode_box_items = g_list_append (mode_box_items, (gpointer) _("SH4"));
   261   mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7"));
   262   mode_box_items = g_list_append (mode_box_items, (gpointer) _("ARM7T"));
   263   gtk_combo_set_popdown_strings (GTK_COMBO (mode_box), mode_box_items);
   264   g_list_free (mode_box_items);
   266   mode_field = GTK_COMBO (mode_box)->entry;
   267   gtk_widget_show (mode_field);
   268   gtk_editable_set_editable (GTK_EDITABLE (mode_field), FALSE);
   269   gtk_entry_set_text (GTK_ENTRY (mode_field), _("SH4"));
   271   label23 = gtk_label_new ("");
   272   gtk_widget_show (label23);
   273   gtk_box_pack_start (GTK_BOX (hbox1), label23, TRUE, TRUE, 4);
   274   gtk_label_set_justify (GTK_LABEL (label23), GTK_JUSTIFY_CENTER);
   276   scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
   277   gtk_widget_show (scrolledwindow7);
   278   gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow7, TRUE, TRUE, 0);
   279   GTK_WIDGET_UNSET_FLAGS (scrolledwindow7, GTK_CAN_FOCUS);
   280   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN);
   282   disasm_list = gtk_clist_new (4);
   283   gtk_widget_show (disasm_list);
   284   gtk_container_add (GTK_CONTAINER (scrolledwindow7), disasm_list);
   285   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 0, 80);
   286   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 1, 80);
   287   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 2, 80);
   288   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 3, 80);
   289   gtk_clist_column_titles_hide (GTK_CLIST (disasm_list));
   291   label24 = gtk_label_new ("");
   292   gtk_widget_show (label24);
   293   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 0, label24);
   295   label27 = gtk_label_new ("");
   296   gtk_widget_show (label27);
   297   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 1, label27);
   299   label28 = gtk_label_new ("");
   300   gtk_widget_show (label28);
   301   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 2, label28);
   303   label29 = gtk_label_new ("");
   304   gtk_widget_show (label29);
   305   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 3, label29);
   307   scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
   308   gtk_widget_show (scrolledwindow4);
   309   gtk_paned_pack2 (GTK_PANED (hpaned1), scrolledwindow4, FALSE, TRUE);
   310   GTK_WIDGET_UNSET_FLAGS (scrolledwindow4, GTK_CAN_FOCUS);
   311   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
   312   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
   314   reg_list = gtk_clist_new (2);
   315   gtk_widget_show (reg_list);
   316   gtk_container_add (GTK_CONTAINER (scrolledwindow4), reg_list);
   317   gtk_clist_set_column_width (GTK_CLIST (reg_list), 0, 80);
   318   gtk_clist_set_column_width (GTK_CLIST (reg_list), 1, 80);
   319   gtk_clist_column_titles_hide (GTK_CLIST (reg_list));
   321   label25 = gtk_label_new ("");
   322   gtk_widget_show (label25);
   323   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 0, label25);
   325   label30 = gtk_label_new ("");
   326   gtk_widget_show (label30);
   327   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 1, label30);
   329   scrolledwindow8 = gtk_scrolled_window_new (NULL, NULL);
   330   gtk_widget_show (scrolledwindow8);
   331   gtk_paned_pack2 (GTK_PANED (vpaned1), scrolledwindow8, FALSE, TRUE);
   332   GTK_WIDGET_UNSET_FLAGS (scrolledwindow8, GTK_CAN_FOCUS);
   333   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
   334   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_SHADOW_IN);
   336   output_list = gtk_clist_new (3);
   337   gtk_widget_show (output_list);
   338   gtk_container_add (GTK_CONTAINER (scrolledwindow8), output_list);
   339   gtk_clist_set_column_width (GTK_CLIST (output_list), 0, 80);
   340   gtk_clist_set_column_width (GTK_CLIST (output_list), 1, 80);
   341   gtk_clist_set_column_width (GTK_CLIST (output_list), 2, 80);
   342   gtk_clist_column_titles_hide (GTK_CLIST (output_list));
   344   label26 = gtk_label_new ("");
   345   gtk_widget_show (label26);
   346   gtk_clist_set_column_widget (GTK_CLIST (output_list), 0, label26);
   348   label31 = gtk_label_new ("");
   349   gtk_widget_show (label31);
   350   gtk_clist_set_column_widget (GTK_CLIST (output_list), 1, label31);
   352   label32 = gtk_label_new ("");
   353   gtk_widget_show (label32);
   354   gtk_clist_set_column_widget (GTK_CLIST (output_list), 2, label32);
   356   debug_appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
   357   gtk_widget_show (debug_appbar);
   358   gnome_app_set_statusbar (GNOME_APP (debug_win), debug_appbar);
   360   g_signal_connect ((gpointer) debug_win, "delete_event",
   361                     G_CALLBACK (on_debug_win_delete_event),
   362                     NULL);
   363   gnome_app_install_menu_hints (GNOME_APP (debug_win), menubar1_uiinfo);
   364   g_signal_connect ((gpointer) load_btn, "clicked",
   365                     G_CALLBACK (on_load_btn_clicked),
   366                     NULL);
   367   g_signal_connect ((gpointer) reset_btn, "clicked",
   368                     G_CALLBACK (on_reset_btn_clicked),
   369                     NULL);
   370   g_signal_connect ((gpointer) stop_btn, "clicked",
   371                     G_CALLBACK (on_stop_btn_clicked),
   372                     NULL);
   373   g_signal_connect ((gpointer) step_btn, "clicked",
   374                     G_CALLBACK (on_step_btn_clicked),
   375                     NULL);
   376   g_signal_connect ((gpointer) run_btn, "clicked",
   377                     G_CALLBACK (on_run_btn_clicked),
   378                     NULL);
   379   g_signal_connect ((gpointer) runto_btn, "clicked",
   380                     G_CALLBACK (on_runto_btn_clicked),
   381                     NULL);
   382   g_signal_connect ((gpointer) break_btn, "clicked",
   383                     G_CALLBACK (on_break_btn_clicked),
   384                     NULL);
   385   g_signal_connect ((gpointer) page_field, "key_press_event",
   386                     G_CALLBACK (on_page_field_key_press_event),
   387                     NULL);
   388   g_signal_connect ((gpointer) page_locked_btn, "toggled",
   389                     G_CALLBACK (on_page_locked_btn_toggled),
   390                     NULL);
   391   g_signal_connect ((gpointer) jump_pc_btn, "clicked",
   392                     G_CALLBACK (on_jump_pc_btn_clicked),
   393                     NULL);
   394   g_signal_connect ((gpointer) mode_field, "changed",
   395                     G_CALLBACK (on_mode_field_changed),
   396                     NULL);
   397   g_signal_connect ((gpointer) disasm_list, "select_row",
   398                     G_CALLBACK (on_disasm_list_select_row),
   399                     NULL);
   400   g_signal_connect ((gpointer) disasm_list, "unselect_row",
   401                     G_CALLBACK (on_disasm_list_unselect_row),
   402                     NULL);
   403   g_signal_connect ((gpointer) output_list, "select_row",
   404                     G_CALLBACK (on_output_list_select_row),
   405                     NULL);
   407   /* Store pointers to all widgets, for use by lookup_widget(). */
   408   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, debug_win, "debug_win");
   409   GLADE_HOOKUP_OBJECT (debug_win, dock1, "dock1");
   410   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[0].widget, "file1");
   411   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[0].widget, "new_file1");
   412   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[1].widget, "open1");
   413   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[2].widget, "save1");
   414   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[3].widget, "save_as1");
   415   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[4].widget, "separator1");
   416   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[5].widget, "exit1");
   417   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[1].widget, "view1");
   418   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[0].widget, "view_memory");
   419   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[1].widget, "mem_mapped_regs1");
   420   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[2].widget, "settings1");
   421   GLADE_HOOKUP_OBJECT (debug_win, settings1_menu_uiinfo[0].widget, "preferences1");
   422   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[3].widget, "help1");
   423   GLADE_HOOKUP_OBJECT (debug_win, help1_menu_uiinfo[0].widget, "about1");
   424   GLADE_HOOKUP_OBJECT (debug_win, toolbar1, "toolbar1");
   425   GLADE_HOOKUP_OBJECT (debug_win, load_btn, "load_btn");
   426   GLADE_HOOKUP_OBJECT (debug_win, reset_btn, "reset_btn");
   427   GLADE_HOOKUP_OBJECT (debug_win, stop_btn, "stop_btn");
   428   GLADE_HOOKUP_OBJECT (debug_win, step_btn, "step_btn");
   429   GLADE_HOOKUP_OBJECT (debug_win, run_btn, "run_btn");
   430   GLADE_HOOKUP_OBJECT (debug_win, runto_btn, "runto_btn");
   431   GLADE_HOOKUP_OBJECT (debug_win, break_btn, "break_btn");
   432   GLADE_HOOKUP_OBJECT (debug_win, vpaned1, "vpaned1");
   433   GLADE_HOOKUP_OBJECT (debug_win, hpaned1, "hpaned1");
   434   GLADE_HOOKUP_OBJECT (debug_win, vbox2, "vbox2");
   435   GLADE_HOOKUP_OBJECT (debug_win, hbox1, "hbox1");
   436   GLADE_HOOKUP_OBJECT (debug_win, label21, "label21");
   437   GLADE_HOOKUP_OBJECT (debug_win, page_field, "page_field");
   438   GLADE_HOOKUP_OBJECT (debug_win, page_locked_btn, "page_locked_btn");
   439   GLADE_HOOKUP_OBJECT (debug_win, jump_pc_btn, "jump_pc_btn");
   440   GLADE_HOOKUP_OBJECT (debug_win, label22, "label22");
   441   GLADE_HOOKUP_OBJECT (debug_win, mode_box, "mode_box");
   442   GLADE_HOOKUP_OBJECT (debug_win, mode_field, "mode_field");
   443   GLADE_HOOKUP_OBJECT (debug_win, label23, "label23");
   444   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow7, "scrolledwindow7");
   445   GLADE_HOOKUP_OBJECT (debug_win, disasm_list, "disasm_list");
   446   GLADE_HOOKUP_OBJECT (debug_win, label24, "label24");
   447   GLADE_HOOKUP_OBJECT (debug_win, label27, "label27");
   448   GLADE_HOOKUP_OBJECT (debug_win, label28, "label28");
   449   GLADE_HOOKUP_OBJECT (debug_win, label29, "label29");
   450   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow4, "scrolledwindow4");
   451   GLADE_HOOKUP_OBJECT (debug_win, reg_list, "reg_list");
   452   GLADE_HOOKUP_OBJECT (debug_win, label25, "label25");
   453   GLADE_HOOKUP_OBJECT (debug_win, label30, "label30");
   454   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow8, "scrolledwindow8");
   455   GLADE_HOOKUP_OBJECT (debug_win, output_list, "output_list");
   456   GLADE_HOOKUP_OBJECT (debug_win, label26, "label26");
   457   GLADE_HOOKUP_OBJECT (debug_win, label31, "label31");
   458   GLADE_HOOKUP_OBJECT (debug_win, label32, "label32");
   459   GLADE_HOOKUP_OBJECT (debug_win, debug_appbar, "debug_appbar");
   460   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, tooltips, "tooltips");
   462   return debug_win;
   463 }
   465 GtkWidget*
   466 create_mmr_win (void)
   467 {
   468   GtkWidget *mmr_win;
   469   GtkWidget *vbox1;
   470   GtkWidget *mmr_notebook;
   471   GtkWidget *empty_notebook_page;
   472   GtkWidget *label16;
   473   GtkWidget *hbuttonbox1;
   474   GtkWidget *mmr_close;
   476   mmr_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   477   gtk_window_set_title (GTK_WINDOW (mmr_win), _("DreamOn! - Memory-Mapped Registers"));
   478   gtk_window_set_default_size (GTK_WINDOW (mmr_win), 600, 600);
   480   vbox1 = gtk_vbox_new (FALSE, 0);
   481   gtk_widget_show (vbox1);
   482   gtk_container_add (GTK_CONTAINER (mmr_win), vbox1);
   484   mmr_notebook = gtk_notebook_new ();
   485   gtk_widget_show (mmr_notebook);
   486   gtk_box_pack_start (GTK_BOX (vbox1), mmr_notebook, TRUE, TRUE, 0);
   487   gtk_notebook_set_tab_pos (GTK_NOTEBOOK (mmr_notebook), GTK_POS_LEFT);
   489   empty_notebook_page = gtk_vbox_new (FALSE, 0);
   490   gtk_widget_show (empty_notebook_page);
   491   gtk_container_add (GTK_CONTAINER (mmr_notebook), empty_notebook_page);
   493   label16 = gtk_label_new (_("label16"));
   494   gtk_widget_show (label16);
   495   gtk_notebook_set_tab_label (GTK_NOTEBOOK (mmr_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (mmr_notebook), 0), label16);
   496   gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_CENTER);
   498   hbuttonbox1 = gtk_hbutton_box_new ();
   499   gtk_widget_show (hbuttonbox1);
   500   gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
   501   gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
   503   mmr_close = gtk_button_new_with_mnemonic (_("Close"));
   504   gtk_widget_show (mmr_close);
   505   gtk_container_add (GTK_CONTAINER (hbuttonbox1), mmr_close);
   506   GTK_WIDGET_SET_FLAGS (mmr_close, GTK_CAN_DEFAULT);
   508   g_signal_connect ((gpointer) mmr_win, "delete_event",
   509                     G_CALLBACK (on_mmr_win_delete_event),
   510                     NULL);
   511   g_signal_connect ((gpointer) mmr_close, "clicked",
   512                     G_CALLBACK (on_mmr_close_clicked),
   513                     NULL);
   515   /* Store pointers to all widgets, for use by lookup_widget(). */
   516   GLADE_HOOKUP_OBJECT_NO_REF (mmr_win, mmr_win, "mmr_win");
   517   GLADE_HOOKUP_OBJECT (mmr_win, vbox1, "vbox1");
   518   GLADE_HOOKUP_OBJECT (mmr_win, mmr_notebook, "mmr_notebook");
   519   GLADE_HOOKUP_OBJECT (mmr_win, label16, "label16");
   520   GLADE_HOOKUP_OBJECT (mmr_win, hbuttonbox1, "hbuttonbox1");
   521   GLADE_HOOKUP_OBJECT (mmr_win, mmr_close, "mmr_close");
   523   return mmr_win;
   524 }
   526 GtkWidget*
   527 create_about_win (void)
   528 {
   529   const gchar *authors[] = {
   530     "Nathan Keynes",
   531     NULL
   532   };
   533   const gchar *documenters[] = { NULL };
   534   /* TRANSLATORS: Replace this string with your names, one name per line. */
   535   gchar *translators = _("translator_credits");
   536   GdkPixbuf *about_win_logo_pixbuf;
   537   GtkWidget *about_win;
   539   if (!strcmp (translators, "translator_credits"))
   540     translators = NULL;
   541   about_win_logo_pixbuf = create_pixbuf ("dream/dcemu.gif");
   542   about_win = gnome_about_new ("Dream", VERSION,
   543                         _("Copyright(c) 2002 Nathan Keynes"),
   544                         "",
   545                         authors,
   546                         documenters,
   547                         translators,
   548                         about_win_logo_pixbuf);
   549   gtk_container_set_border_width (GTK_CONTAINER (about_win), 1);
   550   gtk_window_set_type_hint (GTK_WINDOW (about_win), GDK_WINDOW_TYPE_HINT_DIALOG);
   552   /* Store pointers to all widgets, for use by lookup_widget(). */
   553   GLADE_HOOKUP_OBJECT_NO_REF (about_win, about_win, "about_win");
   555   return about_win;
   556 }
   558 GtkWidget*
   559 create_dump_win (void)
   560 {
   561   GtkWidget *dump_win;
   562   GtkWidget *vbox3;
   563   GtkWidget *hbox2;
   564   GtkWidget *label34;
   565   GtkWidget *dump_from;
   566   GtkWidget *label35;
   567   GtkWidget *dump_to;
   568   GtkWidget *dump_view_button;
   569   GtkWidget *label36;
   570   GtkWidget *scrolledwindow9;
   571   GtkWidget *dump_text;
   573   dump_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   574   gtk_window_set_title (GTK_WINDOW (dump_win), _("Memory dump"));
   576   vbox3 = gtk_vbox_new (FALSE, 0);
   577   gtk_widget_show (vbox3);
   578   gtk_container_add (GTK_CONTAINER (dump_win), vbox3);
   580   hbox2 = gtk_hbox_new (FALSE, 0);
   581   gtk_widget_show (hbox2);
   582   gtk_box_pack_start (GTK_BOX (vbox3), hbox2, FALSE, TRUE, 3);
   584   label34 = gtk_label_new (_(" From "));
   585   gtk_widget_show (label34);
   586   gtk_box_pack_start (GTK_BOX (hbox2), label34, FALSE, FALSE, 0);
   588   dump_from = gtk_entry_new ();
   589   gtk_widget_show (dump_from);
   590   gtk_box_pack_start (GTK_BOX (hbox2), dump_from, FALSE, TRUE, 0);
   592   label35 = gtk_label_new (_(" To "));
   593   gtk_widget_show (label35);
   594   gtk_box_pack_start (GTK_BOX (hbox2), label35, FALSE, FALSE, 0);
   596   dump_to = gtk_entry_new ();
   597   gtk_widget_show (dump_to);
   598   gtk_box_pack_start (GTK_BOX (hbox2), dump_to, FALSE, TRUE, 0);
   600   dump_view_button = gtk_button_new_with_mnemonic (_("View"));
   601   gtk_widget_show (dump_view_button);
   602   gtk_box_pack_start (GTK_BOX (hbox2), dump_view_button, FALSE, FALSE, 0);
   604   label36 = gtk_label_new (_("   "));
   605   gtk_widget_show (label36);
   606   gtk_box_pack_start (GTK_BOX (hbox2), label36, TRUE, TRUE, 0);
   608   scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL);
   609   gtk_widget_show (scrolledwindow9);
   610   gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow9, TRUE, TRUE, 0);
   611   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN);
   613   dump_text = gtk_text_view_new ();
   614   gtk_widget_show (dump_text);
   615   gtk_container_add (GTK_CONTAINER (scrolledwindow9), dump_text);
   617   /* Store pointers to all widgets, for use by lookup_widget(). */
   618   GLADE_HOOKUP_OBJECT_NO_REF (dump_win, dump_win, "dump_win");
   619   GLADE_HOOKUP_OBJECT (dump_win, vbox3, "vbox3");
   620   GLADE_HOOKUP_OBJECT (dump_win, hbox2, "hbox2");
   621   GLADE_HOOKUP_OBJECT (dump_win, label34, "label34");
   622   GLADE_HOOKUP_OBJECT (dump_win, dump_from, "dump_from");
   623   GLADE_HOOKUP_OBJECT (dump_win, label35, "label35");
   624   GLADE_HOOKUP_OBJECT (dump_win, dump_to, "dump_to");
   625   GLADE_HOOKUP_OBJECT (dump_win, dump_view_button, "dump_view_button");
   626   GLADE_HOOKUP_OBJECT (dump_win, label36, "label36");
   627   GLADE_HOOKUP_OBJECT (dump_win, scrolledwindow9, "scrolledwindow9");
   628   GLADE_HOOKUP_OBJECT (dump_win, dump_text, "dump_text");
   630   return dump_win;
   631 }
   633 GtkWidget*
   634 create_watch_win (void)
   635 {
   636   GtkWidget *watch_win;
   637   GtkWidget *vbox4;
   638   GtkWidget *hbox4;
   639   GtkWidget *label37;
   640   GtkWidget *watch_start_addr;
   641   GtkWidget *label38;
   642   GtkWidget *watch_end_addr;
   643   GtkWidget *label39;
   644   GtkWidget *combo1;
   645   GtkWidget *watch_type;
   646   GtkWidget *button_add_watch;
   647   GtkWidget *scrolledwindow10;
   648   GtkWidget *treeview1;
   649   GtkWidget *hbox5;
   650   GtkWidget *label40;
   651   GtkWidget *button_clear_all;
   652   GtkWidget *button_close;
   654   watch_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   655   gtk_window_set_title (GTK_WINDOW (watch_win), _("Watchpoints"));
   657   vbox4 = gtk_vbox_new (FALSE, 0);
   658   gtk_widget_show (vbox4);
   659   gtk_container_add (GTK_CONTAINER (watch_win), vbox4);
   661   hbox4 = gtk_hbox_new (FALSE, 0);
   662   gtk_widget_show (hbox4);
   663   gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, TRUE, 3);
   665   label37 = gtk_label_new (_("Start addr "));
   666   gtk_widget_show (label37);
   667   gtk_box_pack_start (GTK_BOX (hbox4), label37, FALSE, FALSE, 3);
   669   watch_start_addr = gtk_entry_new ();
   670   gtk_widget_show (watch_start_addr);
   671   gtk_box_pack_start (GTK_BOX (hbox4), watch_start_addr, FALSE, TRUE, 0);
   673   label38 = gtk_label_new (_("End addr"));
   674   gtk_widget_show (label38);
   675   gtk_box_pack_start (GTK_BOX (hbox4), label38, FALSE, FALSE, 3);
   677   watch_end_addr = gtk_entry_new ();
   678   gtk_widget_show (watch_end_addr);
   679   gtk_box_pack_start (GTK_BOX (hbox4), watch_end_addr, FALSE, TRUE, 0);
   681   label39 = gtk_label_new (_("Type"));
   682   gtk_widget_show (label39);
   683   gtk_box_pack_start (GTK_BOX (hbox4), label39, FALSE, FALSE, 3);
   685   combo1 = gtk_combo_new ();
   686   g_object_set_data (G_OBJECT (GTK_COMBO (combo1)->popwin),
   687                      "GladeParentKey", combo1);
   688   gtk_widget_show (combo1);
   689   gtk_box_pack_start (GTK_BOX (hbox4), combo1, TRUE, TRUE, 0);
   691   watch_type = GTK_COMBO (combo1)->entry;
   692   gtk_widget_show (watch_type);
   694   button_add_watch = gtk_button_new_with_mnemonic (_("Add Watch"));
   695   gtk_widget_show (button_add_watch);
   696   gtk_box_pack_start (GTK_BOX (hbox4), button_add_watch, FALSE, FALSE, 3);
   698   scrolledwindow10 = gtk_scrolled_window_new (NULL, NULL);
   699   gtk_widget_show (scrolledwindow10);
   700   gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow10, TRUE, TRUE, 0);
   702   treeview1 = gtk_tree_view_new ();
   703   gtk_widget_show (treeview1);
   704   gtk_container_add (GTK_CONTAINER (scrolledwindow10), treeview1);
   705   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview1), FALSE);
   707   hbox5 = gtk_hbox_new (FALSE, 0);
   708   gtk_widget_show (hbox5);
   709   gtk_box_pack_start (GTK_BOX (vbox4), hbox5, FALSE, TRUE, 3);
   711   label40 = gtk_label_new ("");
   712   gtk_widget_show (label40);
   713   gtk_box_pack_start (GTK_BOX (hbox5), label40, TRUE, TRUE, 0);
   715   button_clear_all = gtk_button_new_with_mnemonic (_("Clear all"));
   716   gtk_widget_show (button_clear_all);
   717   gtk_box_pack_start (GTK_BOX (hbox5), button_clear_all, FALSE, FALSE, 3);
   719   button_close = gtk_button_new_with_mnemonic (_("Close"));
   720   gtk_widget_show (button_close);
   721   gtk_box_pack_start (GTK_BOX (hbox5), button_close, FALSE, FALSE, 5);
   723   g_signal_connect ((gpointer) button_add_watch, "clicked",
   724                     G_CALLBACK (on_button_add_watch_clicked),
   725                     NULL);
   726   g_signal_connect ((gpointer) button_clear_all, "clicked",
   727                     G_CALLBACK (on_button_clear_all_clicked),
   728                     NULL);
   729   g_signal_connect ((gpointer) button_close, "clicked",
   730                     G_CALLBACK (on_button_close_clicked),
   731                     NULL);
   733   /* Store pointers to all widgets, for use by lookup_widget(). */
   734   GLADE_HOOKUP_OBJECT_NO_REF (watch_win, watch_win, "watch_win");
   735   GLADE_HOOKUP_OBJECT (watch_win, vbox4, "vbox4");
   736   GLADE_HOOKUP_OBJECT (watch_win, hbox4, "hbox4");
   737   GLADE_HOOKUP_OBJECT (watch_win, label37, "label37");
   738   GLADE_HOOKUP_OBJECT (watch_win, watch_start_addr, "watch_start_addr");
   739   GLADE_HOOKUP_OBJECT (watch_win, label38, "label38");
   740   GLADE_HOOKUP_OBJECT (watch_win, watch_end_addr, "watch_end_addr");
   741   GLADE_HOOKUP_OBJECT (watch_win, label39, "label39");
   742   GLADE_HOOKUP_OBJECT (watch_win, combo1, "combo1");
   743   GLADE_HOOKUP_OBJECT (watch_win, watch_type, "watch_type");
   744   GLADE_HOOKUP_OBJECT (watch_win, button_add_watch, "button_add_watch");
   745   GLADE_HOOKUP_OBJECT (watch_win, scrolledwindow10, "scrolledwindow10");
   746   GLADE_HOOKUP_OBJECT (watch_win, treeview1, "treeview1");
   747   GLADE_HOOKUP_OBJECT (watch_win, hbox5, "hbox5");
   748   GLADE_HOOKUP_OBJECT (watch_win, label40, "label40");
   749   GLADE_HOOKUP_OBJECT (watch_win, button_clear_all, "button_clear_all");
   750   GLADE_HOOKUP_OBJECT (watch_win, button_close, "button_close");
   752   return watch_win;
   753 }
.