[gegl] property-types: don't set a random default value on GeglParamSpecSeed



commit 46ad6636425a499e6c0338259556c03004f7b993
Author: Michael Natterer <mitch gimp org>
Date:   Wed Dec 12 23:50:08 2012 +0100

    property-types: don't set a random default value on GeglParamSpecSeed
    
    because it won't be per-instance, and having a global default seed
    is just wrong.

 gegl/property-types/gegl-paramspecs.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/gegl/property-types/gegl-paramspecs.c b/gegl/property-types/gegl-paramspecs.c
index d276043..cd4abe6 100644
--- a/gegl/property-types/gegl-paramspecs.c
+++ b/gegl/property-types/gegl-paramspecs.c
@@ -644,7 +644,7 @@ gegl_param_seed_get_type (void)
         (GInstanceInitFunc) gegl_param_seed_init
       };
       type = g_type_register_static (G_TYPE_PARAM_INT,
-                                     "GeglParamseed", &info, 0);
+                                     "GeglParamSeed", &info, 0);
     }
   return type;
 }
@@ -652,7 +652,7 @@ gegl_param_seed_get_type (void)
 static void
 gegl_param_seed_class_init (GParamSpecClass *klass)
 {
-  klass->value_type     = G_TYPE_INT;
+  klass->value_type = G_TYPE_INT;
 }
 
 static void
@@ -671,8 +671,7 @@ gegl_param_spec_seed (const gchar *name,
                       GParamFlags  flags)
 {
   GeglParamSpecSeed *pspec;
-  GParamSpecInt *ispec;
-
+  GParamSpecInt     *ispec;
 
   pspec = g_param_spec_internal (GEGL_TYPE_PARAM_SEED,
                                  name, nick, blurb, flags);
@@ -680,7 +679,7 @@ gegl_param_spec_seed (const gchar *name,
 
   ispec->minimum = 0;
   ispec->maximum = G_MAXINT;
-  ispec->default_value = g_random_int_range(0, G_MAXINT);
+  ispec->default_value = 0;
   pspec->ui_minimum = 0;
   pspec->ui_maximum = G_MAXINT;
 



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