From c94a284e13f3e2dec25726e4537a168e1ac2b5c8 Mon Sep 17 00:00:00 2001 From: DL1YCF Date: Sun, 15 Mar 2020 12:48:30 +0100 Subject: [PATCH] small fixes --- band.c | 2 +- oc_menu.c | 43 +++++++++++++------------------------------ radio.c | 2 +- 3 files changed, 15 insertions(+), 32 deletions(-) diff --git a/band.c b/band.c index d93df5b..9f3aff9 100644 --- a/band.c +++ b/band.c @@ -294,8 +294,8 @@ BAND bands[BANDS+XVTRS] = {"3400",&bandstack3400,0,0,0,0,0,ALEX_ATTENUATION_0dB,53.0,3400000000LL,3410000000LL,0LL,0LL,0}, {"AIR",&bandstack3400,0,0,0,0,0,ALEX_ATTENUATION_0dB,53.0,108000000LL,137000000LL,0LL,0LL,0}, #endif - {"GEN",&bandstackGEN,0,0,0,0,0,ALEX_ATTENUATION_0dB,53.0,0LL,0LL,0LL,0LL,0}, {"WWV",&bandstackWWV,0,0,0,0,0,ALEX_ATTENUATION_0dB,53.0,0LL,0LL,0LL,0LL,0}, + {"GEN",&bandstackGEN,0,0,0,0,0,ALEX_ATTENUATION_0dB,53.0,0LL,0LL,0LL,0LL,0}, // XVTRS {"",&bandstack_xvtr_0,0,0,0,0,0,ALEX_ATTENUATION_0dB,53.0,0LL,0LL,0LL,0LL,0}, {"",&bandstack_xvtr_1,0,0,0,0,0,ALEX_ATTENUATION_0dB,53.0,0LL,0LL,0LL,0LL,0}, diff --git a/oc_menu.c b/oc_menu.c index 2d2a2dd..6749ebc 100644 --- a/oc_menu.c +++ b/oc_menu.c @@ -207,7 +207,12 @@ void oc_menu(GtkWidget *parent) { int row=3; - for(i=0;ititle)>0) { GtkWidget *band_label=gtk_label_new(NULL); @@ -238,36 +243,14 @@ void oc_menu(GtkWidget *parent) { } row++; } - } - - for(i=BANDS;ititle)>0) { - GtkWidget *band_label=gtk_label_new(band->title); - //gtk_widget_override_font(band_label, pango_font_description_from_string("Arial 18")); - gtk_widget_show(band_label); - gtk_grid_attach(GTK_GRID(grid),band_label,0,row,1,1); - - int mask; - for(j=1;j<8;j++) { - mask=0x01<<(j-1); - GtkWidget *oc_rx_b=gtk_check_button_new(); - //gtk_widget_override_font(oc_rx_b, pango_font_description_from_string("Arial 18")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (oc_rx_b), (band->OCrx&mask)==mask); - gtk_widget_show(oc_rx_b); - gtk_grid_attach(GTK_GRID(grid),oc_rx_b,j,row,1,1); - g_signal_connect(oc_rx_b,"toggled",G_CALLBACK(oc_rx_cb),(gpointer)(long)(j+(i<<4))); - - GtkWidget *oc_tx_b=gtk_check_button_new(); - //gtk_widget_override_font(oc_tx_b, pango_font_description_from_string("Arial 18")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (oc_tx_b), (band->OCtx&mask)==mask); - gtk_widget_show(oc_tx_b); - gtk_grid_attach(GTK_GRID(grid),oc_tx_b,j+7,row,1,1); - g_signal_connect(oc_tx_b,"toggled",G_CALLBACK(oc_tx_cb),(gpointer)(long)(j+(i<<4))); - - } - row++; + if (i == bandGen) { + i=0; + } else if (i == bands-1) { + i=BANDS; + } else { + i++; } + if (i >= BANDS+XVTRS) break; } int mask; diff --git a/radio.c b/radio.c index dd31ea8..db675ff 100644 --- a/radio.c +++ b/radio.c @@ -361,7 +361,7 @@ void reconfigure_radio() { zoompan = zoompan_init(display_width,ZOOMPAN_HEIGHT); gtk_fixed_put(GTK_FIXED(fixed),zoompan,0,y); } else { - gtk_fixed_put(GTK_FIXED(fixed),zoompan,0,y); + gtk_fixed_move(GTK_FIXED(fixed),zoompan,0,y); } gtk_widget_show_all(zoompan); y+=ZOOMPAN_HEIGHT; -- 2.45.2