summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatsuDrag92018-06-29 11:32:23 +0530
committerGitHub2018-06-29 11:32:23 +0530
commit8a25c568bb1cf44a1df0b61c4ab199378bdc4063 (patch)
treef7999ee8be1b652e8ed1e9e32010210a68fb48f4
parent3e7b5fcf5d796ad852723686352e2a6410684a7f (diff)
parent23bcb8d4e42f2b545a9c70a4a04e9b6b7d6f22fc (diff)
downloadLDMicroGtk-8a25c568bb1cf44a1df0b61c4ab199378bdc4063.tar.gz
LDMicroGtk-8a25c568bb1cf44a1df0b61c4ab199378bdc4063.tar.bz2
LDMicroGtk-8a25c568bb1cf44a1df0b61c4ab199378bdc4063.zip
Merge pull request #38 from akshay-c/GUI_Port_2
Gui port 2
-rw-r--r--ldmicro/ldmicro.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/ldmicro/ldmicro.cpp b/ldmicro/ldmicro.cpp
index be02fd5..7a39478 100644
--- a/ldmicro/ldmicro.cpp
+++ b/ldmicro/ldmicro.cpp
@@ -896,6 +896,15 @@ gboolean LD_WM_Command_call(GtkMenuItem* men, gpointer gpcode)
return FALSE;
}
+void ProcessorCall(GtkCheckMenuItem* men, gpointer gpcode)
+{
+ int tempcode = GPOINTER_TO_INT(gpcode);
+ if(gtk_check_menu_item_get_active(men))
+ {
+ ProcessMenu (tempcode);
+ }
+}
+
gboolean LD_WM_SetFocus_call(GtkWidget *widget, GdkEvent *event, gpointer user_data)
{
/* Handles:
@@ -1144,6 +1153,12 @@ inline void MenuHandler ()
g_signal_connect(G_OBJECT(AboutMenu), "activate",
G_CALLBACK(LD_WM_Command_call), GINT_TO_POINTER(MNU_ABOUT));
+ // Connect microcontroller signals automatically
+ for(int i = 0; i < NUM_SUPPORTED_MCUS; i++)
+ {
+ g_signal_connect(G_OBJECT(ProcessorMenuItems[i]), "toggled",
+ G_CALLBACK(ProcessorCall), GINT_TO_POINTER((MNU_PROCESSOR_0 + i)));
+ }
}
//-----------------------------------------------------------------------------