Search
lxdream.org :: lxdream/src/gui/interface.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/interface.c
changeset 2:42349f6ea216
prev1:eea311cfd33e
next10:c898b37506e0
author nkeynes
date Sat Oct 02 05:49:39 2004 +0000 (17 years ago)
permissions -rw-r--r--
last change compile fix
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   GtkWidget *tmp_toolbar_icon;
   111   GtkWidget *load_btn;
   112   GtkWidget *reset_btn;
   113   GtkWidget *stop_btn;
   114   GtkWidget *step_btn;
   115   GtkWidget *run_btn;
   116   GtkWidget *runto_btn;
   117   GtkWidget *break_btn;
   118   GtkWidget *vpaned1;
   119   GtkWidget *hpaned1;
   120   GtkWidget *vbox2;
   121   GtkWidget *hbox1;
   122   GtkWidget *label21;
   123   GtkWidget *page_field;
   124   GtkWidget *page_locked_btn;
   125   GtkWidget *jump_pc_btn;
   126   GtkWidget *label22;
   127   GtkWidget *mode_box;
   128   GList *mode_box_items = NULL;
   129   GtkWidget *mode_field;
   130   GtkWidget *label23;
   131   GtkWidget *scrolledwindow7;
   132   GtkWidget *disasm_list;
   133   GtkWidget *label24;
   134   GtkWidget *label27;
   135   GtkWidget *label28;
   136   GtkWidget *label29;
   137   GtkWidget *scrolledwindow4;
   138   GtkWidget *reg_list;
   139   GtkWidget *label25;
   140   GtkWidget *label30;
   141   GtkWidget *scrolledwindow8;
   142   GtkWidget *output_list;
   143   GtkWidget *label26;
   144   GtkWidget *label31;
   145   GtkWidget *label32;
   146   GtkWidget *debug_appbar;
   148   debug_win = gnome_app_new ("Dream2", _("DreamOn! Debugger"));
   149   gtk_window_set_default_size (GTK_WINDOW (debug_win), 1000, 700);
   151   dock1 = GNOME_APP (debug_win)->dock;
   152   gtk_widget_show (dock1);
   154   gnome_app_create_menus (GNOME_APP (debug_win), menubar1_uiinfo);
   156   toolbar1 = gtk_toolbar_new ();
   157   gtk_widget_show (toolbar1);
   158   gnome_app_add_toolbar (GNOME_APP (debug_win), GTK_TOOLBAR (toolbar1), "toolbar1",
   159                                 BONOBO_DOCK_ITEM_BEH_EXCLUSIVE,
   160                                 BONOBO_DOCK_TOP, 1, 0, 0);
   161   gtk_container_set_border_width (GTK_CONTAINER (toolbar1), 1);
   162   gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
   164   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-open", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   165   load_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   166                                 GTK_TOOLBAR_CHILD_BUTTON,
   167                                 NULL,
   168                                 _("Load"),
   169                                 _("New File"), NULL,
   170                                 tmp_toolbar_icon, NULL, NULL);
   171   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   172   gtk_widget_show (load_btn);
   174   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-refresh", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   175   reset_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   176                                 GTK_TOOLBAR_CHILD_BUTTON,
   177                                 NULL,
   178                                 _("Reset"),
   179                                 _("Open File"), NULL,
   180                                 tmp_toolbar_icon, NULL, NULL);
   181   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   182   gtk_widget_show (reset_btn);
   184   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-stop", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   185   stop_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   186                                 GTK_TOOLBAR_CHILD_BUTTON,
   187                                 NULL,
   188                                 _("Stop"),
   189                                 _("Save File"), NULL,
   190                                 tmp_toolbar_icon, NULL, NULL);
   191   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   192   gtk_widget_show (stop_btn);
   194   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-redo", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   195   step_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   196                                 GTK_TOOLBAR_CHILD_BUTTON,
   197                                 NULL,
   198                                 _("Step"),
   199                                 NULL, NULL,
   200                                 tmp_toolbar_icon, NULL, NULL);
   201   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   202   gtk_widget_show (step_btn);
   204   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-go-forward", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   205   run_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   206                                 GTK_TOOLBAR_CHILD_BUTTON,
   207                                 NULL,
   208                                 _("Run"),
   209                                 NULL, NULL,
   210                                 tmp_toolbar_icon, NULL, NULL);
   211   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   212   gtk_widget_show (run_btn);
   214   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-goto-last", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   215   runto_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   216                                 GTK_TOOLBAR_CHILD_BUTTON,
   217                                 NULL,
   218                                 _("Run to"),
   219                                 NULL, NULL,
   220                                 tmp_toolbar_icon, NULL, NULL);
   221   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   222   gtk_widget_show (runto_btn);
   224   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-close", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   225   break_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   226                                 GTK_TOOLBAR_CHILD_BUTTON,
   227                                 NULL,
   228                                 _("Break"),
   229                                 NULL, NULL,
   230                                 tmp_toolbar_icon, NULL, NULL);
   231   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   232   gtk_widget_show (break_btn);
   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) "");
   281   gtk_combo_set_popdown_strings (GTK_COMBO (mode_box), mode_box_items);
   282   g_list_free (mode_box_items);
   284   mode_field = GTK_COMBO (mode_box)->entry;
   285   gtk_widget_show (mode_field);
   287   label23 = gtk_label_new ("");
   288   gtk_widget_show (label23);
   289   gtk_box_pack_start (GTK_BOX (hbox1), label23, TRUE, TRUE, 4);
   290   gtk_label_set_justify (GTK_LABEL (label23), GTK_JUSTIFY_CENTER);
   292   scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
   293   gtk_widget_show (scrolledwindow7);
   294   gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow7, TRUE, TRUE, 0);
   295   GTK_WIDGET_UNSET_FLAGS (scrolledwindow7, GTK_CAN_FOCUS);
   296   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN);
   298   disasm_list = gtk_clist_new (4);
   299   gtk_widget_show (disasm_list);
   300   gtk_container_add (GTK_CONTAINER (scrolledwindow7), disasm_list);
   301   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 0, 80);
   302   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 1, 80);
   303   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 2, 80);
   304   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 3, 80);
   305   gtk_clist_column_titles_hide (GTK_CLIST (disasm_list));
   307   label24 = gtk_label_new ("");
   308   gtk_widget_show (label24);
   309   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 0, label24);
   311   label27 = gtk_label_new ("");
   312   gtk_widget_show (label27);
   313   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 1, label27);
   315   label28 = gtk_label_new ("");
   316   gtk_widget_show (label28);
   317   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 2, label28);
   319   label29 = gtk_label_new ("");
   320   gtk_widget_show (label29);
   321   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 3, label29);
   323   scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
   324   gtk_widget_show (scrolledwindow4);
   325   gtk_paned_pack2 (GTK_PANED (hpaned1), scrolledwindow4, FALSE, TRUE);
   326   GTK_WIDGET_UNSET_FLAGS (scrolledwindow4, GTK_CAN_FOCUS);
   327   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
   328   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
   330   reg_list = gtk_clist_new (2);
   331   gtk_widget_show (reg_list);
   332   gtk_container_add (GTK_CONTAINER (scrolledwindow4), reg_list);
   333   gtk_clist_set_column_width (GTK_CLIST (reg_list), 0, 80);
   334   gtk_clist_set_column_width (GTK_CLIST (reg_list), 1, 80);
   335   gtk_clist_column_titles_hide (GTK_CLIST (reg_list));
   337   label25 = gtk_label_new ("");
   338   gtk_widget_show (label25);
   339   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 0, label25);
   341   label30 = gtk_label_new ("");
   342   gtk_widget_show (label30);
   343   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 1, label30);
   345   scrolledwindow8 = gtk_scrolled_window_new (NULL, NULL);
   346   gtk_widget_show (scrolledwindow8);
   347   gtk_paned_pack2 (GTK_PANED (vpaned1), scrolledwindow8, FALSE, TRUE);
   348   GTK_WIDGET_UNSET_FLAGS (scrolledwindow8, GTK_CAN_FOCUS);
   349   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
   350   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_SHADOW_IN);
   352   output_list = gtk_clist_new (3);
   353   gtk_widget_show (output_list);
   354   gtk_container_add (GTK_CONTAINER (scrolledwindow8), output_list);
   355   gtk_clist_set_column_width (GTK_CLIST (output_list), 0, 80);
   356   gtk_clist_set_column_width (GTK_CLIST (output_list), 1, 80);
   357   gtk_clist_set_column_width (GTK_CLIST (output_list), 2, 80);
   358   gtk_clist_column_titles_hide (GTK_CLIST (output_list));
   360   label26 = gtk_label_new ("");
   361   gtk_widget_show (label26);
   362   gtk_clist_set_column_widget (GTK_CLIST (output_list), 0, label26);
   364   label31 = gtk_label_new ("");
   365   gtk_widget_show (label31);
   366   gtk_clist_set_column_widget (GTK_CLIST (output_list), 1, label31);
   368   label32 = gtk_label_new ("");
   369   gtk_widget_show (label32);
   370   gtk_clist_set_column_widget (GTK_CLIST (output_list), 2, label32);
   372   debug_appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
   373   gtk_widget_show (debug_appbar);
   374   gnome_app_set_statusbar (GNOME_APP (debug_win), debug_appbar);
   376   g_signal_connect ((gpointer) debug_win, "delete_event",
   377                     G_CALLBACK (on_debug_win_delete_event),
   378                     NULL);
   379   gnome_app_install_menu_hints (GNOME_APP (debug_win), menubar1_uiinfo);
   380   g_signal_connect ((gpointer) load_btn, "clicked",
   381                     G_CALLBACK (on_load_btn_clicked),
   382                     NULL);
   383   g_signal_connect ((gpointer) reset_btn, "clicked",
   384                     G_CALLBACK (on_reset_btn_clicked),
   385                     NULL);
   386   g_signal_connect ((gpointer) stop_btn, "clicked",
   387                     G_CALLBACK (on_stop_btn_clicked),
   388                     NULL);
   389   g_signal_connect ((gpointer) step_btn, "clicked",
   390                     G_CALLBACK (on_step_btn_clicked),
   391                     NULL);
   392   g_signal_connect ((gpointer) run_btn, "clicked",
   393                     G_CALLBACK (on_run_btn_clicked),
   394                     NULL);
   395   g_signal_connect ((gpointer) runto_btn, "clicked",
   396                     G_CALLBACK (on_runto_btn_clicked),
   397                     NULL);
   398   g_signal_connect ((gpointer) break_btn, "clicked",
   399                     G_CALLBACK (on_break_btn_clicked),
   400                     NULL);
   401   g_signal_connect ((gpointer) page_field, "key_press_event",
   402                     G_CALLBACK (on_page_field_key_press_event),
   403                     NULL);
   404   g_signal_connect ((gpointer) page_locked_btn, "toggled",
   405                     G_CALLBACK (on_page_locked_btn_toggled),
   406                     NULL);
   407   g_signal_connect ((gpointer) jump_pc_btn, "clicked",
   408                     G_CALLBACK (on_jump_pc_btn_clicked),
   409                     NULL);
   410   g_signal_connect ((gpointer) mode_field, "changed",
   411                     G_CALLBACK (on_mode_field_changed),
   412                     NULL);
   413   g_signal_connect ((gpointer) disasm_list, "select_row",
   414                     G_CALLBACK (on_disasm_list_select_row),
   415                     NULL);
   416   g_signal_connect ((gpointer) disasm_list, "unselect_row",
   417                     G_CALLBACK (on_disasm_list_unselect_row),
   418                     NULL);
   419   g_signal_connect ((gpointer) output_list, "select_row",
   420                     G_CALLBACK (on_output_list_select_row),
   421                     NULL);
   423   /* Store pointers to all widgets, for use by lookup_widget(). */
   424   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, debug_win, "debug_win");
   425   GLADE_HOOKUP_OBJECT (debug_win, dock1, "dock1");
   426   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[0].widget, "file1");
   427   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[0].widget, "new_file1");
   428   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[1].widget, "open1");
   429   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[2].widget, "save1");
   430   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[3].widget, "save_as1");
   431   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[4].widget, "separator1");
   432   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[5].widget, "exit1");
   433   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[1].widget, "view1");
   434   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[0].widget, "view_memory");
   435   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[1].widget, "mem_mapped_regs1");
   436   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[2].widget, "settings1");
   437   GLADE_HOOKUP_OBJECT (debug_win, settings1_menu_uiinfo[0].widget, "preferences1");
   438   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[3].widget, "help1");
   439   GLADE_HOOKUP_OBJECT (debug_win, help1_menu_uiinfo[0].widget, "about1");
   440   GLADE_HOOKUP_OBJECT (debug_win, toolbar1, "toolbar1");
   441   GLADE_HOOKUP_OBJECT (debug_win, load_btn, "load_btn");
   442   GLADE_HOOKUP_OBJECT (debug_win, reset_btn, "reset_btn");
   443   GLADE_HOOKUP_OBJECT (debug_win, stop_btn, "stop_btn");
   444   GLADE_HOOKUP_OBJECT (debug_win, step_btn, "step_btn");
   445   GLADE_HOOKUP_OBJECT (debug_win, run_btn, "run_btn");
   446   GLADE_HOOKUP_OBJECT (debug_win, runto_btn, "runto_btn");
   447   GLADE_HOOKUP_OBJECT (debug_win, break_btn, "break_btn");
   448   GLADE_HOOKUP_OBJECT (debug_win, vpaned1, "vpaned1");
   449   GLADE_HOOKUP_OBJECT (debug_win, hpaned1, "hpaned1");
   450   GLADE_HOOKUP_OBJECT (debug_win, vbox2, "vbox2");
   451   GLADE_HOOKUP_OBJECT (debug_win, hbox1, "hbox1");
   452   GLADE_HOOKUP_OBJECT (debug_win, label21, "label21");
   453   GLADE_HOOKUP_OBJECT (debug_win, page_field, "page_field");
   454   GLADE_HOOKUP_OBJECT (debug_win, page_locked_btn, "page_locked_btn");
   455   GLADE_HOOKUP_OBJECT (debug_win, jump_pc_btn, "jump_pc_btn");
   456   GLADE_HOOKUP_OBJECT (debug_win, label22, "label22");
   457   GLADE_HOOKUP_OBJECT (debug_win, mode_box, "mode_box");
   458   GLADE_HOOKUP_OBJECT (debug_win, mode_field, "mode_field");
   459   GLADE_HOOKUP_OBJECT (debug_win, label23, "label23");
   460   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow7, "scrolledwindow7");
   461   GLADE_HOOKUP_OBJECT (debug_win, disasm_list, "disasm_list");
   462   GLADE_HOOKUP_OBJECT (debug_win, label24, "label24");
   463   GLADE_HOOKUP_OBJECT (debug_win, label27, "label27");
   464   GLADE_HOOKUP_OBJECT (debug_win, label28, "label28");
   465   GLADE_HOOKUP_OBJECT (debug_win, label29, "label29");
   466   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow4, "scrolledwindow4");
   467   GLADE_HOOKUP_OBJECT (debug_win, reg_list, "reg_list");
   468   GLADE_HOOKUP_OBJECT (debug_win, label25, "label25");
   469   GLADE_HOOKUP_OBJECT (debug_win, label30, "label30");
   470   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow8, "scrolledwindow8");
   471   GLADE_HOOKUP_OBJECT (debug_win, output_list, "output_list");
   472   GLADE_HOOKUP_OBJECT (debug_win, label26, "label26");
   473   GLADE_HOOKUP_OBJECT (debug_win, label31, "label31");
   474   GLADE_HOOKUP_OBJECT (debug_win, label32, "label32");
   475   GLADE_HOOKUP_OBJECT (debug_win, debug_appbar, "debug_appbar");
   477   return debug_win;
   478 }
   480 GtkWidget*
   481 create_mmr_win (void)
   482 {
   483   GtkWidget *mmr_win;
   484   GtkWidget *vbox1;
   485   GtkWidget *mmr_notebook;
   486   GtkWidget *empty_notebook_page;
   487   GtkWidget *label16;
   488   GtkWidget *hbuttonbox1;
   489   GtkWidget *mmr_close;
   491   mmr_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   492   gtk_window_set_title (GTK_WINDOW (mmr_win), _("DreamOn! - Memory-Mapped Registers"));
   493   gtk_window_set_default_size (GTK_WINDOW (mmr_win), 600, 600);
   495   vbox1 = gtk_vbox_new (FALSE, 0);
   496   gtk_widget_show (vbox1);
   497   gtk_container_add (GTK_CONTAINER (mmr_win), vbox1);
   499   mmr_notebook = gtk_notebook_new ();
   500   gtk_widget_show (mmr_notebook);
   501   gtk_box_pack_start (GTK_BOX (vbox1), mmr_notebook, TRUE, TRUE, 0);
   502   gtk_notebook_set_tab_pos (GTK_NOTEBOOK (mmr_notebook), GTK_POS_LEFT);
   504   empty_notebook_page = gtk_vbox_new (FALSE, 0);
   505   gtk_widget_show (empty_notebook_page);
   506   gtk_container_add (GTK_CONTAINER (mmr_notebook), empty_notebook_page);
   508   label16 = gtk_label_new (_("label16"));
   509   gtk_widget_show (label16);
   510   gtk_notebook_set_tab_label (GTK_NOTEBOOK (mmr_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (mmr_notebook), 0), label16);
   511   gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_CENTER);
   513   hbuttonbox1 = gtk_hbutton_box_new ();
   514   gtk_widget_show (hbuttonbox1);
   515   gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
   516   gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
   518   mmr_close = gtk_button_new_with_mnemonic (_("Close"));
   519   gtk_widget_show (mmr_close);
   520   gtk_container_add (GTK_CONTAINER (hbuttonbox1), mmr_close);
   521   GTK_WIDGET_SET_FLAGS (mmr_close, GTK_CAN_DEFAULT);
   523   g_signal_connect ((gpointer) mmr_win, "delete_event",
   524                     G_CALLBACK (on_mmr_win_delete_event),
   525                     NULL);
   526   g_signal_connect ((gpointer) mmr_close, "clicked",
   527                     G_CALLBACK (on_mmr_close_clicked),
   528                     NULL);
   530   /* Store pointers to all widgets, for use by lookup_widget(). */
   531   GLADE_HOOKUP_OBJECT_NO_REF (mmr_win, mmr_win, "mmr_win");
   532   GLADE_HOOKUP_OBJECT (mmr_win, vbox1, "vbox1");
   533   GLADE_HOOKUP_OBJECT (mmr_win, mmr_notebook, "mmr_notebook");
   534   GLADE_HOOKUP_OBJECT (mmr_win, label16, "label16");
   535   GLADE_HOOKUP_OBJECT (mmr_win, hbuttonbox1, "hbuttonbox1");
   536   GLADE_HOOKUP_OBJECT (mmr_win, mmr_close, "mmr_close");
   538   return mmr_win;
   539 }
   541 GtkWidget*
   542 create_about_win (void)
   543 {
   544   const gchar *authors[] = {
   545     "Nathan Keynes",
   546     NULL
   547   };
   548   const gchar *documenters[] = { NULL };
   549   /* TRANSLATORS: Replace this string with your names, one name per line. */
   550   gchar *translators = _("translator_credits");
   551   GdkPixbuf *about_win_logo_pixbuf;
   552   GtkWidget *about_win;
   554   if (!strcmp (translators, "translator_credits"))
   555     translators = NULL;
   556   about_win_logo_pixbuf = create_pixbuf ("dream/dcemu.gif");
   557   about_win = gnome_about_new ("Dream2", VERSION,
   558                         _("Copyright(c) 2002 Nathan Keynes"),
   559                         "",
   560                         authors,
   561                         documenters,
   562                         translators,
   563                         about_win_logo_pixbuf);
   564   gtk_container_set_border_width (GTK_CONTAINER (about_win), 1);
   566   /* Store pointers to all widgets, for use by lookup_widget(). */
   567   GLADE_HOOKUP_OBJECT_NO_REF (about_win, about_win, "about_win");
   569   return about_win;
   570 }
   572 GtkWidget*
   573 create_dump_win (void)
   574 {
   575   GtkWidget *dump_win;
   576   GtkWidget *vbox3;
   577   GtkWidget *hbox2;
   578   GtkWidget *label34;
   579   GtkWidget *dump_from;
   580   GtkWidget *label35;
   581   GtkWidget *dump_to;
   582   GtkWidget *dump_view_button;
   583   GtkWidget *label36;
   584   GtkWidget *scrolledwindow9;
   585   GtkWidget *dump_text;
   587   dump_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   588   gtk_window_set_title (GTK_WINDOW (dump_win), _("Memory dump"));
   590   vbox3 = gtk_vbox_new (FALSE, 0);
   591   gtk_widget_show (vbox3);
   592   gtk_container_add (GTK_CONTAINER (dump_win), vbox3);
   594   hbox2 = gtk_hbox_new (FALSE, 0);
   595   gtk_widget_show (hbox2);
   596   gtk_box_pack_start (GTK_BOX (vbox3), hbox2, FALSE, TRUE, 3);
   598   label34 = gtk_label_new (_(" From "));
   599   gtk_widget_show (label34);
   600   gtk_box_pack_start (GTK_BOX (hbox2), label34, FALSE, FALSE, 0);
   602   dump_from = gtk_entry_new ();
   603   gtk_widget_show (dump_from);
   604   gtk_box_pack_start (GTK_BOX (hbox2), dump_from, FALSE, TRUE, 0);
   606   label35 = gtk_label_new (_(" To "));
   607   gtk_widget_show (label35);
   608   gtk_box_pack_start (GTK_BOX (hbox2), label35, FALSE, FALSE, 0);
   610   dump_to = gtk_entry_new ();
   611   gtk_widget_show (dump_to);
   612   gtk_box_pack_start (GTK_BOX (hbox2), dump_to, FALSE, TRUE, 0);
   614   dump_view_button = gtk_button_new_with_mnemonic (_("View"));
   615   gtk_widget_show (dump_view_button);
   616   gtk_box_pack_start (GTK_BOX (hbox2), dump_view_button, FALSE, FALSE, 0);
   618   label36 = gtk_label_new (_("   "));
   619   gtk_widget_show (label36);
   620   gtk_box_pack_start (GTK_BOX (hbox2), label36, TRUE, TRUE, 0);
   622   scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL);
   623   gtk_widget_show (scrolledwindow9);
   624   gtk_box_pack_start (GTK_BOX (vbox3), scrolledwindow9, TRUE, TRUE, 0);
   625   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_SHADOW_IN);
   627   dump_text = gtk_text_view_new ();
   628   gtk_widget_show (dump_text);
   629   gtk_container_add (GTK_CONTAINER (scrolledwindow9), dump_text);
   631   /* Store pointers to all widgets, for use by lookup_widget(). */
   632   GLADE_HOOKUP_OBJECT_NO_REF (dump_win, dump_win, "dump_win");
   633   GLADE_HOOKUP_OBJECT (dump_win, vbox3, "vbox3");
   634   GLADE_HOOKUP_OBJECT (dump_win, hbox2, "hbox2");
   635   GLADE_HOOKUP_OBJECT (dump_win, label34, "label34");
   636   GLADE_HOOKUP_OBJECT (dump_win, dump_from, "dump_from");
   637   GLADE_HOOKUP_OBJECT (dump_win, label35, "label35");
   638   GLADE_HOOKUP_OBJECT (dump_win, dump_to, "dump_to");
   639   GLADE_HOOKUP_OBJECT (dump_win, dump_view_button, "dump_view_button");
   640   GLADE_HOOKUP_OBJECT (dump_win, label36, "label36");
   641   GLADE_HOOKUP_OBJECT (dump_win, scrolledwindow9, "scrolledwindow9");
   642   GLADE_HOOKUP_OBJECT (dump_win, dump_text, "dump_text");
   644   return dump_win;
   645 }
   647 GtkWidget*
   648 create_watch_win (void)
   649 {
   650   GtkWidget *watch_win;
   651   GtkWidget *vbox4;
   652   GtkWidget *hbox4;
   653   GtkWidget *label37;
   654   GtkWidget *watch_start_addr;
   655   GtkWidget *label38;
   656   GtkWidget *watch_end_addr;
   657   GtkWidget *label39;
   658   GtkWidget *combo1;
   659   GtkWidget *watch_type;
   660   GtkWidget *button_add_watch;
   661   GtkWidget *scrolledwindow10;
   662   GtkWidget *treeview1;
   663   GtkWidget *hbox5;
   664   GtkWidget *label40;
   665   GtkWidget *button_clear_all;
   666   GtkWidget *button_close;
   668   watch_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   669   gtk_window_set_title (GTK_WINDOW (watch_win), _("Watchpoints"));
   671   vbox4 = gtk_vbox_new (FALSE, 0);
   672   gtk_widget_show (vbox4);
   673   gtk_container_add (GTK_CONTAINER (watch_win), vbox4);
   675   hbox4 = gtk_hbox_new (FALSE, 0);
   676   gtk_widget_show (hbox4);
   677   gtk_box_pack_start (GTK_BOX (vbox4), hbox4, FALSE, TRUE, 3);
   679   label37 = gtk_label_new (_("Start addr "));
   680   gtk_widget_show (label37);
   681   gtk_box_pack_start (GTK_BOX (hbox4), label37, FALSE, FALSE, 3);
   683   watch_start_addr = gtk_entry_new ();
   684   gtk_widget_show (watch_start_addr);
   685   gtk_box_pack_start (GTK_BOX (hbox4), watch_start_addr, FALSE, TRUE, 0);
   687   label38 = gtk_label_new (_("End addr"));
   688   gtk_widget_show (label38);
   689   gtk_box_pack_start (GTK_BOX (hbox4), label38, FALSE, FALSE, 3);
   691   watch_end_addr = gtk_entry_new ();
   692   gtk_widget_show (watch_end_addr);
   693   gtk_box_pack_start (GTK_BOX (hbox4), watch_end_addr, FALSE, TRUE, 0);
   695   label39 = gtk_label_new (_("Type"));
   696   gtk_widget_show (label39);
   697   gtk_box_pack_start (GTK_BOX (hbox4), label39, FALSE, FALSE, 3);
   699   combo1 = gtk_combo_new ();
   700   g_object_set_data (G_OBJECT (GTK_COMBO (combo1)->popwin),
   701                      "GladeParentKey", combo1);
   702   gtk_widget_show (combo1);
   703   gtk_box_pack_start (GTK_BOX (hbox4), combo1, TRUE, TRUE, 0);
   705   watch_type = GTK_COMBO (combo1)->entry;
   706   gtk_widget_show (watch_type);
   708   button_add_watch = gtk_button_new_with_mnemonic (_("Add Watch"));
   709   gtk_widget_show (button_add_watch);
   710   gtk_box_pack_start (GTK_BOX (hbox4), button_add_watch, FALSE, FALSE, 3);
   712   scrolledwindow10 = gtk_scrolled_window_new (NULL, NULL);
   713   gtk_widget_show (scrolledwindow10);
   714   gtk_box_pack_start (GTK_BOX (vbox4), scrolledwindow10, TRUE, TRUE, 0);
   716   treeview1 = gtk_tree_view_new ();
   717   gtk_widget_show (treeview1);
   718   gtk_container_add (GTK_CONTAINER (scrolledwindow10), treeview1);
   719   gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview1), FALSE);
   721   hbox5 = gtk_hbox_new (FALSE, 0);
   722   gtk_widget_show (hbox5);
   723   gtk_box_pack_start (GTK_BOX (vbox4), hbox5, FALSE, TRUE, 3);
   725   label40 = gtk_label_new ("");
   726   gtk_widget_show (label40);
   727   gtk_box_pack_start (GTK_BOX (hbox5), label40, TRUE, TRUE, 0);
   729   button_clear_all = gtk_button_new_with_mnemonic (_("Clear all"));
   730   gtk_widget_show (button_clear_all);
   731   gtk_box_pack_start (GTK_BOX (hbox5), button_clear_all, FALSE, FALSE, 3);
   733   button_close = gtk_button_new_with_mnemonic (_("Close"));
   734   gtk_widget_show (button_close);
   735   gtk_box_pack_start (GTK_BOX (hbox5), button_close, FALSE, FALSE, 5);
   737   g_signal_connect ((gpointer) button_add_watch, "clicked",
   738                     G_CALLBACK (on_button_add_watch_clicked),
   739                     NULL);
   740   g_signal_connect ((gpointer) button_clear_all, "clicked",
   741                     G_CALLBACK (on_button_clear_all_clicked),
   742                     NULL);
   743   g_signal_connect ((gpointer) button_close, "clicked",
   744                     G_CALLBACK (on_button_close_clicked),
   745                     NULL);
   747   /* Store pointers to all widgets, for use by lookup_widget(). */
   748   GLADE_HOOKUP_OBJECT_NO_REF (watch_win, watch_win, "watch_win");
   749   GLADE_HOOKUP_OBJECT (watch_win, vbox4, "vbox4");
   750   GLADE_HOOKUP_OBJECT (watch_win, hbox4, "hbox4");
   751   GLADE_HOOKUP_OBJECT (watch_win, label37, "label37");
   752   GLADE_HOOKUP_OBJECT (watch_win, watch_start_addr, "watch_start_addr");
   753   GLADE_HOOKUP_OBJECT (watch_win, label38, "label38");
   754   GLADE_HOOKUP_OBJECT (watch_win, watch_end_addr, "watch_end_addr");
   755   GLADE_HOOKUP_OBJECT (watch_win, label39, "label39");
   756   GLADE_HOOKUP_OBJECT (watch_win, combo1, "combo1");
   757   GLADE_HOOKUP_OBJECT (watch_win, watch_type, "watch_type");
   758   GLADE_HOOKUP_OBJECT (watch_win, button_add_watch, "button_add_watch");
   759   GLADE_HOOKUP_OBJECT (watch_win, scrolledwindow10, "scrolledwindow10");
   760   GLADE_HOOKUP_OBJECT (watch_win, treeview1, "treeview1");
   761   GLADE_HOOKUP_OBJECT (watch_win, hbox5, "hbox5");
   762   GLADE_HOOKUP_OBJECT (watch_win, label40, "label40");
   763   GLADE_HOOKUP_OBJECT (watch_win, button_clear_all, "button_clear_all");
   764   GLADE_HOOKUP_OBJECT (watch_win, button_close, "button_close");
   766   return watch_win;
   767 }
.