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

gEDA-user: [PCB-Patches] Action-documentation



Hello,

I found some inconsistency in the action-documentation.
Perhaps, someone of you (who is more familiar with the English language and perhaps with the pcb-actions) can have a review of the atached patches bevore I will send them to the patch-tracker.

Patch 0007 and 0010 introduces some new documentation. I am not really sure, if my description really fits to the action. Please feel free to give me feedback or to do a patch by your own.

I am very unsure about the last patch (0011...). This patch removes the translation-marks from the documentation-code. At my system (Ubuntu 10.10, German) this markers (like N_("TEXTTEXT") ) produces errors in the generated pdf-file. For this reason, I removed them, but I can also imagine, that there also is a function for documentation-translation which will become broken with this patch? I don't know....

Patch 0008 removes some parts of functions from the documentation, which did not work for me (and I couldn't find anything about this in the code). Perhaps I am to stupid.

Finaly, Patch 0009 does some cosmetic modifications like adding missing points (dots?) at the end of some sentences and removing of this curious signs ("'') at the beginning of some syntax-lines (like the documentation for 'ChangeFlag()').

Kind regards,
Felix

From 01d2ac533789a4340f2bf56b9337fa0c3ec2ac65 Mon Sep 17 00:00:00 2001
From: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
Date: Wed, 10 Nov 2010 22:21:55 +0100
Subject: [PATCH 07/11] Add missing documentation

Adds documentation for the following actions:
* Display(ToggleLockNames)
* Display(ToggleOnlyNames)
---
 src/action.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/action.c b/src/action.c
index f52fcf4..923d162 100644
--- a/src/action.c
+++ b/src/action.c
@@ -2587,6 +2587,15 @@ you need to be.
 @item ToggleLiveRoute
 If set, the progress of the autorouter will be visible on the screen.
 
+@item ToggleLockNames
+If set, the positions of all element-labels are locked relative to
+the element-position.
+
+@item ToggleOnlyNames
+If set, only the position of element-labels can be changed. Every
+other PCB-elements (lines, polygons, pins, pads, footprints, ...)
+are locked at their position.
+
 @item ToggleAutoDRC
 If set, you will not be permitted to make connections which violate
 the current DRC and netlist settings.
-- 
1.7.1

From c1407ad1740df5568d401ea4f90b0a533b07d06a Mon Sep 17 00:00:00 2001
From: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
Date: Fri, 12 Nov 2010 23:08:29 +0100
Subject: [PATCH 08/11] Remove invalid documentation

Remove some lines from documentation which seems to be invalid.
---
 src/action.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/src/action.c b/src/action.c
index 923d162..b0d9018 100644
--- a/src/action.c
+++ b/src/action.c
@@ -2338,10 +2338,6 @@ Any ``found'' pins and vias are marked ``not found''.
 @item Reset
 All ``found'' objects are marked ``not found''.
 
-@item Measure
-The net under the cursor is found and measured (the lengths of all
-line segments are added together)
-
 @end table
 
 %end-doc */
@@ -2522,7 +2518,7 @@ static const char display_syntax[] =
   "Display(ToggleThindraw|ToggleThindrawPoly|ToggleOrthoMove|ToggleLocalRef)\n"
   "Display(ToggleCheckPlanes|ToggleShowDRC|ToggleAutoDRC)\n"
   "Display(ToggleLiveRoute|LockNames|OnlyNames)\n"
-  "Display(Pinout|PinOrPadName)\n" "Display(Scroll, Direction)";
+  "Display(Pinout|PinOrPadName)";
 
 static const char display_help[] = "Several display-related actions.";
 
@@ -2644,11 +2640,6 @@ Toggles whether the names of pins, pads, or (yes) vias will be
 displayed.  If the cursor is over an element, all of its pins and pads
 are affected.
 
-@item Step <direction> <amount> <units>
-Steps the crosshair in the given direction, with 1=down/left, 2=down,
-etc, according to the numeric keypad layout.  If amount is not given,
-the crosshair steps along the grid.
-
 @end table
 
 %end-doc */
-- 
1.7.1

From 368c20b4f534ecf59f225367e26ca60a21338c3c Mon Sep 17 00:00:00 2001
From: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Nov 2010 23:05:10 +0100
Subject: [PATCH 09/11] Cosmetic modifications to the action-documentation

This patch does some cosmetic modifications to the action-documentation (core-/common- and gtk-actions) like
* dots at end of sentences
* capital letter at start of sentenc
* remove some curious signs at the beginning of some lines.
---
 src/action.c                 |   46 ++++++++++++++++++++++++-----------------
 src/buffer.c                 |    2 +-
 src/djopt.c                  |    5 ++-
 src/fontmode.c               |    4 +-
 src/hid/gtk/gui-top-window.c |    4 +-
 src/move.c                   |    2 +-
 6 files changed, 36 insertions(+), 27 deletions(-)

diff --git a/src/action.c b/src/action.c
index b0d9018..d1672e0 100644
--- a/src/action.c
+++ b/src/action.c
@@ -3262,7 +3262,8 @@ ActionRemoveSelected (int argc, char **argv, int x, int y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char renumber_syntax[] = "Renumber()\n" "Renumber(filename)";
+static const char renumber_syntax[] = "Renumber()\n" 
+                                      "Renumber(filename)";
 
 static const char renumber_help[] =
   "Renumber all elements.  The changes will be recorded to filename\n"
@@ -3823,8 +3824,7 @@ ActionAddRats (int argc, char **argv, int x, int y)
 
 static const char delete_syntax[] =
   "Delete(Object|Selected)\n"
-  "Delete(AllRats|SelectedRats)"
-  ;
+  "Delete(AllRats|SelectedRats)";
 
 static const char delete_help[] = "Delete stuff.";
 
@@ -3997,7 +3997,7 @@ ActionAutoRoute (int argc, char **argv, int x, int y)
 static const char markcrosshair_syntax[] =
   "MarkCrosshair()\n" "MarkCrosshair(Center)";
 
-static const char markcrosshair_help[] = "Set/Reset the Crosshair mark";
+static const char markcrosshair_help[] = "Set/Reset the Crosshair mark.";
 
 /* %start-doc actions MarkCrosshair
 
@@ -4290,7 +4290,8 @@ ActionChangeClearSize (int argc, char **argv, int x, int y)
 /* ---------------------------------------------------------------------------  */
 
 static const char minmaskgap_syntax[] =
-  "MinMaskGap(delta)\n" "MinMaskGap(Selected, delta)";
+  "MinMaskGap(delta)\n" 
+  "MinMaskGap(Selected, delta)";
 
 static const char minmaskgap_help[] =
   "Ensures the mask is a minimum distance from pins and pads.";
@@ -4374,7 +4375,8 @@ ActionMinMaskGap (int argc, char **argv, int x, int y)
 /* ---------------------------------------------------------------------------  */
 
 static const char mincleargap_syntax[] =
-  "MinClearGap(delta)\n" "MinClearGap(Selected, delta)";
+  "MinClearGap(delta)\n" 
+  "MinClearGap(Selected, delta)";
 
 static const char mincleargap_help[] =
   "Ensures that polygons are a minimum distance from objects.";
@@ -4573,7 +4575,8 @@ ActionChangePinName (int argc, char **argv, int x, int y)
 /* --------------------------------------------------------------------------- */
 
 static const char changename_syntax[] =
-  "ChangeName(Object)\n" "ChangeName(Layout|Layer)";
+  "ChangeName(Object)\n" 
+  "ChangeName(Layout|Layer)";
 
 static const char changename_help[] = "Sets the name of objects.";
 
@@ -4930,7 +4933,7 @@ ActionChangeSquare (int argc, char **argv, int x, int y)
 static const char setsquare_syntax[] =
   "SetSquare(ToggleObject|SelectedElements|SelectedPins)";
 
-static const char setsquare_help[] = "sets the square-flag of objects.";
+static const char setsquare_help[] = "Sets the square-flag of objects.";
 
 /* %start-doc actions SetSquare
 
@@ -5345,9 +5348,10 @@ static const char select_syntax[] =
   "Select(ElementByName|ObjectByName|PadByName|PinByName)\n"
   "Select(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
   "Select(TextByName|ViaByName)\n"
-  "Select(TextByName|ViaByName, Name)\n" "Select(Convert)";
+  "Select(TextByName|ViaByName, Name)\n" 
+  "Select(Convert)";
 
-static const char select_help[] = "Toggles or sets the selection";
+static const char select_help[] = "Toggles or sets the selection.";
 
 /* %start-doc actions Select
 
@@ -5534,10 +5538,11 @@ static const char unselect_syntax[] =
   "Unselect(All|Block|Connection)\n"
   "Unselect(ElementByName|ObjectByName|PadByName|PinByName)\n"
   "Unselect(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
-  "Unselect(TextByName|ViaByName)\n" "Unselect(TextByName|ViaByName, Name)\n";
+  "Unselect(TextByName|ViaByName)\n" 
+  "Unselect(TextByName|ViaByName, Name)\n";
 
 static const char unselect_help[] =
-  "unselects the object at the pointer location or the specified objects";
+  "Unselects the object at the pointer location or the specified objects.";
 
 /* %start-doc actions Unselect
 
@@ -5795,7 +5800,8 @@ ActionSaveTo (int argc, char **argv, int x, int y)
 /* --------------------------------------------------------------------------- */
 
 static const char savesettings_syntax[] =
-  "SaveSettings()\n" "SaveSettings(local)";
+  "SaveSettings()\n" 
+  "SaveSettings(local)";
 
 static const char savesettings_help[] = "Saves settings.";
 
@@ -6183,7 +6189,8 @@ ActionPasteBuffer (int argc, char **argv, int x, int y)
 
 /* --------------------------------------------------------------------------- */
 
-static const char undo_syntax[] = "Undo()\n" "Undo(ClearList)";
+static const char undo_syntax[] = "Undo()\n" 
+                                  "Undo(ClearList)";
 
 static const char undo_help[] = "Undo recent changes.";
 
@@ -6732,7 +6739,8 @@ static const char changeflag_syntax[] =
   "ChangeFlag(SelectedLines|SelectedPins|SelectedVias, flag, value)\n"
   "ChangeFlag(SelectedPads|SelectedTexts|SelectedNames, flag, value)\n"
   "ChangeFlag(SelectedElements, flag, value)\n"
-  "flag = square | octagon | thermal | join\n" "value = 0 | 1";
+  "flag = square | octagon | thermal | join\n" 
+  "value = 0 | 1";
 
 static const char changeflag_help[] = "Sets or clears flags on objects.";
 
@@ -7191,7 +7199,7 @@ ActionElementList (int argc, char **argv, int x, int y)
 /* ---------------------------------------------------------------- */
 static const char elementsetattr_syntax[] = "ElementSetAttr(refdes,name[,value])";
 
-static const char elementsetattr_help[] = "Sets or clears an element-specific attribute";
+static const char elementsetattr_help[] = "Sets or clears an element-specific attribute.";
 
 /* %start-doc actions elementsetattr
 
@@ -7255,7 +7263,7 @@ ActionElementSetAttr (int argc, char **argv, int x, int y)
 /* ---------------------------------------------------------------- */
 static const char execcommand_syntax[] = "ExecCommand(command)";
 
-static const char execcommand_help[] = "Runs a command";
+static const char execcommand_help[] = "Runs a command.";
 
 /* %start-doc actions execcommand
 
@@ -7478,7 +7486,7 @@ static const char import_syntax[] =
   "Import(setnewpoint[,(mark|center|X,Y)])\n"
   "Import(setdisperse,D,units)\n";
 
-static const char import_help[] = "Import schematics";
+static const char import_help[] = "Import schematics.";
 
 /* %start-doc actions Import
 
@@ -7549,7 +7557,7 @@ Note that Import() doesn't delete anything - after an Import, elements
 which shouldn't be on the board are selected and may be removed once
 it's determined that the deletion is appropriate.
 
-In @code{Import()} is called with @code{setnewpoint} then the location
+If @code{Import()} is called with @code{setnewpoint}, then the location
 of new components can be specified.  This is where parts show up when
 they're added to the board.  The default is the center of the board.
 
diff --git a/src/buffer.c b/src/buffer.c
index 1b2d27c..5ce58e9 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -865,7 +865,7 @@ LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
 
 static const char loadfootprint_syntax[] = "LoadFootprint(filename[,refdes,value])";
 
-static const char loadfootprint_help[] = "Loads a single footprint by name";
+static const char loadfootprint_help[] = "Loads a single footprint by name.";
 
 /* %start-doc actions LoadFootprint
 
diff --git a/src/djopt.c b/src/djopt.c
index 240b86b..73afeca 100644
--- a/src/djopt.c
+++ b/src/djopt.c
@@ -2914,10 +2914,11 @@ grok_layer_groups ()
 
 static const char djopt_syntax[] =
   "djopt(debumpify|unjaggy|simple|vianudge|viatrim|orthopull)\n"
-  "djopt(auto) - all of the above\n" "djopt(miter)";
+  "djopt(auto) - all of the above\n" 
+  "djopt(miter)";
 
 static const char djopt_help[] =
-  "Perform various optimizations on the current board";
+  "Perform various optimizations on the current board.";
 
 /* %start-doc actions djopt
 
diff --git a/src/fontmode.c b/src/fontmode.c
index bd9fcee..f6503a2 100644
--- a/src/fontmode.c
+++ b/src/fontmode.c
@@ -68,7 +68,7 @@ RCSID ("$Id$");
 static const char fontedit_syntax[] = "FontEdit()";
 
 static const char fontedit_help[] =
-  "Convert the current font to a PCB for editing";
+  "Convert the current font to a PCB for editing.";
 
 /* %start-doc actions FontEdit
 
@@ -161,7 +161,7 @@ FontEdit (int argc, char **argv, int Ux, int Uy)
 
 static const char fontsave_syntax[] = "FontSave()";
 
-static const char fontsave_help[] = "Convert the current PCB back to a font";
+static const char fontsave_help[] = "Convert the current PCB back to a font.";
 
 /* %start-doc actions FontSave
 
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 9c30a93..78f0e0e 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -3835,7 +3835,7 @@ static const char adjuststyle_syntax[] =
 "AdjustStyle()\n";
 
 static const char adjuststyle_help[] =
-"Open the window which allows editing of the route styles";
+"Open the window which allows editing of the route styles.";
 
 /* %start-doc actions AdjustStyle
 
@@ -3864,7 +3864,7 @@ static const char editlayergroups_syntax[] =
 "EditLayerGroups()\n";
 
 static const char editlayergroups_help[] =
-"Open the preferences window which allows editing of the layer groups";
+"Open the preferences window which allows editing of the layer groups.";
 
 /* %start-doc actions EditLayerGroups
 
diff --git a/src/move.c b/src/move.c
index cce6e19..5831fbe 100644
--- a/src/move.c
+++ b/src/move.c
@@ -1057,7 +1057,7 @@ MoveLayer (int old_index, int new_index)
 
 static const char movelayer_syntax[] = "MoveLayer(old,new)";
 
-static const char movelayer_help[] = "Moves/Creates/Deletes Layers";
+static const char movelayer_help[] = "Moves/Creates/Deletes Layers.";
 
 /* %start-doc actions MoveLayer
 
-- 
1.7.1

From 7d9693e4693f8307927c32270738da190565bb98 Mon Sep 17 00:00:00 2001
From: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Nov 2010 23:09:37 +0100
Subject: [PATCH 10/11] Add missing 'Select(Object)' to syntax-documentation

---
 src/action.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/action.c b/src/action.c
index d1672e0..3534da6 100644
--- a/src/action.c
+++ b/src/action.c
@@ -5343,7 +5343,7 @@ ActionChangePaste (int argc, char **argv, int x, int y)
 /* --------------------------------------------------------------------------- */
 
 static const char select_syntax[] =
-  "Select(ToggleObject)\n"
+  "Select(Object|ToggleObject)\n"
   "Select(All|Block|Connection)\n"
   "Select(ElementByName|ObjectByName|PadByName|PinByName)\n"
   "Select(ElementByName|ObjectByName|PadByName|PinByName, Name)\n"
-- 
1.7.1

From 941c1be647b4352234f7be32ba2473871553d216 Mon Sep 17 00:00:00 2001
From: Felix Ruoff <Felix@xxxxxxxxxxxxxxxxxx>
Date: Sat, 13 Nov 2010 23:11:44 +0100
Subject: [PATCH 11/11] Remove translation-marker from action-documentation

Removes N_("TEXT") from the gtk-action - documentation. At my system, the translation-markers producing errors at the document.
---
 src/hid/gtk/gtkhid-main.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index 7d59672..8e52bc4 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -106,9 +106,10 @@ static const char zoom_syntax[] =
 
 
 static const char zoom_help[] =
-N_("Various zoom factor changes.");
+"Various zoom factor changes.";
 
 /* %start-doc actions Zoom
+
 Changes the zoom (magnification) of the view of the board.  If no
 arguments are passed, the view is scaled such that the board just fits
 inside the visible window (i.e. ``view all'').  Otherwise,
@@ -1209,7 +1210,7 @@ static const char about_syntax[] =
 "About()";
 
 static const char about_help[] =
-N_("Tell the user about this version of PCB.");
+"Tell the user about this version of PCB.";
 
 /* %start-doc actions About
 
@@ -1230,8 +1231,7 @@ About (int argc, char **argv, int x, int y)
 static const char getxy_syntax[] =
 "GetXY()";
 
-static const char getxy_help[] =
-N_("Get a coordinate.");
+static const char getxy_help[] = "Get a coordinate.";
 
 /* %start-doc actions GetXY
 
@@ -1386,7 +1386,7 @@ static const char save_syntax[] =
 "Save(PasteBuffer)";
 
 static const char save_help[] =
-N_("Save layout and/or element data to a user-selected file.");
+"Save layout and/or element data to a user-selected file.";
 
 /* %start-doc actions Save
 
@@ -1478,7 +1478,7 @@ static const char swapsides_syntax[] =
 "SwapSides(|v|h|r)";
 
 static const char swapsides_help[] =
-N_("Swaps the side of the board you're looking at.");
+"Swaps the side of the board you're looking at.";
 
 /* %start-doc actions SwapSides
 
@@ -1603,7 +1603,7 @@ static const char print_syntax[] =
 "Print()";
 
 static const char print_help[] =
-N_("Print the layout.");
+"Print the layout.";
 
 /* %start-doc actions Print
 
@@ -1661,7 +1661,7 @@ static const char printcalibrate_syntax[] =
 "PrintCalibrate()";
 
 static const char printcalibrate_help[] =
-N_("Calibrate the printer.");
+"Calibrate the printer.";
 
 /* %start-doc actions PrintCalibrate
 
@@ -1742,7 +1742,7 @@ static const char center_syntax[] =
 "Center()\n";
 
 static const char center_help[] =
-N_("Moves the pointer to the center of the window.");
+  "Moves the pointer to the center of the window.";
 
 /* %start-doc actions Center
 
@@ -1848,7 +1848,7 @@ static const char cursor_syntax[] =
 "Cursor(Type,DeltaUp,DeltaRight,Units)";
 
 static const char cursor_help[] =
-N_("Move the cursor.");
+  "Move the cursor.";
 
 /* %start-doc actions Cursor
 
@@ -1938,11 +1938,11 @@ CursorAction(int argc, char **argv, int x, int y)
 /* ------------------------------------------------------------ */
 
 static const char dowindows_syntax[] =
-"DoWindows(1|2|3|4|5|6)\n"
-"DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)";
+  "DoWindows(1|2|3|4|5|6)\n"
+  "DoWindows(Layout|Library|Log|Netlist|Preferences|DRC)";
 
 static const char dowindows_help[] =
-N_("Open various GUI windows.");
+  "Open various GUI windows.";
 
 /* %start-doc actions DoWindows
 
@@ -2018,7 +2018,7 @@ static const char setunits_syntax[] =
 "SetUnits(mm|mil)";
 
 static const char setunits_help[] =
-N_("Set the default measurement units.");
+"Set the default measurement units.";
 
 /* %start-doc actions SetUnits
 
@@ -2168,9 +2168,9 @@ static const char popup_syntax[] =
 "Popup(MenuName, [Button])";
 
 static const char popup_help[] =
-N_("Bring up the popup menu specified by @code{MenuName}.\n"
+"Bring up the popup menu specified by @code{MenuName}.\n"
 "If called by a mouse event then the mouse button number\n"
-"must be specified as the optional second argument.");
+"must be specified as the optional second argument.";
 
 /* %start-doc actions Popup
 
-- 
1.7.1


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