Code

reorder LPE list
authorjohanengelen <johanengelen@users.sourceforge.net>
Fri, 2 Jan 2009 02:08:21 +0000 (02:08 +0000)
committerjohanengelen <johanengelen@users.sourceforge.net>
Fri, 2 Jan 2009 02:08:21 +0000 (02:08 +0000)
disable test effects per default

src/live_effects/effect-enum.h
src/live_effects/effect.cpp

index 4c0d9389f3436ec1f092a799218c29b8497a25c8..6409fecd251679ad83fe47b5d6309b16efd00064 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "util/enums.h"
 
-#define LPE_ENABLE_TEST_EFFECTS
+//#define LPE_ENABLE_TEST_EFFECTS
 
 namespace Inkscape {
 namespace LivePathEffect {
@@ -24,9 +24,6 @@ enum EffectType {
     ROUGH_HATCHES,
     VONKOCH,
     KNOT,
-#ifdef LPE_ENABLE_TEST_EFFECTS
-    DOEFFECTSTACK_TEST,
-#endif
     GEARS,
     CURVE_STITCH,
     CIRCLE_WITH_RADIUS,
@@ -49,6 +46,9 @@ enum EffectType {
     TEXT_LABEL,
     PATH_LENGTH,
     LINE_SEGMENT,
+#ifdef LPE_ENABLE_TEST_EFFECTS
+    DOEFFECTSTACK_TEST,
+#endif
     INVALID_LPE // This must be last
 };
 
index 2a316a0bb243df282db5398e082590080833b89c..dc252722abd28503b828ebf93d8a097ca2610d78 100644 (file)
@@ -74,18 +74,19 @@ namespace LivePathEffect {
 
 const Util::EnumData<EffectType> LPETypeData[] = {
     // {constant defined in effect-enum.h, N_("name of your effect"), "name of your effect in SVG"}
+#ifdef LPE_ENABLE_TEST_EFFECTS
+    {DOEFFECTSTACK_TEST,    N_("doEffect stack test"),     "doeffectstacktest"},
+#endif
     {ANGLE_BISECTOR,        N_("Angle bisector"),          "angle_bisector"},
     {BEND_PATH,             N_("Bend"),                     "bend_path"},
     {BOOLOPS,               N_("Boolops"),                 "boolops"},
     {CIRCLE_WITH_RADIUS,    N_("Circle (by center and radius)"),   "circle_with_radius"},
     {CIRCLE_3PTS,           N_("Circle by 3 points"), "circle_3pts"},
     {CONSTRUCT_GRID,        N_("Construct grid"),          "construct_grid"},
-#ifdef LPE_ENABLE_TEST_EFFECTS
-    {DOEFFECTSTACK_TEST,    N_("doEffect stack test"),     "doeffectstacktest"},
-#endif
     {ENVELOPE,              N_("Envelope Deformation"),    "envelope"},
     {FREEHAND_SHAPE,        N_("Freehand Shape"),          "freehand_shape"}, // this is actually a special type of PatternAlongPath, used to paste shapes in pen/pencil tool
     {GEARS,                 N_("Gears"),                   "gears"},
+    {ROUGH_HATCHES,         N_("Hatches (rough)"),            "rough_hatches"},
     {INTERPOLATE,           N_("Interpolate Sub-Paths"),   "interpolate"},
     {KNOT,                  N_("Knot"),                    "knot"},
     {LATTICE,               N_("Lattice Deformation"),     "lattice"},
@@ -100,7 +101,6 @@ const Util::EnumData<EffectType> LPETypeData[] = {
     {COPY_ROTATE,           N_("Rotate copies"),           "copy_rotate"},
     {RULER,                 N_("Ruler"),                   "ruler"},
     {SKETCH,                N_("Sketch"),                  "sketch"},
-    {ROUGH_HATCHES,         N_("Hatches (rough)"),            "rough_hatches"},
     {SPIRO,                 N_("Spiro spline"),            "spiro"},
     {CURVE_STITCH,          N_("Stitch Sub-Paths"),        "curvestitching"},
     {TANGENT_TO_CURVE,      N_("Tangent to curve"),        "tangent_to_curve"},
@@ -148,11 +148,6 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
         case KNOT:
             neweffect = static_cast<Effect*> ( new LPEKnot(lpeobj) );
             break;
-#ifdef LPE_ENABLE_TEST_EFFECTS
-        case DOEFFECTSTACK_TEST:
-            neweffect = static_cast<Effect*> ( new LPEdoEffectStackTest(lpeobj) );
-            break;
-#endif
         case GEARS:
             neweffect = static_cast<Effect*> ( new LPEGears(lpeobj) );
             break;
@@ -219,6 +214,11 @@ Effect::New(EffectType lpenr, LivePathEffectObject *lpeobj)
         case LINE_SEGMENT:
             neweffect = static_cast<Effect*> ( new LPELineSegment(lpeobj) );
             break;
+#ifdef LPE_ENABLE_TEST_EFFECTS
+        case DOEFFECTSTACK_TEST:
+            neweffect = static_cast<Effect*> ( new LPEdoEffectStackTest(lpeobj) );
+            break;
+#endif
         default:
             g_warning("LivePathEffect::Effect::New   called with invalid patheffect type (%d)", lpenr);
             neweffect = NULL;