From: Hugo Villeneuve Date: Thu, 31 Oct 2013 00:51:11 +0000 (-0400) Subject: Add view menu option to view/hide SFR memory dump window X-Git-Tag: v2.0.0~99 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=ae50fa4fee0b41f26b161ad2fd7831815cd396cb;p=emu8051.git Add view menu option to view/hide SFR memory dump window --- diff --git a/src/viewmenu.c b/src/viewmenu.c index 99fa0ab..3377329 100644 --- a/src/viewmenu.c +++ b/src/viewmenu.c @@ -71,6 +71,18 @@ void toggle_int_memory(GtkWidget *widget, gpointer data) emugtk_restart_gui(); } +void toggle_sfr_memory(GtkWidget *widget, gpointer data) +{ + if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { + log_info(" View SFR memory"); + cfg->view_sfr_memory = 1; + } else { + cfg->view_sfr_memory = 0; + } + + emugtk_restart_gui(); +} + void toggle_ext_memory(GtkWidget *widget, gpointer data) { if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget))) { @@ -167,6 +179,13 @@ ViewAddMenu(GtkWidget *menu_bar) g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(toggle_int_memory), NULL); + item = gtk_check_menu_item_new_with_label("SFR Memory"); + gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), + cfg->view_sfr_memory); + g_signal_connect(G_OBJECT(item), "activate", + G_CALLBACK(toggle_sfr_memory), NULL); + item = gtk_check_menu_item_new_with_label("External Memory"); gtk_menu_shell_append(GTK_MENU_SHELL(menu), item); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item),