El vie, 12-01-2007 a las 18:09 +0100, Patrick Bernaud escribió: > Hi all, > > I have been working on the selection in gschem to reintroduce the > SELECTION type (as an alias of GList*) as it has been discussed on the > list. I have also cleaned up the selection API quite a bit in libgeda > and gschem and cleaned up the selection hooks in gschem. > > You can get the patches against current CVS HEAD here: > http://www.chbcp.net/~pat/geda/libgeda.selection.diff > http://www.chbcp.net/~pat/geda/gschem.selection.diff
There are some functions taking a SELECTION as a parameter: - o_attrib_toggle_visibility - o_attrib_toggle_show_name_value - o_complex_translate_display_selection - o_complex_translate_selection - o_rotate_90 - o_mirror but actually they depend on SELECTION being a GList. I think a cleaner way would be to keep these functions with a GList parameter and add o_select_*/o_selection_* functions calling them. This way the selection internals are hidden for functions outside o_select.c (excluding o_edit), and these generic functions can be used for other purposes than selections. Plus, if you change the SELECTION definition, you will only need to change o_select_* functions. There is a similar situation with the changes to o_move_prep_rubberband, o_move_end, o_picture_exchange, attrib_edit_dialog_ok, attrib_edit_dialog and create_color_menu. It would also be better to split o_rotate_90 and o_mirror in two functions: one rotating a single object and the other calling the first one for all objects in the GList. Regards, Carlos _______________________________________________ geda-dev mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev
