Index: work/gtk/layersel/layersel.c =================================================================== --- work/gtk/layersel/layersel.c (revision 8510) +++ work/gtk/layersel/layersel.c (revision 8511) @@ -88,7 +88,7 @@ static GtkWidget *build_grp(layersel_grp_t *ls, const char *gname) { - GtkWidget *gn_vert, *grp_layers, *vlabel, *spring; + GtkWidget *gn_vert, *grp_layers, *vlabel, *spring, *vis_box, *vis_ebox; int n; char tmp[32]; @@ -132,10 +132,15 @@ sprintf(tmp, "layer %d", n); + /* sensitive layer visibility widgets */ + vis_box = gtkc_hbox_new(0, 0); ls->vis_on[n] = layer_vis_box(1, "#ff0000"); - gtk_box_pack_start(GTK_BOX(ls->layer[n]), ls->vis_on[n], FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vis_box), ls->vis_on[n], FALSE, FALSE, 0); ls->vis_off[n] = layer_vis_box(0, "#ff0000"); - gtk_box_pack_start(GTK_BOX(ls->layer[n]), ls->vis_off[n], FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(vis_box), ls->vis_off[n], FALSE, FALSE, 0); + vis_ebox = wrap_bind_click(vis_box, G_CALLBACK(group_button_press_cb), NULL); + gtk_box_pack_start(GTK_BOX(ls->layer[n]), vis_ebox, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(ls->layer[n]), gtk_label_new(tmp), FALSE, FALSE, 10); spring = gtkc_hbox_new(FALSE, 0); @@ -152,27 +157,11 @@ GtkWidget *spring; layersel_grp_t grp[3]; - main_box = gtkc_vbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(main_box), build_grp(&grp[0], "group0"), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(main_box), build_grp(&grp[1], "group1"), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(main_box), build_grp(&grp[2], "group2longnamed"), FALSE, FALSE, 0); - -/* - box = gtkc_hbox_new(FALSE, 0); - - event_box = wrap_bind_click(label, G_CALLBACK(group_button_press_cb), NULL); - gtk_box_pack_start(GTK_BOX(box), event_box, FALSE, FALSE, 0); - - label = gtk_label_new("layer_1"); - gtk_box_pack_start(GTK_BOX(box), label, FALSE, FALSE, 0); - gtk_box_pack_start(GTK_BOX(box), gtkc_hbox_new(FALSE, 0), TRUE, TRUE, 0); - - gtk_box_pack_start(GTK_BOX(main_box), box, FALSE, FALSE, 0); -*/ - - spring = gtkc_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(main_box), spring, TRUE, TRUE, 0);