[gtk+/gtk-style-context] GtkThemingEngine: Do not require a default value when registering properties



commit b76ee1c1419ad1fadba7575efbfcab450da60b48
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Nov 6 12:37:46 2010 +0100

    GtkThemingEngine: Do not require a default value when registering properties
    
    NULL should work for 0 for int/double/enum/... types and NULL for
    pointer types, this should be sane enough to not require a default
    value.

 gtk/gtkthemingengine.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c
index c6b213e..d734f35 100644
--- a/gtk/gtkthemingengine.c
+++ b/gtk/gtkthemingengine.c
@@ -381,7 +381,7 @@ gtk_theming_engine_register_property (GtkThemingEngine       *engine,
   g_return_if_fail (GTK_IS_THEMING_ENGINE (engine));
   g_return_if_fail (property_name != NULL);
   g_return_if_fail (type != G_TYPE_INVALID);
-  g_return_if_fail (default_value != NULL && G_IS_VALUE (default_value));
+  g_return_if_fail (default_value == NULL || G_IS_VALUE (default_value));
 
   priv = engine->priv;
 



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