diff -rup gtk+/gtk/gtkbuildable.c my_gtk+/gtk/gtkbuildable.c
--- gtk+/gtk/gtkbuildable.c	2006-12-04 01:57:42.000000000 -0500
+++ my_gtk+/gtk/gtkbuildable.c	2006-12-03 23:30:27.000000000 -0500
@@ -48,26 +48,30 @@ gtk_buildable_get_type (void)
 /**
  * gtk_buildable_set_name:
  * @buildable: A #GtkBuildable
+ * @builder: the #GtkBuilder
  * @name: name to set
  *
  * Sets the name of the builder, it's mainly used to synchronize the name
  * if the object already has it's own concept of name. #GtkWidget for instance,
- * implements this and calls gtk_widget_set_name internally.
- *
- **/
+ * implements this and calls gtk_widget_set_name internally. Its also sure
+ * to be called for every object and is a practicle entry point if you need
+ * to run code at "finish" time.
+ */
 void
 gtk_buildable_set_name (GtkBuildable *buildable,
-                        const gchar *name)
+			GtkBuilder   *builder,
+                        const gchar  *name)
 {
   GtkBuildableIface *iface;
 
   g_return_if_fail (GTK_IS_BUILDABLE (buildable));
+  g_return_if_fail (GTK_IS_BUILDER (builder));
   g_return_if_fail (name != NULL);
 
   iface = GTK_BUILDABLE_GET_IFACE (buildable);
 
   if (iface->set_name)
-    (* iface->set_name) (buildable, name);
+    (* iface->set_name) (buildable, builder, name);
 
   g_object_set_data_full (G_OBJECT (buildable),
                           "gtk-buildable-name",
@@ -136,7 +140,7 @@ gtk_buildable_add (GtkBuildable *buildab
  *
  * g_object_set_property is used as a fallback if it's not implemented.
  *
- **/
+ */
 void
 gtk_buildable_set_property (GtkBuildable *buildable,
                             GtkBuilder   *builder,
@@ -160,6 +164,41 @@ gtk_buildable_set_property (GtkBuildable
     g_object_set_property (G_OBJECT (buildable), name, value);
 }
 
+
+/**
+ * gtk_buildable_child_set_property:
+ * @buildable: A #GtkBuildable
+ * @builder: #GtkBuilder used to construct this object
+ * @child: The #GObject child to set this property for
+ * @name: name of property
+ * @value: value of property
+ *
+ * Called when a child packing property is set.
+ *
+ */
+void
+gtk_buildable_child_set_property (GtkBuildable        *buildable,
+				  GtkBuilder          *builder,
+				  GObject             *child,
+				  const gchar         *name,
+				  const GValue        *value)
+{
+  GtkBuildableIface *iface;
+
+  g_return_if_fail (GTK_IS_BUILDABLE (buildable));
+  g_return_if_fail (GTK_IS_BUILDER (builder));
+  g_return_if_fail (name != NULL);
+  g_return_if_fail (value != NULL);
+
+  iface = GTK_BUILDABLE_GET_IFACE (buildable);
+
+  g_return_if_fail (iface != NULL);
+  g_return_if_fail (iface->child_set_property != NULL);
+
+  (* iface->child_set_property) (buildable, builder, child, name, value);
+}
+
+
 /**
  * gtk_buildable_construct_child
  * @buildable: A #GtkBuildable
diff -rup gtk+/gtk/gtkbuildable.h my_gtk+/gtk/gtkbuildable.h
--- gtk+/gtk/gtkbuildable.h	2006-12-04 01:57:42.000000000 -0500
+++ my_gtk+/gtk/gtkbuildable.h	2006-12-03 23:28:12.000000000 -0500
@@ -41,6 +41,7 @@ struct _GtkBuildableIface
 
   /* virtual table */
   void     (* set_name)           (GtkBuildable *buildable,
+                                   GtkBuilder   *builder,
                                    const gchar  *name);
   void     (* add)                (GtkBuildable *buildable,
                                    GtkBuilder   *builder,
@@ -50,6 +51,11 @@ struct _GtkBuildableIface
                                    GtkBuilder   *builder,
                                    const gchar  *name,
                                    const GValue *value);
+  void     (* child_set_property) (GtkBuildable *buildable,
+                                   GtkBuilder   *builder,
+				   GObject      *child,
+                                   const gchar  *name,
+                                   const GValue *value);
   GObject *(* construct_child)    (GtkBuildable *buildable,
                                    GtkBuilder   *builder,
                                    const gchar  *name);
@@ -64,17 +70,19 @@ struct _GtkBuildableIface
                                    GObject      *child,
                                    const gchar  *tagname,
                                    gpointer      data);
-  GObject * (* get_internal_child) (GtkBuildable *buildable,
-                                    GtkBuilder   *builder,
-                                    const gchar  *childname);
+  GObject *(* get_internal_child) (GtkBuildable *buildable,
+				   GtkBuilder   *builder,
+				   const gchar  *childname);
 };
 
 
 GType     gtk_buildable_get_type              (void) G_GNUC_CONST;
 
 void      gtk_buildable_set_name              (GtkBuildable        *buildable,
+					       GtkBuilder          *builder,
                                                const gchar         *name);
-const gchar * gtk_buildable_get_name          (GtkBuildable        *buildable);
+
+G_CONST_RETURN gchar *gtk_buildable_get_name  (GtkBuildable        *buildable);
 void      gtk_buildable_add                   (GtkBuildable        *buildable,
                                                GtkBuilder          *builder,
                                                GObject             *child,
@@ -83,6 +91,11 @@ void      gtk_buildable_set_property    
                                                GtkBuilder          *builder,
                                                const gchar         *name,
                                                const GValue        *value);
+void      gtk_buildable_child_set_property    (GtkBuildable        *buildable,
+                                               GtkBuilder          *builder,
+					       GObject             *child,
+                                               const gchar         *name,
+                                               const GValue        *value);
 GObject * gtk_buildable_construct_child       (GtkBuildable        *buildable,
                                                GtkBuilder          *builder,
                                                const gchar         *name);
diff -rup gtk+/gtk/gtkbuilder.c my_gtk+/gtk/gtkbuilder.c
--- gtk+/gtk/gtkbuilder.c	2006-12-04 01:57:42.000000000 -0500
+++ my_gtk+/gtk/gtkbuilder.c	2006-12-04 01:39:47.000000000 -0500
@@ -21,6 +21,7 @@
 #include <string.h>
 
 #include <config.h>
+#include "gtkwindow.h"
 #include "gtkbuilder.h"
 #include "gtkbuildable.h"
 #include "gtkbuilderprivate.h"
@@ -40,6 +41,13 @@ static void gtk_builder_get_property   (
                                         GValue          *value,
                                         GParamSpec      *pspec);
 
+typedef struct
+{
+  gchar *object;
+
+  PropertyInfo    property;
+} DelayedProperty;
+
 enum {
   PROP_0,
   PROP_DOMAIN,
@@ -52,16 +60,24 @@ enum {
 
 static guint gtk_builder_signals[NUM_SIGNALS] = { 0 };
 
+static const gchar *gtk_builder_tooltips_key = "GtkBuilder::tooltips";
+static GQuark       gtk_builder_tooltips_id  = 0;
+
 #define GTK_BUILDER_GET_PRIVATE(o)       (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_BUILDER, GtkBuilderPrivate))
 typedef struct _GtkBuilderPrivate GtkBuilderPrivate;
 
 struct _GtkBuilderPrivate
 {
+  gint version;
+  const gchar *filename;
   gchar *domain;
   GHashTable *objects;
   GHashTable *delayed_properties;
   GSList *signals;
   gchar *current_toplevel;
+  GObject *current_toplevel_object;
+  GtkAccelGroup *accel_group;
+  GtkTooltips *tooltips;
 };
 
 G_DEFINE_TYPE (GtkBuilder, gtk_builder, G_TYPE_OBJECT)
@@ -77,6 +93,9 @@ gtk_builder_class_init (GtkBuilderClass 
   gobject_class->set_property = gtk_builder_set_property;
   gobject_class->get_property = gtk_builder_get_property;
 
+  gtk_builder_tooltips_id = 
+    g_quark_from_static_string (gtk_builder_tooltips_key);
+
   g_object_class_install_property (gobject_class,
                                    PROP_DOMAIN,
                                    g_param_spec_string ("domain",
@@ -103,6 +122,7 @@ gtk_builder_init (GtkBuilder *builder)
   GtkBuilderPrivate *priv;
 
   priv = GTK_BUILDER_GET_PRIVATE (builder);
+  priv->tooltips = gtk_tooltips_new ();
   priv->domain = NULL;
   priv->objects = g_hash_table_new (g_str_hash, g_str_equal);
   priv->delayed_properties = g_hash_table_new_full (g_str_hash, g_str_equal,
@@ -117,6 +137,13 @@ gtk_builder_finalize (GObject *object)
   priv = GTK_BUILDER_GET_PRIVATE (object);
   g_free (priv->domain);
 
+  if (priv->tooltips)
+    g_object_unref(priv->tooltips);
+
+  if (priv->accel_group)
+    g_object_unref(priv->accel_group);
+
+
   g_free (priv->current_toplevel);
   g_hash_table_destroy (priv->delayed_properties);
   priv->delayed_properties = NULL;
@@ -167,14 +194,6 @@ gtk_builder_get_property (GObject    *ob
     }
 }
 
-
-typedef struct
-{
-  gchar *object;
-  gchar *name;
-  gchar *value;
-} DelayedProperty;
-
 static void
 gtk_builder_get_parameters (GtkBuilder *builder,
                             GType object_type,
@@ -206,28 +225,34 @@ gtk_builder_get_parameters (GtkBuilder *
                                             prop->name);
       if (!pspec)
         {
-          g_print ("Unknown property: %s.%s\n",
-                   g_type_name (object_type), prop->name);
-          continue;
+	  GTK_NOTE (BUILDER,
+		    g_print ("Adding virtual property %s to %s (%s)\n",
+			     prop->name, object_name, g_type_name (object_type)));
+
+	  g_value_init (&parameter.value, G_TYPE_STRING);
+	  g_value_set_string (&parameter.value, prop->data);
         }
-      if (G_IS_PARAM_SPEC_OBJECT (pspec))
+      else if (G_IS_PARAM_SPEC_OBJECT (pspec) && 
+	       /* Dont deffer pixbufs and adjustments with the old file format */
+	       !(priv->version == 1 && 
+		 (pspec->value_type == GDK_TYPE_PIXBUF ||
+		  pspec->value_type == GTK_TYPE_ADJUSTMENT)))
         {
           GSList *delayed_properties;
 
           delayed_properties = g_hash_table_lookup (priv->delayed_properties,
                                                     priv->current_toplevel);
           property = g_slice_new (DelayedProperty);
-          property->object = g_strdup (object_name);
-          property->name = g_strdup (prop->name);
-          property->value = g_strdup (prop->data);
+          property->object        = g_strdup (object_name);
+          property->property.name = g_strdup (prop->name);
+          property->property.data = g_strdup (prop->data);
           delayed_properties = g_slist_prepend (delayed_properties, property);
           g_hash_table_insert (priv->delayed_properties,
                                g_strdup (priv->current_toplevel),
                                delayed_properties);
           continue;
         }
-
-      if (!gtk_builder_value_from_string (pspec, prop->data, &parameter.value))
+      else if (!gtk_builder_value_from_string (builder, pspec, prop->data, &parameter.value))
         {
           g_warning ("failed to set property %s.%s to %s",
                      g_type_name (object_type), prop->name, prop->data);
@@ -235,7 +260,7 @@ gtk_builder_get_parameters (GtkBuilder *
         }
 
       parameter.name = prop->name;
-      if (pspec->flags & G_PARAM_CONSTRUCT_ONLY)
+      if (pspec && (pspec->flags & G_PARAM_CONSTRUCT_ONLY))
         g_array_append_val (*construct_parameters, parameter);
       else
         g_array_append_val (*parameters, parameter);
@@ -244,6 +269,73 @@ gtk_builder_get_parameters (GtkBuilder *
   g_type_class_unref (oclass);
 }
 
+/* Currently this function will create parameters based 
+ * on pspecs returned from the GtkContainer api, otherwise
+ * it preserves the raw strings for objects that implement
+ * packing properties outside the GtkContainer api, a more
+ * simplified version would be to create GContainerIface
+ * and implement that in GtkContainer, and use GContainerIface
+ * here.
+ */
+static void
+gtk_builder_get_child_parameters (GtkBuilder   *builder,
+				  GObject      *parent_object,
+				  GSList       *properties,
+				  GArray      **parameters)
+{
+  GtkBuilderPrivate *priv;
+  GSList *l;
+  GParamSpec *pspec;
+  GObjectClass *oclass;
+
+  oclass = G_OBJECT_GET_CLASS (parent_object);
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  *parameters = g_array_new (FALSE, FALSE, sizeof (GParameter));
+
+
+  for (l = properties; l; l = l->next)
+    {
+      PropertyInfo *prop = (PropertyInfo*)l->data;
+      GParameter parameter = { NULL };
+
+      pspec = gtk_container_class_find_child_property (oclass, prop->name);
+      if (!pspec)
+        {
+	  GTK_NOTE (BUILDER,
+		    g_print ("Adding virtual child property %s to child of parent %s\n",
+			     prop->name, g_type_name (G_TYPE_FROM_CLASS (oclass))));
+
+	  g_value_init (&parameter.value, G_TYPE_STRING);
+	  g_value_set_string (&parameter.value, prop->data);
+        }
+      else if (G_IS_PARAM_SPEC_OBJECT (pspec) && 
+	       /* Dont deffer pixbufs and adjustments with the old file format */
+	       !(priv->version == 1 && 
+		 (pspec->value_type == GDK_TYPE_PIXBUF ||
+		  pspec->value_type == GTK_TYPE_ADJUSTMENT)))
+        {
+	  /* No support for deffered packing properties as of yet */
+	  g_warning ("object type packing properties are unsupported");
+          continue;
+        }
+      else if (!gtk_builder_value_from_string (builder, pspec, prop->data, &parameter.value))
+        {
+          g_warning ("failed to set child property %s.%s to %s",
+                     g_type_name (G_TYPE_FROM_CLASS (oclass)), prop->name, prop->data);
+          continue;
+        }
+
+      GTK_NOTE (BUILDER,
+		g_print ("Adding child property %s to child of parent %s\n",
+			 prop->name, g_type_name (G_TYPE_FROM_CLASS (oclass))));
+
+      parameter.name = prop->name;
+      g_array_append_val (*parameters, parameter);
+    }
+}
+
 static GObject *
 gtk_builder_get_internal_child (GtkBuilder  *builder,
                                 ObjectInfo  *info,
@@ -277,6 +369,63 @@ gtk_builder_get_internal_child (GtkBuild
   return obj;
 }
 
+void
+_gtk_builder_set_version (GtkBuilder *builder, 
+			  gint        version)
+{
+  GtkBuilderPrivate *priv;
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  priv->version = version;
+}
+
+/* This is used while the tree is being built to set the toplevel window that
+ * is currently being built.  It is mainly used to enable GtkAccelGroup's to
+ * be bound to the correct window, but could have other uses.
+ */
+static void
+builder_set_toplevel (GtkBuilder  *builder,
+		      const gchar *id,
+		      GObject     *object)
+{
+  GtkBuilderPrivate *priv;
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  /* Only connect the accel group when parsing the 'next' toplevel
+   * or at "finish" time (incase a toplevel with accelerators installed
+   * only on the toplevel dont get missed, since properties are parsed/set
+   * before priv->current_toplevel_object can be set.
+   */
+  if (priv->accel_group)
+    {
+      if (priv->current_toplevel_object && 
+	  GTK_IS_WINDOW (priv->current_toplevel_object))
+	gtk_window_add_accel_group(GTK_WINDOW (priv->current_toplevel_object),
+				   priv->accel_group);
+
+      g_object_unref (priv->accel_group);
+    }
+  priv->accel_group = NULL;
+
+  if (GTK_IS_WINDOW (object))
+    {
+      /* each window holds a reference to the tooltips object */
+      g_object_ref(priv->tooltips);
+      g_object_set_qdata_full(object, gtk_builder_tooltips_id,
+			      priv->tooltips,
+			      (GDestroyNotify)g_object_unref);
+    }
+
+  if (priv->current_toplevel)
+    g_free (priv->current_toplevel);
+
+  priv->current_toplevel = id ? g_strdup (id) : NULL;
+  priv->current_toplevel_object = object;
+}
+
+
 GObject *
 _gtk_builder_construct (GtkBuilder *builder,
                         ObjectInfo *info)
@@ -285,11 +434,8 @@ _gtk_builder_construct (GtkBuilder *buil
   GType object_type;
   GObject *obj;
   GtkBuilderPrivate *priv;
-  int i;
+  gint i;
   GSList *l;
-  GtkBuildableIface *iface;
-  gboolean custom_set_property;
-  GtkBuildable *buildable;
 
   priv = GTK_BUILDER_GET_PRIVATE (builder);
 
@@ -341,37 +487,29 @@ _gtk_builder_construct (GtkBuilder *buil
       g_array_free (construct_parameters, TRUE);
     }
 
-  custom_set_property = FALSE;
-  buildable = NULL;
-  iface = NULL;
-  if (GTK_IS_BUILDABLE (obj))
-    {
-      buildable = GTK_BUILDABLE (obj);
-      iface = GTK_BUILDABLE_GET_IFACE (obj);
-      if (iface->set_property)
-        custom_set_property = TRUE;
-    }
-
   for (i = 0; i < parameters->len; i++)
     {
       GParameter *param = &g_array_index (parameters, GParameter, i);
-      if (custom_set_property)
-        iface->set_property (buildable, builder, param->name, &param->value);
+      if (GTK_IS_BUILDABLE (obj))
+	gtk_buildable_set_property (GTK_BUILDABLE (obj), builder, 
+				    param->name, &param->value);
       else
         g_object_set_property (obj, param->name, &param->value);
 
+#ifdef G_ENABLE_DEBUG
       if (gtk_debug_flags & GTK_DEBUG_BUILDER)
         {
           gchar *str = g_strdup_value_contents ((const GValue*)&param->value);
           g_print ("set %s: %s = %s\n", info->id, param->name, str);
           g_free (str);
         }
+#endif
       g_value_unset (&param->value);
     }
   g_array_free (parameters, TRUE);
 
   if (GTK_IS_BUILDABLE (obj))
-    gtk_buildable_set_name (buildable, info->id);
+    gtk_buildable_set_name (GTK_BUILDABLE (obj), builder, info->id);
 
   g_object_set_data_full (obj,
                           "gtk-builder-name",
@@ -379,26 +517,68 @@ _gtk_builder_construct (GtkBuilder *buil
                           g_free);
 
   if (!info->parent)
-    {
-      g_free (priv->current_toplevel);
-      priv->current_toplevel = g_strdup (info->id);
-    }
+    builder_set_toplevel (builder, info->id, obj);
+
   g_hash_table_insert (priv->objects, g_strdup (info->id), obj);
 
   for (l = info->signals; l; l = l->next)
     {
       priv->signals = g_slist_prepend (priv->signals, l->data);
     }
+
+
+  for (l = info->accelerators; l; l = l->next)
+    {
+      AcceleratorInfo    *accel = l->data;
+      
+      gtk_widget_add_accelerator(GTK_WIDGET (obj), 
+				 accel->signal,
+				 gtk_builder_ensure_accel_group(builder),
+				 accel->key, 
+				 accel->modifiers,
+				 GTK_ACCEL_VISIBLE);
+    }
+
   return obj;
 }
 
+const gchar *
+builder_extract_child_type (GArray **parameters)
+{
+  const gchar *ret = NULL;
+  gint i;
+
+  for (i = 0; i < (*parameters)->len; i++)
+    {
+      GParameter *param = &g_array_index (*parameters, GParameter, i);
+
+      if (!strcmp (param->name, "type"))
+	{
+	  ret = g_value_get_string (&param->value);
+	  
+	  *parameters = g_array_remove_index (*parameters, i);
+
+	  break;
+	}
+    }
+
+  return ret;
+}
+
+
 
 void
 _gtk_builder_add (GtkBuilder *builder,
                   ChildInfo  *child_info)
 {
-  GObject *object;
-  GObject *parent;
+  GtkBuilderPrivate *priv;
+  const gchar *child_type;
+  GObject     *object;
+  GObject     *parent;
+  GArray      *parameters;
+  gint         i;
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
 
   /* Internal children are already added
    * Also prevent us from being called twice.
@@ -430,12 +610,129 @@ _gtk_builder_add (GtkBuilder *builder,
                      gtk_builder_get_object_name (object),
                      gtk_builder_get_object_name (parent)));
 
-  gtk_buildable_add (GTK_BUILDABLE (parent), builder, object,
-                     child_info->type);
+  /* If we are working with version 1 glade files, we must
+   * dig up the "type" packing property for child_info->type.
+   */
+  gtk_builder_get_child_parameters (builder,
+				    parent,
+				    child_info->packing_properties,
+				    &parameters);
+  
+  if (priv->version <= 1)
+    child_type = builder_extract_child_type (&parameters);
+  else
+    child_type = child_info->type;
+
+  gtk_buildable_add (GTK_BUILDABLE (parent), builder, object, child_type);
+
+  for (i = 0; i < parameters->len; i++)
+    {
+      GParameter *param = &g_array_index (parameters, GParameter, i);
+
+      gtk_buildable_child_set_property (GTK_BUILDABLE (parent), builder, 
+					object, param->name, &param->value);
+
+#ifdef G_ENABLE_DEBUG
+      if (gtk_debug_flags & GTK_DEBUG_BUILDER)
+        {
+          gchar *str = g_strdup_value_contents ((const GValue*)&param->value);
+          g_print ("parent %s set child %s: %s = %s\n", 
+		   gtk_builder_get_object_name (parent),
+		   gtk_builder_get_object_name (object),
+		   param->name, str);
+          g_free (str);
+        }
+#endif
+      g_value_unset (&param->value);
+    }
+
+
+  g_array_free (parameters, TRUE);
+
+
+
 
   child_info->added = TRUE;
 }
 
+
+/**
+ * gtk_builder_ensure_accel_group:
+ * @builder: A #GtkBuilder
+ *
+ * Creates an accel group for the toplevel currently being
+ * parsed in @builder, if one already exists it will be returned.
+ * If the toplevel is a GtkWindow then it will be bound to that
+ * window.
+ *
+ * Note that this wont work when applying delayed properties
+ *
+ * Returns: A #GtkAccelGroup
+ */
+GtkAccelGroup *
+gtk_builder_ensure_accel_group (GtkBuilder *builder)
+{
+  GtkBuilderPrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  if (!priv->accel_group) 
+    {
+      priv->accel_group = gtk_accel_group_new();
+    }
+  return priv->accel_group;
+}
+
+/**
+ * gtk_builder_get_tooltips:
+ * @builder: A #GtkBuilder
+ *
+ * Gets the #GtkTooltips object associated with this builder.
+ *
+ * NOTE: if any toplevel GtkWindows exist in the hierarcy they will be
+ * given an explicit reference for convenience (destroying the coresponding
+ * window will remove the reference to the tooltips). If you do
+ * not use toplevels you will need to explicitly reference the tooltips
+ * object before destroying @builder.
+ *
+ * Returns: The #GtkTooltips
+ */
+GtkTooltips *
+gtk_builder_get_tooltips (GtkBuilder *builder)
+{
+  GtkBuilderPrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  return priv->tooltips;
+}
+
+/**
+ * gtk_builder_file_version:
+ * @builder: A #GtkBuilder
+ *
+ * This returns the version of the file that the builder
+ * parsed after parsing a file.
+ *
+ * Returns: A version identifier.
+ */
+gint
+gtk_builder_file_version (GtkBuilder *builder)
+{
+  GtkBuilderPrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_BUILDER (builder), -1);
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  return priv->version;
+}
+
+
 static void
 apply_delayed_properties (const gchar *window_name,
                           GSList      *props,
@@ -443,11 +740,8 @@ apply_delayed_properties (const gchar *w
 {
   GSList *l;
   DelayedProperty *property;
-  GObject *object;
+  GObject *object, *obj;
   GtkBuilderPrivate *priv;
-  GType object_type;
-  GObjectClass *oclass;
-  GParamSpec *pspec;
 
   priv = GTK_BUILDER_GET_PRIVATE (builder);
 
@@ -455,37 +749,40 @@ apply_delayed_properties (const gchar *w
   props = g_slist_reverse (props);
   for (l = props; l; l = l->next)
     {
-      property = (DelayedProperty*)l->data;
+      property = (DelayedProperty *)l->data;
+
       object = g_hash_table_lookup (priv->objects, property->object);
       g_assert (object != NULL);
 
-      object_type = gtk_registered_type_from_name (G_OBJECT_TYPE_NAME (object));
-      g_assert (object_type != G_TYPE_INVALID);
-
-      oclass = g_type_class_ref (object_type);
-      g_assert (oclass != NULL);
-
-      pspec = g_object_class_find_property (G_OBJECT_CLASS (oclass),
-                                            property->name);
-      if (!pspec)
-        g_warning ("Unknown property: %s.%s\n", g_type_name (object_type),
-                   property->name);
+      obj = g_hash_table_lookup (priv->objects, property->property.data);
+      if (!obj)
+	g_warning ("No object called: %s\n", property->property.data);
+      else if (GTK_IS_BUILDABLE (object))
+	{
+	  GValue value = { 0, };
+	  
+	  GTK_NOTE (BUILDER,
+		    g_print ("Applying delayed property %s on object %s (obj %s)\n",
+			     property->property.name, 
+			     property->object, 
+			     property->property.data));
+
+	  g_value_init (&value, G_TYPE_OBJECT);
+	  g_value_set_object (&value, obj);
+	  gtk_buildable_set_property (GTK_BUILDABLE (object), builder, 
+				      property->property.name, &value);
+	  g_value_unset (&value);
+	}
       else
-        {
-          GObject *obj;
-
-          obj = g_hash_table_lookup (priv->objects, property->value);
-          if (!obj)
-            g_warning ("No object called: %s\n", property->object);
-          else
-            g_object_set (object, property->name, obj, NULL);
-        }
-      g_free (property->value);
+	g_object_set (object, property->property.name, obj, NULL);
+      
       g_free (property->object);
-      g_free (property->name);
+      g_free (property->property.name);
+      g_free (property->property.data);
       g_slice_free (DelayedProperty, property);
-      g_type_class_unref (oclass);
+      
     }
+  
   g_slist_free (props);
 }
 
@@ -495,6 +792,9 @@ _gtk_builder_finish (GtkBuilder  *builde
   GtkBuilderPrivate *priv;
 
   priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  builder_set_toplevel (builder, NULL, NULL);
+
   if (priv->delayed_properties)
     {
       g_hash_table_foreach (priv->delayed_properties,
@@ -504,27 +804,63 @@ _gtk_builder_finish (GtkBuilder  *builde
 }
 
 /**
+ * gtk_builder_relative_file:
+ * @builder: A #GtkBuilder
+ * @filename: the filename
+ *
+ * This function resolves a relative pathname, using the directory of the
+ * XML file as a base.  If the pathname is absolute, then the original
+ * filename is returned.
+ *
+ * Returns: the filename.  The result must be g_free'd.
+ */
+gchar *
+gtk_builder_relative_file (GtkBuilder *builder, const gchar *filename)
+{
+  gchar *dirname, *tmp;
+  GtkBuilderPrivate *priv;
+  
+  g_return_val_if_fail (GTK_IS_BUILDER (builder), NULL);
+  g_return_val_if_fail (filename != NULL, NULL);
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  if (g_path_is_absolute(filename)) /* an absolute pathname */
+    return g_strdup(filename);
+
+  /* prepend XML file's dir onto filename */
+  dirname = g_path_get_dirname(priv->filename ? priv->filename : 
+			       g_get_current_dir ());
+  tmp = g_strconcat(dirname, G_DIR_SEPARATOR_S, filename, NULL);
+  g_free(dirname);
+  return tmp;
+}
+
+
+/**
  * gtk_builder_value_from_string
- * @pspec: the GParamSpec for the property
+ * @builder: A #GtkBuilder
+ * @pspec: the #GParamSpec for the property
  * @string: the string representation of the value.
- * @value: the GValue to store the result in.
+ * @value: the #GValue to store the result in.
  *
  * This function demarshals a value from a string.  This function
  * calls g_value_init() on the @value argument, so it need not be
  * initialised beforehand.
  *
- * This function can handle char, uchar, boolean, int, uint, long,
- * ulong, enum, flags, float, double, string, GdkColor and
- * GtkAdjustment type values.  Support for GtkWidget type values is
- * still to come.
- *
  * Returns: %TRUE on success.
  */
 gboolean
-gtk_builder_value_from_string (GParamSpec *pspec,
+gtk_builder_value_from_string (GtkBuilder *builder,
+			       GParamSpec *pspec,
                                const gchar *string,
                                GValue *value)
+
 {
+  g_return_val_if_fail (GTK_IS_BUILDER (builder), FALSE);
+  g_return_val_if_fail (string != NULL, FALSE);
+  g_return_val_if_fail (value != NULL,  FALSE);
+
   /*
    * GParamSpecUnichar has the internal type G_TYPE_UINT,
    * so we cannot handle this in the switch, do it separately
@@ -539,26 +875,36 @@ gtk_builder_value_from_string (GParamSpe
       return TRUE;
     }
 
-  return gtk_builder_value_from_string_type (G_PARAM_SPEC_VALUE_TYPE (pspec),
+  return gtk_builder_value_from_string_type (builder,
+					     G_PARAM_SPEC_VALUE_TYPE (pspec),
                                              string, value);
 }
 
 /**
- * gtk_builder_value_from_string
- * @pspec: the GParamSpec for the property
+ * gtk_builder_value_from_string_type
+ * @builder: A #GtkBuilder
+ * @type: the #GType for the property string
  * @string: the string representation of the value.
- * @value: the GValue to store the result in.
+ * @value: the #GValue to store the result in.
  *
  * Like gtk_builder_value_from_string, but takes a GType instead of GParamSpec.
  *
  * Returns: %TRUE on success.
  */
 gboolean
-gtk_builder_value_from_string_type (GType type,
+gtk_builder_value_from_string_type (GtkBuilder *builder,
+				    GType type,
                                     const gchar *string,
                                     GValue *value)
 {
   gboolean ret = TRUE;
+  GtkBuilderPrivate *priv;
+
+  g_return_val_if_fail (GTK_IS_BUILDER (builder), FALSE);
+  g_return_val_if_fail (string != NULL, FALSE);
+  g_return_val_if_fail (value != NULL,  FALSE);
+
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
 
   g_value_init (value, type);
 
@@ -571,10 +917,7 @@ gtk_builder_value_from_string_type (GTyp
       g_value_set_uchar (value, (guchar)string[0]);
       break;
     case G_TYPE_BOOLEAN:
-      g_value_set_boolean (value,
-                           g_ascii_tolower (string[0]) == 't'
-                           || g_ascii_tolower (string[0]) == 'y'
-                           || strtol (string, NULL, 0));
+      g_value_set_boolean (value, BOOL (string));
       break;
     case G_TYPE_INT:
       g_value_set_int (value, strtol (string, NULL, 0));
@@ -629,30 +972,47 @@ gtk_builder_value_from_string_type (GTyp
         ret = FALSE;
       break;
     case G_TYPE_OBJECT:
-#if 0
-        if (G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF))
-      {
-        gchar *filename;
-        GError *error = NULL;
-        GdkPixbuf *pixbuf;
-
-        filename = gtk_xml_relative_file (xml, string);
-        pixbuf = gdk_pixbuf_new_from_file (filename, &error);
-        if (pixbuf)
-          {
-            g_value_set_object (value, pixbuf);
-            g_object_unref (G_OBJECT (pixbuf));
-          }
-        else
-          {
-            g_warning ("Error loading image: %s", error->message);
-            g_error_free (error);
-            ret = FALSE;
-          }
-        g_free (filename);
-      }
+      if (priv->version <= 1 && G_VALUE_HOLDS (value, GTK_TYPE_ADJUSTMENT))
+	{
+	  GtkAdjustment *adj =
+	    GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, 100, 1, 10, 10));
+	  gchar *ptr = (gchar *)string;
+	  
+	  adj->value = g_strtod(ptr, &ptr);
+	  adj->lower = g_strtod(ptr, &ptr);
+	  adj->upper = g_strtod(ptr, &ptr);
+	  adj->step_increment = g_strtod(ptr, &ptr);
+	  adj->page_increment = g_strtod(ptr, &ptr);
+	  adj->page_size = g_strtod(ptr, &ptr);
+	  
+	  g_value_set_object(value, adj);
+	  
+	  g_object_ref_sink(adj);
+	  g_object_unref(adj);
+	  
+	} 
+      else if (priv->version <= 1 && G_VALUE_HOLDS (value, GDK_TYPE_PIXBUF))
+	{
+	  gchar *filename;
+	  GError *error = NULL;
+	  GdkPixbuf *pixbuf;
+
+	  filename = gtk_builder_relative_file (builder, string);
+	  pixbuf = gdk_pixbuf_new_from_file (filename, &error);
+	  if (pixbuf)
+	    {
+	      g_value_set_object (value, pixbuf);
+	      g_object_unref (G_OBJECT (pixbuf));
+	    }
+	  else
+	    {
+	      g_warning ("Error loading image: %s", error->message);
+	      g_error_free (error);
+	      ret = FALSE;
+	    }
+	  g_free (filename);
+	}
         else
-#endif
           ret = FALSE;
       break;
     default:
@@ -693,10 +1053,18 @@ gtk_builder_parse_filename (GtkBuilder  
 {
   char *buffer;
   unsigned length;
+  GtkBuilderPrivate *priv;
 
   g_return_if_fail (GTK_IS_BUILDER (builder));
   g_return_if_fail (filename != NULL);
 
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+
+  /* We only need it for the duration of the parse, no need
+   * to dup this string
+   */
+  priv->filename = filename;
+
   if (g_file_get_contents (filename, &buffer, &length, error))
     _gtk_builder_parser_parse_buffer (builder, filename,
                                       buffer, length,
@@ -720,9 +1088,14 @@ gtk_builder_parse_buffer (GtkBuilder  *b
                           gsize        length,
                           GError     **error)
 {
+  GtkBuilderPrivate *priv;
+
   g_return_if_fail (GTK_IS_BUILDER (builder));
   g_return_if_fail (buffer != NULL);
 
+  priv = GTK_BUILDER_GET_PRIVATE (builder);
+  priv->filename = NULL;
+
   _gtk_builder_parser_parse_buffer (builder, "<input>",
                                     buffer, length,
                                     error);
@@ -841,6 +1214,8 @@ gtk_builder_signal_autoconnect (GtkBuild
   GModule *module;
   GCallback func;
 
+  g_return_if_fail (GTK_IS_BUILDER (builder));
+
   priv = GTK_BUILDER_GET_PRIVATE (builder);
   if (!priv->signals)
     return;
@@ -920,6 +1295,9 @@ gtk_builder_signal_autoconnect_full (Gtk
   GObject *object;
   GObject *other;
 
+  g_return_if_fail (GTK_IS_BUILDER (builder));
+  g_return_if_fail (func != NULL);
+
   priv = GTK_BUILDER_GET_PRIVATE (builder);
   if (!priv->signals)
     return;
diff -rup gtk+/gtk/gtkbuilder.h my_gtk+/gtk/gtkbuilder.h
--- gtk+/gtk/gtkbuilder.h	2006-12-04 01:57:42.000000000 -0500
+++ my_gtk+/gtk/gtkbuilder.h	2006-12-03 22:49:33.000000000 -0500
@@ -20,6 +20,8 @@
 #define __GTK_BUILDER_H__
 
 #include <glib-object.h>
+#include <gtk/gtkwidget.h>
+#include <gtk/gtktooltips.h>
 
 G_BEGIN_DECLS
 
@@ -60,34 +62,43 @@ typedef void (*GtkBuilderConnectFunc) (G
                                        gboolean     after,
                                        gpointer     user_data);
 
-GType       gtk_builder_get_type           (void) G_GNUC_CONST;
-GtkBuilder* gtk_builder_new                (void);
+GType          gtk_builder_get_type               (void) G_GNUC_CONST;
+GtkBuilder*    gtk_builder_new                    (void);
 
-void        gtk_builder_parse_filename     (GtkBuilder   *builder,
-                                            const gchar  *filename,
-                                            GError      **error);
-void        gtk_builder_parse_buffer       (GtkBuilder   *builder,
-                                            const gchar  *buffer,
-                                            gsize         length,
-                                            GError      **error);
-GObject*    gtk_builder_get_object         (GtkBuilder   *builder,
-                                            const gchar  *name);
-GSList*     gtk_builder_get_objects        (GtkBuilder   *builder);
-void        gtk_builder_signal_autoconnect (GtkBuilder   *builder);
-void        gtk_builder_signal_autoconnect_full (GtkBuilder *builder,
-                                                 GtkBuilderConnectFunc func,
-                                                 gpointer user_data);
-void        gtk_builder_set_translation_domain (GtkBuilder   *builder,
-                                                const gchar  *domain);
-
-const gchar*   gtk_builder_get_object_name (GObject *object);
-
-gboolean gtk_builder_value_from_string (GParamSpec  *pspec,
-                                        const gchar *string,
-                                        GValue      *value);
-gboolean gtk_builder_value_from_string_type (GType        type,
-                                             const gchar *string,
-                                             GValue      *value);
+void           gtk_builder_parse_filename         (GtkBuilder   *builder,
+						   const gchar  *filename,
+						   GError      **error);
+void           gtk_builder_parse_buffer           (GtkBuilder   *builder,
+						   const gchar  *buffer,
+						   gsize         length,
+						   GError      **error);
+GObject       *gtk_builder_get_object              (GtkBuilder   *builder,
+						    const gchar  *name);
+GSList        *gtk_builder_get_objects             (GtkBuilder   *builder);
+void           gtk_builder_signal_autoconnect      (GtkBuilder   *builder);
+void           gtk_builder_signal_autoconnect_full (GtkBuilder *builder,
+						    GtkBuilderConnectFunc func,
+						    gpointer user_data);
+void           gtk_builder_set_translation_domain  (GtkBuilder   *builder,
+						    const gchar  *domain);
+
+const gchar   *gtk_builder_get_object_name         (GObject *object);
+
+gboolean       gtk_builder_value_from_string       (GtkBuilder  *builder,
+						    GParamSpec  *pspec,
+						    const gchar *string,
+						    GValue      *value);
+gboolean       gtk_builder_value_from_string_type  (GtkBuilder  *builder,
+						    GType        type,
+						    const gchar *string,
+						    GValue      *value);
+
+GtkAccelGroup *gtk_builder_ensure_accel_group      (GtkBuilder *builder);
+GtkTooltips   *gtk_builder_get_tooltips            (GtkBuilder *builder);
+
+gchar         *gtk_builder_relative_file           (GtkBuilder *builder, 
+						    const gchar *filename);
+gint           gtk_builder_file_version            (GtkBuilder *builder);
 
 G_END_DECLS
 
diff -rup gtk+/gtk/gtkbuilderparser.c my_gtk+/gtk/gtkbuilderparser.c
--- gtk+/gtk/gtkbuilderparser.c	2006-12-04 01:57:42.000000000 -0500
+++ my_gtk+/gtk/gtkbuilderparser.c	2006-12-03 11:15:05.000000000 -0500
@@ -17,6 +17,7 @@
  * Boston, MA 02111-1307, USA.
  */
 
+#include <stdlib.h>
 #include <string.h>
 #include <glib/gfileutils.h>
 #include <glib/gi18n.h>
@@ -39,6 +40,9 @@
 static void free_property_info (PropertyInfo *info,
                                 gpointer user_data);
 
+static void free_accelerator_info (AcceleratorInfo *info,
+				   gpointer user_data);
+
 static inline void
 state_push (ParserData *data, gpointer info)
 {
@@ -113,10 +117,10 @@ parse_object (ParserData   *data,
     }
 
   if (!object_class)
-    error_missing_attribute (data, "object", "class", error);
+    error_missing_attribute (data, "widget", "class", error);
 
   if (!object_id)
-    error_missing_attribute (data, "object", "id", error);
+    error_missing_attribute (data, "widget", "id", error);
 
   info = g_slice_new0 (ObjectInfo);
   info->class_name = object_class;
@@ -137,6 +141,8 @@ free_object_info (ObjectInfo *info)
   g_slist_foreach (info->properties,
                    (GFunc)free_property_info, NULL);
   g_slist_free (info->properties);
+  g_slist_foreach (info->accelerators,
+                   (GFunc)free_accelerator_info, NULL);
   g_free (info->constructor);
   g_free (info->class_name);
   g_free (info->id);
@@ -195,7 +201,7 @@ parse_property (ParserData   *data,
       if (!strcmp (names[i], "name"))
         name = g_strdelimit (g_strdup (values[i]), "_", '-');
       else if (!strcmp (names[i], "translatable"))
-        translatable = !strcmp (values[i], "yes");
+        translatable = BOOL (values[i]);
     }
 
   if (!name)
@@ -243,7 +249,7 @@ parse_signal (ParserData   *data,
       else if (!strcmp (names[i], "object"))
         object = g_strdup (values[i]);
       else if (!strcmp (names[i], "after"))
-        after = !strcmp (values[i], "yes");
+        after = BOOL (values[i]);
     }
 
   if (!name)
@@ -275,6 +281,110 @@ _free_signal_info (SignalInfo *info,
 }
 
 
+static void
+parse_accelerator (ParserData   *data,
+		   const gchar  *element_name,
+		   const gchar **names,
+		   const gchar **values,
+		   GError      **error)
+{
+  AcceleratorInfo *info;
+  guint key = 0;
+  GdkModifierType modifiers = 0;
+  gchar *signal = NULL;
+  gboolean key_parsed = FALSE;
+  int i;
+
+  g_assert (data->stack != NULL);
+
+  for (i = 0; names[i] != NULL; i++)
+    {
+      if (!strcmp (names[i], "key")) {
+	key = gdk_keyval_from_name (values[i]);
+	key_parsed = TRUE;
+      } else if (!strcmp (names[i], "modifiers")) {
+	/* Using the code from libglade here to parse the modifiers,
+	 * we know it works.
+	 */
+	const gchar *pos = values[i];
+
+	while (pos[0])
+	  if (!strncmp(pos, "GDK_", 4)) {
+	    pos += 4;
+	    if (!strncmp(pos, "SHIFT_MASK", 10)) {
+	      modifiers |= GDK_SHIFT_MASK;
+	      pos += 10;
+	    } else if (!strncmp(pos, "LOCK_MASK", 9)) {
+	      modifiers |= GDK_LOCK_MASK;
+	      pos += 9;
+	    } else if (!strncmp(pos, "CONTROL_MASK", 12)) {
+	      modifiers |= GDK_CONTROL_MASK;
+	      pos += 12;
+	    } else if (!strncmp(pos, "MOD", 3) &&
+		       !strncmp(pos+4, "_MASK", 5)) {
+	      switch (pos[3]) {
+	      case '1':
+		modifiers |= GDK_MOD1_MASK; break;
+	      case '2':
+		modifiers |= GDK_MOD2_MASK; break;
+	      case '3':
+		modifiers |= GDK_MOD3_MASK; break;
+	      case '4':
+		modifiers |= GDK_MOD4_MASK; break;
+	      case '5':
+		modifiers |= GDK_MOD5_MASK; break;
+	      }
+	      pos += 9;
+	    } else if (!strncmp(pos, "BUTTON", 6) &&
+		       !strncmp(pos+7, "_MASK", 5)) {
+	      switch (pos[6]) {
+	      case '1':
+		modifiers |= GDK_BUTTON1_MASK; break;
+	      case '2':
+		modifiers |= GDK_BUTTON2_MASK; break;
+	      case '3':
+		modifiers |= GDK_BUTTON3_MASK; break;
+	      case '4':
+		modifiers |= GDK_BUTTON4_MASK; break;
+	      case '5':
+		modifiers |= GDK_BUTTON5_MASK; break;
+	      }
+	      pos += 12;
+	    } else if (!strncmp(pos, "RELEASE_MASK", 12)) {
+	      modifiers |= GDK_RELEASE_MASK;
+	      pos += 12;
+	    } else
+	      pos++;
+	  } else
+	    pos++;
+      } else if (!strcmp (names[i], "signal"))
+
+        signal = g_strdup (values[i]);
+    }
+
+  if (!key_parsed)
+    error_missing_attribute (data, "accelerator", "key", error);
+
+  if (!signal)
+    error_missing_attribute (data, "accelerator", "signal", error);
+
+  info = g_slice_new0 (AcceleratorInfo);
+  info->key = key;
+  info->modifiers = modifiers;
+  info->signal = signal;
+  state_push (data, info);
+
+  info->tag.name = element_name;
+}
+
+static void
+free_accelerator_info (AcceleratorInfo *info,
+		       gpointer user_data)
+{
+  g_free (info->signal);
+  g_slice_free (AcceleratorInfo, info);
+}
+
 static GObject *
 builder_construct (ParserData *data,
                    ObjectInfo *object_info)
@@ -307,7 +417,7 @@ start_element (GMarkupParseContext *cont
 {
   ParserData *data = (ParserData*)user_data;
 
-#ifdef GTK_ENABLE_DEBUG
+#ifdef G_ENABLE_DEBUG
   if (gtk_debug_flags & GTK_DEBUG_BUILDER)
     {
       GString *tags = g_string_new ("");
@@ -343,7 +453,7 @@ start_element (GMarkupParseContext *cont
         }
     }
 
-  if (!strcmp (element_name, "object"))
+  if (!strcmp (element_name, "widget"))
     {
       ChildInfo* child_info = state_peek_info (data, ChildInfo);
       ObjectInfo *object_info;
@@ -371,22 +481,50 @@ start_element (GMarkupParseContext *cont
     {
       parse_signal (data, element_name, names, values, error);
     }
+  else if (!strcmp (element_name, "accelerator"))
+    {
+      parse_accelerator (data, element_name, names, values, error);
+    }
   else if (!strcmp (element_name, "glade-interface"))
     {
-      int i;
+      gint i;
 
       for (i = 0; names[i] != NULL; i++)
         {
           if (!strcmp (names[i], "domain") && !data->domain)
             {
               data->domain = g_strdup (values[i]);
-              break;
             }
+	  else if (!strcmp (names[i], "version"))
+	    {
+	      gint version;
+	      sscanf (values[i], "%d", &version);
+
+	      _gtk_builder_set_version (data->builder, version);
+	    }
         }
     }
+  else if (!strcmp (element_name, "packing"))
+    {
+    }
   else if (!strcmp (element_name, "placeholder"))
     {
     }
+  /* Atk is unimplemented, but it must be specified so as not
+   * to trigger a custom tag
+   */
+  else if (!strcmp (element_name, "accessibility"))
+    {
+    }
+  else if (!strcmp (element_name, "atkproperty"))
+    {
+    }
+  else if (!strcmp (element_name, "atkrelation"))
+    {
+    }
+  else if (!strcmp (element_name, "atkaction"))
+    {
+    }
   else
     {
       CommonInfo* info = state_peek_info (data, CommonInfo);
@@ -394,7 +532,7 @@ start_element (GMarkupParseContext *cont
       if (!info)
         goto unhandled;
 
-      if (!strcmp (info->tag.name, "object") ||
+      if (!strcmp (info->tag.name, "widget") ||
           !strcmp (info->tag.name, "child"))
         {
           GMarkupParser parser;
@@ -403,7 +541,7 @@ start_element (GMarkupParseContext *cont
           GObject *object;
           GObject *child;
 
-          if (!strcmp (info->tag.name, "object"))
+          if (!strcmp (info->tag.name, "widget"))
             {
               ObjectInfo* object_info = (ObjectInfo*)info;
               if (!object_info->object)
@@ -486,11 +624,12 @@ end_element (GMarkupParseContext *contex
       return;
     }
 
-  if (!strcmp (element_name, "object"))
+  if (!strcmp (element_name, "widget"))
     {
       ObjectInfo *object_info = state_pop_info (data, ObjectInfo);
       ChildInfo* child_info = state_peek_info (data, ChildInfo);
 
+      /* XXX Any reason to call this in the </end> handler ? */
       object_info->object = builder_construct (data, object_info);
 
       if (child_info)
@@ -504,15 +643,18 @@ end_element (GMarkupParseContext *contex
       CommonInfo *info = state_peek_info (data, CommonInfo);
 
       /* Normal properties */
-      if (!strcmp (info->tag.name, "object"))
+      if (!strcmp (info->tag.name, "widget"))
         {
           ObjectInfo *object_info = (ObjectInfo*)info;
           object_info->properties =
             g_slist_prepend (object_info->properties, prop_info);
         }
-      else
+      /* Packing properties */
+      else if (!strcmp (info->tag.name, "child"))
         {
-          g_assert_not_reached ();
+	  ChildInfo *child_info = (ChildInfo*)info;
+	  child_info->packing_properties =
+	    g_slist_prepend (child_info->packing_properties, prop_info);
         }
     }
   else if (!strcmp (element_name, "child"))
@@ -528,15 +670,40 @@ end_element (GMarkupParseContext *contex
       SignalInfo *signal_info = state_pop_info (data, SignalInfo);
       ObjectInfo *object_info = (ObjectInfo*)state_peek_info (data, CommonInfo);
       signal_info->object_name = g_strdup (object_info->id);
+
       object_info->signals =
         g_slist_prepend (object_info->signals, signal_info);
     }
+  else if (!strcmp (element_name, "accelerator"))
+    {
+      AcceleratorInfo *accelerator_info = state_pop_info (data, AcceleratorInfo);
+      ObjectInfo *object_info = (ObjectInfo*)state_peek_info (data, CommonInfo);
+
+      object_info->accelerators =
+        g_slist_prepend (object_info->accelerators, accelerator_info);
+    }
   else if (!strcmp (element_name, "glade-interface"))
     {
     }
+  else if (!strcmp (element_name, "packing"))
+    {
+    }
   else if (!strcmp (element_name, "placeholder"))
     {
     }
+  else if (!strcmp (element_name, "accessibility"))
+    {
+    }
+  else if (!strcmp (element_name, "atkproperty"))
+    {
+    }
+  else if (!strcmp (element_name, "atkrelation"))
+    {
+    }
+  else if (!strcmp (element_name, "atkaction"))
+    {
+    }
+
 }
 
 /* Called for character data */
@@ -610,6 +777,8 @@ _gtk_builder_parser_parse_buffer (GtkBui
   data->builder = builder;
   data->filename = filename;
 
+  _gtk_builder_set_version (builder, 1);
+
   g_object_get (builder, "domain", &data->domain, NULL);
 
   data->ctx = g_markup_parse_context_new (&parser, 0, data, NULL);
diff -rup gtk+/gtk/gtkbuilderprivate.h my_gtk+/gtk/gtkbuilderprivate.h
--- gtk+/gtk/gtkbuilderprivate.h	2006-12-04 01:57:42.000000000 -0500
+++ my_gtk+/gtk/gtkbuilderprivate.h	2006-12-01 13:07:59.000000000 -0500
@@ -23,7 +23,7 @@
 #include <glib/gmarkup.h>
 #include <glib/gslist.h>
 
-#include <glib-object.h>
+#include <gdk/gdk.h>
 #include "gtkbuilder.h"
 
 typedef struct {
@@ -41,6 +41,7 @@ typedef struct {
   gchar *constructor;
   GSList *properties;
   GSList *signals;
+  GSList *accelerators;
   GObject *object;
   CommonInfo *parent;
 } ObjectInfo;
@@ -72,6 +73,13 @@ typedef struct {
 } SignalInfo;
 
 typedef struct {
+  TagInfo tag;
+  guint key;
+  GdkModifierType modifiers;
+  gchar *signal;
+} AcceleratorInfo;
+
+typedef struct {
   GMarkupParser *parser;
   const gchar *tagname;
   const gchar *start;
@@ -89,18 +97,28 @@ typedef struct {
   const gchar *filename;
 } ParserData;
 
-void _gtk_builder_parser_parse_buffer (GtkBuilder *builder,
-                                       const gchar *filename,
-                                       const gchar *buffer,
-                                       gsize length,
-                                       GError **error);
+#define BOOL(s)                       \
+    (g_ascii_tolower (*(s)) == 't' || \
+     g_ascii_tolower (*(s)) == 'y' || \
+     strtol ((s), NULL, 0))
+
+void      _gtk_builder_parser_parse_buffer (GtkBuilder *builder,
+					    const gchar *filename,
+					    const gchar *buffer,
+					    gsize length,
+					    GError **error);
 GObject * _gtk_builder_construct (GtkBuilder *builder,
                                   ObjectInfo *info);
 void      _gtk_builder_add (GtkBuilder *builder,
                             ChildInfo *child_info);
 void      _gtk_builder_finish (GtkBuilder *builder);
-void _free_signal_info (SignalInfo *info,
-                        gpointer user_data);
+void      _free_signal_info (SignalInfo *info,
+			     gpointer user_data);
+void      _gtk_builder_set_version (GtkBuilder *builder, 
+				    gint version);
+void      _gtk_builder_set_toplevel (GtkBuilder  *builder,
+				     const gchar *id,
+				     GObject     *object);
 
 #endif /* __GTK_BUILDER_PRIVATE_H__ */
--- gtk+/gtk/gtk.symbols        2006-12-04 02:29:22.000000000 -0500
+++ my_gtk+/gtk/gtk.symbols     2006-11-26 10:27:45.000000000 -0500
@@ -425,6 +425,5 @@ gtk_buildable_get_name
 gtk_buildable_get_type G_GNUC_CONST
 gtk_buildable_set_name
 gtk_buildable_set_property
-gtk_buildable_child_set_property
 #endif
 #endif

@@ -443,9 +442,5 @@ gtk_builder_signal_autoconnect
 gtk_builder_signal_autoconnect_full
 gtk_builder_value_from_string
 gtk_builder_value_from_string_type
-gtk_builder_ensure_accel_group
-gtk_builder_get_tooltips
-gtk_builder_relative_file
-gtk_builder_file_version
 #endif
 #endif
