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

2010-03-24 Tristan Van Berkom <tvb@gnome.org>

	* gladeui/glade-signal.[ch]: Broke api of glade_signal_write(), this api should never
	  be called outside of the Glade core so its a soft api break.

	* gladeui/glade-widget.c: Call glade_signal_write() with the current project format, fixes bug 600031.
parent 074fb256
2010-03-24 Tristan Van Berkom <tvb@gnome.org>
* gladeui/glade-signal.[ch]: Broke api of glade_signal_write(), this api should never
be called outside of the Glade core so its a soft api break.
* gladeui/glade-widget.c: Call glade_signal_write() with the current project format, fixes bug 600031.
2010-03-20 Javier Jardón <jjardon@gnome.org>
* gladeui/glade-builtins.c: Use g_timeout_add_seconds() instead of g_timeout_add()
......
......@@ -120,15 +120,17 @@ glade_signal_clone (const GladeSignal *signal)
/**
* glade_signal_write:
* @signal: The #GladeSignal
* @fmt: The #GladeProjectFormat to write the signal for
* @context: A #GladeXmlContext
* @node: A #GladeXmlNode
*
* Writes @signal to @node
*/
void
glade_signal_write (GladeSignal *signal,
GladeXmlContext *context,
GladeXmlNode *node)
glade_signal_write (GladeSignal *signal,
GladeProjectFormat fmt,
GladeXmlContext *context,
GladeXmlNode *node)
{
GladeXmlNode *signal_node;
gchar *name;
......@@ -138,7 +140,9 @@ glade_signal_write (GladeSignal *signal,
*/
name = g_strdup (signal->name);
glade_util_replace (name, '-', '_');
if (fmt == GLADE_PROJECT_FORMAT_LIBGLADE)
glade_util_replace (name, '-', '_');
/* Now dump the node values... */
signal_node = glade_xml_node_new (context, GLADE_XML_TAG_SIGNAL);
......
......@@ -31,9 +31,10 @@ void glade_signal_free (GladeSignal *signal);
gboolean glade_signal_equal (GladeSignal *sig1, GladeSignal *sig2);
GladeSignal *glade_signal_read (GladeXmlNode *node);
void glade_signal_write (GladeSignal *signal,
GladeXmlContext *context,
GladeXmlNode *node);
void glade_signal_write (GladeSignal *signal,
GladeProjectFormat fmt,
GladeXmlContext *context,
GladeXmlNode *node);
G_END_DECLS
......
......@@ -3838,8 +3838,9 @@ glade_widget_write_placeholder (GladeWidget *parent,
}
typedef struct {
GladeXmlContext *context;
GladeXmlNode *node;
GladeXmlContext *context;
GladeXmlNode *node;
GladeProjectFormat fmt;
} WriteSignalsInfo;
static void
......@@ -3857,6 +3858,7 @@ glade_widget_adaptor_write_signals (gpointer key,
{
GladeSignal *signal = g_ptr_array_index (signals, i);
glade_signal_write (signal,
info->fmt,
info->context,
info->node);
}
......@@ -3871,6 +3873,8 @@ glade_widget_write_signals (GladeWidget *widget,
info.context = context;
info.node = node;
info.fmt = glade_project_get_format (widget->project);
g_hash_table_foreach (widget->signals,
glade_widget_adaptor_write_signals,
&info);
......
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