[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: i_callbacks.nw
User: cnieves
Date: 05/09/30 18:01:51
Modified: . i_callbacks.nw o_misc.nw
Log:
Added support for embedded pictures.
Revision Changes Path
1.43 +2 -1 eda/geda/devel/gschem/noweb/i_callbacks.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: i_callbacks.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/i_callbacks.nw,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- i_callbacks.nw 27 Feb 2005 18:16:18 -0000 1.42
+++ i_callbacks.nw 30 Sep 2005 22:01:51 -0000 1.43
@@ -1426,7 +1426,8 @@
while (s_current != NULL) {
g_assert (s_current->selected_object != NULL);
- if (s_current->selected_object->type == OBJ_COMPLEX) {
+ if ( (s_current->selected_object->type == OBJ_COMPLEX) ||
+ (s_current->selected_object->type == OBJ_PICTURE) ) {
o_embed (w_current, s_current->selected_object);
}
s_current = s_current->next;
1.37 +29 -1 eda/geda/devel/gschem/noweb/o_misc.nw
(In the diff below, changes in quantity of whitespace are not shown.)
Index: o_misc.nw
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/devel/gschem/noweb/o_misc.nw,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- o_misc.nw 27 Sep 2005 22:36:57 -0000 1.36
+++ o_misc.nw 30 Sep 2005 22:01:51 -0000 1.37
@@ -58,7 +58,6 @@
@
-
<<o_misc.c : include directives>>=
#include <config.h>
@@ -67,6 +66,7 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
+#include <libgen.h>
#include <libgeda/libgeda.h>
@@ -557,6 +557,20 @@
w_current->page_current->CHANGED = 1;
}
+ /* If it's a picture and it's not embedded */
+ if ( (o_current->type == OBJ_PICTURE) &&
+ (o_current->picture->embedded == 0) ) {
+
+ o_current->picture->embedded = 1;
+
+ s_log_message (_("Picture [%s] has been embedded\n"),
+ basename(o_current->picture->filename));
+
+
+ /* page content has been modified */
+ w_current->page_current->CHANGED = 1;
+ }
+
}
@@ -615,6 +629,20 @@
}
}
+ /* If it's a picture and it's embedded */
+ if ( (o_current->type == OBJ_PICTURE) &&
+ (o_current->picture->embedded == 1) ) {
+
+ o_current->picture->embedded = 0;
+
+ s_log_message (_("Picture [%s] has been unembedded\n"),
+ basename(o_current->picture->filename));
+
+
+ /* page content has been modified */
+ w_current->page_current->CHANGED = 1;
+ }
+
}