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

gEDA-cvs: branch: master updated (1.1.2.20070818-201-gd197bd4)



The branch, master has been updated
       via  d197bd400dd217aba91e9b72a9b1ce8bd4c387ec (commit)
      from  b03232ea8fe9f911af8265c63b16425cf7ee70cb (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
=========

 libgeda/include/prototype.h |    2 ++
 libgeda/src/o_embed.c       |   16 ++--------------
 libgeda/src/o_picture.c     |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 37 insertions(+), 14 deletions(-)


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

commit d197bd400dd217aba91e9b72a9b1ce8bd4c387ec
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Dec 28 18:57:09 2007 +0000

    Move picture embedding code from o_embed.c into o_picture.c

:100644 100644 4082f67... ffdd3f7... M	libgeda/include/prototype.h
:100644 100644 b052d4d... a1cd97b... M	libgeda/src/o_embed.c
:100644 100644 98ede2c... bd6bfd7... M	libgeda/src/o_picture.c

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

commit d197bd400dd217aba91e9b72a9b1ce8bd4c387ec
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Fri Dec 28 18:57:09 2007 +0000

    Move picture embedding code from o_embed.c into o_picture.c

diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 4082f67..ffdd3f7 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -280,6 +280,8 @@ void o_picture_translate_world(TOPLEVEL *toplevel, int x1, int y1, OBJECT *objec
 OBJECT *o_picture_copy(TOPLEVEL *toplevel, OBJECT *list_tail, OBJECT *o_current);
 guint8 *o_picture_rgb_data(GdkPixbuf *image);
 guint8 *o_picture_mask_data(GdkPixbuf *image);
+void o_picture_embed(TOPLEVEL *toplevel, OBJECT *object);
+void o_picture_unembed(TOPLEVEL *toplevel, OBJECT *object);
 
 /* o_pin_basic.c */
 void world_get_pin_bounds(TOPLEVEL *toplevel, OBJECT *object, int *left, int *top, int *right, int *bottom);
diff --git a/libgeda/src/o_embed.c b/libgeda/src/o_embed.c
index b052d4d..a1cd97b 100644
--- a/libgeda/src/o_embed.c
+++ b/libgeda/src/o_embed.c
@@ -56,17 +56,11 @@ void o_embed(TOPLEVEL *toplevel, OBJECT *o_current)
   /* If it's a picture and it's not embedded */
   if ( (o_current->type == OBJ_PICTURE) &&
        (o_current->picture->embedded == 0) ) {
+    o_picture_embed (toplevel, o_current);
 
-    o_current->picture->embedded = 1;
-    
-    s_log_message (_("Picture [%s] has been embedded\n"),
-		   basename(o_current->picture->filename));
-    
-    
     /* page content has been modified */
     toplevel->page_current->CHANGED = 1;
   }
-  
 }
 
 /*! \todo Finish function documentation!!!
@@ -108,15 +102,9 @@ void o_unembed(TOPLEVEL *toplevel, OBJECT *o_current)
   /* If it's a picture and it's embedded */
   if ( (o_current->type == OBJ_PICTURE) &&
        (o_current->picture->embedded == 1) ) {
+    o_picture_unembed (toplevel, o_current);
 
-    o_current->picture->embedded = 0;
-    
-    s_log_message (_("Picture [%s] has been unembedded\n"),
-		   basename(o_current->picture->filename));
-    
-    
     /* page content has been modified */
     toplevel->page_current->CHANGED = 1;
   }
-  
 }
diff --git a/libgeda/src/o_picture.c b/libgeda/src/o_picture.c
index 98ede2c..bd6bfd7 100644
--- a/libgeda/src/o_picture.c
+++ b/libgeda/src/o_picture.c
@@ -932,3 +932,36 @@ void o_picture_print(TOPLEVEL *toplevel, FILE *fp, OBJECT *o_current,
 	
 }
 
+
+/*! \brief Embed the given picture
+ *
+ *  \par Function Description
+ *  This function embeds the given picture.
+ *
+ *  \param [in]     toplevel     The TOPLEVEL object.
+ *  \param [in]     object       The picture OBJECT to embed
+ */
+void o_picture_embed (TOPLEVEL *toplevel, OBJECT *object)
+{
+  object->picture->embedded = 1;
+
+  s_log_message (_("Picture [%s] has been embedded\n"),
+                 basename(object->picture->filename));
+}
+
+
+/*! \brief Unembed the given picture
+ *
+ *  \par Function Description
+ *  This function unembeds the given picture.
+ *
+ *  \param [in]     toplevel     The TOPLEVEL object.
+ *  \param [in]     object       The picture OBJECT to unembed
+ */
+void o_picture_unembed (TOPLEVEL *toplevel, OBJECT *object)
+{
+  object->picture->embedded = 0;
+
+  s_log_message (_("Picture [%s] has been unembedded\n"),
+                 basename(object->picture->filename));
+}




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