--- np2/x11/gtk/Attic/gtk_menu.c 2003/12/11 15:11:56 1.1 +++ np2/x11/gtk/Attic/gtk_menu.c 2004/03/23 15:16:43 1.4 @@ -48,6 +48,7 @@ #include "kdispwin.h" #include "toolwin.h" #include "viewer.h" +#include "debugwin.h" #include "mousemng.h" #include "scrnmng.h" @@ -132,6 +133,9 @@ static void memory_dump(GtkWidget *w, Gd #if defined(SUPPORT_VIEWER) static void debug_utility(GtkWidget *w, GdkEvent *e); #endif +#if defined(CPUCORE_IA32) && defined(SUPPORT_MEMDBG32) +static void memory_debug(GtkWidget *w, GdkEvent *e); +#endif static void toggle(gpointer, guint, GtkWidget *); @@ -231,8 +235,6 @@ static GtkItemFactoryEntry menu_items[] { "/HardDisk/SASI-_2", NULL, NULL, 0, "" }, { "/HardDisk/SASI-2/_Open...", NULL, f(sasiopen), 1, NULL }, { "/HardDisk/SASI-2/_Remove", NULL, f(sasiremove), 1, NULL }, -{ "/HardDisk/sep1", NULL, NULL, 0, "" }, -{ "/HardDisk/_Remove All", NULL, f(sasiremove), ~0, NULL }, { "/Screen", NULL, NULL, 0, "" }, { "/Screen/_Window", NULL, NULL, 0, "" }, { "/Screen/_FullScreen", NULL, NULL, 0, "/Screen/Window" }, @@ -385,7 +387,7 @@ create_menu(GtkWidget *w) xmenu_toggle_item(KEY_DISPLAY, np2oscfg.keydisp, TRUE); xmenu_select_framerate(np2oscfg.DRAW_SKIP); - xmenu_select_f12key(np2oscfg.F12COPY); + xmenu_select_f12key(np2oscfg.F12KEY); xmenu_select_beepvol(np2cfg.BEEP_VOL); xmenu_select_soundboard(np2cfg.SOUND_SW); xmenu_select_extmem(np2cfg.EXTMEM); @@ -403,6 +405,9 @@ create_menu(GtkWidget *w) #if defined(SUPPORT_VIEWER) GtkWidget *dbgutil_item; #endif +#if defined(CPUCORE_IA32) && defined(SUPPORT_MEMDBG32) + GtkWidget *memdbg_item; +#endif debug_menu = gtk_menu_new(); @@ -426,6 +431,14 @@ create_menu(GtkWidget *w) GTK_SIGNAL_FUNC(debug_utility), (gpointer)0); #endif +#if defined(CPUCORE_IA32) && defined(SUPPORT_MEMDBG32) + memdbg_item = gtk_menu_item_new_with_label("Memory Map"); + gtk_widget_show(memdbg_item); + gtk_menu_append(GTK_MENU(debug_menu), memdbg_item); + gtk_signal_connect_object(GTK_OBJECT(memdbg_item), "activate", + GTK_SIGNAL_FUNC(memory_debug), (gpointer)0); +#endif + debug_item = gtk_menu_item_new_with_label("Debug"); gtk_menu_item_right_justify(GTK_MENU_ITEM(debug_item)); gtk_widget_show(debug_item); @@ -914,9 +927,9 @@ f12(gpointer data, guint action, GtkWidg if (action >= 5) action = 0; - if (np2oscfg.F12COPY != action) { - np2oscfg.F12COPY = action; - gtkkbd_resetf12(); + if (np2oscfg.F12KEY != action) { + np2oscfg.F12KEY = action; + kbdmng_resetf12(); sysmng_update(SYS_UPDATEOSCFG); } } @@ -929,6 +942,7 @@ beepvol(gpointer data, guint action, Gtk UNUSED(w); if (np2cfg.BEEP_VOL != action) { + np2cfg.BEEP_VOL = action; beep_setvol(action); sysmng_update(SYS_UPDATECFG); } @@ -1108,6 +1122,18 @@ debug_utility(GtkWidget *w, GdkEvent *e) } #endif +#if defined(CPUCORE_IA32) && defined(SUPPORT_MEMDBG32) +static void +memory_debug(GtkWidget *w, GdkEvent *e) +{ + + UNUSED(w); + UNUSED(e); + + debugwin_create(); +} +#endif + /* ----- toggle item */ static void toggle(gpointer data, guint action, GtkWidget *w)