Commit ad347d83 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-signal.c: Fire a warning when signal class is not found for signal

	  read in by glade_signal_read from the xml (this happens because GTK+-3 removes some
	  signals).
parent 00a9f557
......@@ -5,6 +5,10 @@
* gladeui/glade-widget.c: Fixed access of NULL project at glade_widget_show/hide time.
* gladeui/glade-signal.c: Fire a warning when signal class is not found for signal
read in by glade_signal_read from the xml (this happens because GTK+-3 removes some
signals).
2011-01-10 Tristan Van Berkom <tristanvb@openismus.com>
* gladeui/glade-signal-model.[ch]:
......
......@@ -363,7 +363,8 @@ glade_signal_write (GladeSignal * signal,
GladeSignal *
glade_signal_read (GladeXmlNode * node, GladeWidgetAdaptor* adaptor)
{
GladeSignal *signal;
GladeSignal *signal = NULL;
GladeSignalClass *signal_class;
gchar *name, *handler, *userdata;
g_return_val_if_fail (glade_xml_node_verify_silent
......@@ -383,15 +384,22 @@ glade_signal_read (GladeXmlNode * node, GladeWidgetAdaptor* adaptor)
return NULL;
}
userdata = glade_xml_get_property_string (node, GLADE_XML_TAG_OBJECT);
signal =
glade_signal_new (glade_widget_adaptor_get_signal_class (adaptor, name),
handler, userdata,
glade_xml_get_property_boolean (node, GLADE_XML_TAG_AFTER, FALSE),
glade_xml_get_property_boolean (node, GLADE_XML_TAG_SWAPPED,
userdata != NULL));
userdata = glade_xml_get_property_string (node, GLADE_XML_TAG_OBJECT);
signal_class = glade_widget_adaptor_get_signal_class (adaptor, name);
if (signal_class)
signal =
glade_signal_new (signal_class,
handler, userdata,
glade_xml_get_property_boolean (node, GLADE_XML_TAG_AFTER, FALSE),
glade_xml_get_property_boolean (node, GLADE_XML_TAG_SWAPPED,
userdata != NULL));
else
{
/* XXX These errors should be collected and reported to the user */
g_warning ("No signal %s was found for class %s, skipping\n",
name, glade_widget_adaptor_get_name (adaptor));
}
g_free (name);
g_free (handler);
......
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