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

gEDA-cvs: branch: master updated (1.1.2.20070818-75-g3da83d3)



The branch, master has been updated
       via  3da83d39b58ab2cb642b93b798ec31be0a725d81 (commit)
       via  fe4375d7185c0d5f7cc8186c1a214981fb6d0edd (commit)
       via  fd28531b8e88ced997b0269fd31cdb23abf3936d (commit)
      from  f217428f8248d6e8491d943256d30d5e11d808d1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/include/prototype.h  |    2 ++
 gschem/src/o_basic.c        |   23 +++++++++++++++++++++++
 gschem/src/o_complex.c      |    2 +-
 gschem/src/o_select.c       |   31 ++++++++++++++++++++++++++-----
 libgeda/include/prototype.h |    3 ---
 libgeda/src/o_attrib.c      |    4 ++--
 libgeda/src/o_basic.c       |   23 -----------------------
 libgeda/src/o_selection.c   |   18 ------------------
 8 files changed, 54 insertions(+), 52 deletions(-)


=================
 Commit Messages
=================

commit 3da83d39b58ab2cb642b93b798ec31be0a725d81
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Oct 9 20:08:26 2007 +0100

    Move o_redraw_single() from libgeda to gschem

:100644 100644 a0954d6... e9c78a5... M	gschem/include/prototype.h
:100644 100644 6d2d2b1... de4f00b... M	gschem/src/o_basic.c
:100644 100644 b30b1aa... 8afa473... M	libgeda/include/prototype.h
:100644 100644 fa0b7c8... e55e161... M	libgeda/src/o_basic.c

commit fe4375d7185c0d5f7cc8186c1a214981fb6d0edd
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Oct 9 20:08:26 2007 +0100

    Move libgeda's o_selection_unselect_list() into gschem.
    
    The function calls o_redraw_single(), so should be in gschem.
    It is now named o_select_unselect_list().

:100644 100644 319a081... a0954d6... M	gschem/include/prototype.h
:100644 100644 c5e4ce0... 8e8c736... M	gschem/src/o_complex.c
:100644 100644 ecac644... 49a3571... M	gschem/src/o_select.c
:100644 100644 b4e2a96... b30b1aa... M	libgeda/include/prototype.h
:100644 100644 f890702... 6be87d3... M	libgeda/src/o_selection.c

commit fd28531b8e88ced997b0269fd31cdb23abf3936d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Oct 9 20:08:23 2007 +0100

    Fix a bug in o_attrib_search_name_single() were it might return NULL.
    
    If o_attrib_search_name_single() doesn't find an attribute attached to
    the passed OBJECT, it checks if the passed OBJECT is itsself an attribute.
    In this case, it would return NULL (the result from the preceeding search).
    
    The bug might not actually be triggered in normal usage, as most callers
    don't pass a variable to recieve the OBJECT pointer.

:100644 100644 d0c6c55... 5138a01... M	libgeda/src/o_attrib.c

=========
 Changes
=========

commit 3da83d39b58ab2cb642b93b798ec31be0a725d81
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Oct 9 20:08:26 2007 +0100

    Move o_redraw_single() from libgeda to gschem

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index a0954d6..e9c78a5 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -470,6 +470,7 @@ OBJECT *o_attrib_add_attrib(TOPLEVEL *w_current, char *text_string, int visibili
 void o_redraw_all(TOPLEVEL *w_current);
 void o_redraw_all_fast(TOPLEVEL *w_current);
 void o_redraw(TOPLEVEL *w_current, OBJECT *object_list, gboolean draw_selected);
+void o_redraw_single(TOPLEVEL *w_current, OBJECT *o_current);
 void o_draw_list(TOPLEVEL *w_current, GList *list);
 void o_draw_selected(TOPLEVEL *w_current);
 void o_erase_selected(TOPLEVEL *w_current);
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 6d2d2b1..de4f00b 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -131,6 +131,29 @@ void o_redraw(TOPLEVEL *w_current, OBJECT *object_list, gboolean draw_selected)
   w_current->DONT_REDRAW = redraw_state;
 }
 
+/*! \brief Redraw an object on the screen.
+ *  \par Function Description
+ *  This function will redraw a single object on the screen.
+ *
+ *  \param [in] w_current  The TOPLEVEL object.
+ *  \param [in] o_current  The OBJECT to redraw.
+ *
+ */
+void o_redraw_single(TOPLEVEL *w_current, OBJECT *o_current)
+{
+  if (o_current == NULL)
+  return;
+
+  if (w_current->DONT_REDRAW) /* highly experimental */
+  return;
+
+  if (o_current->draw_func != NULL && o_current->type != OBJ_HEAD) {
+    w_current->inside_redraw = 1;
+    (*o_current->draw_func)(w_current, o_current);
+    w_current->inside_redraw = 0;
+  }
+}
+
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index b30b1aa..8afa473 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -195,7 +195,6 @@ void o_attrib_list_copied_to(ATTRIB *list, OBJECT *to_obj);
 
 /* o_basic.c */
 int inside_region(int xmin, int ymin, int xmax, int ymax, int x, int y);
-void o_redraw_single(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_recalc_single_object(TOPLEVEL *toplevel, OBJECT *o_current);
 void o_recalc_object_list(TOPLEVEL *toplevel, OBJECT *object_list);
 void o_recalc_object_glist(TOPLEVEL *toplevel, GList *object_glist);
diff --git a/libgeda/src/o_basic.c b/libgeda/src/o_basic.c
index fa0b7c8..e55e161 100644
--- a/libgeda/src/o_basic.c
+++ b/libgeda/src/o_basic.c
@@ -65,29 +65,6 @@ int inside_region(int xmin, int ymin, int xmax, int ymax, int x, int y)
   return ((x >= xmin && x <= xmax && y >= ymin && y <= ymax) ? 1 : 0);
 }
 
-/*! \brief Redraw an object on the screen.
- *  \par Function Description
- *  This function will redraw a single object on the screen.
- *
- *  \param [in] toplevel  The TOPLEVEL object.
- *  \param [in] o_current  The OBJECT to redraw.
- *
- */
-void o_redraw_single(TOPLEVEL *toplevel, OBJECT *o_current)
-{
-  if (o_current == NULL)
-  return;
-	
-  if (toplevel->DONT_REDRAW) /* highly experimental */
-  return;
-
-  if (o_current->draw_func != NULL && o_current->type != OBJ_HEAD) {
-    toplevel->inside_redraw = 1;
-    (*o_current->draw_func)(toplevel, o_current);
-    toplevel->inside_redraw = 0;
-  }
-}
-
 /*! \brief Recalculate position of the given object.
  *  \par Function Description
  *  This function will take an object and recalculate its

commit fe4375d7185c0d5f7cc8186c1a214981fb6d0edd
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Oct 9 20:08:26 2007 +0100

    Move libgeda's o_selection_unselect_list() into gschem.
    
    The function calls o_redraw_single(), so should be in gschem.
    It is now named o_select_unselect_list().

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 319a081..a0954d6 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -687,6 +687,7 @@ void o_select_box_rubberband(TOPLEVEL *w_current, int x, int y);
 void o_select_box_search(TOPLEVEL *w_current);
 OBJECT *o_select_return_first_object(TOPLEVEL *w_current);
 int o_select_selected(TOPLEVEL *w_current);
+void o_select_unselect_list(TOPLEVEL *w_current, SELECTION *selection);
 void o_select_unselect_all(TOPLEVEL *w_current);
 void o_select_move_to_place_list(TOPLEVEL *w_current);
 /* o_slot.c */
diff --git a/gschem/src/o_complex.c b/gschem/src/o_complex.c
index c5e4ce0..8e8c736 100644
--- a/gschem/src/o_complex.c
+++ b/gschem/src/o_complex.c
@@ -425,7 +425,7 @@ void o_complex_end(TOPLEVEL *w_current, int screen_x, int screen_y)
   /* This doesn't allow anything else to be in the selection
    * list when you add a component */
 
-  o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+  o_select_unselect_list( w_current, 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 */
diff --git a/gschem/src/o_select.c b/gschem/src/o_select.c
index ecac644..49a3571 100644
--- a/gschem/src/o_select.c
+++ b/gschem/src/o_select.c
@@ -163,7 +163,7 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
           /* result: remove all objects from selection */
           if (count == 0 && !CONTROLKEY) {
             o_select_run_hooks( w_current, NULL, 2 );
-            o_selection_unselect_list (w_current,w_current->page_current->selection_list);
+            o_select_unselect_list( w_current, w_current->page_current->selection_list );
           }
           break;
 
@@ -200,7 +200,7 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
           /* 2nd result: add object to selection */
           if (type == MULTIPLE && count == 0 && !CONTROLKEY) {
             o_select_run_hooks( w_current, NULL, 2 );
-            o_selection_unselect_list (w_current, w_current->page_current->selection_list );
+            o_select_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->selection_list, o_current);
@@ -212,7 +212,7 @@ void o_select_object(TOPLEVEL *w_current, OBJECT *o_current,
           /* 2nd result: add object to selection list */
           if (type == SINGLE && !CONTROLKEY) {
             o_select_run_hooks( w_current, NULL, 2 );
-            o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+            o_select_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->selection_list, o_current);
@@ -410,7 +410,7 @@ void o_select_box_search(TOPLEVEL *w_current)
   /* key was pressed */
   if (count == 0 && !SHIFTKEY) {
     o_select_run_hooks( w_current, NULL, 2 );
-    o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+    o_select_unselect_list( w_current, w_current->page_current->selection_list );
   }
   i_update_menus(w_current);
 }
@@ -440,6 +440,27 @@ int o_select_selected(TOPLEVEL *w_current)
   return(FALSE);
 }
 
+
+/*! \brief Unselects all the objects in the given list.
+ *  \par Unselects all objects in the given list, does the
+ *  needed work to make the objects visually unselected, and redraw them.
+ *  \param [in] toplevel TOPLEVEL struct.
+ *  \param [in] head Pointer to the selection list
+ */
+void o_select_unselect_list(TOPLEVEL *w_current, SELECTION *selection)
+{
+  const GList *list = geda_list_get_glist( selection );
+
+  while ( list != NULL ) {
+    o_selection_unselect( (OBJECT *)list->data );
+    o_redraw_single( w_current, (OBJECT *)list->data );
+   list = g_list_next( list );
+  }
+
+  geda_list_remove_all( (GedaList *)selection );
+}
+
+
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
@@ -448,7 +469,7 @@ int o_select_selected(TOPLEVEL *w_current)
 void o_select_unselect_all(TOPLEVEL *w_current)
 {
   o_select_run_hooks( w_current, NULL, 2 );
-  o_selection_unselect_list( w_current, w_current->page_current->selection_list );
+  o_select_unselect_list( w_current, w_current->page_current->selection_list );
 }
 
 /*! \todo Finish function documentation!!!
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index b4e2a96..b30b1aa 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -399,8 +399,6 @@ SELECTION *o_selection_new( void );
 void o_selection_add(SELECTION *selection, OBJECT *o_selected);
 void o_selection_print_all(const SELECTION *selection);
 void o_selection_remove(SELECTION *selection, OBJECT *o_selected);
-void o_selection_unselect_list(TOPLEVEL *toplevel, SELECTION *selection);
-
 void o_selection_select(OBJECT *object, int color); /* DEPRECATED */
 void o_selection_unselect(OBJECT *object);          /* DEPRECATED */
 
diff --git a/libgeda/src/o_selection.c b/libgeda/src/o_selection.c
index f890702..6be87d3 100644
--- a/libgeda/src/o_selection.c
+++ b/libgeda/src/o_selection.c
@@ -91,24 +91,6 @@ void o_selection_remove(SELECTION *selection, OBJECT *o_selected )
   }
 }
 
-/*! \brief Unselects all the objects in the given list.
- *  \par Unselects all objects in the given list, does the 
- *  needed work to make the objects visually unselected, and redraw them.
- *  \param [in] toplevel TOPLEVEL struct.
- *  \param [in] head Pointer to the selection list
- */
-void o_selection_unselect_list(TOPLEVEL *toplevel, SELECTION *selection)
-{
-  const GList *list = geda_list_get_glist( selection );
-
-  while ( list != NULL ) {
-    o_selection_unselect( (OBJECT *)list->data );
-    o_redraw_single( toplevel, (OBJECT *)list->data );
-   list = g_list_next( list );
-  }
-
-  geda_list_remove_all( (GedaList *)selection );
-}
 
 /*! \brief Prints the given selection list.
  *  \par Prints the given selection list.

commit fd28531b8e88ced997b0269fd31cdb23abf3936d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Tue Oct 9 20:08:23 2007 +0100

    Fix a bug in o_attrib_search_name_single() were it might return NULL.
    
    If o_attrib_search_name_single() doesn't find an attribute attached to
    the passed OBJECT, it checks if the passed OBJECT is itsself an attribute.
    In this case, it would return NULL (the result from the preceeding search).
    
    The bug might not actually be triggered in normal usage, as most callers
    don't pass a variable to recieve the OBJECT pointer.

diff --git a/libgeda/src/o_attrib.c b/libgeda/src/o_attrib.c
index d0c6c55..5138a01 100644
--- a/libgeda/src/o_attrib.c
+++ b/libgeda/src/o_attrib.c
@@ -1386,7 +1386,7 @@ char *o_attrib_search_name_single(OBJECT *object, char *name,
 {
   OBJECT *o_current;
   ATTRIB *a_current;
-  OBJECT *found=NULL;
+  OBJECT *found;
   int val;
   char *found_name = NULL;
   char *found_value = NULL;
@@ -1448,7 +1448,7 @@ char *o_attrib_search_name_single(OBJECT *object, char *name,
           g_malloc(sizeof(char)* strlen(found_value)+1);
         strcpy(return_string, found_value);
         if (return_found) {
-          *return_found = found;
+          *return_found = o_current;
         }
 	if (found_name) g_free(found_name);
 	if (found_value) g_free(found_value);




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