diff --git a/desmume/src/gtk/dTool.h b/desmume/src/gtk/dTool.h index e758f8aa5..82685b3f7 100644 --- a/desmume/src/gtk/dTool.h +++ b/desmume/src/gtk/dTool.h @@ -10,7 +10,9 @@ typedef void (*dTool_closeFn)(); typedef struct { - const char name[64]; + /* this should be the same name of the action in the gui xml */ + const char shortname[16]; + const char name[32]; dTool_openFn open; dTool_updateFn update; dTool_closeFn close; diff --git a/desmume/src/gtk/main.cpp b/desmume/src/gtk/main.cpp index b41ed62f3..600feb80e 100644 --- a/desmume/src/gtk/main.cpp +++ b/desmume/src/gtk/main.cpp @@ -226,7 +226,7 @@ static const char *ui_description = " " " " " " -" " +" " " " " " " " @@ -1682,8 +1682,7 @@ static void desmume_gtk_menu_tools (GtkActionGroup *ag) gint i; for(i = 0; i < dTools_list_size; i++) { GtkAction *act; - //FIXME: remove hardcoded 'ioregtool' from here and in ui_description - act = gtk_action_new("ioregtool", dTools_list[i]->name, NULL, NULL); + act = gtk_action_new(dTools_list[i]->shortname, dTools_list[i]->name, NULL, NULL); g_signal_connect(G_OBJECT(act), "activate", G_CALLBACK(Start_dTool), GINT_TO_POINTER(i)); gtk_action_group_add_action(ag, GTK_ACTION(act)); } diff --git a/desmume/src/gtk/tools/ioregsView.cpp b/desmume/src/gtk/tools/ioregsView.cpp index c701b4791..cf75b1530 100644 --- a/desmume/src/gtk/tools/ioregsView.cpp +++ b/desmume/src/gtk/tools/ioregsView.cpp @@ -25,6 +25,7 @@ #include "../MMU.h" +#define SHORTNAME "ioregs" #define TOOL_NAME "IO regs view" BOOL CPUS [2] = {TRUE, TRUE}; @@ -472,6 +473,7 @@ static void open(int ID) dTool_t dTool_ioregsView = { + SHORTNAME, TOOL_NAME, &open, &update,