xcf_item_path_is_parent (GList *path,
                         GList *parent_path)
{
  GList *iter        = path;
  GList *parent_iter = parent_path;

  if (g_list_length (parent_path) >= g_list_length (path))
    return FALSE;

  while (iter && parent_iter)
    {
      if (iter->data != parent_iter->data)
        return FALSE;

      iter = iter->next;
      parent_iter = parent_iter->next;
    }

  return TRUE;
}
xcf_item_path_is_parent (GList *path,
                         GList *parent_path)
{
  GList *iter        = path;
  GList *parent_iter = parent_path;

  if (g_list_length (parent_path) >= g_list_length (path))
    return FALSE;

  while (iter && parent_iter)
    {
      if (iter->data != parent_iter->data)
        return FALSE;

      iter = iter->next;
      parent_iter = parent_iter->next;
    }

  return TRUE;
}