[glade3] * plugins/gtk+/glade-gtk.c: Fixed loading state of assigned GtkTreeModels of GtkCellRendererCombo
- From: Tristan Van Berkom <tvb src gnome org>
- To: svn-commits-list gnome org
- Subject: [glade3] * plugins/gtk+/glade-gtk.c: Fixed loading state of assigned GtkTreeModels of GtkCellRendererCombo
- Date: Wed, 1 Jul 2009 16:51:45 +0000 (UTC)
commit e68c4987ab1ec13d06c49f62c29d8c5376faec2f
Author: Tristan Van Berkom <vantr TheBully local>
Date: Wed Jul 1 12:51:21 2009 -0400
* plugins/gtk+/glade-gtk.c: Fixed loading state of assigned GtkTreeModels of GtkCellRendererCombo
objects (bug 566928).
ChangeLog | 5 +++++
plugins/gtk+/glade-gtk.c | 37 ++++++++++++++++++++++++-------------
2 files changed, 29 insertions(+), 13 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c7dc798..b2c82a4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-07-01 Tristan Van Berkom <tvb gnome org>
+
+ * plugins/gtk+/glade-gtk.c: Fixed loading state of assigned GtkTreeModels of GtkCellRendererCombo
+ objects (bug 566928).
+
2009-06-29 Tristan Van Berkom <tvb gnome org>
* configure.ac, NEWS: Rolling Glade 3.6.7
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 0cb6eff..0753141 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -10666,24 +10666,19 @@ glade_gtk_cell_renderer_write_widget (GladeWidgetAdaptor *adaptor,
GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
}
-void
-glade_gtk_cell_renderer_read_widget (GladeWidgetAdaptor *adaptor,
- GladeWidget *widget,
- GladeXmlNode *node)
+static void
+glade_gtk_cell_renderer_parse_finished (GladeProject *project,
+ GladeWidget *widget)
{
GladeProperty *property;
GList *l;
static gint attr_len = 0, use_attr_len = 0;
- if (!glade_xml_node_verify
- (node, GLADE_XML_TAG_WIDGET (glade_project_get_format (widget->project))))
- return;
-
- /* First chain up and read in all the properties... */
- GWA_GET_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
-
-
- /* Now set "use-attr-*" everywhere that the object property is non-default */
+ /* Set "use-attr-*" everywhere that the object property is non-default
+ *
+ * We do this in the finished handler because some properties may be
+ * object type properties (which may be anywhere in the glade file).
+ */
if (!attr_len)
{
attr_len = strlen ("attr-");
@@ -10706,7 +10701,23 @@ glade_gtk_cell_renderer_read_widget (GladeWidgetAdaptor *adaptor,
glade_property_set (switch_prop, FALSE);
}
}
+}
+
+void
+glade_gtk_cell_renderer_read_widget (GladeWidgetAdaptor *adaptor,
+ GladeWidget *widget,
+ GladeXmlNode *node)
+{
+ if (!glade_xml_node_verify
+ (node, GLADE_XML_TAG_WIDGET (glade_project_get_format (widget->project))))
+ return;
+ /* First chain up and read in all the properties... */
+ GWA_GET_CLASS (G_TYPE_OBJECT)->read_widget (adaptor, widget, node);
+
+ g_signal_connect (widget->project, "parse-finished",
+ G_CALLBACK (glade_gtk_cell_renderer_parse_finished),
+ widget);
}
/*--------------------------- GtkCellLayout ---------------------------------*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]