/* Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon  */
GIcon* g_themed_icon_new_from_names(char **iconnames, int len)
/* Returns: (transfer full) (type GThemedIcon): a new #GThemedIcon  */
GIcon* g_themed_icon_new_from_names(char **iconnames, int len)
{
  GIcon *icon;
  g_return_val_if_fail (iconnames != NULL, NULL);
  if (len >= 0)
    {
      char **names;
      int i;
      names = g_new (char *, len + 1);
      for (i = 0; i < len; i++)
        names[i] = iconnames[i];
      names[i] = NULL;
      icon = G_ICON (g_object_new (G_TYPE_THEMED_ICON, "names", names, NULL));
      g_free (names);
    }
  else
    icon = G_ICON (g_object_new (G_TYPE_THEMED_ICON, "names", iconnames, NULL));
  return icon;
}