On Fri, 2007-06-08 at 18:07 +0200, Christian Riggenbach wrote:
> Am Mittwoch, 6. Juni 2007 21.34:17 schrieb Christian Riggenbach:
> > good day
> >
> > i submitted about two weeks ago a patch to save the footprints. i don't
> > wan't to hurry, but there are sure others who wan't to save their
> > footprints.
> >
> > the id of the patch is 1726201 and the link
> > http://sourceforge.net/tracker/index.php?func=detail&aid=1726201&group_id=7
> >3743&atid=538813
I've not been able to save footprints from the cut-buffer to a file, and
get the following error in the log window:
Syntax error. Usage:
SaveTo(Layout|LayoutAs,filename)
SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)
Dan, DJ, Harry - Does this patch from Christian Riggenbach seem
reasonable (in principle at least)? It seems to fix the issue for me.
(I attach a refreshed version against CVS head with a typo fixed, and
one of the white-space additions removed).
If your busy (but approve the patch - less superfluous white-space
changes), I could apply it to CVS when I get a moment during the week.
Regards,
Peter C.
Index: src/action.c
===================================================================
RCS file: /cvsroot/pcb/pcb/src/action.c,v
retrieving revision 1.109
diff -U3 -p -r1.109 action.c
--- src/action.c 9 Jun 2007 20:34:49 -0000 1.109
+++ src/action.c 12 Jun 2007 13:29:22 -0000
@@ -5337,7 +5337,8 @@ ActionUnselect (int argc, char **argv, i
static const char saveto_syntax[] =
"SaveTo(Layout|LayoutAs,filename)\n"
- "SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)";
+ "SaveTo(AllConnections|AllUnusedPins|ElementConnections,filename)\n"
+ "SaveTo(PasteBuffer,filename)";
static const char saveto_help[] = "Saves data to a file.";
@@ -5360,6 +5361,9 @@ List all unused pins to a file.
@item ElementConnections
Save connections to the element at the cursor to a file.
[EMAIL PROTECTED] PasteBuffer
+Save the content of the active Buffer to a file. This is the graphical way to create a footprint.
+
@end table
%end-doc */
@@ -5369,9 +5373,11 @@ ActionSaveTo (int argc, char **argv, int
{
char *function;
char *name;
+ int result;
function = argv[0];
name = argv[1];
+
if (argc != 2)
AFAIL (saveto);
@@ -5435,6 +5441,12 @@ ActionSaveTo (int argc, char **argv, int
return 0;
}
+ if (strcasecmp (function, "PasteBuffer") == 0)
+ {
+ result = SaveBufferElements (name);
+ return result;
+ }
+
AFAIL (saveto);
}
_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev