o_selection_select() and o_selection_unselect() are both low-level
functions that should only be used internally to libgeda.
This patch removes the use of the above functions from applications
which use libgeda, and marks them as 'deprecated' in libgeda's
prototype.h.
gschem/src/o_misc.c | 8 +++++---
libgeda/include/prototype.h | 4 ++--
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/gschem/src/o_misc.c b/gschem/src/o_misc.c
index c78ddf5..5c3538f 100644
--- a/gschem/src/o_misc.c
+++ b/gschem/src/o_misc.c
@@ -1213,8 +1213,9 @@ void o_update_component(TOPLEVEL *w_current, OBJECT
*o_current)
o_erase_single (w_current, o_current);
/* delete its connections */
s_conn_remove_complex (w_current, o_current);
- /* and unselect but keep it in the selection list */
- o_selection_unselect (o_current);
+ /* and unselect it */
+ o_selection_remove (&(w_current->page_current->selection_list),
+ o_current);
/* build a temporary list and add a complex to this list */
tmp_list = s_basic_init_object ("update component");
@@ -1281,7 +1282,8 @@ void o_update_component(TOPLEVEL *w_current, OBJECT
*o_current)
s_delete_list_fromstart (w_current, tmp_list);
/* reconnect, re-select and redraw */
s_conn_update_complex (w_current, o_current->complex->prim_objs);
- o_selection_select (o_current, SELECT_COLOR);
+ o_selection_add (&(w_current->page_current->selection_list),
+ o_current);
o_redraw_single (w_current, o_current);
if (is_embedded) {
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 02a6721..5a63175 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -435,8 +435,8 @@ void o_pin_update_whichend(TOPLEVEL *w_current, OBJECT
*object_list, int num_pin
/* o_selection.c */
void o_selection_add(GList **head, OBJECT *o_selected);
void o_selection_print_all( GList *head );
-void o_selection_select(OBJECT *object, int color);
-void o_selection_unselect(OBJECT *object);
+void o_selection_select(OBJECT *object, int color); // DEPRECATED
+void o_selection_unselect(OBJECT *object); // DEPRECATED
void o_selection_remove(GList **head, OBJECT *o_selected);
void o_selection_unselect_list(TOPLEVEL *w_current, GList **head);
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev