diff options
-rw-r--r-- | ldmicro/ldmicro.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ldmicro/ldmicro.cpp b/ldmicro/ldmicro.cpp index 5773c3b..c3d84d6 100644 --- a/ldmicro/ldmicro.cpp +++ b/ldmicro/ldmicro.cpp @@ -327,9 +327,8 @@ void ProgramChanged(void) //----------------------------------------------------------------------------- // Handle a selection from the menu bar of the main window. //----------------------------------------------------------------------------- -static void ProcessMenu(GtkMenuItem* men, gpointer gpcode) +static void ProcessMenu(int code) { - int code = GPOINTER_TO_INT(gpcode); if(code >= MNU_PROCESSOR_0 && code < MNU_PROCESSOR_0+NUM_SUPPORTED_MCUS) { strcpy(CurrentCompileFile, ""); Prog.mcu = &SupportedMcus[code - MNU_PROCESSOR_0]; @@ -588,12 +587,16 @@ static void ProcessMenu(GtkMenuItem* men, gpointer gpcode) } } +void WM_COMMAND (GtkMenuItem* men, gpointer gpcode){ + int tempcode = GPOINTER_TO_INT(gpcode); + ProcessMenu (tempcode); +} + void MenuHandler (){ g_signal_connect(G_OBJECT(McuSettingsMenu), "activate", - G_CALLBACK(ProcessMenu), GINT_TO_POINTER(MNU_MCU_SETTINGS)); + G_CALLBACK(WM_COMMAND), GINT_TO_POINTER(MNU_MCU_SETTINGS)); } - //----------------------------------------------------------------------------- // WndProc for MainWindow. //----------------------------------------------------------------------------- |