Search
lxdream.org :: lxdream/src/gui/interface.c
lxdream 0.9.1
released Jun 29
Download Now
filename src/gui/interface.c
changeset 1:eea311cfd33e
next2:42349f6ea216
author nkeynes
date Sat Mar 13 00:03:32 2004 +0000 (15 years ago)
permissions -rw-r--r--
last change This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches.
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   {
    32     GNOME_APP_UI_ITEM, N_("gtk-new"),
    33     NULL,
    34     (gpointer) on_new_file1_activate, NULL, NULL,
    35     GNOME_APP_PIXMAP_NONE, NULL,
    36     0, (GdkModifierType) 0, NULL
    37   },
    38   {
    39     GNOME_APP_UI_ITEM, N_("gtk-open"),
    40     NULL,
    41     (gpointer) on_open1_activate, NULL, NULL,
    42     GNOME_APP_PIXMAP_NONE, NULL,
    43     0, (GdkModifierType) 0, NULL
    44   },
    45   {
    46     GNOME_APP_UI_ITEM, N_("gtk-save"),
    47     NULL,
    48     (gpointer) on_save1_activate, NULL, NULL,
    49     GNOME_APP_PIXMAP_NONE, NULL,
    50     0, (GdkModifierType) 0, NULL
    51   },
    52   {
    53     GNOME_APP_UI_ITEM, N_("gtk-save-as"),
    54     NULL,
    55     (gpointer) on_save_as1_activate, NULL, NULL,
    56     GNOME_APP_PIXMAP_NONE, NULL,
    57     0, (GdkModifierType) 0, NULL
    58   },
    59   GNOMEUIINFO_SEPARATOR,
    60   {
    61     GNOME_APP_UI_ITEM, N_("gtk-quit"),
    62     NULL,
    63     (gpointer) on_exit1_activate, NULL, NULL,
    64     GNOME_APP_PIXMAP_NONE, NULL,
    65     0, (GdkModifierType) 0, NULL
    66   },
    67   GNOMEUIINFO_END
    68 };
    70 static GnomeUIInfo view1_menu_uiinfo[] =
    71 {
    72   {
    73     GNOME_APP_UI_ITEM, N_("Mem mapped Regs"),
    74     NULL,
    75     (gpointer) on_mem_mapped_regs1_activate, NULL, NULL,
    76     GNOME_APP_PIXMAP_NONE, NULL,
    77     0, (GdkModifierType) 0, NULL
    78   },
    79   GNOMEUIINFO_END
    80 };
    82 static GnomeUIInfo settings1_menu_uiinfo[] =
    83 {
    84   {
    85     GNOME_APP_UI_ITEM, N_("gtk-preferences"),
    86     NULL,
    87     (gpointer) on_preferences1_activate, NULL, NULL,
    88     GNOME_APP_PIXMAP_NONE, NULL,
    89     0, (GdkModifierType) 0, NULL
    90   },
    91   GNOMEUIINFO_END
    92 };
    94 static GnomeUIInfo help1_menu_uiinfo[] =
    95 {
    96   {
    97     GNOME_APP_UI_ITEM, N_("gnome-stock-about"),
    98     NULL,
    99     (gpointer) on_about1_activate, NULL, NULL,
   100     GNOME_APP_PIXMAP_NONE, NULL,
   101     0, (GdkModifierType) 0, NULL
   102   },
   103   GNOMEUIINFO_END
   104 };
   106 static GnomeUIInfo menubar1_uiinfo[] =
   107 {
   108   {
   109     GNOME_APP_UI_SUBTREE, N_("_File"),
   110     NULL,
   111     file1_menu_uiinfo, NULL, NULL,
   112     GNOME_APP_PIXMAP_NONE, NULL,
   113     0, (GdkModifierType) 0, NULL
   114   },
   115   {
   116     GNOME_APP_UI_SUBTREE, N_("_View"),
   117     NULL,
   118     view1_menu_uiinfo, NULL, NULL,
   119     GNOME_APP_PIXMAP_NONE, NULL,
   120     0, (GdkModifierType) 0, NULL
   121   },
   122   {
   123     GNOME_APP_UI_SUBTREE, N_("_Settings"),
   124     NULL,
   125     settings1_menu_uiinfo, NULL, NULL,
   126     GNOME_APP_PIXMAP_NONE, NULL,
   127     0, (GdkModifierType) 0, NULL
   128   },
   129   {
   130     GNOME_APP_UI_SUBTREE, N_("_Help"),
   131     NULL,
   132     help1_menu_uiinfo, NULL, NULL,
   133     GNOME_APP_PIXMAP_NONE, NULL,
   134     0, (GdkModifierType) 0, NULL
   135   },
   136   GNOMEUIINFO_END
   137 };
   139 GtkWidget*
   140 create_debug_win (void)
   141 {
   142   GtkWidget *debug_win;
   143   GtkWidget *dock1;
   144   GtkWidget *toolbar1;
   145   GtkWidget *tmp_toolbar_icon;
   146   GtkWidget *load_btn;
   147   GtkWidget *reset_btn;
   148   GtkWidget *stop_btn;
   149   GtkWidget *step_btn;
   150   GtkWidget *run_btn;
   151   GtkWidget *runto_btn;
   152   GtkWidget *break_btn;
   153   GtkWidget *vpaned1;
   154   GtkWidget *hpaned1;
   155   GtkWidget *vbox2;
   156   GtkWidget *hbox1;
   157   GtkWidget *label21;
   158   GtkWidget *page_field;
   159   GtkWidget *page_locked_btn;
   160   GtkWidget *jump_pc_btn;
   161   GtkWidget *label22;
   162   GtkWidget *mode_box;
   163   GList *mode_box_items = NULL;
   164   GtkWidget *mode_field;
   165   GtkWidget *label23;
   166   GtkWidget *scrolledwindow7;
   167   GtkWidget *disasm_list;
   168   GtkWidget *label24;
   169   GtkWidget *label27;
   170   GtkWidget *label28;
   171   GtkWidget *label29;
   172   GtkWidget *scrolledwindow4;
   173   GtkWidget *reg_list;
   174   GtkWidget *label25;
   175   GtkWidget *label30;
   176   GtkWidget *scrolledwindow8;
   177   GtkWidget *output_list;
   178   GtkWidget *label26;
   179   GtkWidget *label31;
   180   GtkWidget *label32;
   181   GtkWidget *debug_appbar;
   183   debug_win = gnome_app_new ("Dream2", _("DreamOn! Debugger"));
   184   gtk_window_set_default_size (GTK_WINDOW (debug_win), 1000, 700);
   186   dock1 = GNOME_APP (debug_win)->dock;
   187   gtk_widget_show (dock1);
   189   gnome_app_create_menus (GNOME_APP (debug_win), menubar1_uiinfo);
   191   toolbar1 = gtk_toolbar_new ();
   192   gtk_widget_show (toolbar1);
   193   gnome_app_add_toolbar (GNOME_APP (debug_win), GTK_TOOLBAR (toolbar1), "toolbar1",
   194                                 BONOBO_DOCK_ITEM_BEH_EXCLUSIVE,
   195                                 BONOBO_DOCK_TOP, 1, 0, 0);
   196   gtk_container_set_border_width (GTK_CONTAINER (toolbar1), 1);
   197   gtk_toolbar_set_style (GTK_TOOLBAR (toolbar1), GTK_TOOLBAR_BOTH);
   199   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-open", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   200   load_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   201                                 GTK_TOOLBAR_CHILD_BUTTON,
   202                                 NULL,
   203                                 _("Load"),
   204                                 _("New File"), NULL,
   205                                 tmp_toolbar_icon, NULL, NULL);
   206   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   207   gtk_widget_show (load_btn);
   209   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-refresh", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   210   reset_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   211                                 GTK_TOOLBAR_CHILD_BUTTON,
   212                                 NULL,
   213                                 _("Reset"),
   214                                 _("Open File"), NULL,
   215                                 tmp_toolbar_icon, NULL, NULL);
   216   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   217   gtk_widget_show (reset_btn);
   219   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-stop", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   220   stop_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   221                                 GTK_TOOLBAR_CHILD_BUTTON,
   222                                 NULL,
   223                                 _("Stop"),
   224                                 _("Save File"), NULL,
   225                                 tmp_toolbar_icon, NULL, NULL);
   226   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   227   gtk_widget_show (stop_btn);
   229   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-redo", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   230   step_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   231                                 GTK_TOOLBAR_CHILD_BUTTON,
   232                                 NULL,
   233                                 _("Step"),
   234                                 NULL, NULL,
   235                                 tmp_toolbar_icon, NULL, NULL);
   236   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   237   gtk_widget_show (step_btn);
   239   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-go-forward", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   240   run_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   241                                 GTK_TOOLBAR_CHILD_BUTTON,
   242                                 NULL,
   243                                 _("Run"),
   244                                 NULL, NULL,
   245                                 tmp_toolbar_icon, NULL, NULL);
   246   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   247   gtk_widget_show (run_btn);
   249   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-goto-last", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   250   runto_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   251                                 GTK_TOOLBAR_CHILD_BUTTON,
   252                                 NULL,
   253                                 _("Run to"),
   254                                 NULL, NULL,
   255                                 tmp_toolbar_icon, NULL, NULL);
   256   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   257   gtk_widget_show (runto_btn);
   259   tmp_toolbar_icon = gtk_image_new_from_stock ("gtk-close", gtk_toolbar_get_icon_size (GTK_TOOLBAR (toolbar1)));
   260   break_btn = gtk_toolbar_append_element (GTK_TOOLBAR (toolbar1),
   261                                 GTK_TOOLBAR_CHILD_BUTTON,
   262                                 NULL,
   263                                 _("Break"),
   264                                 NULL, NULL,
   265                                 tmp_toolbar_icon, NULL, NULL);
   266   gtk_label_set_use_underline (GTK_LABEL (((GtkToolbarChild*) (g_list_last (GTK_TOOLBAR (toolbar1)->children)->data))->label), TRUE);
   267   gtk_widget_show (break_btn);
   269   vpaned1 = gtk_vpaned_new ();
   270   gtk_widget_show (vpaned1);
   271   gnome_app_set_contents (GNOME_APP (debug_win), vpaned1);
   272   gtk_paned_set_position (GTK_PANED (vpaned1), 430);
   274   hpaned1 = gtk_hpaned_new ();
   275   gtk_widget_show (hpaned1);
   276   gtk_paned_pack1 (GTK_PANED (vpaned1), hpaned1, TRUE, TRUE);
   277   gtk_paned_set_position (GTK_PANED (hpaned1), 800);
   279   vbox2 = gtk_vbox_new (FALSE, 0);
   280   gtk_widget_show (vbox2);
   281   gtk_paned_pack1 (GTK_PANED (hpaned1), vbox2, FALSE, TRUE);
   283   hbox1 = gtk_hbox_new (FALSE, 0);
   284   gtk_widget_show (hbox1);
   285   gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 3);
   287   label21 = gtk_label_new (_("Page"));
   288   gtk_widget_show (label21);
   289   gtk_box_pack_start (GTK_BOX (hbox1), label21, FALSE, FALSE, 4);
   290   gtk_label_set_justify (GTK_LABEL (label21), GTK_JUSTIFY_CENTER);
   292   page_field = gtk_entry_new ();
   293   gtk_widget_show (page_field);
   294   gtk_box_pack_start (GTK_BOX (hbox1), page_field, FALSE, TRUE, 0);
   296   page_locked_btn = gtk_check_button_new_with_mnemonic (_("Locked"));
   297   gtk_widget_show (page_locked_btn);
   298   gtk_box_pack_start (GTK_BOX (hbox1), page_locked_btn, FALSE, FALSE, 5);
   300   jump_pc_btn = gtk_button_new_with_mnemonic (_(" Jump to PC "));
   301   gtk_widget_show (jump_pc_btn);
   302   gtk_box_pack_start (GTK_BOX (hbox1), jump_pc_btn, FALSE, FALSE, 4);
   304   label22 = gtk_label_new (_("Mode"));
   305   gtk_widget_show (label22);
   306   gtk_box_pack_start (GTK_BOX (hbox1), label22, FALSE, FALSE, 5);
   307   gtk_label_set_justify (GTK_LABEL (label22), GTK_JUSTIFY_RIGHT);
   308   gtk_misc_set_alignment (GTK_MISC (label22), 1, 0.5);
   310   mode_box = gtk_combo_new ();
   311   g_object_set_data (G_OBJECT (GTK_COMBO (mode_box)->popwin),
   312                      "GladeParentKey", mode_box);
   313   gtk_widget_show (mode_box);
   314   gtk_box_pack_start (GTK_BOX (hbox1), mode_box, FALSE, FALSE, 0);
   315   mode_box_items = g_list_append (mode_box_items, (gpointer) "");
   316   gtk_combo_set_popdown_strings (GTK_COMBO (mode_box), mode_box_items);
   317   g_list_free (mode_box_items);
   319   mode_field = GTK_COMBO (mode_box)->entry;
   320   gtk_widget_show (mode_field);
   322   label23 = gtk_label_new ("");
   323   gtk_widget_show (label23);
   324   gtk_box_pack_start (GTK_BOX (hbox1), label23, TRUE, TRUE, 4);
   325   gtk_label_set_justify (GTK_LABEL (label23), GTK_JUSTIFY_CENTER);
   327   scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL);
   328   gtk_widget_show (scrolledwindow7);
   329   gtk_box_pack_start (GTK_BOX (vbox2), scrolledwindow7, TRUE, TRUE, 0);
   330   GTK_WIDGET_UNSET_FLAGS (scrolledwindow7, GTK_CAN_FOCUS);
   331   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_SHADOW_IN);
   333   disasm_list = gtk_clist_new (4);
   334   gtk_widget_show (disasm_list);
   335   gtk_container_add (GTK_CONTAINER (scrolledwindow7), disasm_list);
   336   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 0, 80);
   337   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 1, 80);
   338   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 2, 80);
   339   gtk_clist_set_column_width (GTK_CLIST (disasm_list), 3, 80);
   340   gtk_clist_column_titles_hide (GTK_CLIST (disasm_list));
   342   label24 = gtk_label_new ("");
   343   gtk_widget_show (label24);
   344   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 0, label24);
   346   label27 = gtk_label_new ("");
   347   gtk_widget_show (label27);
   348   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 1, label27);
   350   label28 = gtk_label_new ("");
   351   gtk_widget_show (label28);
   352   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 2, label28);
   354   label29 = gtk_label_new ("");
   355   gtk_widget_show (label29);
   356   gtk_clist_set_column_widget (GTK_CLIST (disasm_list), 3, label29);
   358   scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
   359   gtk_widget_show (scrolledwindow4);
   360   gtk_paned_pack2 (GTK_PANED (hpaned1), scrolledwindow4, FALSE, TRUE);
   361   GTK_WIDGET_UNSET_FLAGS (scrolledwindow4, GTK_CAN_FOCUS);
   362   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
   363   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
   365   reg_list = gtk_clist_new (2);
   366   gtk_widget_show (reg_list);
   367   gtk_container_add (GTK_CONTAINER (scrolledwindow4), reg_list);
   368   gtk_clist_set_column_width (GTK_CLIST (reg_list), 0, 80);
   369   gtk_clist_set_column_width (GTK_CLIST (reg_list), 1, 80);
   370   gtk_clist_column_titles_hide (GTK_CLIST (reg_list));
   372   label25 = gtk_label_new ("");
   373   gtk_widget_show (label25);
   374   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 0, label25);
   376   label30 = gtk_label_new ("");
   377   gtk_widget_show (label30);
   378   gtk_clist_set_column_widget (GTK_CLIST (reg_list), 1, label30);
   380   scrolledwindow8 = gtk_scrolled_window_new (NULL, NULL);
   381   gtk_widget_show (scrolledwindow8);
   382   gtk_paned_pack2 (GTK_PANED (vpaned1), scrolledwindow8, FALSE, TRUE);
   383   GTK_WIDGET_UNSET_FLAGS (scrolledwindow8, GTK_CAN_FOCUS);
   384   gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS);
   385   gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow8), GTK_SHADOW_IN);
   387   output_list = gtk_clist_new (3);
   388   gtk_widget_show (output_list);
   389   gtk_container_add (GTK_CONTAINER (scrolledwindow8), output_list);
   390   gtk_clist_set_column_width (GTK_CLIST (output_list), 0, 80);
   391   gtk_clist_set_column_width (GTK_CLIST (output_list), 1, 80);
   392   gtk_clist_set_column_width (GTK_CLIST (output_list), 2, 80);
   393   gtk_clist_column_titles_hide (GTK_CLIST (output_list));
   395   label26 = gtk_label_new ("");
   396   gtk_widget_show (label26);
   397   gtk_clist_set_column_widget (GTK_CLIST (output_list), 0, label26);
   399   label31 = gtk_label_new ("");
   400   gtk_widget_show (label31);
   401   gtk_clist_set_column_widget (GTK_CLIST (output_list), 1, label31);
   403   label32 = gtk_label_new ("");
   404   gtk_widget_show (label32);
   405   gtk_clist_set_column_widget (GTK_CLIST (output_list), 2, label32);
   407   debug_appbar = gnome_appbar_new (TRUE, TRUE, GNOME_PREFERENCES_NEVER);
   408   gtk_widget_show (debug_appbar);
   409   gnome_app_set_statusbar (GNOME_APP (debug_win), debug_appbar);
   411   g_signal_connect ((gpointer) debug_win, "delete_event",
   412                     G_CALLBACK (on_debug_win_delete_event),
   413                     NULL);
   414   gnome_app_install_menu_hints (GNOME_APP (debug_win), menubar1_uiinfo);
   415   g_signal_connect ((gpointer) load_btn, "clicked",
   416                     G_CALLBACK (on_load_btn_clicked),
   417                     NULL);
   418   g_signal_connect ((gpointer) reset_btn, "clicked",
   419                     G_CALLBACK (on_reset_btn_clicked),
   420                     NULL);
   421   g_signal_connect ((gpointer) stop_btn, "clicked",
   422                     G_CALLBACK (on_stop_btn_clicked),
   423                     NULL);
   424   g_signal_connect ((gpointer) step_btn, "clicked",
   425                     G_CALLBACK (on_step_btn_clicked),
   426                     NULL);
   427   g_signal_connect ((gpointer) run_btn, "clicked",
   428                     G_CALLBACK (on_run_btn_clicked),
   429                     NULL);
   430   g_signal_connect ((gpointer) runto_btn, "clicked",
   431                     G_CALLBACK (on_runto_btn_clicked),
   432                     NULL);
   433   g_signal_connect ((gpointer) break_btn, "clicked",
   434                     G_CALLBACK (on_break_btn_clicked),
   435                     NULL);
   436   g_signal_connect ((gpointer) page_field, "key_press_event",
   437                     G_CALLBACK (on_page_field_key_press_event),
   438                     NULL);
   439   g_signal_connect ((gpointer) page_locked_btn, "toggled",
   440                     G_CALLBACK (on_page_locked_btn_toggled),
   441                     NULL);
   442   g_signal_connect ((gpointer) jump_pc_btn, "clicked",
   443                     G_CALLBACK (on_jump_pc_btn_clicked),
   444                     NULL);
   445   g_signal_connect ((gpointer) mode_field, "changed",
   446                     G_CALLBACK (on_mode_field_changed),
   447                     NULL);
   448   g_signal_connect ((gpointer) disasm_list, "select_row",
   449                     G_CALLBACK (on_disasm_list_select_row),
   450                     NULL);
   451   g_signal_connect ((gpointer) disasm_list, "unselect_row",
   452                     G_CALLBACK (on_disasm_list_unselect_row),
   453                     NULL);
   454   g_signal_connect ((gpointer) output_list, "select_row",
   455                     G_CALLBACK (on_output_list_select_row),
   456                     NULL);
   458   /* Store pointers to all widgets, for use by lookup_widget(). */
   459   GLADE_HOOKUP_OBJECT_NO_REF (debug_win, debug_win, "debug_win");
   460   GLADE_HOOKUP_OBJECT (debug_win, dock1, "dock1");
   461   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[0].widget, "file1");
   462   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[0].widget, "new_file1");
   463   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[1].widget, "open1");
   464   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[2].widget, "save1");
   465   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[3].widget, "save_as1");
   466   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[4].widget, "separator1");
   467   GLADE_HOOKUP_OBJECT (debug_win, file1_menu_uiinfo[5].widget, "exit1");
   468   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[1].widget, "view1");
   469   GLADE_HOOKUP_OBJECT (debug_win, view1_menu_uiinfo[0].widget, "mem_mapped_regs1");
   470   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[2].widget, "settings1");
   471   GLADE_HOOKUP_OBJECT (debug_win, settings1_menu_uiinfo[0].widget, "preferences1");
   472   GLADE_HOOKUP_OBJECT (debug_win, menubar1_uiinfo[3].widget, "help1");
   473   GLADE_HOOKUP_OBJECT (debug_win, help1_menu_uiinfo[0].widget, "about1");
   474   GLADE_HOOKUP_OBJECT (debug_win, toolbar1, "toolbar1");
   475   GLADE_HOOKUP_OBJECT (debug_win, load_btn, "load_btn");
   476   GLADE_HOOKUP_OBJECT (debug_win, reset_btn, "reset_btn");
   477   GLADE_HOOKUP_OBJECT (debug_win, stop_btn, "stop_btn");
   478   GLADE_HOOKUP_OBJECT (debug_win, step_btn, "step_btn");
   479   GLADE_HOOKUP_OBJECT (debug_win, run_btn, "run_btn");
   480   GLADE_HOOKUP_OBJECT (debug_win, runto_btn, "runto_btn");
   481   GLADE_HOOKUP_OBJECT (debug_win, break_btn, "break_btn");
   482   GLADE_HOOKUP_OBJECT (debug_win, vpaned1, "vpaned1");
   483   GLADE_HOOKUP_OBJECT (debug_win, hpaned1, "hpaned1");
   484   GLADE_HOOKUP_OBJECT (debug_win, vbox2, "vbox2");
   485   GLADE_HOOKUP_OBJECT (debug_win, hbox1, "hbox1");
   486   GLADE_HOOKUP_OBJECT (debug_win, label21, "label21");
   487   GLADE_HOOKUP_OBJECT (debug_win, page_field, "page_field");
   488   GLADE_HOOKUP_OBJECT (debug_win, page_locked_btn, "page_locked_btn");
   489   GLADE_HOOKUP_OBJECT (debug_win, jump_pc_btn, "jump_pc_btn");
   490   GLADE_HOOKUP_OBJECT (debug_win, label22, "label22");
   491   GLADE_HOOKUP_OBJECT (debug_win, mode_box, "mode_box");
   492   GLADE_HOOKUP_OBJECT (debug_win, mode_field, "mode_field");
   493   GLADE_HOOKUP_OBJECT (debug_win, label23, "label23");
   494   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow7, "scrolledwindow7");
   495   GLADE_HOOKUP_OBJECT (debug_win, disasm_list, "disasm_list");
   496   GLADE_HOOKUP_OBJECT (debug_win, label24, "label24");
   497   GLADE_HOOKUP_OBJECT (debug_win, label27, "label27");
   498   GLADE_HOOKUP_OBJECT (debug_win, label28, "label28");
   499   GLADE_HOOKUP_OBJECT (debug_win, label29, "label29");
   500   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow4, "scrolledwindow4");
   501   GLADE_HOOKUP_OBJECT (debug_win, reg_list, "reg_list");
   502   GLADE_HOOKUP_OBJECT (debug_win, label25, "label25");
   503   GLADE_HOOKUP_OBJECT (debug_win, label30, "label30");
   504   GLADE_HOOKUP_OBJECT (debug_win, scrolledwindow8, "scrolledwindow8");
   505   GLADE_HOOKUP_OBJECT (debug_win, output_list, "output_list");
   506   GLADE_HOOKUP_OBJECT (debug_win, label26, "label26");
   507   GLADE_HOOKUP_OBJECT (debug_win, label31, "label31");
   508   GLADE_HOOKUP_OBJECT (debug_win, label32, "label32");
   509   GLADE_HOOKUP_OBJECT (debug_win, debug_appbar, "debug_appbar");
   511   return debug_win;
   512 }
   514 GtkWidget*
   515 create_mmr_win (void)
   516 {
   517   GtkWidget *mmr_win;
   518   GtkWidget *vbox1;
   519   GtkWidget *mmr_notebook;
   520   GtkWidget *empty_notebook_page;
   521   GtkWidget *label16;
   522   GtkWidget *hbuttonbox1;
   523   GtkWidget *mmr_close;
   525   mmr_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   526   gtk_window_set_title (GTK_WINDOW (mmr_win), _("DreamOn! - Memory-Mapped Registers"));
   527   gtk_window_set_default_size (GTK_WINDOW (mmr_win), 600, 600);
   529   vbox1 = gtk_vbox_new (FALSE, 0);
   530   gtk_widget_show (vbox1);
   531   gtk_container_add (GTK_CONTAINER (mmr_win), vbox1);
   533   mmr_notebook = gtk_notebook_new ();
   534   gtk_widget_show (mmr_notebook);
   535   gtk_box_pack_start (GTK_BOX (vbox1), mmr_notebook, TRUE, TRUE, 0);
   536   gtk_notebook_set_tab_pos (GTK_NOTEBOOK (mmr_notebook), GTK_POS_LEFT);
   538   empty_notebook_page = gtk_vbox_new (FALSE, 0);
   539   gtk_widget_show (empty_notebook_page);
   540   gtk_container_add (GTK_CONTAINER (mmr_notebook), empty_notebook_page);
   542   label16 = gtk_label_new (_("label16"));
   543   gtk_widget_show (label16);
   544   gtk_notebook_set_tab_label (GTK_NOTEBOOK (mmr_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (mmr_notebook), 0), label16);
   545   gtk_label_set_justify (GTK_LABEL (label16), GTK_JUSTIFY_CENTER);
   547   hbuttonbox1 = gtk_hbutton_box_new ();
   548   gtk_widget_show (hbuttonbox1);
   549   gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, TRUE, 0);
   550   gtk_box_set_spacing (GTK_BOX (hbuttonbox1), 30);
   552   mmr_close = gtk_button_new_with_mnemonic (_("Close"));
   553   gtk_widget_show (mmr_close);
   554   gtk_container_add (GTK_CONTAINER (hbuttonbox1), mmr_close);
   555   GTK_WIDGET_SET_FLAGS (mmr_close, GTK_CAN_DEFAULT);
   557   g_signal_connect ((gpointer) mmr_win, "delete_event",
   558                     G_CALLBACK (on_mmr_win_delete_event),
   559                     NULL);
   560   g_signal_connect ((gpointer) mmr_close, "clicked",
   561                     G_CALLBACK (on_mmr_close_clicked),
   562                     NULL);
   564   /* Store pointers to all widgets, for use by lookup_widget(). */
   565   GLADE_HOOKUP_OBJECT_NO_REF (mmr_win, mmr_win, "mmr_win");
   566   GLADE_HOOKUP_OBJECT (mmr_win, vbox1, "vbox1");
   567   GLADE_HOOKUP_OBJECT (mmr_win, mmr_notebook, "mmr_notebook");
   568   GLADE_HOOKUP_OBJECT (mmr_win, label16, "label16");
   569   GLADE_HOOKUP_OBJECT (mmr_win, hbuttonbox1, "hbuttonbox1");
   570   GLADE_HOOKUP_OBJECT (mmr_win, mmr_close, "mmr_close");
   572   return mmr_win;
   573 }
   575 GtkWidget*
   576 create_about_win (void)
   577 {
   578   const gchar *authors[] = {
   579     "Nathan Keynes",
   580     NULL
   581   };
   582   const gchar *documenters[] = { NULL };
   583   /* TRANSLATORS: Replace this string with your names, one name per line. */
   584   gchar *translators = _("translator_credits");
   585   GdkPixbuf *about_win_logo_pixbuf;
   586   GtkWidget *about_win;
   588   if (!strcmp (translators, "translator_credits"))
   589     translators = NULL;
   590   about_win_logo_pixbuf = create_pixbuf ("dream/dcemu.gif");
   591   about_win = gnome_about_new ("Dream2", VERSION,
   592                         _("Copyright(c) 2002 Nathan Keynes"),
   593                         "",
   594                         authors,
   595                         documenters,
   596                         translators,
   597                         about_win_logo_pixbuf);
   598   gtk_container_set_border_width (GTK_CONTAINER (about_win), 1);
   600   /* Store pointers to all widgets, for use by lookup_widget(). */
   601   GLADE_HOOKUP_OBJECT_NO_REF (about_win, about_win, "about_win");
   603   return about_win;
   604 }
.