Index: trunk/src/action.c =================================================================== --- trunk/src/action.c (revision 1086) +++ trunk/src/action.c (revision 1087) @@ -2820,15 +2820,6 @@ /* --------------------------------------------------------------------------- */ -static int ActionPSCalib(int argc, char **argv, Coord x, Coord y) -{ - HID *ps = hid_find_exporter("ps"); - ps->calibrate(0.0, 0.0); - return 0; -} - -/* --------------------------------------------------------------------------- */ - static ElementType *element_cache = NULL; static ElementType *find_element_by_refdes(char *refdes) @@ -3363,8 +3354,6 @@ {"MoveToCurrentLayer", 0, ActionMoveToCurrentLayer, movetocurrentlayer_help, movetocurrentlayer_syntax} , - {"pscalib", 0, ActionPSCalib} - , {"ElementList", 0, ActionElementList, elementlist_help, elementlist_syntax} , Index: trunk/src/action_list.h =================================================================== --- trunk/src/action_list.h (revision 1086) +++ trunk/src/action_list.h (revision 1087) @@ -31,6 +31,7 @@ /* hid/ps (export) */ REGISTER_ATTRIBUTES(ps_attribute_list) +REGISTER_ACTIONS(hidps_action_list) REGISTER_ATTRIBUTES(eps_attribute_list) /* hid/gtk (gui) */ Index: trunk/src/hid/ps/ps.c =================================================================== --- trunk/src/hid/ps/ps.c (revision 1086) +++ trunk/src/hid/ps/ps.c (revision 1087) @@ -1537,10 +1537,22 @@ { } +static int ActionPSCalib(int argc, char **argv, Coord x, Coord y) +{ + ps_calibrate(0.0, 0.0); + return 0; +} + +HID_Action hidps_action_list[] = { + {"pscalib", 0, ActionPSCalib} +}; + +REGISTER_ACTIONS(hidps_action_list) + + #include "dolists.h" HID ps_hid; - void ps_ps_init(HID * hid) { hid->get_export_options = ps_get_export_options; @@ -1564,6 +1576,8 @@ hid->fill_rect = ps_fill_rect; hid->calibrate = ps_calibrate; hid->set_crosshair = ps_set_crosshair; + + REGISTER_ACTIONS(hidps_action_list) } void hid_ps_init()