From 73b06a15d3ea07d83bb1f4f3dff8930d1d9aa682 Mon Sep 17 00:00:00 2001 From: Tristan Van Berkom Date: Wed, 22 Apr 2009 09:28:46 -0400 Subject: 2009-04-22 Tristan Van Berkom * plugins/gtk+/glade-gtk.c: Made Atk proxy objects always have unique names (at least as unique as the widget they are created for) (bug 579565). 2009-04-22 Davyd Madeley * plugins/gtk+/glade-gtk.c: Fixed output format for GtkLabel attributes (bug 579793). --- ChangeLog | 9 +++++++++ doc/gladepython.sgml | 2 +- plugins/gtk+/glade-gtk.c | 20 ++++++++++++++------ 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index b38b8cd2..cbe66223 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-04-22 Tristan Van Berkom + + * plugins/gtk+/glade-gtk.c: Made Atk proxy objects always have unique names (at + least as unique as the widget they are created for) (bug 579565). + +2009-04-22 Davyd Madeley + + * plugins/gtk+/glade-gtk.c: Fixed output format for GtkLabel attributes (bug 579793). + 2009-04-21 Juan Pablo Ugarte * doc/gladepython.sgml: added Glade Python plugin documentation. diff --git a/doc/gladepython.sgml b/doc/gladepython.sgml index 3620148a..c5dcb633 100644 --- a/doc/gladepython.sgml +++ b/doc/gladepython.sgml @@ -75,7 +75,7 @@ class MyBox(gtk.HBox): def __init__(self): gtk.HBox.__init__(self) -]]> +]]> diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c index 751c4efd..cf9ee07a 100644 --- a/plugins/gtk+/glade-gtk.c +++ b/plugins/gtk+/glade-gtk.c @@ -705,7 +705,6 @@ glade_gtk_widget_write_atk_properties_gtkbuilder (GladeWidget *widget, { GladeXmlNode *child_node, *object_node; GladeProperty *name_prop, *desc_prop; - name_prop = glade_widget_get_property (widget, "AtkObject::accessible-name"); desc_prop = glade_widget_get_property (widget, "AtkObject::accessible-description"); @@ -714,6 +713,8 @@ glade_gtk_widget_write_atk_properties_gtkbuilder (GladeWidget *widget, if (!glade_property_default (name_prop) || !glade_property_default (desc_prop)) { + gchar *atkname = g_strdup_printf ("%s-atkobject", widget->name); + child_node = glade_xml_node_new (context, GLADE_XML_TAG_CHILD); glade_xml_node_append_child (node, child_node); @@ -730,13 +731,14 @@ glade_gtk_widget_write_atk_properties_gtkbuilder (GladeWidget *widget, glade_xml_node_set_property_string (object_node, GLADE_XML_TAG_ID, - "dummy"); + atkname); if (!glade_property_default (name_prop)) glade_gtk_widget_write_atk_property (name_prop, context, object_node); if (!glade_property_default (desc_prop)) glade_gtk_widget_write_atk_property (desc_prop, context, object_node); + g_free (atkname); } } @@ -8168,10 +8170,16 @@ glade_gtk_parse_attributes (GladeWidget *widget, (prop, GLADE_XML_TAG_NAME, NULL))) continue; - if (!(value = glade_xml_get_content (prop))) + if (!(value = glade_xml_get_property_string_required + (prop, GLADE_TAG_VALUE, NULL))) { - g_free (name); - continue; + /* for a while, Glade was broken and was storing + * attributes in the node contents */ + if (!(value = glade_xml_get_content (prop))) + { + g_free (name); + continue; + } } if ((attr_type = @@ -8277,8 +8285,8 @@ glade_gtk_label_write_attributes (GladeWidget *widget, attr_node = glade_xml_node_new (context, GLADE_TAG_ATTRIBUTE); glade_xml_node_append_child (node, attr_node); - glade_xml_set_content (attr_node, attr_value); glade_xml_node_set_property_string (attr_node, GLADE_TAG_NAME, attr_type); + glade_xml_node_set_property_string (attr_node, GLADE_TAG_VALUE, attr_value); } } -- cgit v1.2.1