if (child)
gtk_widget_destroy(child);
- /* Get table size */
-
guint rows = 1, cols = 1, cur_cols;
gchar row_label_str[64], col_label_str[64], button_str[64];
GtkWidget *row_label, *col_label, *button = NULL;
GtkWidget *table = gtk_table_new(rows, cols, FALSE);
+
for (guint vi = 0; vi < radar->h.nvolumes; vi++) {
Volume *vol = radar->v[vi];
if (vol == NULL) continue;
row_label = gtk_label_new(row_label_str);
gtk_label_set_use_markup(GTK_LABEL(row_label), TRUE);
gtk_misc_set_alignment(GTK_MISC(row_label), 1, 0.5);
- gtk_table_attach(GTK_TABLE(table), row_label, 0,1, rows-1,rows, GTK_FILL,GTK_FILL, 5,0);
+ gtk_table_attach(GTK_TABLE(table), row_label,
+ 0,1, rows-1,rows, GTK_FILL,GTK_FILL, 5,0);
for (guint si = 0; si < vol->h.nsweeps; si++) {
Sweep *sweep = vol->sweep[si];
col_label = gtk_label_new(col_label_str);
gtk_label_set_use_markup(GTK_LABEL(col_label), TRUE);
gtk_widget_set_size_request(col_label, 40, -1);
- gtk_table_attach(GTK_TABLE(table), col_label, cols-1,cols, 0,1, GTK_FILL,GTK_FILL, 0,0);
+ gtk_table_attach(GTK_TABLE(table), col_label,
+ cols-1,cols, 0,1, GTK_FILL,GTK_FILL, 0,0);
}
/* Button */
- //g_snprintf(button_str, 64, "%c: %.2f", vol->h.type_str[0], sweep->h.elev);
- //button = gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(button), button_str);
button = gtk_radio_button_new_from_widget(GTK_RADIO_BUTTON(button));
gtk_widget_set_size_request(button, -1, 22);
g_object_set(button, "draw-indicator", FALSE, NULL);
- g_signal_connect_swapped(button, "clicked", G_CALLBACK(load_color_table), vol->h.type_str);
- g_signal_connect_swapped(button, "clicked", G_CALLBACK(load_sweep), sweep);
- gtk_table_attach(GTK_TABLE(table), button, cols-1,cols, rows-1,rows, GTK_FILL,GTK_FILL, 0,0);
+ g_signal_connect_swapped(button, "clicked",
+ G_CALLBACK(load_color_table), vol->h.type_str);
+ g_signal_connect_swapped(button, "clicked",
+ G_CALLBACK(load_sweep), sweep);
+ gtk_table_attach(GTK_TABLE(table), button,
+ cols-1,cols, rows-1,rows, GTK_FILL,GTK_FILL, 0,0);
}
}
gtk_container_add(GTK_CONTAINER(config_body), table);