[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: o_slot.c
User: werner
Date: 06/11/07 15:10:24
Modified: . o_slot.c o_text.c
Log:
* src/o_text.c, src/o_slot.c: fixed slot update errors
(Bug #1589247)
Revision Changes Path
1.20 +7 -0 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.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- o_slot.c 15 Jul 2006 18:51:41 -0000 1.19
+++ o_slot.c 7 Nov 2006 20:10:24 -0000 1.20
@@ -130,6 +130,13 @@
object = o_select_return_first_object(w_current);
+ /* get the parent object if the selection is only a text object */
+ if (object != NULL && object->type == OBJ_TEXT) {
+ if (object->attached_to != NULL) {
+ object=o_attrib_return_parent(object->attached_to);
+ }
+ }
+
/* now find the slot attribute on the outside first */
if (object != NULL) {
numslots_value = o_attrib_search_numslots(object, NULL);
1.25 +4 -9 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.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- o_text.c 23 Oct 2006 20:23:52 -0000 1.24
+++ o_text.c 7 Nov 2006 20:10:24 -0000 1.25
@@ -653,15 +653,11 @@
if (object->text->string) {
g_free(object->text->string);
}
- /* Kazu <kazu@xxxxxxxx> on August 5, 1999 - I am not
- sure if strlen(string) == len. If so, activate the
- second part of this "if".*/
-#if 1
- object->text->string = g_malloc(sizeof(char) * len + 1);
- strcpy(object->text->string, string);
-#else
object->text->string = g_strdup (string);
-#endif
+ /* handle slot= attribute, it's a special case */
+ if (g_ascii_strncasecmp (string, "slot=", 5) == 0) {
+ o_slot_end (w_current, string, strlen (string));
+ }
}
object->text->size = text_size;
@@ -683,7 +679,6 @@
w_current->page_current->CHANGED = 1;
o_undo_savestate(w_current, UNDO_ALL);
-
}
/*! \todo Finish function documentation!!!
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs