Just repaired the files to match drupal 5,
Most work was on JS side.
Here again it works much nicer if you add the type parameter to the widget_settings hook
I.e.
apply this change on content_inc
line 362
$additions = module_invoke($widget_type['module'], 'widget_settings', 'form', $field['widget'],$type);
instead of
$additions = module_invoke($widget_type['module'], 'widget_settings', 'form', $field['widget']);