Index: trunk/src/brave.c =================================================================== --- trunk/src/brave.c (revision 25556) +++ trunk/src/brave.c (revision 25557) @@ -55,6 +55,7 @@ {PCB_BRAVE_CLIPBATCH, "clipbatch", "batch poly clipping", "batch polygon clipping in some expensive user operations", 0}, {PCB_BRAVE_LESSTIF_TREETABLE, "lesstifttbl", "lesstif tree table", "enable experimental lesstif tree table support", 0}, {PCB_BRAVE_OLD_LIBWIN, "oldlibwin", "old library window", "use the old library window instead of the new, DAD based", 0}, + {PCB_BRAVE_OLD_SPINBOX, "oldspinbox", "old spin box", "use the old spin box widgets instead of the new, DAD based", 0}, {0, NULL, NULL, NULL} }; Index: trunk/src/brave.h =================================================================== --- trunk/src/brave.h (revision 25556) +++ trunk/src/brave.h (revision 25557) @@ -6,6 +6,7 @@ PCB_BRAVE_CLIPBATCH = 2, PCB_BRAVE_LESSTIF_TREETABLE = 4, PCB_BRAVE_OLD_LIBWIN = 8, + PCB_BRAVE_OLD_SPINBOX = 16, PCB_BRAVE_max } pcb_brave_t; Index: trunk/src/hid_dad.h =================================================================== --- trunk/src/hid_dad.h (revision 25556) +++ trunk/src/hid_dad.h (revision 25557) @@ -34,6 +34,8 @@ #include "pcb-printf.h" #include "global_typedefs.h" +#include "hid_dad_spin.h" + #include /*** Helpers for building dynamic attribute dialogs (DAD) ***/ @@ -183,9 +185,16 @@ PCB_DAD_ALLOC(table, PCB_HATT_UNIT); \ } while(0) +#include "brave.h" + #define PCB_DAD_COORD(table, label) \ do { \ - PCB_DAD_ALLOC(table, PCB_HATT_COORD); \ + if (pcb_brave & PCB_BRAVE_OLD_SPINBOX) { \ + PCB_DAD_ALLOC(table, PCB_HATT_COORD); \ + } \ + else {\ + PCB_DAD_SPIN_COORD(table); \ + } \ PCB_DAD_SET_ATTR_FIELD(table, name, label); \ } while(0) Index: trunk/src/hid_dad_spin.h =================================================================== --- trunk/src/hid_dad_spin.h (revision 25556) +++ trunk/src/hid_dad_spin.h (revision 25557) @@ -26,6 +26,9 @@ /* Compound DAD widget for numeric value entry, creating a spinbox */ +#ifndef PCB_HID_DAD_SPIN_H +#define PCB_HID_DAD_SPIN_H + #include typedef struct { @@ -127,3 +130,5 @@ int pcb_dad_spin_set_value(pcb_hid_attribute_t *end, void *hid_ctx, int idx, const pcb_hid_attr_val_t *val); extern gdl_list_t pcb_dad_coord_spins; /* list of all active coord spinboxes */ + +#endif