[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: CVS update: g_hook.c



  User: ahvezda 
  Date: 06/12/16 23:14:06

  Modified:    .        g_hook.c i_basic.c i_callbacks.c o_attrib.c
                        o_basic.c o_buffer.c o_bus.c o_complex.c o_copy.c
                        o_delete.c o_find.c o_grips.c o_misc.c o_move.c
                        o_net.c o_picture.c o_select.c o_slot.c o_text.c
                        x_attribedit.c x_autonumber.c x_compselect.c
                        x_dialog.c x_event.c x_image.c x_multiattrib.c
                        x_print.c
  Log:
  Merged Carlos' glist work via Peter Brett's patch sets to the trunk.
  
  
  
  
  Revision  Changes    Path
  1.14      +2 -1      eda/geda/gaf/gschem/src/g_hook.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: g_hook.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/g_hook.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -b -r1.13 -r1.14
  --- g_hook.c	14 Dec 2006 19:00:16 -0000	1.13
  +++ g_hook.c	17 Dec 2006 04:14:03 -0000	1.14
  @@ -648,7 +648,8 @@
       clib = (gchar*)clibs->data;
   
       new_object = page->object_tail = o_complex_add(w_current, 
  -			                           page->object_tail, 'C', 
  +			                           page->object_tail, NULL, 
  +						   'C', 
   			                           WHITE, 
   			                           x, y, 
   			                           angle, mirror,
  
  
  
  1.17      +5 -2      eda/geda/gaf/gschem/src/i_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_basic.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -b -r1.16 -r1.17
  --- i_basic.c	7 Dec 2006 04:24:17 -0000	1.16
  +++ i_basic.c	17 Dec 2006 04:14:03 -0000	1.17
  @@ -425,7 +425,10 @@
      * should be based on what is in the selection list 
      */
     
  -  if (o_selection_return_num(w_current->page_current->selection2_head)) {
  +  g_assert(w_current != NULL);
  +  g_assert(w_current->page_current != NULL);
  +
  +  if (w_current->page_current->selection_list != NULL) {
       /* since one or more things are selected, we set these TRUE */
       /* These strings should NOT be internationalized */
       x_menus_sensitivity(w_current, "Edit/Cut Buffer", TRUE);
  
  
  
  1.71      +77 -57    eda/geda/gaf/gschem/src/i_callbacks.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: i_callbacks.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/i_callbacks.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -b -r1.70 -r1.71
  --- i_callbacks.c	5 Dec 2006 03:04:31 -0000	1.70
  +++ i_callbacks.c	17 Dec 2006 04:14:03 -0000	1.71
  @@ -799,7 +799,7 @@
     exit_if_null(w_current);
   
     i_update_middle_button(w_current, i_callback_edit_edit, _("Edit"));
  -  o_edit(w_current, w_current->page_current->selection2_head->next);
  +  o_edit(w_current, w_current->page_current->selection_list);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -884,18 +884,19 @@
   DEFINE_I_CALLBACK(edit_rotate_90_hotkey)
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
  -  SELECTION *s_current;
  +  GList *object_list;
   
     exit_if_null(w_current);
     o_redraw_cleanstates(w_current);	
   
  -  if (w_current->page_current->selection2_head) {
  -    s_current = w_current->page_current->selection2_head->next;
  +  object_list = w_current->page_current->selection_list;    
  +
  +  if (object_list) {
       i_update_middle_button(w_current,
                              i_callback_edit_rotate_90_hotkey, _("Rotate"));
       /* Allow o_rotate_90 to redraw the objects */
       w_current->DONT_REDRAW = 0;
  -    o_rotate_90(w_current, s_current, mouse_x, mouse_y);
  +    o_rotate_90(w_current, object_list, mouse_x, mouse_y);
     }
   
     w_current->event_state = SELECT;
  @@ -926,19 +927,20 @@
   DEFINE_I_CALLBACK(edit_mirror_hotkey)
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
  -  OBJECT *object;
  +  GList *object_list;
   
     exit_if_null(w_current);
   
     o_redraw_cleanstates(w_current);	
  -  object = o_select_return_first_object(w_current);
   
  -  if (object) {
  +  object_list = w_current->page_current->selection_list;    
  +
  +  if (object_list) {
       i_update_middle_button(w_current,
                              i_callback_edit_mirror_hotkey, _("Mirror"));
   
       o_mirror(w_current, 
  -             w_current->page_current->selection2_head->next, 
  +             object_list, 
                mouse_x, mouse_y);
     }
   
  @@ -1025,6 +1027,7 @@
   DEFINE_I_CALLBACK(edit_embed)
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
  +  OBJECT *o_current;
   
     exit_if_null(w_current);
   
  @@ -1032,14 +1035,15 @@
     /* anything selected ? */
     if (o_select_selected(w_current)) {
       /* yes, embed each selected component */
  -    SELECTION *s_current =
  -      w_current->page_current->selection2_head->next;
  +    GList *s_current =
  +      w_current->page_current->selection_list;
   
       while (s_current != NULL) {
  -      g_assert (s_current->selected_object != NULL);
  -      if ( (s_current->selected_object->type == OBJ_COMPLEX) ||
  -	   (s_current->selected_object->type == OBJ_PICTURE) ) {
  -        o_embed (w_current, s_current->selected_object);
  +      o_current = (OBJECT *) s_current->data;
  +      g_assert (o_current != NULL);
  +      if ( (o_current->type == OBJ_COMPLEX) ||
  +	   (o_current->type == OBJ_PICTURE) ) {
  +        o_embed (w_current, o_current);
         }
         s_current = s_current->next;
       }
  @@ -1061,6 +1065,7 @@
   DEFINE_I_CALLBACK(edit_unembed)
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
  +  OBJECT *o_current;
   
     exit_if_null(w_current);
   
  @@ -1068,14 +1073,15 @@
     /* anything selected ? */
     if (o_select_selected(w_current)) {
       /* yes, unembed each selected component */
  -    SELECTION *s_current =
  -      w_current->page_current->selection2_head->next;
  +    GList *s_current =
  +      w_current->page_current->selection_list;
   
       while (s_current != NULL) {
  -      g_assert (s_current->selected_object != NULL);
  -      if ( (s_current->selected_object->type == OBJ_COMPLEX) ||
  -           (s_current->selected_object->type == OBJ_PICTURE) ) {
  -        o_unembed (w_current, s_current->selected_object);
  +      o_current = (OBJECT *) s_current->data;
  +      g_assert (o_current != NULL);
  +      if ( (o_current->type == OBJ_COMPLEX) ||
  +           (o_current->type == OBJ_PICTURE) ) {
  +        o_unembed (w_current, o_current);
         }
         s_current = s_current->next;
       }
  @@ -1097,6 +1103,7 @@
   DEFINE_I_CALLBACK(edit_update)
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
  +  OBJECT *o_current;
   
     exit_if_null(w_current);
   
  @@ -1104,14 +1111,14 @@
     /* anything selected ? */
     if (o_select_selected(w_current)) {
       /* yes, update each selected component */
  -    SELECTION *s_current =
  -      w_current->page_current->selection2_head->next;
  +    GList *s_current =
  +      w_current->page_current->selection_list;
   
       while (s_current != NULL) {
  -      g_assert (s_current->selected_object != NULL);
  -      if (s_current->selected_object->type == OBJ_COMPLEX) {
  -        o_update_component (w_current,
  -                            s_current->selected_object);
  +      o_current = (OBJECT *) s_current->data;
  +      g_assert (o_current != NULL);
  +      if (o_current->type == OBJ_COMPLEX) {
  +        o_update_component (w_current, o_current);
         }
         s_current = s_current->next;
       }
  @@ -1259,13 +1266,13 @@
   
     /* anything selected ? */
     if (o_select_selected(w_current)) {
  -    SELECTION *s_current =
  -      w_current->page_current->selection2_head->next;
  +    GList *s_current =
  +      w_current->page_current->selection_list;
       GList *objects = NULL;
   
       /* yes, build a list of relevant objects */
       while (s_current != NULL) {
  -      OBJECT *o_current = s_current->selected_object;
  +      OBJECT *o_current = (OBJECT *) s_current->data;
             
         if (o_current->type == OBJ_LINE   ||
             o_current->type == OBJ_BOX    ||
  @@ -1302,13 +1309,13 @@
   
     /* anything selected ? */
     if (o_select_selected(w_current)) {
  -    SELECTION *s_current =
  -      w_current->page_current->selection2_head->next;
  +    GList *s_current =
  +      w_current->page_current->selection_list;
       GList *objects = NULL;
   
       /* yes, build a list of relevant objects */
       while (s_current != NULL) {
  -      OBJECT *o_current = s_current->selected_object;
  +      OBJECT *o_current = (OBJECT *) s_current->data;
             
         if (o_current->type == OBJ_BOX ||
             o_current->type == OBJ_CIRCLE) {
  @@ -1854,7 +1861,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_copy1, _("Copy 1"));
  @@ -1873,7 +1880,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_copy2, _("Copy 2"));
  @@ -1892,7 +1899,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_copy3, _("Copy 3"));
  @@ -1911,7 +1918,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_copy4, _("Copy 4"));
  @@ -1930,7 +1937,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_copy5, _("Copy 5"));
  @@ -1949,7 +1956,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_cut1, _("Cut 1"));
  @@ -1968,7 +1975,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_cut2, _("Cut 2"));
  @@ -1987,7 +1994,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_cut3, _("Cut 3"));
  @@ -2006,7 +2013,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_cut4, _("Cut 4"));
  @@ -2025,7 +2032,7 @@
   
     exit_if_null(w_current);
   
  -  if (w_current->page_current->selection2_head->next == NULL)
  +  if (w_current->page_current->selection_list == NULL)
     return;
   
     i_update_middle_button(w_current, i_callback_buffer_cut5, _("Cut 5"));
  @@ -3066,7 +3073,7 @@
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
     OBJECT *first_object;
  -  SELECTION *s_current;
  +  GList *s_current;
   
     exit_if_null(w_current);
   
  @@ -3082,12 +3089,12 @@
                            _("Attach"));
   
     /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     if (!s_current) {
       return;
     }
   
  -  first_object = s_current->selected_object; 
  +  first_object = (OBJECT *) s_current->data; 
     if (!first_object) {
       return;	
     }
  @@ -3095,10 +3102,10 @@
     /* skip over first object */
     s_current = s_current->next;
     while (s_current != NULL) {
  -    if (s_current->selected_object) {
  +    if (s_current->data) {
         o_attrib_attach(w_current,
                         w_current->page_current->object_head,
  -                      s_current->selected_object,
  +                      (OBJECT *)s_current->data,
                         first_object);
         w_current->page_current->CHANGED=1;
       }
  @@ -3115,7 +3122,7 @@
   DEFINE_I_CALLBACK(attributes_detach)
   {
     TOPLEVEL *w_current = (TOPLEVEL *) data;
  -  SELECTION *s_current;
  +  GList *s_current;
     OBJECT *o_current;
   
     exit_if_null(w_current);
  @@ -3131,9 +3138,9 @@
                            _("Detach"));
   
     /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     while (s_current != NULL) {
  -    o_current = s_current->selected_object;
  +    o_current = (OBJECT *) s_current->data;
       if (o_current) {
         if (o_current->attribs) {
           o_attrib_free_all(w_current, 
  @@ -3173,7 +3180,7 @@
     if (object != NULL) {
       o_attrib_toggle_show_name_value(w_current, 
                                       w_current->page_current->
  -                                    selection2_head->next,
  +                                    selection_list,
                                       SHOW_NAME);
     }
   }
  @@ -3204,7 +3211,7 @@
     if (object != NULL) {
       o_attrib_toggle_show_name_value(w_current, 
                                       w_current->page_current->
  -                                    selection2_head->next,
  +                                    selection_list,
                                       SHOW_VALUE);
     }
   }
  @@ -3235,7 +3242,7 @@
     if (object != NULL) {
       o_attrib_toggle_show_name_value(w_current, 
                                       w_current->page_current->
  -                                    selection2_head->next,
  +                                    selection_list,
                                       SHOW_NAME_VALUE);
     }
   }
  @@ -3267,7 +3274,7 @@
     if (object != NULL) {
       o_attrib_toggle_visibility(w_current, 
                                  w_current->page_current->
  -                               selection2_head->next);
  +                               selection_list);
     }
   }
   
  @@ -3505,8 +3512,21 @@
      * so lets be sure to clean up the complex_place_head
      * structure and also clean up the attrib_place_head.
      * remember these don't remove the head structure */
  -  o_list_delete_rest(w_current,
  -                     w_current->page_current->complex_place_head);
  +
  +  /* If it is a move command, then free the complex place list WITHOUT
  +     freeing the individual objects. */
  +  if ( (w_current->inside_action) && 
  +       ((w_current->event_state == ENDCOPY) ||
  +	(w_current->event_state == ENDMCOPY)) ) {
  +	  s_delete_object_glist(w_current,
  +				w_current->page_current->complex_place_list);  
  +	  w_current->page_current->complex_place_list = NULL;
  +	}
  +  else {
  +    g_list_free(w_current->page_current->complex_place_list);
  +  }
  +  w_current->page_current->complex_place_list = NULL;
  +
     o_list_delete_rest(w_current,
                        w_current->page_current->attrib_place_head);
   
  
  
  
  1.26      +19 -16    eda/geda/gaf/gschem/src/o_attrib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_attrib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_attrib.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- o_attrib.c	6 Aug 2006 16:07:54 -0000	1.25
  +++ o_attrib.c	17 Dec 2006 04:14:03 -0000	1.26
  @@ -51,10 +51,11 @@
    *
    *  \todo get a better name
    */
  -void o_attrib_add_selected(TOPLEVEL *w_current, SELECTION* selection_list,
  +void o_attrib_add_selected(TOPLEVEL *w_current, GList** selection_list_ptr,
   			   OBJECT *selected)
   {
     ATTRIB *a_current;
  +  GList *selection_list = *selection_list_ptr;
   
     if (!selection_list) return;
   
  @@ -69,7 +70,7 @@
   
   				/* make sure object isn't selected already */
           if (a_current->object->saved_color == -1) {
  -          o_selection_add(selection_list,
  +          *selection_list_ptr = o_selection_add(selection_list,
                             /* w_current->page_current->
                                selection2_head,*/
                             a_current->object);
  @@ -90,9 +91,9 @@
    *  \par Function Description
    *
    */
  -void o_attrib_toggle_visibility(TOPLEVEL *w_current, SELECTION *list)
  +void o_attrib_toggle_visibility(TOPLEVEL *w_current, GList *list)
   {
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     OBJECT *object = NULL;
   
     if (list == NULL) {
  @@ -102,7 +103,7 @@
     s_current = list;
   
     while(s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
       if (object == NULL) {
         fprintf(stderr, _("Got NULL in o_attrib_toggle_visibility\n"));
         exit(-1);
  @@ -154,9 +155,9 @@
    *
    */
   void o_attrib_toggle_show_name_value(TOPLEVEL *w_current, 
  -				     SELECTION *list, int new_show_name_value)
  +				     GList *list, int new_show_name_value)
   {
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     OBJECT *object = NULL;
   
     if (list == NULL) {
  @@ -166,7 +167,7 @@
     s_current = list;
   
     while(s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
   
       if (object == NULL) {
         fprintf(stderr, _("Got NULL in o_attrib_toggle_show_name_value\n"));
  @@ -334,7 +335,7 @@
     /* here is where you attach the stuff */
     /* if an object is selected, else just place it */
     /* selection_head should never be null since it has a head struct */
  -  object = o_select_return_first_object(w_current);
  +  object = (OBJECT *) g_list_first (w_current->page_current->selection_list)->data;
     if (object != NULL) {
       /* should attribute be selected? probably */
       /* this is probably okay, NEWSEL, since tail is a single obj */
  @@ -344,7 +345,8 @@
                       object);
     }
   
  -  o_selection_add(w_current->page_current->selection2_head,
  +  w_current->page_current->selection_list = 
  +    o_selection_add(w_current->page_current->selection_list,
                     w_current->page_current->object_tail);
     o_undo_savestate(w_current, UNDO_ALL);
   }
  @@ -471,7 +473,8 @@
                       o_current);
     }
   
  -  o_selection_add(w_current->page_current->selection2_head,
  +  w_current->page_current->selection_list = 
  +    o_selection_add(w_current->page_current->selection_list,
                     w_current->page_current->object_tail);
   
     o_text_erase(w_current, w_current->page_current->object_tail); 
  
  
  
  1.23      +128 -130  eda/geda/gaf/gschem/src/o_basic.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_basic.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_basic.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- o_basic.c	21 Oct 2006 19:23:44 -0000	1.22
  +++ o_basic.c	17 Dec 2006 04:14:03 -0000	1.23
  @@ -62,7 +62,7 @@
         case(ENDCOPY):
         case(ENDMCOPY):
   	o_drawbounding(w_current, NULL,
  -                       w_current->page_current->selection2_head->next,
  +                       w_current->page_current->selection_list,
                          x_get_darkcolor(w_current->bb_color), FALSE);
   
           break;
  @@ -70,8 +70,8 @@
         case(DRAWCOMP):
         case(ENDCOMP):
           o_drawbounding(w_current, 
  -		       w_current->page_current->complex_place_head->next,
                          NULL,
  +		       w_current->page_current->complex_place_list,
                          x_get_darkcolor(w_current->bb_color), FALSE);
           break;
   
  @@ -106,7 +106,9 @@
       x_repaint_background(w_current);
     }
   
  -  o_recalc(w_current, w_current->page_current->object_head);
  +  o_recalc_object_list(w_current, w_current->page_current->object_head);
  +  /* Uncomment this when using the complex_place_list for moving and copying */
  +  /*  o_recalc_object_glist(w_current, w_current->page_current->complex_place_list); */
   
     draw_selected = !(w_current->inside_action &&
   		    ((w_current->event_state == MOVE) ||
  @@ -154,8 +156,8 @@
   {
     if (!w_current->SHIFTKEY) {
       o_select_run_hooks(w_current, NULL, 2);
  -    o_selection_remove_most(w_current, w_current->page_current->
  -                            selection2_head); 
  +    o_selection_unselect_list(w_current,
  +			      &(w_current->page_current->selection_list));
     }
   }
   
  @@ -193,15 +195,15 @@
    */
   void o_draw_selected(TOPLEVEL *w_current)
   {
  -  SELECTION* s_current;
  +  GList* s_current;
     OBJECT* o_current;
     if (w_current->inside_redraw) {
       return;
     }
   
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     while (s_current != NULL) {
  -    o_current=s_current->selected_object;
  +    o_current = (OBJECT *) s_current->data;
   
       if (o_current) {
         o_redraw_single(w_current, o_current);
  @@ -219,15 +221,15 @@
    */
   void o_erase_selected(TOPLEVEL *w_current)
   {
  -  SELECTION* s_current;
  +  GList* s_current;
     OBJECT* o_current;
     if (w_current->inside_redraw) {
       return;
     }
   
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     while (s_current != NULL) {
  -    o_current=s_current->selected_object;
  +    o_current = (OBJECT *) s_current->data;
   
       if (o_current) {
         o_cue_erase_single(w_current, o_current);
  @@ -273,7 +275,7 @@
    */
   /* both outline and boundingbox work! */
   /* name is blah */
  -void o_drawbounding(TOPLEVEL *w_current, OBJECT *o_list, SELECTION *s_list, 
  +void o_drawbounding(TOPLEVEL *w_current, OBJECT *o_list, GList *o_glist, 
   		    GdkColor *color, int firsttime)
   {
     int diff_x, diff_y;
  @@ -283,7 +285,7 @@
     /* you have to make these static... for the once mode */
     static int rleft, rtop, rbottom, rright;
   
  -  if (!o_list && !s_list) {
  +  if (!o_list && !o_glist) {
       return;
     }
   
  @@ -304,29 +306,25 @@
                                     diff_x,
                                     diff_y,
                                     o_list);
  -    } else if (s_list) { 
  -      o_complex_translate_display_selection(w_current,
  -					    diff_x,
  -					    diff_y,
  -					    s_list);
  +    } else if (o_glist) {
  +      o_complex_translate_display_object_glist(w_current, diff_x, diff_y, o_glist);
       }
   
       gdk_gc_set_foreground(w_current->bounding_xor_gc, color);
   
       if (o_list) {
  -      get_complex_bounds(w_current, o_list,
  +      get_object_list_bounds(w_current, o_list,
                            &rleft  ,
                            &rtop   ,
                            &rright ,
                            &rbottom);
  -    } else if (s_list) {
  -      get_complex_bounds_selection(w_current, s_list,
  +    } else if (o_glist) {
  +      get_object_glist_bounds(w_current, o_glist,
   				   &rleft  ,
   				   &rtop   ,
   				   &rright ,
   				   &rbottom);
       }
  -
       gdk_draw_rectangle(w_current->window,
                          w_current->bounding_xor_gc, FALSE,
                          rleft + diff_x,
  @@ -343,13 +341,13 @@
   #endif
   
           if (o_list) {
  -          get_complex_bounds(w_current, o_list,
  +          get_object_list_bounds(w_current, o_list,
                                &rleft  ,
                                &rtop   ,
                                &rright ,
                                &rbottom);
  -        } else if (s_list) {
  -          get_complex_bounds_selection(w_current, s_list,
  +        } else if (o_glist) {
  +	  get_object_glist_bounds(w_current, o_glist,
                                          &rleft  ,
                                          &rtop   ,
                                          &rright ,
  @@ -373,12 +371,11 @@
                                         diff_x,
                                         diff_y,
                                         o_list);
  -        } else if (s_list) { 
  -          o_complex_translate_display_selection(w_current,
  -                                                diff_x,
  -                                                diff_y,
  -                                                s_list);
  +        } else if (o_glist) {
  +	  o_complex_translate_display_object_glist(w_current, 
  +						   diff_x, diff_y, o_glist);
           }
  +	
         }
   
     w_current->last_drawb_mode = w_current->actionfeedback_mode;
  @@ -406,21 +403,20 @@
                                       diff_x,
                                       diff_y,
                                       o_list);
  -      } else if (s_list) { 
  -        o_complex_translate_display_selection(w_current,
  -                                              diff_x,
  -                                              diff_y,
  -                                              s_list);
  +      } else if (o_glist) {
  +	o_complex_translate_display_object_glist(w_current, 
  +						 diff_x, diff_y, o_glist);
         }
  +      
       } else {
         if (o_list) {
  -        get_complex_bounds(w_current, o_list,
  +        get_object_list_bounds(w_current, o_list,
                              &rleft  ,
                              &rtop   ,
                              &rright ,
                              &rbottom);
  -      } else if (s_list) {
  -        get_complex_bounds_selection(w_current, s_list,
  +      } else if (o_glist) {
  +	get_object_glist_bounds(w_current, o_glist,
                                        &rleft  ,
                                        &rtop   ,
                                        &rright ,
  @@ -454,26 +450,26 @@
                                       diff_x,
                                       diff_y,
                                       o_list);
  -      } else if (s_list) { 
  -        o_complex_translate_display_selection(w_current,
  -                                              diff_x,
  -                                              diff_y,
  -                                              s_list);
  +      } else if (o_glist) {
  +	o_complex_translate_display_object_glist(w_current, 
  +						 diff_x, diff_y, o_glist);
         }
  +
       } else {
         if (o_list) {
  -        get_complex_bounds(w_current, o_list,
  +        get_object_list_bounds(w_current, o_list,
                              &rleft  ,
                              &rtop   ,
                              &rright ,
                              &rbottom);
  -      } else if (s_list) {
  -        get_complex_bounds_selection(w_current, s_list,
  +      } else if (o_glist) {
  +	get_object_glist_bounds(w_current, o_glist,
                                        &rleft  ,
                                        &rtop   ,
                                        &rright ,
                                        &rbottom);
         }
  +      
         gdk_gc_set_foreground(w_current->bounding_xor_gc,
                               color);
         gdk_draw_rectangle(w_current->window,
  @@ -512,32 +508,30 @@
                                           diff_x,
                                           diff_y,
                                           o_list);
  -          } else if (s_list) { 
  -            o_complex_translate_display_selection(w_current,
  -                                                  diff_x,
  -                                                  diff_y,
  -                                                  s_list);
  -            o_complex_translate_display_selection(w_current,
  -                                                  diff_x,
  -                                                  diff_y,
  -                                                  s_list);
  +          } else if (o_glist) {
  +	    o_complex_translate_display_object_glist(w_current, 
  +						     diff_x, diff_y, o_glist);
  +	    o_complex_translate_display_object_glist(w_current,
  +						     diff_x, diff_y, o_glist);
             }
  +	  
           } else {
             /*! \todo why are we doing this here...?
              * probably a reason */
             if (o_list) {
  -            get_complex_bounds(w_current, o_list,
  +            get_object_list_bounds(w_current, o_list,
                                  &rleft  ,
                                  &rtop   ,
                                  &rright ,
                                  &rbottom);
  -          } else if (s_list) {
  -            get_complex_bounds_selection(w_current, s_list,
  +          } else if (o_glist) {
  +	    get_object_glist_bounds(w_current, o_glist,
                                            &rleft  ,
                                            &rtop   ,
                                            &rright ,
                                            &rbottom);
             }
  +
           }
           if (w_current->netconn_rubberband) {
             o_move_stretch_rubberband(w_current);
  @@ -559,18 +553,19 @@
   
       if (firsttime == TRUE) {
         if (o_list) {
  -        get_complex_bounds(w_current, o_list,
  +        get_object_list_bounds(w_current, o_list,
                              &rleft  ,
                              &rtop   ,
                              &rright ,
                              &rbottom);
  -      } else if (s_list) {
  -        get_complex_bounds_selection(w_current, s_list,
  +      } else if (o_glist) {
  +	get_object_glist_bounds(w_current, o_glist,
                                        &rleft  ,
                                        &rtop   ,
                                        &rright ,
                                        &rbottom);
         }
  +      
         /*printf("once\n");*/
       
       }
  @@ -595,9 +590,9 @@
      */
     if (o_list) {
       o_complex_translate2(w_current, diff_x, diff_y, o_list);
  -  } else if (s_list) {
  -    o_complex_translate_selection(w_current, diff_x, diff_y, 
  -                                  s_list);
  +  } else if (o_glist) {
  +    o_complex_translate_display_object_glist(w_current, 
  +					     diff_x, diff_y, o_glist);
     }
   }
   
  @@ -606,12 +601,12 @@
    *  \par Function Description
    *
    */
  -void o_erasebounding(TOPLEVEL *w_current, OBJECT *o_list, SELECTION *s_list)
  +void o_erasebounding(TOPLEVEL *w_current, OBJECT *o_list, GList *s_list)
   {
     int diff_x, diff_y;
     int rleft, rtop, rright, rbottom;
   
  -  if (o_list == NULL) {
  +  if ( (o_list == NULL) && (s_list == NULL)) {
       /* this is an error condition */
       w_current->event_state = SELECT;
       w_current->inside_action = 0;
  @@ -623,13 +618,13 @@
     }
   
     if (o_list) {
  -    get_complex_bounds(w_current, o_list,
  +    get_object_list_bounds(w_current, o_list,
                          &rleft  ,
                          &rtop   ,
                          &rright ,
                          &rbottom);
     } else if (s_list) {
  -    get_complex_bounds_selection(w_current, s_list,
  +    get_object_glist_bounds(w_current, s_list,
                                    &rleft  ,
                                    &rtop   ,
                                    &rright ,
  @@ -764,8 +759,11 @@
          * so lets be sure to clean up the complex_place_head
          * structure and also clean up the attrib_place_head.
          * remember these don't remove the head structure */
  -      o_list_delete_rest(w_current,
  -			 w_current->page_current->complex_place_head);
  +      /* The complex place is a reference to the real objects, so don't
  +	 free the objects here */
  +      g_list_free (w_current->page_current->complex_place_list);
  +      w_current->page_current->complex_place_list = NULL;
  +
         o_list_delete_rest(w_current,
   			 w_current->page_current->attrib_place_head);
    
  
  
  
  1.9       +11 -13    eda/geda/gaf/gschem/src/o_buffer.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_buffer.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_buffer.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -b -r1.8 -r1.9
  --- o_buffer.c	21 Oct 2006 13:56:24 -0000	1.8
  +++ o_buffer.c	17 Dec 2006 04:14:03 -0000	1.9
  @@ -35,14 +35,14 @@
    */
   void o_buffer_copy(TOPLEVEL *w_current, int buf_num)
   {
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
   
     if (buf_num < 0 || buf_num > MAX_BUFFERS) {
       fprintf(stderr, _("Got an invalid buffer_number [o_buffer_copy]\n"));
       return;
     }
   
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     if (object_buffer[buf_num] == NULL) {
       object_buffer[buf_num] = s_basic_init_object("buffer0_head");
  @@ -73,14 +73,14 @@
    */
   void o_buffer_cut(TOPLEVEL *w_current, int buf_num)
   {
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
   
     if (buf_num < 0 || buf_num > MAX_BUFFERS) {
       fprintf(stderr, _("Got an invalid buffer_number [o_buffer_cut]\n"));
       return;
     }
   
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     if (object_buffer[buf_num] == NULL) {
       object_buffer[buf_num] = s_basic_init_object("buffer0_head");
  @@ -165,7 +165,7 @@
     int w_diff_x, w_diff_y;
     OBJECT *o_current;
     OBJECT *o_saved;
  -  SELECTION *temp_list;
  +  GList *temp_list;
     PAGE *p_current;
     GList *connected_objects = NULL;
   
  @@ -205,11 +205,11 @@
   
     p_current->object_tail = return_tail(p_current->object_head);
     o_current = o_saved->next;
  -  temp_list = o_selection_new_head();
  +  temp_list = NULL;
   
     /* now add new objects to the selection list */
     while (o_current != NULL) {
  -    o_selection_add(temp_list, o_current);
  +    temp_list = o_selection_add(temp_list, o_current);
       s_conn_update_object(w_current, o_current);
       if (o_current->type == OBJ_COMPLEX || o_current->type == OBJ_PLACEHOLDER) {
         connected_objects = s_conn_return_complex_others(
  @@ -229,12 +229,10 @@
     connected_objects = NULL;
       
     o_select_run_hooks(w_current, NULL, 2); 
  -  o_selection_remove_most(w_current,
  -                          w_current->page_current->selection2_head);
  -  o_selection_destroy_head(w_current->page_current->selection2_head);
  -  w_current->page_current->selection2_head = temp_list;
  -  w_current->page_current->selection2_tail = o_selection_return_tail(
  -                                                                     temp_list);
  +
  +  o_selection_unselect_list(w_current,
  +			    &(w_current->page_current->selection_list));
  +  w_current->page_current->selection_list = temp_list;
   
     w_current->page_current->CHANGED = 1;
     o_redraw(w_current, o_saved->next, TRUE); /* only redraw new objects */
  
  
  
  1.22      +1 -1      eda/geda/gaf/gschem/src/o_bus.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_bus.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_bus.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- o_bus.c	21 Oct 2006 13:56:24 -0000	1.21
  +++ o_bus.c	17 Dec 2006 04:14:03 -0000	1.22
  @@ -270,7 +270,7 @@
   
   #if 0 /* not ready for prime time use */
     /* new bus extenstion stuff */
  -  o_current = w_current->page_current->selection_head->next;
  +  o_current = w_current->page_current->selection_list;
     if (o_current != NULL && w_current->event_state == STARTDRAWNET) {
       if (o_current->type == OBJ_BUS) {
         if (o_current->line) {
  
  
  
  1.29      +100 -108  eda/geda/gaf/gschem/src/o_complex.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_complex.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_complex.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -b -r1.28 -r1.29
  --- o_complex.c	21 Oct 2006 13:56:25 -0000	1.28
  +++ o_complex.c	17 Dec 2006 04:14:03 -0000	1.29
  @@ -42,11 +42,15 @@
   {
     int left, right, top, bottom;
   
  +  g_return_if_fail (o_current != NULL); 
  +  g_return_if_fail (o_current->complex != NULL);
  +  g_return_if_fail (o_current->complex->prim_objs != NULL);
  +
     if (!w_current->DONT_REDRAW) {
       o_redraw(w_current, o_current->complex->prim_objs, TRUE);
     }
   
  -  get_complex_bounds(w_current, o_current->complex->prim_objs,
  +  get_object_list_bounds(w_current, o_current->complex->prim_objs,
                        &left, &top, &right, &bottom);
     o_current->left   = left;
     o_current->top    = top;
  @@ -154,10 +158,8 @@
   
     w_current->DONT_DRAW_CONN = 1;
     w_current->ADDING_SEL = 1; /* reuse this flag, rename later hack */
  -  w_current->page_current->complex_place_tail =
  -  (OBJECT *) o_complex_add(
  -                           w_current,
  -                           w_current->page_current->complex_place_head,
  +  o_complex_add(w_current, NULL,
  +		&(w_current->page_current->complex_place_list),
                              OBJ_COMPLEX, WHITE, x, y, 0, 0,
                              w_current->internal_clib,
                              w_current->internal_basename, 1, TRUE);
  @@ -172,8 +174,8 @@
     }
   
     o_drawbounding(w_current, 
  -                 w_current->page_current->complex_place_head->next,
                    NULL,
  +                 w_current->page_current->complex_place_list,
                    x_get_darkcolor(w_current->bb_color), TRUE);
   }
   
  @@ -185,19 +187,21 @@
   void o_complex_place_rotate(TOPLEVEL *w_current)
   {
     OBJECT *o_current;
  +  GList *ptr;
     int screen_x_local = -1;
     int screen_y_local = -1;
     int new_angle;
   
  -  o_current = w_current->page_current->complex_place_head->next;
  -  while(o_current) {
  +  ptr = w_current->page_current->complex_place_list;
  +  while(ptr) {
  +    o_current = (OBJECT *) ptr->data;
       switch(o_current->type) {	
         case(OBJ_COMPLEX):
           screen_x_local = o_current->complex->screen_x; 
           screen_y_local = o_current->complex->screen_y;
           break;
       }
  -    o_current = o_current->next;
  +    ptr = ptr->next;
     }
   
     if (screen_x_local == -1) {
  @@ -205,8 +209,9 @@
       return;
     }
   
  -  o_current = w_current->page_current->complex_place_head->next;
  -  while(o_current) {
  +  ptr = w_current->page_current->complex_place_list;
  +  while(ptr) {
  +    o_current = (OBJECT *) ptr->data;
       switch(o_current->type) {	
   
         case(OBJ_TEXT):
  @@ -222,7 +227,7 @@
           break;
   
       }
  -    o_current = o_current->next;
  +    ptr = ptr->next;
     }
   
   }
  @@ -298,19 +303,18 @@
         printf("inside draw outline here\n");
   #endif
         /* erase outline */
  -      o_complex_translate_display(
  -                                  w_current,
  +      
  +      o_complex_translate_display_object_glist(w_current,
                                     diff_x, diff_y,
                                     w_current->page_current->
  -                                  complex_place_head->next);
  +					       complex_place_list); 
       } else {
   #if 0
         printf("inside draw bounding here\n");
   #endif
  -      get_complex_bounds(
  -                         w_current,
  +      get_object_glist_bounds(w_current,
                            w_current->page_current->
  -                         complex_place_head->next,
  +			      complex_place_list,
                            &rleft, &rtop, &rright, &rbottom);
         gdk_gc_set_foreground(
                               w_current->gc,
  @@ -327,16 +331,15 @@
       w_current->page_current->CHANGED = 1;
       o_undo_savestate(w_current, UNDO_ALL);
       i_update_menus(w_current);
  -    o_list_delete_rest(w_current, w_current->page_current->
  -                       complex_place_head);
  +    s_delete_object_glist(w_current, w_current->page_current->
  +			  complex_place_list);
       return;
     }
   
     o_temp = w_current->page_current->object_tail;
     w_current->page_current->object_tail =
  -    o_complex_add(
  -                  w_current,
  -                  w_current->page_current->object_tail,
  +    o_complex_add(w_current,
  +                  w_current->page_current->object_tail, NULL,
                     OBJ_COMPLEX, WHITE, x, y, w_current->complex_rotate, 0,
                     w_current->internal_clib,
                     w_current->internal_basename, 1, TRUE);
  @@ -361,7 +364,6 @@
     }
   
     /* 1 should be define fix everywhere hack */
  -	
     o_current = w_current->page_current->object_tail;
   
     if (scm_hook_empty_p(add_component_hook) == SCM_BOOL_F &&
  @@ -403,17 +405,15 @@
       printf("inside draw outline here\n");
   #endif
       /* erase outline */
  -    o_complex_translate_display(
  -                                w_current,
  +    o_complex_translate_display_object_glist(w_current,
                                   diff_x, diff_y,
  -                                w_current->page_current->complex_place_head->next);
  +					     w_current->page_current->complex_place_list);
     } else {
   #if 0
       printf("inside draw bounding here\n");
   #endif
  -    get_complex_bounds(
  -                       w_current,
  -                       w_current->page_current->complex_place_head->next,
  +    get_object_glist_bounds(w_current,
  +			    w_current->page_current->complex_place_list,
                          &rleft, &rtop,
                          &rright, &rbottom);
       gdk_gc_set_foreground(
  @@ -428,19 +428,20 @@
   
     /*! \todo redraw has to happen at the end of all this hack or
      * maybe not? */
  -  o_list_delete_rest(w_current,
  -                     w_current->page_current->complex_place_head);
  +  g_list_free(w_current->page_current->complex_place_list);
  +  w_current->page_current->complex_place_list = NULL;
   
     /* This doesn't allow anything else to be in the selection
      * list when you add a component */
   
  -  o_selection_remove_most(w_current,
  -                          w_current->page_current->selection2_head);
  -  o_selection_add(w_current->page_current->selection2_head, 
  +  o_selection_unselect_list(w_current,
  +			    &(w_current->page_current->selection_list));
  +  w_current->page_current->selection_list = 
  +    o_selection_add(w_current->page_current->selection_list, 
                     w_current->page_current->object_tail);
     /* the o_redraw_selected is in x_events.c after this call
      * returns */
  -  o_attrib_add_selected(w_current, w_current->page_current->selection2_head,
  +  o_attrib_add_selected(w_current, &(w_current->page_current->selection_list),
                           w_current->page_current->object_tail);
   
     s_conn_update_complex(w_current, o_current->complex->prim_objs);
  @@ -464,8 +465,8 @@
   void o_complex_rubbercomplex(TOPLEVEL *w_current)
   {
     o_drawbounding(w_current,
  -                 w_current->page_current->complex_place_head->next,
                    NULL,
  +                 w_current->page_current->complex_place_list,
                    x_get_darkcolor(w_current->bb_color), FALSE);
   }
   
  @@ -474,12 +475,11 @@
    *  \par Function Description
    *
    */
  -void o_complex_translate_display(TOPLEVEL *w_current,
  -				 int x1, int y1, OBJECT *complex)
  +void
  +o_complex_translate_display_single_object(TOPLEVEL *w_current,
  +					  int x1, int y1, OBJECT *o_current)
   {
  -  OBJECT *o_current = complex;
  -
  -  while (o_current != NULL) {
  +  if (o_current != NULL) {
       switch(o_current->type) {
         case(OBJ_LINE):
           o_line_draw_xor(w_current, x1, y1, o_current);
  @@ -523,6 +523,41 @@
           o_arc_draw_xor(w_current, x1, y1, o_current);
           break;
       }
  +  }
  +}
  +
  +/*! \todo Finish function documentation!!!
  + *  \brief
  + *  \par Function Description
  + *
  + */
  +void
  +o_complex_translate_display_object_glist(TOPLEVEL *w_current,
  +			                 int x1, int y1, GList *object_list)
  +{
  +  GList *ptr = object_list;
  +
  +  while (ptr != NULL) {
  +    o_complex_translate_display_single_object (w_current, x1, y1, 
  +                                               (OBJECT *)ptr->data);
  +    ptr = ptr->next;
  +  }
  +}
  +
  +
  +/*! \todo Finish function documentation!!!
  + *  \brief
  + *  \par Function Description
  + *
  + */
  +void
  +o_complex_translate_display(TOPLEVEL *w_current,
  +			    int x1, int y1, OBJECT *complex)
  +{
  +  OBJECT *o_current = complex;
  +
  +  while (o_current != NULL) {
  +    o_complex_translate_display_single_object (w_current, x1, y1, o_current);
       o_current = o_current->next;
     }
   }
  @@ -533,63 +568,20 @@
    *
    */
   void o_complex_translate_display_selection(TOPLEVEL *w_current,
  -					   int x1, int y1, SELECTION *head)
  +					   int x1, int y1, GList *head)
   {
  -  SELECTION *s_current = head;
  +  GList *s_current = head;
     OBJECT *o_current;
   
     while (s_current != NULL) {
   
  -    o_current = s_current->selected_object;
  +    o_current = (OBJECT *) s_current->data;
   
       if (!o_current) {
         fprintf(stderr, _("Got NULL in o_complex_translate_display_selection\n"));
         exit(-1);
       }
  -
  -    switch(o_current->type) {
  -      case(OBJ_LINE):
  -        o_line_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_NET):
  -        o_net_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_BUS):
  -        o_bus_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_BOX):
  -        o_box_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_PICTURE):
  -        o_picture_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_CIRCLE):
  -        o_circle_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_COMPLEX):
  -      case(OBJ_PLACEHOLDER):
  -        o_complex_draw_xor(w_current, x1, y1, 
  -                           o_current->complex->prim_objs);
  -        break;
  -
  -      case(OBJ_TEXT):
  -        o_text_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_PIN):
  -        o_pin_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -
  -      case(OBJ_ARC):
  -        o_arc_draw_xor(w_current, x1, y1, o_current);
  -        break;
  -    }
  +    o_complex_translate_display_single_object (w_current, x1, y1, o_current);
       s_current = s_current->next;
     }
   }
  @@ -629,7 +621,7 @@
                    A_PAN_DONT_REDRAW);
     o_redraw_all(w_current);
   
  -  get_complex_bounds(w_current, w_current->page_current->object_head,
  +  get_object_list_bounds(w_current, w_current->page_current->object_head,
                        &rleft,
                        &rtop,
                        &rright,
  @@ -700,7 +692,7 @@
    *
    */
   void o_complex_translate_selection(TOPLEVEL *w_current, int dx, int dy, 
  -				   SELECTION *head)
  +				   GList *head)
   {
     if (head == NULL)  {
       printf(_("Got NULL in o_complex_translate_selection!\n"));
  @@ -906,7 +898,7 @@
   
   
     new_obj = o_complex_add(w_current,
  -                          list, object->type,
  +                          list, NULL, object->type,
                             color,
                             x, y,
                             object->complex->angle, 
  
  
  
  1.27      +29 -29    eda/geda/gaf/gschem/src/o_copy.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_copy.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_copy.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- o_copy.c	6 Aug 2006 16:45:29 -0000	1.26
  +++ o_copy.c	17 Dec 2006 04:14:03 -0000	1.27
  @@ -37,7 +37,7 @@
    */
   void o_copy_start(TOPLEVEL *w_current, int x, int y)
   {
  -  if (w_current->page_current->selection2_head->next != NULL) {
  +  if (w_current->page_current->selection_list != NULL) {
   
     /* This is commented out since it breaks the copy of objects.  See below. */
   #if 0
  @@ -53,7 +53,7 @@
       w_current->last_x = w_current->start_x = fix_x(w_current, x);
       w_current->last_y = w_current->start_y = fix_y(w_current, y);
       o_drawbounding(w_current, NULL,
  -                   w_current->page_current->selection2_head->next,
  +                   w_current->page_current->selection_list,
                      x_get_darkcolor(w_current->bb_color), TRUE);
       w_current->inside_action = 1;
     }
  @@ -66,8 +66,8 @@
    */
   void o_copy_end(TOPLEVEL *w_current)
   {
  -  SELECTION *temp_list = NULL;
  -  SELECTION *s_current = NULL;
  +  GList *temp_list = NULL;
  +  GList *s_current = NULL;
     GList *new_objects = NULL;
     GList *connected_objects=NULL;
     OBJECT *new_object = NULL;
  @@ -108,18 +108,19 @@
     diff_y = ly - sy;
   
     /* skip over head node */
  -  s_current = w_current->page_current->selection2_head->next;
  -  temp_list = o_selection_new_head();
  +  s_current = w_current->page_current->selection_list;
  +  temp_list = NULL;
     new_objects_head = s_basic_init_object("object_head");
   
     while(s_current != NULL) {
   
  -    if (s_current->selected_object == NULL) {
  +    object = (OBJECT *) s_current->data;
  +
  +    if (object == NULL) {
         fprintf(stderr, _("ERROR: NULL object in o_copy_end!\n"));
         exit(-1);
       }
   
  -    object = s_current->selected_object;
       switch(object->type) {
   
         case(OBJ_NET):
  @@ -143,7 +144,7 @@
                                 diff_x, diff_y,
                                 new_object);
   
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_net_draw(w_current, new_object);
   
  @@ -174,7 +175,7 @@
                                 diff_x, diff_y,
                                 new_object);
           
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_pin_draw(w_current, new_object);
           
  @@ -204,7 +205,7 @@
                                 diff_x, diff_y,
                                 new_object);
           
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_bus_draw(w_current, new_object);
           
  @@ -244,7 +245,7 @@
                                              diff_y,
                                              new_object);
   
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
   
   	/* NEWSEL: this needs to be fixed too */
   	/* this may not be needed anymore? */
  @@ -275,7 +276,7 @@
                                  new_object);
           w_current->ADDING_SEL=0; 
   
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_line_draw(w_current, new_object);
           break;
  @@ -297,7 +298,7 @@
                                 new_object);
           w_current->ADDING_SEL=0; 
           
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_box_draw(w_current, new_object);
           
  @@ -320,7 +321,7 @@
   				  new_object);
           w_current->ADDING_SEL=0; 
           
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_picture_draw(w_current, new_object);
           
  @@ -344,7 +345,7 @@
                                    new_object);
           w_current->ADDING_SEL=0; 
   
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_circle_draw(w_current, new_object);
           break;
  @@ -367,7 +368,7 @@
                                 new_object);
           w_current->ADDING_SEL=0; 
           
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = object->saved_color;
           o_arc_draw(w_current, new_object);
           break;
  @@ -381,15 +382,16 @@
     }
   
     /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     while(s_current != NULL) {
   
  -    if (s_current->selected_object == NULL) {
  +    object = (OBJECT *) s_current->data;
  +
  +    if (object == NULL) {
         fprintf(stderr, _("ERROR: NULL object in o_copy_end!\n"));
         exit(-1);
       }
   
  -    object = s_current->selected_object;
       switch(object->type) {
   
         case(OBJ_TEXT):
  @@ -440,7 +442,7 @@
             color = object->saved_color;
           }
   
  -        o_selection_add(temp_list, new_object);
  +        temp_list = o_selection_add(temp_list, new_object);
           new_object->saved_color = color;
           
   	/* signify that object is no longer an attribute */
  @@ -506,19 +508,17 @@
     /* erase the bounding box */
     if (w_current->actionfeedback_mode == BOUNDINGBOX) {
       o_drawbounding(w_current, NULL,
  -                   w_current->page_current->selection2_head->next,
  +                   w_current->page_current->selection_list,
                      x_get_darkcolor(w_current->bb_color), TRUE);
     }
   
     o_select_run_hooks(w_current, NULL, 2); 
  -  o_selection_remove_most(w_current,
  -                          w_current->page_current->selection2_head);
  -  o_selection_destroy_head(w_current->page_current->selection2_head);
  -  w_current->page_current->selection2_head = temp_list;
  -  w_current->page_current->selection2_tail = o_selection_return_tail(
  -                                                                     temp_list);
  +  o_selection_unselect_list(w_current, 
  +			    &(w_current->page_current->selection_list));
  +  w_current->page_current->selection_list = NULL;
  +  w_current->page_current->selection_list = temp_list;
   #if DEBUG
  -  o_selection_print_all(w_current->page_current->selection2_head);
  +  o_selection_print_all(w_current->page_current->selection_list);
   #endif
   
     w_current->page_current->CHANGED = 1;
  
  
  
  1.23      +8 -10     eda/geda/gaf/gschem/src/o_delete.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_delete.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_delete.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -b -r1.22 -r1.23
  --- o_delete.c	6 Aug 2006 16:45:29 -0000	1.22
  +++ o_delete.c	17 Dec 2006 04:14:03 -0000	1.23
  @@ -232,7 +232,7 @@
    */
   void o_delete(TOPLEVEL *w_current)
   {
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     OBJECT *object = NULL;
   
     object = o_select_return_first_object(w_current);
  @@ -245,16 +245,12 @@
   
   
     /* skip over head node */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     while(s_current != NULL) {
   
  -    object = s_current->selected_object;
  -    if (object == NULL) {
  -      fprintf(stderr, 
  -              _("ERROR: NULL object in o_delete_end!\n"));
  -      exit(-1);
  -    }
  +    object = (OBJECT *) s_current->data;
  +    g_assert (object != NULL);
   
       switch(object->type) {
         case(OBJ_LINE):
  @@ -303,8 +299,10 @@
   
     w_current->inside_action = 0;
   
  -  o_selection_destroy_all(w_current->page_current->selection2_head);
  -  w_current->page_current->selection2_head = o_selection_new_head();
  +  /* Objects have been deleted. Free the list, without freeing again 
  +     the objects */
  +  g_list_free(w_current->page_current->selection_list);
  +  w_current->page_current->selection_list = NULL;
     w_current->page_current->CHANGED=1;
   
     /* no longer needed */
  
  
  
  1.5       +7 -11     eda/geda/gaf/gschem/src/o_find.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_find.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_find.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -b -r1.4 -r1.5
  --- o_find.c	14 Jul 2006 02:23:55 -0000	1.4
  +++ o_find.c	17 Dec 2006 04:14:03 -0000	1.5
  @@ -69,7 +69,6 @@
   	return object_found;
         }
       }
  -    
       o_current = o_current->next;
     } 
   
  @@ -113,11 +112,11 @@
     if (change_selection && (!w_current->SHIFTKEY)) {
   
   #if DEBUG
  -    o_selection_print_all( w_current->page_current->selection2_head);
  +    o_selection_print_all( w_current->page_current->selection_list);
   #endif
       o_select_run_hooks(w_current, NULL, 2); 
  -    o_selection_remove_most(w_current, 
  -                            w_current->page_current->selection2_head);
  +    o_selection_unselect_list (w_current,
  +			       &(w_current->page_current->selection_list));
     }
   
     i_update_menus(w_current);
  @@ -134,15 +133,12 @@
   				int screen_x, int screen_y)
   {
     OBJECT *o_current=NULL;
  -  SELECTION *s_current;
  -
  -  g_assert (w_current->page_current->selection2_head != NULL);
  +  GList *s_current;
   
  -  /* Skip the head node */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     /* do first search */
     while (s_current != NULL) {
  -    o_current = s_current->selected_object;
  +    o_current = (OBJECT *) s_current->data;
       if (inside_region(o_current->left, o_current->top,
                         o_current->right, o_current->bottom, 
                         screen_x, screen_y)) {
  
  
  
  1.13      +5 -6      eda/geda/gaf/gschem/src/o_grips.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_grips.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_grips.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -b -r1.12 -r1.13
  --- o_grips.c	21 Oct 2006 13:56:25 -0000	1.12
  +++ o_grips.c	17 Dec 2006 04:14:03 -0000	1.13
  @@ -86,7 +86,7 @@
   {
     OBJECT *object=NULL;
     OBJECT *found=NULL;
  -  SELECTION *s_current;
  +  GList *s_current;
     int size, x2size;
   	
     if (!whichone) {
  @@ -99,12 +99,11 @@
     x2size = size * 2;
   	
     /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  -  while (s_current) {
  -    if (s_current->selected_object) {
  -      object = s_current->selected_object;
  +  s_current = w_current->page_current->selection_list;
  +  while (s_current != NULL) {
  +    object = (OBJECT *) s_current->data;
  +    if (object) {
         switch(object->type) {
  -				
           case(OBJ_ARC):
             /* check the grips of the arc object */
             found = o_grips_search_arc(w_current, object,
  
  
  
  1.37      +22 -49    eda/geda/gaf/gschem/src/o_misc.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_misc.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_misc.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -b -r1.36 -r1.37
  --- o_misc.c	12 Dec 2006 18:11:39 -0000	1.36
  +++ o_misc.c	17 Dec 2006 04:14:03 -0000	1.37
  @@ -47,14 +47,10 @@
    *  \par Function Description
    *
    */
  -void o_edit(TOPLEVEL *w_current, SELECTION *list)
  +void o_edit(TOPLEVEL *w_current, GList *list)
   {
     char *equal_ptr;
     OBJECT *o_current;
  -#if 0 /* was HAS_LIBGTKEXTRA, no longer user */
  -  SELECTION *s_current;
  -  int object_count=0;
  -#endif
     int num_lines = 0;
   
     if (list == NULL) {
  @@ -63,38 +59,12 @@
       return;
     }
   
  -  o_current = list->selected_object;	
  +  o_current = (OBJECT *) list->data;	
     if (o_current == NULL) {
       fprintf(stderr, _("Got an unexpected NULL in o_edit\n"));
       exit(-1);
     }
   
  -#if 0 /* was HAS_LIBGTKEXTRA, no longer used */
  -  /* count up how many non-text objects exist in the selection */
  -  /* list.  Why?  Because if there are multiple objects, invoke the */
  -  /* multi_multi_edit dialog box */
  -  s_current = list;
  -  while (s_current != NULL) {
  -    if (s_current->selected_object) {
  -      if (s_current->selected_object->type != OBJ_TEXT) {
  -        object_count++;	
  -      }				
  -    }
  -    s_current=s_current->next;
  -  }
  -
  -  /* now decide what we want to do, either single edit or */
  -  /* multi multi edit */
  -  if (object_count == 1 && o_current->type != OBJ_TEXT) {
  -    x_multiattrib_open (w_current, o_current);
  -    return;
  -  } else if ( object_count > 1 ) {
  -    x_multiattrib_open (w_current, o_current);
  -    return;
  -  }
  -#endif
  -
  -
     /* for now deal with only the first item */
     switch(o_current->type) {
   
  @@ -155,13 +125,13 @@
   void o_lock(TOPLEVEL *w_current)
   {
     OBJECT *object = NULL;
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
   
     /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     while(s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
       if (object) {
         /* check to see if locked_color is already being used */
         if (object->locked_color == -1) {
  @@ -194,12 +164,12 @@
   void o_unlock(TOPLEVEL *w_current)
   {
     OBJECT *object = NULL;
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
   
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     while(s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
       if (object) {
         /* only unlock if sel_func is not set to something */
         if (object->sel_func == NULL) {
  @@ -232,11 +202,11 @@
    *  \param [in] centerx    Center x coordinate of rotation.
    *  \param [in] centery    Center y coordinate of rotation.
    */
  -void o_rotate_90(TOPLEVEL *w_current, SELECTION *list,
  +void o_rotate_90(TOPLEVEL *w_current, GList *list,
   		 int centerx, int centery)
   {
     OBJECT *object;
  -  SELECTION *s_current;
  +  GList *s_current;
     int new_angle;
     GList *other_objects=NULL;
     GList *connected_objects=NULL;
  @@ -252,7 +222,7 @@
     s_current = list;
   
     while (s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
   
       if (!object) {
         fprintf(stderr, _("ERROR: NULL object in o_rotate_90!\n"));
  @@ -501,7 +471,7 @@
        an object and all its attributes (text) */
     s_current = list;
     while (s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
   
       if (!object) {
         fprintf(stderr, _("ERROR: NULL object in o_rotate_90!\n"));
  @@ -663,10 +633,10 @@
    *  \par Function Description
    * 
    */
  -void o_mirror(TOPLEVEL *w_current, SELECTION *list, int centerx, int centery)
  +void o_mirror(TOPLEVEL *w_current, GList *list, int centerx, int centery)
   {
     OBJECT *object;
  -  SELECTION *s_current;
  +  GList *s_current;
     OBJECT *o_current = NULL;
     GList *other_objects=NULL;
     GList *connected_objects=NULL;
  @@ -681,7 +651,7 @@
   
     while (s_current != NULL) {
   
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
   
       if (!object) {
         fprintf(stderr, _("ERROR: NULL object in o_mirror!\n"));
  @@ -859,7 +829,7 @@
        an object and all its attributes (text) */
     s_current = list;
     while (s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
   
       if (!object) {
         fprintf(stderr, _("ERROR: NULL object in o_rotate_90!\n"));
  @@ -1080,7 +1050,8 @@
         if (strstr(o_current->text->string,stext)) {
   	/*            printf(_("Found %s\n"), stext);
   	   if (!o_current->selected&&(!descend)) {
  -	   o_selection_add(w_current->page_current->selection2_head,
  +	   w_current->page_current->selection_list = 
  +	     o_selection_add(w_current->page_current->selection_list,
   	   o_current);
   	   } */
   	if (!skiplast) {
  @@ -1214,6 +1185,8 @@
     gboolean is_embedded;
     gchar *basename, *clib;
   
  +  g_return_if_fail (o_current != NULL);
  +
     is_embedded = o_complex_is_embedded (o_current);
   
     /* identify symbol name */
  @@ -1252,7 +1225,7 @@
     /* build a temporary list and add a complex to this list */
     tmp_list = s_basic_init_object ("update component");
     new_complex = o_complex_add (w_current,
  -                               tmp_list,
  +                               tmp_list, NULL,
                                  OBJ_COMPLEX,
                                  WHITE,
                                  o_current->complex->x,
  
  
  
  1.30      +19 -16    eda/geda/gaf/gschem/src/o_move.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_move.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_move.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- o_move.c	6 Aug 2006 16:45:29 -0000	1.29
  +++ o_move.c	17 Dec 2006 04:14:03 -0000	1.30
  @@ -36,7 +36,7 @@
    */
   void o_move_start(TOPLEVEL * w_current, int x, int y)
   {
  -  if (w_current->page_current->selection2_head->next != NULL) {
  +  if (w_current->page_current->selection_list != NULL) {
   
       /* Save the current state. When rotating the selection when moving,
          we have to come back to here */
  @@ -50,7 +50,7 @@
       o_erase_selected(w_current);
       
       o_drawbounding(w_current, NULL,
  -                   w_current->page_current->selection2_head->next,
  +                   w_current->page_current->selection_list,
                      x_get_darkcolor(w_current->bb_color), TRUE);
   
       if (w_current->netconn_rubberband) {
  @@ -58,6 +58,7 @@
         o_move_stretch_rubberband(w_current);
       }
   
  +    o_select_move_to_place_list(w_current); 
       w_current->inside_action = 1;
     }
   }
  @@ -165,7 +166,7 @@
    */
   void o_move_end(TOPLEVEL * w_current)
   {
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     OBJECT *object;
     int diff_x, diff_y;
     int screen_diff_x, screen_diff_y;
  @@ -207,22 +208,23 @@
   
     if (w_current->actionfeedback_mode == OUTLINE) {
       o_drawbounding(w_current, NULL,
  -                   w_current->page_current->selection2_head->next,
  +                   w_current->page_current->selection_list,
                      x_get_darkcolor(w_current->bb_color), TRUE);
     }
     
     /* skip over head node */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     while (s_current != NULL) {
   
  -    if (s_current->selected_object == NULL) {
  +    object = (OBJECT *) s_current->data;
  +
  +    if (object == NULL) {
         fprintf(stderr, _("ERROR: NULL object in o_move_end!\n"));
         exit(-1);
       }
   
   
  -    object = s_current->selected_object;
       switch (object->type) {
         case (OBJ_NET):
         case (OBJ_PIN):
  @@ -264,7 +266,7 @@
                               &other_objects, &connected_objects);
   
   
  -        get_complex_bounds(w_current, object->complex->prim_objs,
  +        get_object_list_bounds(w_current, object->complex->prim_objs,
                              &left, &top, &right, &bottom);
   
           object->left = left;
  @@ -284,7 +286,7 @@
     /* erase the bounding box */
     if (w_current->actionfeedback_mode == BOUNDINGBOX) {
       o_drawbounding(w_current, NULL,
  -                   w_current->page_current->selection2_head->next,
  +                   w_current->page_current->selection_list,
                      x_get_darkcolor(w_current->bb_color), FALSE);
     }
   
  @@ -313,6 +315,8 @@
     g_list_free(rubbernet_other_objects);
     g_list_free(rubbernet_connected_objects);
   
  +  g_list_free(w_current->page_current->complex_place_list);
  +  w_current->page_current->complex_place_list = NULL;
   }
   
   /*! \todo Finish function documentation!!!
  @@ -418,7 +422,7 @@
    */
   void o_move_prep_rubberband(TOPLEVEL * w_current)
   {
  -  SELECTION *s_current;
  +  GList *s_current;
     OBJECT *object;
     OBJECT *o_current;
   
  @@ -433,10 +437,9 @@
     printf("\n\n\n");
   #endif
   
  -  /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     while (s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
       if (object) {
         switch (object->type) {
           case (OBJ_NET):
  
  
  
  1.30      +2 -1      eda/geda/gaf/gschem/src/o_net.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_net.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_net.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- o_net.c	21 Oct 2006 13:56:26 -0000	1.29
  +++ o_net.c	17 Dec 2006 04:14:03 -0000	1.30
  @@ -317,7 +317,7 @@
   
   #if 0 /* not ready for prime time use */
     /* new net extenstion stuff */
  -  o_current = w_current->page_current->selection_head->next;
  +  o_current = (OBJECT *) w_current->page_current->selection_list->data;
     if (o_current != NULL && w_current->event_state == STARTDRAWNET) {
       if (o_current->type == OBJ_NET) {
         if (o_current->line) {
  @@ -1133,6 +1133,7 @@
             (OBJECT *) o_complex_add(
                                      w_current,
                                      w_current->page_current->object_tail,
  +				   NULL,
                                      OBJ_COMPLEX, WHITE,
                                      rippers[i].x[0], rippers[i].y[0],
                                      complex_angle, 0,
  
  
  
  1.7       +3 -3      eda/geda/gaf/gschem/src/o_picture.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_picture.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_picture.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -b -r1.6 -r1.7
  --- o_picture.c	21 Oct 2006 13:56:26 -0000	1.6
  +++ o_picture.c	17 Dec 2006 04:14:03 -0000	1.7
  @@ -737,7 +737,7 @@
     const gchar *selected_filename;
     GdkPixbuf *pixbuf;
     GError *error;
  -  SELECTION *list;  
  +  GList *list;  
   
     selected_filename = (char *) g_strdup(gtk_file_selection_get_filename (GTK_FILE_SELECTION (file_selector)));
   #if DEBUG
  @@ -775,11 +775,11 @@
   
     w_current->inside_action = 0;
   
  -  list = w_current->page_current->selection2_head->next;
  +  list = w_current->page_current->selection_list;
     while (list != NULL) {
       OBJECT *object;
       
  -    object = list->selected_object;
  +    object = (OBJECT *) list->data;
       if (object == NULL) {
         fprintf(stderr, _("ERROR: NULL object!\n"));
         exit(-1);
  
  
  
  1.6       +55 -34    eda/geda/gaf/gschem/src/o_select.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_select.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_select.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- o_select.c	21 Oct 2006 13:56:26 -0000	1.5
  +++ o_select.c	17 Dec 2006 04:14:03 -0000	1.6
  @@ -162,8 +162,8 @@
             /* result: remove all objects from selection */
             if (count == 0 && !CONTROLKEY) {
               o_select_run_hooks(w_current, NULL, 2);
  -            o_selection_remove_most(w_current,
  -                                    w_current->page_current->selection2_head);
  +	    o_selection_unselect_list (w_current,
  +				       &(w_current->page_current->selection_list));
             }
             break;
   
  @@ -171,7 +171,8 @@
   
         /* object not select, add it to the selection list */
         o_select_run_hooks(w_current, o_current, 1);
  -      o_selection_add(w_current->page_current->selection2_head,
  +      w_current->page_current->selection_list = 
  +	o_selection_add(w_current->page_current->selection_list,
                         o_current);
   
         break;
  @@ -187,8 +188,7 @@
             /* result: remove object from selection */
             if (type != MULTIPLE) {
               o_select_run_hooks(w_current, o_current, 0);
  -            o_selection_remove(
  -                               w_current->page_current->selection2_head,
  +            o_selection_remove(&(w_current->page_current->selection_list),
                                  o_current);
             }
   
  @@ -203,12 +203,12 @@
             /* 2nd result: add object to selection */
             if (type == MULTIPLE && count == 0 && !CONTROLKEY) {
               o_select_run_hooks(w_current, NULL, 2);
  -            o_selection_remove_most(w_current,
  -                                    w_current->page_current->selection2_head);
  +	    o_selection_unselect_list (w_current,
  +				       &(w_current->page_current->selection_list));
   	    
   	    o_select_run_hooks(w_current, o_current, 1);
  -            o_selection_add(
  -                            w_current->page_current->selection2_head,
  +            w_current->page_current->selection_list = 
  +	      o_selection_add(w_current->page_current->selection_list,
                               o_current);
             }	
   
  @@ -218,19 +218,18 @@
             /* 2nd result: add object to selection list */
             if (type == SINGLE && !CONTROLKEY) {
               o_select_run_hooks(w_current, NULL, 2);
  -            o_selection_remove_most(w_current,
  -                                    w_current->page_current->selection2_head);
  +	    o_selection_unselect_list (w_current,
  +				       &(w_current->page_current->selection_list));
   
               o_select_run_hooks (w_current, o_current, 1);
  -            o_selection_add(
  -                            w_current->page_current->selection2_head,
  +            w_current->page_current->selection_list =
  +	      o_selection_add(w_current->page_current->selection_list,
                               o_current);
             }
   
             if (CONTROLKEY) {
               o_select_run_hooks(w_current, o_current, 0);
  -            o_selection_remove(
  -                               w_current->page_current->selection2_head,
  +            o_selection_remove(&(w_current->page_current->selection_list),
                                  o_current);
             }
   
  @@ -240,7 +239,7 @@
     }
   
     /* do the attributes */
  -  o_attrib_add_selected(w_current, w_current->page_current->selection2_head,
  +  o_attrib_add_selected(w_current, &(w_current->page_current->selection_list),
                           o_current);
   
     /* finally redraw object */
  @@ -436,8 +435,8 @@
     /* key was pressed */
     if (count == 0 && !SHIFTKEY)  {
       o_select_run_hooks(w_current, NULL, 2);
  -    o_selection_remove_most(w_current,
  -			    w_current->page_current->selection2_head);
  +    o_selection_unselect_list (w_current,
  +			       &(w_current->page_current->selection_list));
     }
     i_update_menus(w_current);
   }
  @@ -446,8 +445,10 @@
   /* This function always looks at the current page selection list */ 
   OBJECT *o_select_return_first_object(TOPLEVEL *w_current) 
   {
  -  return(o_selection_return_first_object(w_current->page_current->
  -                                         selection2_head));
  +  if (! (w_current && w_current->page_current && w_current->page_current->selection_list))
  +    return NULL;
  +  else
  +    return((OBJECT *) g_list_first(w_current->page_current->selection_list)->data);
   }
   
   /*! \todo Finish function documentation!!!
  @@ -459,16 +460,9 @@
    */
   int o_select_selected(TOPLEVEL *w_current)
   {
  -  SELECTION *head;
  -
  -  head = w_current->page_current->selection2_head;
  -  if (head) {
  -    if (head->next) {
  -      if (head->next->selected_object) {
  +  if (w_current->page_current->selection_list) {
           return(TRUE);
         }
  -    }
  -  }
     return(FALSE);
   }
   
  @@ -480,6 +474,33 @@
   void o_select_unselect_all(TOPLEVEL *w_current)
   {
     o_select_run_hooks(w_current, NULL, 2);
  -  o_selection_remove_most(w_current, 
  -                          w_current->page_current->selection2_head);
  +  o_selection_unselect_list (w_current,
  +			     &(w_current->page_current->selection_list));
  +}
  +
  +/*! \todo Finish function documentation!!!
  + *  \brief
  + *  \par Function Description
  + *
  + */
  +void
  +o_select_move_to_place_list(TOPLEVEL *w_current)
  +{
  +  GList *selection;
  +  OBJECT *o_current;
  +  
  +  selection= w_current->page_current->selection_list;
  +
  +  if (!selection) {
  +    return;
  +  }
  +
  +  while (selection) {
  +    o_current = (OBJECT *) selection->data;
  +    if (o_current) {
  +      w_current->page_current->complex_place_list = g_list_append(w_current->page_current->complex_place_list,
  +								  o_current);
  +    }
  +    selection = selection->next;
  +  }
   }
  
  
  
  1.22      +1 -1      eda/geda/gaf/gschem/src/o_slot.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_slot.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_slot.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -b -r1.21 -r1.22
  --- o_slot.c	12 Dec 2006 18:11:39 -0000	1.21
  +++ o_slot.c	17 Dec 2006 04:14:03 -0000	1.22
  @@ -232,7 +232,7 @@
       o_erase_selected(w_current);
   
       o_attrib_slot_copy(w_current, object,
  -                       w_current->page_current->selection_head->next);
  +                       w_current->page_current->selection_list);
       o_redraw_single(w_current,object);
   #endif
   
  
  
  
  1.26      +11 -10    eda/geda/gaf/gschem/src/o_text.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: o_text.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/o_text.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- o_text.c	7 Nov 2006 20:10:24 -0000	1.25
  +++ o_text.c	17 Dec 2006 04:14:03 -0000	1.26
  @@ -62,7 +62,7 @@
     
     o_redraw(w_current, o_current->text->prim_objs, TRUE);
   
  -  get_complex_bounds(w_current, o_current->text->prim_objs,
  +  get_object_list_bounds(w_current, o_current->text->prim_objs,
                        &left, &top, &right, &bottom);
     o_current->left   = left;
     o_current->top    = top;
  @@ -580,9 +580,10 @@
   
     w_current->page_current->CHANGED=1;
     o_select_run_hooks(w_current, NULL, 2); 
  -  o_selection_remove_most(w_current,
  -                          w_current->page_current->selection2_head);
  -  o_selection_add(w_current->page_current->selection2_head, 
  +  o_selection_unselect_list(w_current,
  +			    &(w_current->page_current->selection_list));
  +  w_current->page_current->selection_list = 
  +    o_selection_add(w_current->page_current->selection_list, 
                     w_current->page_current->object_tail);
   	
   
  @@ -635,15 +636,15 @@
   		     int text_alignment)
   {
     OBJECT *object;
  -  SELECTION *s_current;
  +  GList *s_current;
     int numselect;
   
     /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  -  numselect = o_selection_return_num(w_current->page_current->selection2_head);
  +  s_current = w_current->page_current->selection_list;
  +  numselect = g_list_length(w_current->page_current->selection_list);
     
     while(s_current != NULL) {
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
   
       if (object) {
         if (object->type == OBJ_TEXT) {
  
  
  
  1.6       +9 -9      eda/geda/gaf/gschem/src/x_attribedit.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_attribedit.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_attribedit.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -b -r1.5 -r1.6
  --- x_attribedit.c	21 Oct 2006 01:46:29 -0000	1.5
  +++ x_attribedit.c	17 Dec 2006 04:14:03 -0000	1.6
  @@ -93,7 +93,7 @@
     GtkWidget *overwritebutton;
     OBJECT *attribptr;
     OBJECT *object;
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     ATTRIB *a_current = NULL, *a_sav;
     int vis, show;
     int invocation_flag;
  @@ -146,19 +146,19 @@
       int world_x, world_y;
       OBJECT *new = NULL;
   
  -    s_current = w_current->page_current->selection2_head->next;
  +    s_current = w_current->page_current->selection_list;
       while (s_current != NULL) {
  -      object = s_current->selected_object;
  +      object = (OBJECT *)s_current->data;
         if (object == NULL) {
   	fprintf(stderr, _("ERROR: NULL object!\n"));
   	exit(-1);
         }
  -      if (!s_current->selected_object->attached_to) {
  +      if (!object->attached_to) {
   	nsel++;
         }
         s_current = s_current->next;
       }
  -    s_current = w_current->page_current->selection2_head->next;
  +    s_current = w_current->page_current->selection_list;
       if (nsel > 1) {
   
         addtoallbutton =
  @@ -196,7 +196,7 @@
         while (s_current != NULL) {
   	gboolean replaced;
   
  -	object = s_current->selected_object;
  +	object = (OBJECT *) s_current->data;
   	if (object && !object->attached_to && object->type != OBJ_TEXT ) {
   	  addmask = 4;
   	  if (object->type == OBJ_COMPLEX || object->type == OBJ_PLACEHOLDER) {
  @@ -338,7 +338,7 @@
     GtkWidget *overwritebutton;
   
     /* gschem specific */
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     GList *combo_items = NULL;
     char* string = NULL;
     int nsel=0, i, len;
  @@ -351,9 +351,9 @@
     return;
   
     /* gschem specific */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
     while (s_current != NULL) {
  -    if (!s_current->selected_object->attached_to) {
  +    if (!((OBJECT *) s_current->data)->attached_to) {
         nsel++;
       }
       s_current = s_current->next;
  
  
  
  1.3       +2 -1      eda/geda/gaf/gschem/src/x_autonumber.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_autonumber.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_autonumber.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- x_autonumber.c	12 Dec 2006 18:11:39 -0000	1.2
  +++ x_autonumber.c	17 Dec 2006 04:14:03 -0000	1.3
  @@ -582,7 +582,8 @@
         if (slot_str != NULL && o_slot != NULL) {
   	g_free(slot_str);
   	/* delete the slot attribute */
  -	o_selection_remove (autotext->toplevel->page_current->selection2_head, o_slot);
  +	GList *selection = autotext->toplevel->page_current->selection_list;
  +	o_selection_remove (&selection, o_slot);
   	o_delete_text (autotext->toplevel, o_slot);
   	/* redraw the slotted object. So that the pinnumbers appear as with slot=1 */
   	/* --> No: should be done by o_delete_text as several dialog use it. */
  
  
  
  1.12      +7 -6      eda/geda/gaf/gschem/src/x_compselect.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_compselect.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_compselect.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -b -r1.11 -r1.12
  --- x_compselect.c	9 Dec 2006 19:03:12 -0000	1.11
  +++ x_compselect.c	17 Dec 2006 04:14:03 -0000	1.12
  @@ -133,13 +133,14 @@
   	  diff_x = toplevel->last_x - toplevel->start_x;
   	  diff_y = toplevel->last_y - toplevel->start_y;
   	  
  -	  o_complex_translate_display(toplevel,
  +	  o_complex_translate_display_object_glist(toplevel,
   				      diff_x, diff_y,
  -				      toplevel->page_current->complex_place_head);
  +						   toplevel->page_current->complex_place_list);
   	}
           
  -	o_list_delete_rest(toplevel,
  -			   toplevel->page_current->complex_place_head);
  +	g_list_free(toplevel->page_current->complex_place_list);
  +	toplevel->page_current->complex_place_list = NULL;
  +	
   	o_complex_set_filename(toplevel, toplevel->current_clib,
   			       toplevel->current_basename);
           
  
  
  
  1.69      +9 -10     eda/geda/gaf/gschem/src/x_dialog.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_dialog.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_dialog.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -b -r1.68 -r1.69
  --- x_dialog.c	12 Dec 2006 18:11:40 -0000	1.68
  +++ x_dialog.c	17 Dec 2006 04:14:03 -0000	1.69
  @@ -462,7 +462,7 @@
     GtkTextIter start, end;
     GtkWidget *widget;
   
  -  num_selected = o_selection_return_num(w_current->page_current->selection2_head);
  +  num_selected = g_list_length(w_current->page_current->selection_list);
   
     /* text string entry will only show up if one object is selected */
     if (num_selected == 1) {
  @@ -578,7 +578,8 @@
       gtk_box_set_spacing(GTK_BOX(vbox),5);
   
       /* add a text box if only one object is selected */
  -    num_selected = o_selection_return_num(w_current->page_current->selection2_head);
  +    num_selected = g_list_length(w_current->page_current->selection_list);
  +
       if (num_selected == 1) {
         label = gtk_label_new (_("Text Content:"));
         gtk_misc_set_alignment(GTK_MISC(label),0,0);
  @@ -2458,18 +2459,17 @@
     /* first lets see if we have a selected object, if so select its color */
     int select_col = -1;
     int item_index = 0;
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     OBJECT *object = NULL;
   
     menu = gtk_menu_new ();
     group = NULL;
   
  -  /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     if (s_current != NULL) {
   
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
       if (object == NULL) {
         fprintf(stderr, "no object selected - WHEE!\n");
       }else{
  @@ -2538,15 +2538,14 @@
    */
   void color_edit_dialog_apply(GtkWidget *w, TOPLEVEL *w_current)
   {
  -  SELECTION *s_current = NULL;
  +  GList *s_current = NULL;
     OBJECT *object = NULL;
   
  -  /* skip over head */
  -  s_current = w_current->page_current->selection2_head->next;
  +  s_current = w_current->page_current->selection_list;
   
     while(s_current != NULL) {
   
  -    object = s_current->selected_object;
  +    object = (OBJECT *) s_current->data;
       if (object == NULL) {
         fprintf(stderr, _("ERROR: NULL object in color_edit_dialog_apply!\n"));
         exit(-1);
  
  
  
  1.42      +29 -39    eda/geda/gaf/gschem/src/x_event.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_event.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_event.c,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -b -r1.41 -r1.42
  --- x_event.c	4 Oct 2006 19:10:30 -0000	1.41
  +++ x_event.c	17 Dec 2006 04:14:03 -0000	1.42
  @@ -88,15 +88,14 @@
         case(ENDCOPY):
         case(ENDMCOPY):
           o_drawbounding(w_current, NULL,
  -                       w_current->page_current->selection2_head->next,
  +                       w_current->page_current->selection_list,
                          x_get_darkcolor(w_current->bb_color), FALSE);
           break;
         case(DRAWCOMP):
         case(ENDCOMP):
         case(ENDPASTE):
  - 	 o_drawbounding(w_current, 
  -		       w_current->page_current->complex_place_head->next,
  -                       NULL,
  +	o_drawbounding(w_current, NULL,
  +		       w_current->page_current->complex_place_list,
                          x_get_darkcolor(w_current->bb_color), FALSE); 
           break;
   
  @@ -161,7 +160,7 @@
     printf("event state: %d \n", event->state);
     printf("w_current state: %d \n", w_current->event_state);
     printf("Selection is:\n");
  -  o_selection_print_all( w_current->page_current->selection2_head);
  +  o_selection_print_all( w_current->page_current->selection_list);
     printf("\n");
   #endif
   
  @@ -169,8 +168,8 @@
         (w_current->event_state == STARTSELECT || 
          w_current->event_state == SELECT)) {
       o_find_object(w_current, (int) event->x, (int) event->y, TRUE);
  -    if (w_current->page_current->selection2_head->next) {
  -       o_edit(w_current, w_current->page_current->selection2_head->next);
  +    if (w_current->page_current->selection_list) {
  +       o_edit(w_current, w_current->page_current->selection_list);
          return(0);
       }
     }
  @@ -433,7 +432,7 @@
   	w_current->DONT_REDRAW = 0;
           o_rotate_90(
                       w_current,
  -                    w_current->page_current->selection2_head->next,
  +                    w_current->page_current->selection_list,
                       (int) event->x, (int) event->y);
   	w_current->DONT_REDRAW = prev_state;
   
  @@ -444,7 +443,7 @@
   
         case(ENDMIRROR):
           o_mirror(w_current,
  -                 w_current->page_current->selection2_head->next,
  +                 w_current->page_current->selection_list,
                    (int) event->x, (int) event->y);
   
           w_current->inside_action = 0;
  @@ -759,7 +758,6 @@
           break;
   
         case(STARTSELECT):
  -
           /* first look for grips */
           if (!o_grips_start(
                              w_current, (int) event->x, (int) event->y)) {
  @@ -782,9 +780,9 @@
       if (w_current->inside_action) {
         if (w_current->event_state == ENDCOMP) {
           o_drawbounding(w_current,
  -                       w_current->page_current->
  -                       complex_place_head->next, 
  -                       NULL, x_get_darkcolor(w_current->bb_color), TRUE);
  +                       NULL,
  +		       w_current->page_current->complex_place_list,
  +		       x_get_darkcolor(w_current->bb_color), TRUE);
   
           w_current->complex_rotate = 
           (w_current->complex_rotate + 90) % 360;
  @@ -792,15 +790,16 @@
   	o_complex_place_rotate(w_current);
   	  
           o_drawbounding(w_current,
  -                       w_current->page_current->
  -                       complex_place_head->next, 
  -                       NULL, x_get_darkcolor(w_current->bb_color), TRUE);
  +                       NULL,
  +		       w_current->page_current->complex_place_list,
  +		       x_get_darkcolor(w_current->bb_color), TRUE);
           return(0);
         } else if (w_current->event_state == ENDTEXT) {
           o_drawbounding(w_current,
                          w_current->page_current->
                          attrib_place_head->next, 
  -                       NULL, x_get_darkcolor(w_current->bb_color), TRUE);
  +                       NULL, 
  +		       x_get_darkcolor(w_current->bb_color), TRUE);
   
           w_current->complex_rotate = 
           (w_current->complex_rotate + 90) % 360;
  @@ -810,18 +809,18 @@
           o_drawbounding(w_current,
                          w_current->page_current->
                          attrib_place_head->next, 
  -                       NULL, x_get_darkcolor(w_current->bb_color), TRUE);
  +                       NULL, 
  +		       x_get_darkcolor(w_current->bb_color), TRUE);
           return(0);
   
         }
         else if ((w_current->event_state == ENDMOVE) ||
   	       (w_current->event_state == ENDCOPY) ||
   	       (w_current->event_state == ENDMCOPY) ) {
  -	g_assert (w_current->page_current->selection2_head != NULL);
   	prev_state = w_current->event_state;
   
   	o_drawbounding(w_current, NULL,
  -		       w_current->page_current->selection2_head->next,
  +		       w_current->page_current->complex_place_list,
   		       x_get_darkcolor(w_current->bb_color), TRUE);
   
   	/* Don't allow o_rotate_90 to erase the selection, neither to
  @@ -830,7 +829,7 @@
   	redraw_state = w_current->DONT_REDRAW;
   	w_current->DONT_REDRAW = 1;
   
  -	o_rotate_90(w_current, w_current->page_current->selection2_head->next,
  +	o_rotate_90(w_current, w_current->page_current->complex_place_list,
   		    fix_x(w_current, w_current->start_x),
   		    fix_y(w_current, w_current->start_y));
   	w_current->DONT_REDRAW = redraw_state;
  @@ -838,7 +837,7 @@
   	w_current->event_state = prev_state;
   
   	o_drawbounding(w_current, NULL,
  -		       w_current->page_current->selection2_head->next,
  +		       w_current->page_current->complex_place_list,
   		       x_get_darkcolor(w_current->bb_color), TRUE);
   	
           return(0);
  @@ -1072,17 +1071,10 @@
           o_move_stretch_rubberband(w_current);
         }
   
  -      o_drawbounding(
  -                     w_current, NULL,
  -                     w_current->page_current->selection2_head->next,
  -                     x_get_darkcolor(w_current->bb_color), FALSE);
  +      o_complex_rubbercomplex(w_current);
         w_current->last_x = fix_x(w_current,  (int) event->x);
         w_current->last_y = fix_y(w_current,  (int) event->y);
  -      o_drawbounding(
  -                     w_current, NULL,
  -                     w_current->page_current->selection2_head->next,
  -                     x_get_darkcolor(w_current->bb_color), FALSE);
  -
  +      o_complex_rubbercomplex(w_current);
         if (w_current->netconn_rubberband) {
           o_move_stretch_rubberband(w_current);
         }
  @@ -1095,15 +1087,13 @@
       case(ENDMCOPY):
       case(MCOPY):
       if (w_current->inside_action) {
  -      o_drawbounding(
  -                     w_current, NULL,
  -                     w_current->page_current->selection2_head->next,
  +      o_drawbounding(w_current, NULL,
  +                     w_current->page_current->selection_list,
                        x_get_darkcolor(w_current->bb_color), FALSE);
         w_current->last_x = fix_x(w_current,  (int) event->x);
         w_current->last_y = fix_y(w_current,  (int) event->y);
  -      o_drawbounding(
  -                     w_current, NULL,
  -                     w_current->page_current->selection2_head->next,
  +      o_drawbounding(w_current, NULL,
  +                     w_current->page_current->selection_list,
                        x_get_darkcolor(w_current->bb_color), FALSE);
       }
       break;
  
  
  
  1.28      +6 -7      eda/geda/gaf/gschem/src/x_image.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_image.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_image.c,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -b -r1.27 -r1.28
  --- x_image.c	9 Dec 2006 19:03:12 -0000	1.27
  +++ x_image.c	17 Dec 2006 04:14:03 -0000	1.28
  @@ -274,9 +274,8 @@
   
     /* de select everything first */
     o_select_run_hooks(w_current, NULL, 2); 
  -  o_selection_remove_most(w_current,
  -                          w_current->page_current->
  -                          selection2_head);
  +  o_selection_unselect_list(w_current,
  +			    &(w_current->page_current->selection_list));
   		
   
   #ifdef HAS_LIBGD
  @@ -652,7 +651,7 @@
     /* If there are no objects, can't use zoom_extents */
     if (object_found) {
       o_redraw_all (&toplevel); 
  -    get_complex_bounds(&toplevel, 
  +    get_object_list_bounds(&toplevel, 
   		       toplevel.page_current->object_head, 
   		       &origin_x, &origin_y, 
   		       &right, &bottom);
  
  
  
  1.4       +1 -1      eda/geda/gaf/gschem/src/x_multiattrib.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_multiattrib.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_multiattrib.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- x_multiattrib.c	19 Oct 2006 15:42:44 -0000	1.3
  +++ x_multiattrib.c	17 Dec 2006 04:14:03 -0000	1.4
  @@ -457,7 +457,7 @@
   						OBJECT *o_attrib) 
   {
     /* actually deletes the attribute */
  -  o_selection_remove (toplevel->page_current->selection2_head, o_attrib);
  +  o_selection_remove (&(toplevel->page_current->selection_list), o_attrib);
     o_delete_text (toplevel, o_attrib);
     toplevel->page_current->CHANGED=1;
     o_undo_savestate (toplevel, UNDO_ALL);
  
  
  
  1.27      +2 -2      eda/geda/gaf/gschem/src/x_print.c
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: x_print.c
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/src/x_print.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- x_print.c	9 Dec 2006 19:03:12 -0000	1.26
  +++ x_print.c	17 Dec 2006 04:14:03 -0000	1.27
  @@ -737,8 +737,8 @@
   		
         /* de select everything first */
         o_select_run_hooks (w_current, NULL, 2);
  -      o_selection_remove_most (w_current,
  -			       w_current->page_current->selection2_head);
  +      g_list_free(w_current->page_current->selection_list);
  +      w_current->page_current->selection_list = NULL;
   
         if (usefile && filename[0])
   	/* Print to file */
  
  
  


_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs