From e54156f2b4802ea4d0ad78f28d8271454be8e0e1 Mon Sep 17 00:00:00 2001 From: c vw Date: Wed, 24 Feb 2021 15:25:34 +0100 Subject: [PATCH] Maintain cw_keyer_internal variable even if not compiled with LOCALCW --- cw_menu.c | 8 +++++++- radio.c | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cw_menu.c b/cw_menu.c index bc00e21..335f66a 100644 --- a/cw_menu.c +++ b/cw_menu.c @@ -33,7 +33,9 @@ #include "receiver.h" #include "new_protocol.h" #include "old_protocol.h" +#ifdef LOCALCW #include "iambic.h" +#endif #include "ext.h" static GtkWidget *parent_window=NULL; @@ -276,13 +278,17 @@ void cw_menu(GtkWidget *parent) { gtk_grid_attach(GTK_GRID(grid),cw_keyer_weight_b,1,9,1,1); g_signal_connect(cw_keyer_weight_b,"value_changed",G_CALLBACK(cw_keyer_weight_value_changed_cb),NULL); -#ifdef LOCALCW +// +// With the advent of MIDI keyers, this check-box is needed even if not compiled +// with LOCALCW +// GtkWidget *cw_keyer_internal_b=gtk_check_button_new_with_label("CW handled in Radio"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cw_keyer_internal_b), cw_keyer_internal); gtk_widget_show(cw_keyer_internal_b); gtk_grid_attach(GTK_GRID(grid),cw_keyer_internal_b,0,10,1,1); g_signal_connect(cw_keyer_internal_b,"toggled",G_CALLBACK(cw_keyer_internal_cb),NULL); +#ifdef LOCALCW GtkWidget *cw_keyer_spacing_b=gtk_check_button_new_with_label("CW enforce letter spacing"); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cw_keyer_spacing_b), cw_keyer_spacing); gtk_widget_show(cw_keyer_spacing_b); diff --git a/radio.c b/radio.c index b7090a6..501cb1c 100644 --- a/radio.c +++ b/radio.c @@ -1973,10 +1973,8 @@ g_print("radioRestoreState: %s\n",property_path); if(value) cw_keyer_weight=atoi(value); value=getProperty("cw_keyer_spacing"); if(value) cw_keyer_spacing=atoi(value); -#ifdef LOCALCW value=getProperty("cw_keyer_internal"); if(value) cw_keyer_internal=atoi(value); -#endif value=getProperty("cw_keyer_sidetone_volume"); if(value) cw_keyer_sidetone_volume=atoi(value); value=getProperty("cw_keyer_ptt_delay"); -- 2.45.2