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

gEDA-cvs: gaf.git: branch: master updated (1.5.0-20080706-366-g28e12a7)



The branch, master has been updated
       via  28e12a770b23ffbe08c994cbd98d21a581b2cd2d (commit)
      from  921a39edd130ed3bbfe83d9c39c3a9085c405d9a (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/src/o_undo.c         |    3 +--
 libgeda/include/prototype.h |    1 +
 libgeda/src/s_page.c        |   17 +++++++++++++++--
 3 files changed, 17 insertions(+), 4 deletions(-)


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

commit 28e12a770b23ffbe08c994cbd98d21a581b2cd2d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Thu Dec 11 21:44:24 2008 +0000

    Add API s_page_delete_objects() to delete all OBJECTs on a page

:100644 100644 17f19ed... b86fc67... M	gschem/src/o_undo.c
:100644 100644 e3c31f9... a683e79... M	libgeda/include/prototype.h
:100644 100644 7814c2b... 8909194... M	libgeda/src/s_page.c

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

commit 28e12a770b23ffbe08c994cbd98d21a581b2cd2d
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Thu Dec 11 21:44:24 2008 +0000

    Add API s_page_delete_objects() to delete all OBJECTs on a page

diff --git a/gschem/src/o_undo.c b/gschem/src/o_undo.c
index 17f19ed..b86fc67 100644
--- a/gschem/src/o_undo.c
+++ b/gschem/src/o_undo.c
@@ -371,8 +371,7 @@ void o_undo_callback(GSCHEM_TOPLEVEL *w_current, int type)
 
   } else if (w_current->undo_type == UNDO_MEMORY && u_current->object_list) {
 
-    s_delete_object_glist (toplevel, toplevel->page_current->object_list);
-    toplevel->page_current->object_list = NULL;
+    s_page_delete_objects (toplevel, toplevel->page_current);
 
     toplevel->page_current->object_list =
       o_glist_copy_all (toplevel, u_current->object_list,
diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index e3c31f9..a683e79 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -414,6 +414,7 @@ void s_page_autosave_init(TOPLEVEL *toplevel);
 gint s_page_autosave (TOPLEVEL *toplevel);
 void s_page_append (PAGE *page, OBJECT *object);
 void s_page_remove (PAGE *page, OBJECT *object);
+void s_page_delete_objects (TOPLEVEL *toplevel, PAGE *page);
 
 /* s_papersizes.c */
 int s_papersizes_add_entry(char *new_papersize, int width, int height);
diff --git a/libgeda/src/s_page.c b/libgeda/src/s_page.c
index 7814c2b..8909194 100644
--- a/libgeda/src/s_page.c
+++ b/libgeda/src/s_page.c
@@ -189,8 +189,7 @@ void s_page_delete (TOPLEVEL *toplevel, PAGE *page)
   g_object_unref( page->selection_list );
 
   /* then delete objects of page */
-  s_delete_object_glist (toplevel, page->object_list);
-  page->object_list = NULL;
+  s_page_delete_objects (toplevel, page);
 
   /* Free the objects in the place list. */
   s_delete_object_glist (toplevel, page->place_list);
@@ -537,3 +536,17 @@ void s_page_remove (PAGE *page, OBJECT *object)
 {
   page->object_list = g_list_remove (page->object_list, object);
 }
+
+/*! \brief Remove and free all OBJECTs from the PAGE
+ *
+ *  \par Function Description
+ *  Removes and frees all OBJECTs from the PAGE.
+ *
+ *  \param [in] toplevel  The TOPLEVEL object.
+ *  \param [in] page      The PAGE being cleared.
+ */
+void s_page_delete_objects (TOPLEVEL *toplevel, PAGE *page)
+{
+  s_delete_object_glist (toplevel, page->object_list);
+  page->object_list = NULL;
+}




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