Commit cf0e4a52 authored by Tristan Van Berkom's avatar Tristan Van Berkom

last fix broke the build, backing it out.


svn path=/trunk/; revision=1321
parent 3cbee45c
2007-05-18 Tristan Van Berkom <tvb@gnome.org>
* Reverting Juan's last fix for bug 435912 since it broke the build.
2007-05-16 Juan Pablo Ugarte <juanpablougarte@gmail.com>
* gladeui/glade-widget-adaptor.[ch]: fixed bogus type punned warnings adding a
......
......@@ -1328,79 +1328,6 @@ gwa_update_actions (GladeWidgetAdaptor *adaptor,
g_free (label);
g_free (stock);
}
static void
gwa_extend_with_node_load_sym (GladeWidgetAdaptorClass *klass,
GladeXmlNode *node,
GModule *module)
{
gpointer symbol;
/*
* We use a temporary variable to avoid a bogus gcc warning.
* the thing it that g_module_symbol() should use a function pointer
* instead of a gpointer!
*/
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_POST_CREATE_FUNCTION,
&symbol))
klass->post_create = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_GET_INTERNAL_CHILD_FUNCTION,
&symbol))
klass->get_internal_child = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_SET_FUNCTION,
&symbol))
klass->set_property = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_GET_FUNCTION,
&symbol))
klass->get_property = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_VERIFY_FUNCTION,
&symbol))
klass->verify_property = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_ADD_CHILD_FUNCTION,
&symbol))
klass->add = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_REMOVE_CHILD_FUNCTION,
&symbol))
klass->remove = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_GET_CHILDREN_FUNCTION,
&symbol))
klass->get_children = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_CHILD_SET_PROP_FUNCTION,
&symbol))
klass->child_set_property = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_CHILD_GET_PROP_FUNCTION,
&symbol))
klass->child_get_property = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_CHILD_VERIFY_FUNCTION,
&symbol))
klass->child_verify_property = symbol;
if (glade_xml_load_sym_from_node (node, module,
GLADE_TAG_REPLACE_CHILD_FUNCTION,
&symbol))
klass->replace_child = symbol;
}
static gboolean
......@@ -1413,8 +1340,57 @@ gwa_extend_with_node (GladeWidgetAdaptor *adaptor,
GladeXmlNode *child;
gchar *child_type;
/* Load catalog symbols from module */
if (module) gwa_extend_with_node_load_sym (adaptor_class, node, module);
if (module)
{
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_POST_CREATE_FUNCTION,
(gpointer *)&adaptor_class->post_create);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_GET_INTERNAL_CHILD_FUNCTION,
(gpointer *)&adaptor_class->get_internal_child);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_SET_FUNCTION,
(gpointer *)&adaptor_class->set_property);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_GET_FUNCTION,
(gpointer *)&adaptor_class->get_property);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_VERIFY_FUNCTION,
(gpointer *)&adaptor_class->verify_property);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_ADD_CHILD_FUNCTION,
(gpointer *)&adaptor_class->add);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_REMOVE_CHILD_FUNCTION,
(gpointer *)&adaptor_class->remove);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_GET_CHILDREN_FUNCTION,
(gpointer *)&adaptor_class->get_children);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_CHILD_SET_PROP_FUNCTION,
(gpointer *)&adaptor_class->child_set_property);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_CHILD_GET_PROP_FUNCTION,
(gpointer *)&adaptor_class->child_get_property);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_CHILD_VERIFY_FUNCTION,
(gpointer *)&adaptor_class->child_verify_property);
glade_xml_load_sym_from_node (node, module,
GLADE_TAG_REPLACE_CHILD_FUNCTION,
(gpointer *)&adaptor_class->replace_child);
}
adaptor_class->fixed =
glade_xml_get_property_boolean
......
......@@ -777,14 +777,14 @@ glade_xml_alloc_propname(GladeInterface *interface, const gchar *string)
return glade_xml_alloc_string(interface, norm_str->str);
}
gboolean
void
glade_xml_load_sym_from_node (GladeXmlNode *node_in,
GModule *module,
gchar *tagname,
gpointer *sym_location)
{
static GModule *self = NULL;
gboolean retval = FALSE;
gchar *buff;
if (!self)
......@@ -798,7 +798,7 @@ glade_xml_load_sym_from_node (GladeXmlNode *node_in,
"no module available to load it from !",
buff, tagname);
g_free (buff);
return FALSE;
return;
}
/* I use here a g_warning to signal these errors instead of a dialog
......@@ -813,14 +813,10 @@ glade_xml_load_sym_from_node (GladeXmlNode *node_in,
*
* XXX http://bugzilla.gnome.org/show_bug.cgi?id=331797
*/
if (g_module_symbol (module, buff, sym_location) ||
g_module_symbol (self, buff, sym_location))
retval = TRUE;
else
g_warning ("Could not find %s in %s or in global namespace\n",
buff, g_module_name (module));
if (!g_module_symbol (module, buff, sym_location))
if (!g_module_symbol (self, buff, sym_location))
g_warning ("Could not find %s in %s or in global namespace\n",
buff, g_module_name (module));
g_free (buff);
}
return retval;
}
......@@ -175,7 +175,7 @@ GladeXmlDoc * glade_xml_context_get_doc (GladeXmlContext *context);
gchar * glade_xml_alloc_string (GladeInterface *interface, const gchar *string);
gchar * glade_xml_alloc_propname (GladeInterface *interface, const gchar *string);
gboolean glade_xml_load_sym_from_node (GladeXmlNode *node_in,
void glade_xml_load_sym_from_node (GladeXmlNode *node_in,
GModule *module,
gchar *tagname,
gpointer *sym_location);
......
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