]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
remove hardcoding of number of steps
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Mon, 3 Jan 2022 09:59:26 +0000 (15:29 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Mon, 3 Jan 2022 09:59:26 +0000 (15:29 +0530)
vfo_menu.c

index 2b4da08f26541f4c7fe2db1206ea72c46edd9117..fe6e3bb236dad1c032e3e7175e942409a6023441 100644 (file)
@@ -257,7 +257,7 @@ void vfo_menu(GtkWidget *parent,int vfo) {
   gtk_grid_attach(GTK_GRID(grid),label,0,1,3,1);
 
   GtkWidget *step_rb=NULL;
-  for (i=0; i<16; i++) {
+  for (i=0; i<STEPS; i++) {
     btn[i]=gtk_button_new_with_label(btn_labels[i]);
     set_button_text_color(btn[i],"black");
     gtk_widget_show(btn[i]);
@@ -291,7 +291,7 @@ void vfo_menu(GtkWidget *parent,int vfo) {
   gtk_grid_attach(GTK_GRID(grid),vfo_label,3,3,1,1);
 
   GtkWidget *vfo_b=gtk_combo_box_text_new();
-  for(i=0;i<15;i++) {
+  for(i=0;i<STEPS;i++) {
     gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(vfo_b),NULL,step_labels[i]);
     if(steps[i]==step) {
       gtk_combo_box_set_active (GTK_COMBO_BOX(vfo_b), i);