Commit 1e18d0fe authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

set glade_widget_adaptor_child_verify_property() value parameter as

* gladeui/glade-widget-adaptor.[ch]: set glade_widget_adaptor_child_verify_property()
  value parameter as constant.

* gladeui/glade-property.c: added packing property verify check in 
  glade_property_set_value_impl().

svn path=/trunk/; revision=1431
parent daf67732
......@@ -7,6 +7,12 @@
2007-07-03 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* gladeui/glade-widget-adaptor.[ch]: set glade_widget_adaptor_child_verify_property()
value parameter as constant.
* gladeui/glade-property.c: added packing property verify check in
glade_property_set_value_impl().
* plugins/gtk+/gtk+.xml.in: fixed verify-function and child-verify-function tags
for GtkBox, GtkTable, GtkNotebook and GtkAssistant classes.
......
......@@ -174,6 +174,29 @@ glade_property_update_prop_refs (GladeProperty *property,
}
}
static gboolean
glade_property_verify (GladeProperty *property, const GValue *value)
{
if (property->klass->packing)
{
if (property->widget->parent)
return glade_widget_adaptor_child_verify_property (property->widget->parent->adaptor,
property->widget->parent->object,
property->widget->object,
property->klass->id,
value);
else
return FALSE;
}
else
{
return glade_widget_adaptor_verify_property (property->widget->adaptor,
property->widget->object,
property->klass->id,
value);
}
}
static void
glade_property_set_value_impl (GladeProperty *property, const GValue *value)
{
......@@ -203,13 +226,9 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value)
/* Check if the backend doesnt give us permission to
* set this value.
*/
if (glade_property_superuser () == FALSE &&
property->widget &&
if (glade_property_superuser () == FALSE && property->widget &&
project && glade_project_is_loading (project) == FALSE &&
glade_widget_adaptor_verify_property (property->widget->adaptor,
property->widget->object,
property->klass->id,
value) == FALSE)
glade_property_verify (property, value) == FALSE)
return;
/* save "changed" state.
......
......@@ -2257,7 +2257,7 @@ glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor *adaptor,
GObject *container,
GObject *child,
const gchar *property_name,
GValue *value)
const GValue *value)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
g_return_val_if_fail (G_IS_OBJECT (container), FALSE);
......
......@@ -231,7 +231,7 @@ typedef gboolean (* GladeChildVerifyPropertyFunc) (GladeWidgetAdaptor *adaptor,
GObject *container,
GObject *child,
const gchar *property_name,
GValue *value);
const GValue *value);
/**
......@@ -571,7 +571,7 @@ gboolean glade_widget_adaptor_child_verify_property (GladeWidgetAdap
GObject *container,
GObject *child,
const gchar *property_name,
GValue *value);
const GValue *value);
void glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor,
GObject *container,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment