glade3 r2019 - in trunk: . gladeui plugins/gtk+
- From: tvb svn gnome org
- To: svn-commits-list gnome org
- Subject: glade3 r2019 - in trunk: . gladeui plugins/gtk+
- Date: Fri, 7 Nov 2008 20:56:30 +0000 (UTC)
Author: tvb
Date: Fri Nov 7 20:56:30 2008
New Revision: 2019
URL: http://svn.gnome.org/viewvc/glade3?rev=2019&view=rev
Log:
* gladeui/glade-widget.c, gladeui/glade-widget-adaptor.c: moved signal and
children serialization from glade_widget_adaptor_object_write_widget() to
glade_widget_write() (bug #559531)
Modified:
trunk/ChangeLog
trunk/gladeui/glade-widget-adaptor.c
trunk/gladeui/glade-widget.c
trunk/plugins/gtk+/gtk+.xml.in
Modified: trunk/gladeui/glade-widget-adaptor.c
==============================================================================
--- trunk/gladeui/glade-widget-adaptor.c (original)
+++ trunk/gladeui/glade-widget-adaptor.c Fri Nov 7 20:56:30 2008
@@ -900,40 +900,13 @@
}
}
-typedef struct {
- GladeXmlContext *context;
- GladeXmlNode *node;
-} WriteSignalsInfo;
-
-
-static void
-glade_widget_adaptor_write_signals (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- WriteSignalsInfo *info;
- GPtrArray *signals;
- guint i;
-
- info = (WriteSignalsInfo *) user_data;
- signals = (GPtrArray *) value;
- for (i = 0; i < signals->len; i++)
- {
- GladeSignal *signal = g_ptr_array_index (signals, i);
- glade_signal_write (signal,
- info->context,
- info->node);
- }
-}
-
static void
glade_widget_adaptor_object_write_widget (GladeWidgetAdaptor *adaptor,
GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node)
{
- GList *props, *l, *list;
- WriteSignalsInfo info = { context, node };
+ GList *props;
/* Write the properties */
for (props = widget->properties;
@@ -943,29 +916,6 @@
GLADE_PROPERTY (props->data)->enabled)
glade_property_write (GLADE_PROPERTY (props->data), context, node);
}
-
- /* Write the signals */
- g_hash_table_foreach (widget->signals,
- glade_widget_adaptor_write_signals,
- &info);
-
- /* Write the children */
- if ((list =
- glade_widget_adaptor_get_children (adaptor, widget->object)) != NULL)
- {
- for (l = list; l; l = l->next)
- {
- GladeWidget *child = glade_widget_get_from_gobject (l->data);
-
- if (child)
- glade_widget_write_child (widget, child, context, node);
- else if (GLADE_IS_PLACEHOLDER (l->data))
- glade_widget_write_placeholder (widget,
- G_OBJECT (l->data),
- context, node);
- }
- g_list_free (list);
- }
}
static void
Modified: trunk/gladeui/glade-widget.c
==============================================================================
--- trunk/gladeui/glade-widget.c (original)
+++ trunk/gladeui/glade-widget.c Fri Nov 7 20:56:30 2008
@@ -3710,6 +3710,31 @@
}
}
+typedef struct {
+ GladeXmlContext *context;
+ GladeXmlNode *node;
+} WriteSignalsInfo;
+
+static void
+glade_widget_adaptor_write_signals (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ WriteSignalsInfo *info;
+ GPtrArray *signals;
+ guint i;
+
+ info = (WriteSignalsInfo *) user_data;
+ signals = (GPtrArray *) value;
+ for (i = 0; i < signals->len; i++)
+ {
+ GladeSignal *signal = g_ptr_array_index (signals, i);
+ glade_signal_write (signal,
+ info->context,
+ info->node);
+ }
+}
+
/**
* glade_widget_write:
* @widget: The #GladeWidget
@@ -3725,6 +3750,8 @@
GladeXmlNode *node)
{
GladeXmlNode *widget_node;
+ WriteSignalsInfo info;
+ GList *l, *list;
widget_node =
glade_xml_node_new
@@ -3741,6 +3768,31 @@
/* Write out widget content (properties and signals) */
glade_widget_adaptor_write_widget (widget->adaptor, widget, context, widget_node);
+
+ /* Write the signals */
+ info.context = context;
+ info.node = widget_node;
+ g_hash_table_foreach (widget->signals,
+ glade_widget_adaptor_write_signals,
+ &info);
+
+ /* Write the children */
+ if ((list =
+ glade_widget_adaptor_get_children (widget->adaptor, widget->object)) != NULL)
+ {
+ for (l = list; l; l = l->next)
+ {
+ GladeWidget *child = glade_widget_get_from_gobject (l->data);
+
+ if (child)
+ glade_widget_write_child (widget, child, context, widget_node);
+ else if (GLADE_IS_PLACEHOLDER (l->data))
+ glade_widget_write_placeholder (widget,
+ G_OBJECT (l->data),
+ context, widget_node);
+ }
+ g_list_free (list);
+ }
}
Modified: trunk/plugins/gtk+/gtk+.xml.in
==============================================================================
--- trunk/plugins/gtk+/gtk+.xml.in (original)
+++ trunk/plugins/gtk+/gtk+.xml.in Fri Nov 7 20:56:30 2008
@@ -336,6 +336,13 @@
<write-widget-function>glade_gtk_window_write_widget</write-widget-function>
<properties>
+ <!-- Virtual accel-groups property to record accel groups -->
+ <property id="accel-groups" name="Accel Groups" ignore="True" save="False">
+ <parameter-spec>
+ <type>GladeParamObjects</type>
+ <value-type>GtkAccelGroup</value-type>
+ </parameter-spec>
+ </property>
<property id="opacity" since="2.12" ignore="True"/>
<property id="startup-id" since="2.12"/>
<property id="deletable" since="2.10"/>
@@ -400,13 +407,6 @@
</displayable-values>
</property>
<property id="accept-focus" ignore="True"/>
- <!-- Virtual accel-groups property to record accel groups -->
- <property id="accel-groups" name="Accel Groups" ignore="True" save="False">
- <parameter-spec>
- <type>GladeParamObjects</type>
- <value-type>GtkAccelGroup</value-type>
- </parameter-spec>
- </property>
</properties>
</glade-widget-class>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]