Ejemplo n.º 1
0
static void
glade_gtk_widget_write_atk_relation (GladeProperty * property,
                                     GladeXmlContext * context,
                                     GladeXmlNode * node)
{
  GladeXmlNode *prop_node;
  GladePropertyClass *pclass;
  gchar *value, **split;
  gint i;

  if ((value = glade_widget_adaptor_string_from_value
       (glade_property_class_get_adaptor (glade_property_get_class (property)),
        glade_property_get_class (property), glade_property_inline_value (property))) != NULL)
    {
      if ((split = g_strsplit (value, GPC_OBJECT_DELIMITER, 0)) != NULL)
        {
          for (i = 0; split[i] != NULL; i++)
            {
	      pclass = glade_property_get_class (property);

              prop_node = glade_xml_node_new (context, GLADE_TAG_A11Y_RELATION);
              glade_xml_node_append_child (node, prop_node);

              glade_xml_node_set_property_string (prop_node,
                                                  GLADE_TAG_A11Y_TYPE,
                                                  glade_property_class_id (pclass));
              glade_xml_node_set_property_string (prop_node,
                                                  GLADE_TAG_A11Y_TARGET,
                                                  split[i]);
            }
          g_strfreev (split);
        }
    }
}
Ejemplo n.º 2
0
void
glade_gtk_scale_set_property (GladeWidgetAdaptor *adaptor,
                              GObject            *object,
                              const gchar        *id,
                              const GValue       *value)
{
  GladeWidget *widget = glade_widget_get_from_gobject (object);
  GladeProperty *property = glade_widget_get_property (widget, id);

  if (strcmp (id, "draw-value") == 0)
    {
      if (g_value_get_boolean (value))
        {
          glade_widget_property_set_sensitive (widget, "digits", TRUE, NULL);
          glade_widget_property_set_sensitive (widget, "value-pos", TRUE, NULL);
        }
      else
        {
          glade_widget_property_set_sensitive (widget, "digits", FALSE, DRAW_VALUE_DISABLED_MSG);
          glade_widget_property_set_sensitive (widget, "value-pos", FALSE, DRAW_VALUE_DISABLED_MSG);
        }
    }

  if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
Ejemplo n.º 3
0
void
glade_gtk_progress_bar_set_property (GladeWidgetAdaptor * adaptor,
					GObject * object,
					const gchar * id, const GValue * value)
{
  GladeWidget *widget = glade_widget_get_from_gobject (object);
  GladeProperty *property = glade_widget_get_property (widget, id);

  if (strcmp (id, "show-text") == 0)
    {
      if (g_value_get_boolean (value))
	{
	  glade_widget_property_set_sensitive (widget, "text", TRUE, NULL);
	  glade_widget_property_set_sensitive (widget, "ellipsize", TRUE, NULL);
	}
      else
	{
	  glade_widget_property_set_sensitive (widget, "text", FALSE, TEXT_DISABLED_MSG);
	  glade_widget_property_set_sensitive (widget, "ellipsize", FALSE, TEXT_DISABLED_MSG);
	}
    }

  if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
Ejemplo n.º 4
0
void
glade_gtk_treeview_set_property (GladeWidgetAdaptor * adaptor,
				 GObject * object,
				 const gchar * id, const GValue * value)
{
  GladeWidget *widget = glade_widget_get_from_gobject (object);
  GladeProperty *property = glade_widget_get_property (widget, id);

  if (strcmp (id, "enable-search") == 0)
    {
      if (g_value_get_boolean (value))
	glade_widget_property_set_sensitive (widget, "search-column", TRUE, NULL);
      else
	glade_widget_property_set_sensitive (widget, "search-column", FALSE, _("Search is disabled"));
    }
  else if (strcmp (id, "headers-visible") == 0)
    {
      if (g_value_get_boolean (value))
	glade_widget_property_set_sensitive (widget, "headers-clickable", TRUE, NULL);
      else
	glade_widget_property_set_sensitive (widget, "headers-clickable", FALSE, _("Headers are invisible"));
    }
  else if (strcmp (id, "show-expanders") == 0)
    {
      if (g_value_get_boolean (value))
	glade_widget_property_set_sensitive (widget, "expander-column", TRUE, NULL);
      else
	glade_widget_property_set_sensitive (widget, "expander-column", FALSE, _("Expanders are not shown"));
    }

  if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
Ejemplo n.º 5
0
static void
glade_gtk_parse_atk_relation (GladeProperty * property, GladeXmlNode * node)
{
  GladeXmlNode *prop;
  GladePropertyClass *pclass;
  gchar *type, *target, *id, *tmp;
  gchar *string = NULL;

  for (prop = glade_xml_node_get_children (node);
       prop; prop = glade_xml_node_next (prop))
    {
      if (!glade_xml_node_verify_silent (prop, GLADE_TAG_A11Y_RELATION))
        continue;

      if (!(type =
            glade_xml_get_property_string_required
            (prop, GLADE_TAG_A11Y_TYPE, NULL)))
        continue;

      if (!(target =
            glade_xml_get_property_string_required
            (prop, GLADE_TAG_A11Y_TARGET, NULL)))
        {
          g_free (type);
          continue;
        }

      id     = glade_util_read_prop_name (type);
      pclass = glade_property_get_class (property);

      if (!strcmp (id, glade_property_class_id (pclass)))
        {
          if (string == NULL)
            string = g_strdup (target);
          else
            {
              tmp = g_strdup_printf ("%s%s%s", string,
                                     GPC_OBJECT_DELIMITER, target);
              string = (g_free (string), tmp);
            }

        }

      g_free (id);
      g_free (type);
      g_free (target);
    }

  /* we must synchronize this directly after loading this project
   * (i.e. lookup the actual objects after they've been parsed and
   * are present). this is a feature of object and object list properties
   * that needs a better api.
   */
  if (string)
    {
      g_object_set_data_full (G_OBJECT (property), "glade-loaded-object",
			      /* 'string' here is already allocated on the heap */
                              string, g_free);
    }
}
Ejemplo n.º 6
0
void
glade_gtk_tool_item_set_property (GladeWidgetAdaptor * adaptor,
                                  GObject * object,
                                  const gchar * id, const GValue * value)
{
  GladeWidget *gwidget = glade_widget_get_from_gobject (object);
  GladeProperty *property = glade_widget_get_property (gwidget, id);

  if (GPC_VERSION_CHECK
      (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id,
                                                      value);
}
Ejemplo n.º 7
0
void
glade_gtk_button_set_property (GladeWidgetAdaptor * adaptor,
                               GObject * object,
                               const gchar * id, const GValue * value)
{
  GladeWidget *widget = glade_widget_get_from_gobject (object);
  GladeProperty *property = glade_widget_get_property (widget, id);

  if (strcmp (id, "custom-child") == 0)
    {
      GtkWidget *child = gtk_bin_get_child (GTK_BIN (object));
      gboolean custom_child = g_value_get_boolean (value);

      /* Avoid removing a child if we already have a custom child */
      if (custom_child && (child && glade_widget_get_from_gobject (child)))
        return;

      if (custom_child)
        {
          if (child)
            gtk_container_remove (GTK_CONTAINER (object), child);

          gtk_container_add (GTK_CONTAINER (object), glade_placeholder_new ());
        }
      else if (child && GLADE_IS_PLACEHOLDER (child))
        gtk_container_remove (GTK_CONTAINER (object), child);
    }
  else if (strcmp (id, "stock") == 0)
    {
      gboolean use_stock = FALSE;
      glade_widget_property_get (widget, "use-stock", &use_stock);

      if (use_stock)
        gtk_button_set_label (GTK_BUTTON (object), g_value_get_string (value));
    }
  else if (strcmp (id, "use-stock") == 0)
    {
      /* I guess its my bug in GTK+, we need to resync the appearance property
       * on GtkButton when the GtkButton:use-stock property changes.
       */
      GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object,
                                                        id, value);
      glade_gtk_sync_use_appearance (widget);
    }
  else if (GPC_VERSION_CHECK (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
Ejemplo n.º 8
0
void
glade_gtk_menu_item_set_property (GladeWidgetAdaptor * adaptor,
                                  GObject * object,
                                  const gchar * id, const GValue * value)
{
  GladeWidget *gwidget = glade_widget_get_from_gobject (object);
  GladeProperty *property = glade_widget_get_property (gwidget, id);

  if (!strcmp (id, "use-underline"))
    glade_gtk_menu_item_set_use_underline (object, value);
  else if (!strcmp (id, "label"))
    glade_gtk_menu_item_set_label (object, value);
  else if (GPC_VERSION_CHECK
           (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
    GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id,
                                                      value);
}
Ejemplo n.º 9
0
void
glade_popup_property_pop (GladeProperty *property, GdkEventButton *event)
{

  GladeWidgetAdaptor *adaptor, *prop_adaptor;
  GladePropertyClass *pclass;
  GParamSpec         *pspec;
  GtkWidget *popup_menu;
  gint button;
  gint event_time;

  pclass       = glade_property_get_class (property);
  pspec        = glade_property_class_get_pspec (pclass);
  prop_adaptor = glade_property_class_get_adaptor (pclass);
  adaptor      = glade_widget_adaptor_from_pspec (prop_adaptor, pspec);

  g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));

  popup_menu = gtk_menu_new ();

  glade_popup_append_item (popup_menu, _("Set default value"), TRUE,
                           glade_popup_clear_property_cb, property);

  if (!glade_property_class_get_virtual (pclass) &&
      glade_widget_adaptor_get_book (adaptor) &&
      glade_util_have_devhelp ())
    {
      glade_popup_append_item (popup_menu, _("Read _documentation"), TRUE,
                               glade_popup_property_docs_cb, property);
    }

  if (event)
    {
      button = event->button;
      event_time = event->time;
    }
  else
    {
      button = 0;
      event_time = gtk_get_current_event_time ();
    }

  gtk_menu_popup (GTK_MENU (popup_menu), NULL, NULL,
                  NULL, NULL, button, event_time);
}
Ejemplo n.º 10
0
static void
glade_popup_property_docs_cb (GtkMenuItem *item, GladeProperty *property)
{
  GladeWidgetAdaptor *adaptor, *prop_adaptor;
  GladePropertyClass *pclass;
  GParamSpec         *pspec;
  gchar              *search;

  pclass       = glade_property_get_class (property);
  pspec        = glade_property_class_get_pspec (pclass);
  prop_adaptor = glade_property_class_get_adaptor (pclass);
  adaptor      = glade_widget_adaptor_from_pspec (prop_adaptor, pspec);
  search       = g_strdup_printf ("The \"%s\" property", glade_property_class_id (pclass));

  glade_app_search_docs (glade_widget_adaptor_get_book (adaptor),
                         g_type_name (pspec->owner_type), search);

  g_free (search);
}
Ejemplo n.º 11
0
static void
glade_gtk_widget_write_atk_property (GladeProperty * property,
                                     GladeXmlContext * context,
                                     GladeXmlNode * node)
{
  GladeXmlNode *prop_node;
  GladePropertyClass *pclass;
  gchar *value;

  glade_property_get (property, &value);
  if (value && value[0])
    {
      pclass = glade_property_get_class (property);

      prop_node = glade_xml_node_new (context, GLADE_TAG_A11Y_PROPERTY);
      glade_xml_node_append_child (node, prop_node);

      glade_xml_node_set_property_string (prop_node,
                                          GLADE_TAG_NAME, glade_property_class_id (pclass));

      glade_xml_set_content (prop_node, value);

      if (glade_property_i18n_get_translatable (property))
        glade_xml_node_set_property_string (prop_node,
                                            GLADE_TAG_TRANSLATABLE,
                                            GLADE_XML_TAG_I18N_TRUE);

      if (glade_property_i18n_get_comment (property))
        glade_xml_node_set_property_string (prop_node,
                                            GLADE_TAG_COMMENT,
                                            glade_property_i18n_get_comment (property));

      if (glade_property_i18n_get_context (property))
        glade_xml_node_set_property_string (prop_node,
                                            GLADE_TAG_CONTEXT,
                                            glade_property_i18n_get_context (property));
    }
}
Ejemplo n.º 12
0
static GList *
create_command_property_list (GladeWidget * gnew, GList * saved_props)
{
  GList *l, *command_properties = NULL;

  for (l = saved_props; l; l = l->next)
    {
      GladeProperty *property = l->data;
      GladePropertyClass *pclass = glade_property_get_class (property);
      GladeProperty *orig_prop =
	glade_widget_get_pack_property (gnew, glade_property_class_id (pclass));
      GCSetPropData *pdata = g_new0 (GCSetPropData, 1);

      pdata->property = orig_prop;
      pdata->old_value = g_new0 (GValue, 1);
      pdata->new_value = g_new0 (GValue, 1);

      glade_property_get_value (orig_prop, pdata->old_value);
      glade_property_get_value (property, pdata->new_value);

      command_properties = g_list_prepend (command_properties, pdata);
    }
  return g_list_reverse (command_properties);
}
Ejemplo n.º 13
0
static void
glade_gtk_widget_write_atk_action (GladeProperty * property,
                                   GladeXmlContext * context,
                                   GladeXmlNode * node)
{
  GladeXmlNode *prop_node;
  GladePropertyClass *pclass;
  gchar *value = NULL;

  glade_property_get (property, &value);

  if (value && value[0])
    {
      pclass = glade_property_get_class (property);
      prop_node = glade_xml_node_new (context, GLADE_TAG_A11Y_ACTION);
      glade_xml_node_append_child (node, prop_node);

      glade_xml_node_set_property_string (prop_node,
                                          GLADE_TAG_A11Y_ACTION_NAME,
                                          &glade_property_class_id (pclass)[4]);
      glade_xml_node_set_property_string (prop_node,
                                          GLADE_TAG_A11Y_DESC, value);
    }
}
Ejemplo n.º 14
0
void
glade_gtk_entry_set_property (GladeWidgetAdaptor * adaptor,
                              GObject * object,
                              const gchar * id, const GValue * value)
{
  GladeImageEditMode mode;
  GladeWidget *gwidget = glade_widget_get_from_gobject (object);
  GladeProperty *property = glade_widget_get_property (gwidget, id);

  if (!strcmp (id, "use-entry-buffer"))
    {
      glade_widget_property_set_sensitive (gwidget, "text", FALSE,
                                           NOT_SELECTED_MSG);
      glade_widget_property_set_sensitive (gwidget, "buffer", FALSE,
                                           NOT_SELECTED_MSG);

      if (g_value_get_boolean (value))
        glade_widget_property_set_sensitive (gwidget, "buffer", TRUE, NULL);
      else
        glade_widget_property_set_sensitive (gwidget, "text", TRUE, NULL);
    }
  else if (!strcmp (id, "primary-icon-mode"))
    {
      mode = g_value_get_int (value);

      glade_widget_property_set_sensitive (gwidget, "primary-icon-stock", FALSE,
                                           NOT_SELECTED_MSG);
      glade_widget_property_set_sensitive (gwidget, "primary-icon-name", FALSE,
                                           NOT_SELECTED_MSG);
      glade_widget_property_set_sensitive (gwidget, "primary-icon-pixbuf",
                                           FALSE, NOT_SELECTED_MSG);

      switch (mode)
        {
          case GLADE_IMAGE_MODE_STOCK:
            glade_widget_property_set_sensitive (gwidget, "primary-icon-stock",
                                                 TRUE, NULL);
            break;
          case GLADE_IMAGE_MODE_ICON:
            glade_widget_property_set_sensitive (gwidget, "primary-icon-name",
                                                 TRUE, NULL);
            break;
          case GLADE_IMAGE_MODE_FILENAME:
            glade_widget_property_set_sensitive (gwidget, "primary-icon-pixbuf",
                                                 TRUE, NULL);
            break;
          case GLADE_IMAGE_MODE_RESOURCE:
	    /* Doesnt apply for entry icons */
	    break;
        }
    }
  else if (!strcmp (id, "secondary-icon-mode"))
    {
      mode = g_value_get_int (value);

      glade_widget_property_set_sensitive (gwidget, "secondary-icon-stock",
                                           FALSE, NOT_SELECTED_MSG);
      glade_widget_property_set_sensitive (gwidget, "secondary-icon-name",
                                           FALSE, NOT_SELECTED_MSG);
      glade_widget_property_set_sensitive (gwidget, "secondary-icon-pixbuf",
                                           FALSE, NOT_SELECTED_MSG);

      switch (mode)
        {
          case GLADE_IMAGE_MODE_STOCK:
            glade_widget_property_set_sensitive (gwidget,
                                                 "secondary-icon-stock", TRUE,
                                                 NULL);
            break;
          case GLADE_IMAGE_MODE_ICON:
            glade_widget_property_set_sensitive (gwidget, "secondary-icon-name",
                                                 TRUE, NULL);
            break;
          case GLADE_IMAGE_MODE_FILENAME:
            glade_widget_property_set_sensitive (gwidget,
                                                 "secondary-icon-pixbuf", TRUE,
                                                 NULL);
            break;
          case GLADE_IMAGE_MODE_RESOURCE:
	    /* Doesnt apply for entry icons */
	    break;
        }
    }
  else if (!strcmp (id, "primary-icon-tooltip-text") ||
           !strcmp (id, "primary-icon-tooltip-markup"))
    {
      /* Avoid a silly crash in GTK+ */
      if (gtk_entry_get_icon_storage_type (GTK_ENTRY (object),
                                           GTK_ENTRY_ICON_PRIMARY) != GTK_IMAGE_EMPTY)
        GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object, id, value);
    }
  else if (!strcmp (id, "secondary-icon-tooltip-text") ||
           !strcmp (id, "secondary-icon-tooltip-markup"))
    {
      /* Avoid a silly crash in GTK+ */
      if (gtk_entry_get_icon_storage_type (GTK_ENTRY (object),
                                           GTK_ENTRY_ICON_SECONDARY) != GTK_IMAGE_EMPTY)
        GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object, id, value);
    }
  else if (!strcmp (id, "text"))
    {
      g_signal_handlers_block_by_func (object, glade_gtk_entry_changed,
                                       gwidget);

      if (g_value_get_string (value))
        gtk_entry_set_text (GTK_ENTRY (object), g_value_get_string (value));
      else
        gtk_entry_set_text (GTK_ENTRY (object), "");

      g_signal_handlers_unblock_by_func (object, glade_gtk_entry_changed,
                                         gwidget);
    }
  else if (!strcmp (id, "has-frame"))
    {
      if (g_value_get_boolean (value))
	glade_widget_property_set_sensitive (gwidget, "shadow-type", TRUE, NULL);
      else
	glade_widget_property_set_sensitive (gwidget, "shadow-type", FALSE,
					     _("This property is only available\n"
					       "if the entry has a frame"));

      GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object, id, value);
    }
  else if (!strcmp (id, "visibility"))
    {
      if (g_value_get_boolean (value))
	glade_widget_property_set_sensitive (gwidget, "invisible-char", FALSE,
					     _("This property is only available\n"
					       "if the entry characters are invisible"));
      else
	glade_widget_property_set_sensitive (gwidget, "invisible-char", TRUE, NULL);

      GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object, id, value);
    }
  else if (GPC_VERSION_CHECK
           (glade_property_get_class (property), gtk_major_version, gtk_minor_version + 1))
    GWA_GET_CLASS (GTK_TYPE_WIDGET)->set_property (adaptor, object, id, value);
}
Ejemplo n.º 15
0
void
glade_gtk_entry_read_widget (GladeWidgetAdaptor * adaptor,
                             GladeWidget * widget, GladeXmlNode * node)
{
  GladeProperty *property;

  if (!(glade_xml_node_verify_silent (node, GLADE_XML_TAG_WIDGET) ||
	glade_xml_node_verify_silent (node, GLADE_XML_TAG_TEMPLATE)))
    return;

  /* First chain up and read in all the normal properties.. */
  GWA_GET_CLASS (GTK_TYPE_WIDGET)->read_widget (adaptor, widget, node);

  if (!glade_widget_property_original_default (widget, "text"))
    {
      property = glade_widget_get_property (widget, "text");
      glade_widget_property_set (widget, "use-entry-buffer", FALSE);

      glade_property_sync (property);
    }
  else
    {
      gint target_minor, target_major;

      glade_project_get_target_version (glade_widget_get_project (widget), "gtk+", 
					&target_major, &target_minor);

      property = glade_widget_get_property (widget, "buffer");

      /* Only default to the buffer setting if the project version supports it. */
      if (GPC_VERSION_CHECK (glade_property_get_class (property), target_major, target_minor))
        {
          glade_widget_property_set (widget, "use-entry-buffer", TRUE);
          glade_property_sync (property);
        }
      else
        glade_widget_property_set (widget, "use-entry-buffer", FALSE);
    }

  if (!glade_widget_property_original_default (widget, "primary-icon-name"))
    {
      property = glade_widget_get_property (widget, "primary-icon-name");
      glade_widget_property_set (widget, "primary-icon-mode",
                                 GLADE_IMAGE_MODE_ICON);
    }
  else if (!glade_widget_property_original_default (widget, "primary-icon-pixbuf"))
    {
      property = glade_widget_get_property (widget, "primary-icon-pixbuf");
      glade_widget_property_set (widget, "primary-icon-mode",
                                 GLADE_IMAGE_MODE_FILENAME);
    }
  else /*  if (glade_widget_property_original_default (widget, "stock") == FALSE) */
    {
      property = glade_widget_get_property (widget, "primary-icon-stock");
      glade_widget_property_set (widget, "primary-icon-mode",
                                 GLADE_IMAGE_MODE_STOCK);
    }

  glade_property_sync (property);

  if (!glade_widget_property_original_default (widget, "secondary-icon-name"))
    {
      property = glade_widget_get_property (widget, "secondary-icon-name");
      glade_widget_property_set (widget, "secondary-icon-mode",
                                 GLADE_IMAGE_MODE_ICON);
    }
  else if (!glade_widget_property_original_default (widget, "secondary-icon-pixbuf"))
    {
      property = glade_widget_get_property (widget, "secondary-icon-pixbuf");
      glade_widget_property_set (widget, "secondary-icon-mode",
                                 GLADE_IMAGE_MODE_FILENAME);
    }
  else /*  if (glade_widget_property_original_default (widget, "stock") == FALSE) */
    {
      property = glade_widget_get_property (widget, "secondary-icon-stock");
      glade_widget_property_set (widget, "secondary-icon-mode",
                                 GLADE_IMAGE_MODE_STOCK);
    }

  glade_property_sync (property);

  if (!glade_widget_property_original_default (widget, "primary-icon-tooltip-markup"))
    glade_widget_property_set (widget, "glade-primary-tooltip-markup", TRUE);

  if (!glade_widget_property_original_default (widget, "secondary-icon-tooltip-markup"))
    glade_widget_property_set (widget, "glade-secondary-tooltip-markup", TRUE);
}
Ejemplo n.º 16
0
static void
glade_gtk_parse_atk_props (GladeWidget * widget, GladeXmlNode * node)
{
  GladeXmlNode *prop;
  GladeProperty *property;
  GValue *gvalue;
  gchar *value, *name, *id, *comment;
  gint translatable;
  gboolean is_action;

  for (prop = glade_xml_node_get_children (node);
       prop; prop = glade_xml_node_next (prop))
    {
      if (glade_xml_node_verify_silent (prop, GLADE_TAG_A11Y_PROPERTY))
        is_action = FALSE;
      else if (glade_xml_node_verify_silent (prop, GLADE_TAG_A11Y_ACTION))
        is_action = TRUE;
      else
        continue;

      if (!is_action &&
          !(name = glade_xml_get_property_string_required
            (prop, GLADE_XML_TAG_NAME, NULL)))
        continue;
      else if (is_action &&
               !(name = glade_xml_get_property_string_required
                 (prop, GLADE_TAG_A11Y_ACTION_NAME, NULL)))
        continue;


      /* Make sure we are working with dashes and
       * not underscores ... 
       */
      id = glade_util_read_prop_name (name);
      g_free (name);

      /* We are namespacing the action properties internally
       * just incase they clash (all property names must be
       * unique...)
       */
      if (is_action)
        {
          name = g_strdup_printf ("atk-%s", id);
          g_free (id);
          id = name;
        }

      if ((property = glade_widget_get_property (widget, id)) != NULL)
        {
          /* Complex statement just getting the value here... */
          if ((!is_action &&
               !(value = glade_xml_get_content (prop))) ||
              (is_action &&
               !(value = glade_xml_get_property_string_required
                 (prop, GLADE_TAG_A11Y_DESC, NULL))))
            {
              /* XXX should be a glade_xml_get_content_required()... */
              g_free (id);
              continue;
            }

          /* Set the parsed value on the property ... */
          gvalue = glade_property_class_make_gvalue_from_string
	    (glade_property_get_class (property), value, glade_widget_get_project (widget));
          glade_property_set_value (property, gvalue);
          g_value_unset (gvalue);
          g_free (gvalue);

          /* Deal with i18n... ... XXX Do i18n context !!! */
          translatable = glade_xml_get_property_boolean
              (prop, GLADE_TAG_TRANSLATABLE, FALSE);
          comment = glade_xml_get_property_string (prop, GLADE_TAG_COMMENT);

          glade_property_i18n_set_translatable (property, translatable);
          glade_property_i18n_set_comment (property, comment);

          g_free (comment);
          g_free (value);
        }

      g_free (id);
    }
}