From 7337b23f0fafbb40e5e78396e25a8df3a2d9e482 Mon Sep 17 00:00:00 2001 From: Jonathan Westhues Date: Sat, 16 Jan 2010 10:15:40 -0800 Subject: [PATCH] Edit Message() and Error() strings to use just \n, not \r\n, since my own dialog boxes don't require the carriage returns. [git-p4: depot-paths = "//depot/solvespace/": change = 2109] --- clipboard.cpp | 2 +- constraint.cpp | 100 ++++++++++++++++++++++++------------------------ export.cpp | 8 ++-- exportstep.cpp | 2 +- generate.cpp | 8 ++-- graphicswin.cpp | 2 +- group.cpp | 22 +++++------ solvespace.cpp | 14 +++---- 8 files changed, 79 insertions(+), 79 deletions(-) diff --git a/clipboard.cpp b/clipboard.cpp index 149a9f98..4965eb10 100644 --- a/clipboard.cpp +++ b/clipboard.cpp @@ -180,7 +180,7 @@ void GraphicsWindow::PasteClipboard(Vector trans, double theta, double scale) { void GraphicsWindow::MenuClipboard(int id) { if(id != MNU_DELETE && !SS.GW.LockedInWorkplane()) { - Error("Cut, paste, and copy work only in a workplane.\r\n\r\n" + Error("Cut, paste, and copy work only in a workplane.\n\n" "Select one with Sketch -> In Workplane."); return; } diff --git a/constraint.cpp b/constraint.cpp index 181cdda0..131446f2 100644 --- a/constraint.cpp +++ b/constraint.cpp @@ -139,13 +139,13 @@ void Constraint::MenuConstrain(int id) { c.entityA = gs.entity[0]; } else { Error("Bad selection for distance / diameter constraint. This " - "constraint can apply to:\r\n\r\n" - " * two points (distance between points)\r\n" - " * a line segment (length)\r\n" - " * a workplane and a point (minimum distance)\r\n" - " * a line segment and a point (minimum distance)\r\n" - " * a plane face and a point (minimum distance)\r\n" - " * a circle or an arc (diameter)\r\n"); + "constraint can apply to:\n\n" + " * two points (distance between points)\n" + " * a line segment (length)\n" + " * a workplane and a point (minimum distance)\n" + " * a line segment and a point (minimum distance)\n" + " * a plane face and a point (minimum distance)\n" + " * a circle or an arc (diameter)\n"); return; } if(c.type == PT_PT_DISTANCE) { @@ -187,12 +187,12 @@ void Constraint::MenuConstrain(int id) { c.entityA = gs.face[0]; } else { Error("Bad selection for on point / curve / plane constraint. " - "This constraint can apply to:\r\n\r\n" - " * two points (points coincident)\r\n" - " * a point and a workplane (point in plane)\r\n" - " * a point and a line segment (point on line)\r\n" - " * a point and a circle or arc (point on curve)\r\n" - " * a point and a plane face (point on face)\r\n"); + "This constraint can apply to:\n\n" + " * two points (points coincident)\n" + " * a point and a workplane (point in plane)\n" + " * a point and a line segment (point on line)\n" + " * a point and a circle or arc (point on curve)\n" + " * a point and a plane face (point on face)\n"); return; } AddConstraint(&c); @@ -249,21 +249,21 @@ void Constraint::MenuConstrain(int id) { } } else { Error("Bad selection for equal length / radius constraint. " - "This constraint can apply to:\r\n\r\n" - " * two line segments (equal length)\r\n" + "This constraint can apply to:\n\n" + " * two line segments (equal length)\n" " * two line segments and two points " - "(equal point-line distances)\r\n" + "(equal point-line distances)\n" " * a line segment and two points " - "(equal point-line distances)\r\n" + "(equal point-line distances)\n" " * a line segment, and a point and line segment " - "(point-line distance equals length)\r\n" + "(point-line distance equals length)\n" " * four line segments or normals " - "(equal angle between A,B and C,D)\r\n" + "(equal angle between A,B and C,D)\n" " * three line segments or normals " - "(equal angle between A,B and B,C)\r\n" - " * two circles or arcs (equal radius)\r\n" + "(equal angle between A,B and B,C)\n" + " * two circles or arcs (equal radius)\n" " * a line segment and an arc " - "(line segment length equals arc length)\r\n"); + "(line segment length equals arc length)\n"); return; } if(c.type == EQUAL_ANGLE) { @@ -288,8 +288,8 @@ void Constraint::MenuConstrain(int id) { c.entityB = gs.entity[1]; } else { Error("Bad selection for length ratio constraint. This " - "constraint can apply to:\r\n\r\n" - " * two line segments\r\n"); + "constraint can apply to:\n\n" + " * two line segments\n"); return; } @@ -314,11 +314,11 @@ void Constraint::MenuConstrain(int id) { c.entityB = gs.entity[1-i]; } else { Error("Bad selection for at midpoint constraint. This " - "constraint can apply to:\r\n\r\n" + "constraint can apply to:\n\n" " * a line segment and a point " - "(point at midpoint)\r\n" + "(point at midpoint)\n" " * a line segment and a workplane " - "(line's midpoint on plane)\r\n"); + "(line's midpoint on plane)\n"); return; } AddConstraint(&c); @@ -365,13 +365,13 @@ void Constraint::MenuConstrain(int id) { c.type = SYMMETRIC_LINE; } else { Error("Bad selection for symmetric constraint. This constraint " - "can apply to:\r\n\r\n" + "can apply to:\n\n" " * two points or a line segment " - "(symmetric about workplane's coordinate axis)\r\n" + "(symmetric about workplane's coordinate axis)\n" " * line segment, and two points or a line segment " - "(symmetric about line segment)\r\n" + "(symmetric about line segment)\n" " * workplane, and two points or a line segment " - "(symmetric about workplane)\r\n"); + "(symmetric about workplane)\n"); return; } if(c.type != 0) { @@ -427,9 +427,9 @@ void Constraint::MenuConstrain(int id) { hb = c.ptB = gs.point[1]; } else { Error("Bad selection for horizontal / vertical constraint. " - "This constraint can apply to:\r\n\r\n" - " * two points\r\n" - " * a line segment\r\n"); + "This constraint can apply to:\n\n" + " * two points\n" + " * a line segment\n"); return; } if(id == GraphicsWindow::MNU_HORIZONTAL) { @@ -448,8 +448,8 @@ void Constraint::MenuConstrain(int id) { c.entityB = gs.anyNormal[1]; } else { Error("Bad selection for same orientation constraint. This " - "constraint can apply to:\r\n\r\n" - " * two normals\r\n"); + "constraint can apply to:\n\n" + " * two normals\n"); return; } SS.UndoRemember(); @@ -524,10 +524,10 @@ void Constraint::MenuConstrain(int id) { c.valA = 0; } else { Error("Bad selection for angle constraint. This constraint " - "can apply to:\r\n\r\n" - " * two line segments\r\n" - " * a line segment and a normal\r\n" - " * two normals\r\n"); + "can apply to:\n\n" + " * two line segments\n" + " * a line segment and a normal\n" + " * two normals\n"); return; } @@ -609,14 +609,14 @@ void Constraint::MenuConstrain(int id) { c.entityB = line->h; } else { Error("Bad selection for parallel / tangent constraint. This " - "constraint can apply to:\r\n\r\n" - " * two line segments (parallel)\r\n" - " * a line segment and a normal (parallel)\r\n" - " * two normals (parallel)\r\n" + "constraint can apply to:\n\n" + " * two line segments (parallel)\n" + " * a line segment and a normal (parallel)\n" + " * two normals (parallel)\n" " * a line segment and an arc, that share an endpoint " - "(tangent)\r\n" + "(tangent)\n" " * a line segment and a cubic bezier, that share an " - "endpoint (tangent)\r\n"); + "endpoint (tangent)\n"); return; } AddConstraint(&c); @@ -629,10 +629,10 @@ void Constraint::MenuConstrain(int id) { c.entityB = gs.vector[1]; } else { Error("Bad selection for perpendicular constraint. This " - "constraint can apply to:\r\n\r\n" - " * two line segments\r\n" - " * a line segment and a normal\r\n" - " * two normals\r\n"); + "constraint can apply to:\n\n" + " * two line segments\n" + " * a line segment and a normal\n" + " * two normals\n"); return; } AddConstraint(&c); diff --git a/export.cpp b/export.cpp index e168bdce..e9abc609 100644 --- a/export.cpp +++ b/export.cpp @@ -56,12 +56,12 @@ void SolveSpace::ExportSectionTo(char *filename) { u = ut.WithMagnitude(1); v = (n.Cross(u)).WithMagnitude(1); } else { - Error("Bad selection for export section. Please select:\r\n\r\n" + Error("Bad selection for export section. Please select:\n\n" " * nothing, with an active workplane " - "(workplane is section plane)\r\n" - " * a face (section plane through face)\r\n" + "(workplane is section plane)\n" + " * a face (section plane through face)\n" " * a point and two line segments " - "(plane through point and parallel to lines)\r\n"); + "(plane through point and parallel to lines)\n"); return; } SS.GW.ClearSelection(); diff --git a/exportstep.cpp b/exportstep.cpp index 3007c1ea..7c44acba 100644 --- a/exportstep.cpp +++ b/exportstep.cpp @@ -284,7 +284,7 @@ void StepFileWriter::ExportSurfacesTo(char *file) { if(shell->surface.n == 0) { Error("The model does not contain any surfaces to export.%s", g->runningMesh.l.n > 0 ? - "\r\n\r\nThe model does contain triangles from a mesh, but " + "\n\nThe model does contain triangles from a mesh, but " "a triangle mesh cannot be exported as a STEP file. Try " "File -> Export Mesh... instead." : ""); return; diff --git a/generate.cpp b/generate.cpp index 39a225f7..58624c8c 100644 --- a/generate.cpp +++ b/generate.cpp @@ -327,10 +327,10 @@ void SolveSpace::GenerateAll(int first, int last, bool andFindFree) { // be fine. Error("Additional sketch elements were deleted, because they " "depend on the element that was just deleted explicitly. " - "These include: \r\n" - " %d request%s\r\n" - " %d constraint%s\r\n" - " %d group%s\r\n\r\n" + "These include: \n" + " %d request%s\n" + " %d constraint%s\n" + " %d group%s\n\n" "Choose Edit -> Undo to undelete all elements.", deleted.requests, deleted.requests == 1 ? "" : "s", deleted.constraints, deleted.constraints == 1 ? "" : "s", diff --git a/graphicswin.cpp b/graphicswin.cpp index 797ec99e..97b42206 100644 --- a/graphicswin.cpp +++ b/graphicswin.cpp @@ -361,7 +361,7 @@ void GraphicsWindow::MenuView(int id) { SS.forceParallelProj = !SS.forceParallelProj; if(SS.cameraTangent < 1e-6) { Error("The perspective factor is set to zero, so the view will " - "always be a parallel projection.\r\n\r\n" + "always be a parallel projection.\n\n" "For a perspective projection, modify the perspective " "factor in the configuration screen. A value around 0.3 " "is typical."); diff --git a/group.cpp b/group.cpp index 3426391d..c6858077 100644 --- a/group.cpp +++ b/group.cpp @@ -75,11 +75,11 @@ void Group::MenuGroup(int id) { if(SS.GW.projUp. Dot(vt) < 0) g.predef.negateV = true; } else { Error("Bad selection for new sketch in workplane. This " - "group can be created with:\r\n\r\n" + "group can be created with:\n\n" " * a point (orthogonal to coordinate axes, " - "through the point)\r\n" + "through the point)\n" " * a point and two line segments (parallel to the " - "lines, through the point)\r\n"); + "lines, through the point)\n"); return; } break; @@ -108,11 +108,11 @@ void Group::MenuGroup(int id) { // since a line segment is a vector } else { Error("Bad selection for new lathe group. This group can " - "be created with:\r\n\r\n" + "be created with:\n\n" " * a point and a line segment or normal " "(revolved about an axis parallel to line / " - "normal, through point)\r\n" - " * a line segment (revolved about line segment)\r\n"); + "normal, through point)\n" + " * a line segment (revolved about line segment)\n"); return; } g.type = LATHE; @@ -158,9 +158,9 @@ void Group::MenuGroup(int id) { g.predef.entityB = gs.entity[0]; } else { Error("Bad selection for helical sweep. This group can " - "be created with:\r\n\r\n" + "be created with:\n\n" " * a line segment and a point (line segment " - "is axis of helix, point lies on helix)\r\n"); + "is axis of helix, point lies on helix)\n"); return; } g.type = HELICAL_SWEEP; @@ -184,12 +184,12 @@ void Group::MenuGroup(int id) { g.predef.entityB = gs.vector[0]; } else { Error("Bad selection for new rotation. This group can " - "be created with:\r\n\r\n" + "be created with:\n\n" " * a point, while locked in workplane (rotate " - "in plane, about that point)\r\n" + "in plane, about that point)\n" " * a point and a line or a normal (rotate about " "an axis through the point, and parallel to " - "line / normal)\r\n"); + "line / normal)\n"); return; } g.type = ROTATE; diff --git a/solvespace.cpp b/solvespace.cpp index 72d57072..1530a8fe 100644 --- a/solvespace.cpp +++ b/solvespace.cpp @@ -541,15 +541,15 @@ void SolveSpace::MenuAnalyze(int id) { "The mesh is watertight (okay, valid)."; char cntMsg[1024]; - sprintf(cntMsg, "\r\n\r\nThe model contains %d triangles, from " + sprintf(cntMsg, "\n\nThe model contains %d triangles, from " "%d surfaces.", g->displayMesh.l.n, g->runningShell.surface.n); if(SS.nakedEdges.l.n == 0) { - Message("%s\r\n\r\n%s\r\n\r\nZero problematic edges, good.%s", + Message("%s\n\n%s\n\nZero problematic edges, good.%s", intersMsg, leaksMsg, cntMsg); } else { - Error("%s\r\n\r\n%s\r\n\r\n%d problematic edges, bad.%s", + Error("%s\n\n%s\n\n%d problematic edges, bad.%s", intersMsg, leaksMsg, SS.nakedEdges.l.n, cntMsg); } break; @@ -786,10 +786,10 @@ void SolveSpace::MenuHelp(int id) { break; case GraphicsWindow::MNU_ABOUT: - Message("This is SolveSpace version 1.6.\r\n\r\n" - "For more information, see http://solvespace.com/\r\n\r\n" - "Built " __TIME__ " " __DATE__ ".\r\n\r\n" - "Copyright 2008-2010 Useful Subset, LLC.\r\n" + Message("This is SolveSpace version 1.6.\n\n" + "For more information, see http://solvespace.com/\n\n" + "Built " __TIME__ " " __DATE__ ".\n\n" + "Copyright 2008-2010 Useful Subset, LLC.\n" "All Rights Reserved."); break;