- if (dbus_message_iter_get_arg_type (&mrc) == DBUS_TYPE_STRING)
- {
- char *str;
- gchar **attributes;
- gchar **pp;
- dbus_message_iter_get_basic (&mrc, &str);
- attributes = g_strsplit (str, "\n", -1);
- for (pp = attributes; *pp; pp++)
- {
- str = *pp;
- attr = g_new (AtkAttribute, 1);
- if (attr)
- {
- int len = strcspn (str, ":");
- attr->name = g_strndup (str, len);
- if (str[len] == ':')
- {
- len++;
- if (str[len] == ' ')
- len++;
- attr->value = g_strdup (str + len);
- }
- else
- attr->value = NULL;
- mrp->attributes = g_slist_prepend (mrp->attributes, attr);
- }
- }
- g_strfreev (attributes);
- }
- else
+ dbus_message_iter_recurse (&iter_struct, &iter_dict);
+ while (dbus_message_iter_get_arg_type (&iter_dict) != DBUS_TYPE_INVALID)