Commit 5edae3e6 authored by Manish Sing's avatar Manish Sing Committed by Manish Singh
Browse files

fix find_next_guide to return 0 on the last guide as documented, instead

2003-03-06  Manish Sing  <yosh@gimp.org>

        * tools/pdbgen/pdb/guides.pdb: fix find_next_guide to return 0 on
        the last guide as documented, instead of failing.

        * app/pdb/guides_cmds.c: regenerated
parent 06aeae86
2003-03-06 Manish Sing <yosh@gimp.org>
* tools/pdbgen/pdb/guides.pdb: fix find_next_guide to return 0 on
the last guide as documented, instead of failing.
* app/pdb/guides_cmds.c: regenerated
2003-03-06 Michael Natterer <mitch@gimp.org>
 
* themes/Default/images/stock-delete-16.png
......@@ -298,36 +298,39 @@ image_find_next_guide_invoker (Gimp *gimp,
if (success)
{
success = (gimage->guides == NULL);
guide_found = FALSE;
for (guides = gimage->guides; guides; guides = g_list_next (guides))
if (gimage->guides != NULL)
{
GimpGuide *g = (GimpGuide *) guides->data;
if (g->position < 0)
continue;
success = FALSE;
guide_found = FALSE;
if (guide == 0) /* init - Return first guide ID in list */
for (guides = gimage->guides; guides; guides = g_list_next (guides))
{
next_guide = g->guide_ID;
GimpGuide *g = (GimpGuide *) guides->data;
success = TRUE;
break;
}
if (g->position < 0)
continue;
if (! guide_found)
{
if (g->guide_ID == guide)
guide_found = TRUE;
}
else
{
next_guide = g->guide_ID;
if (guide == 0) /* init - Return first guide ID in list */
{
next_guide = g->guide_ID;
success = TRUE;
break;
guide_found = TRUE;
break;
}
if (! guide_found)
{
if (g->guide_ID == guide)
guide_found = TRUE;
}
else
{
next_guide = g->guide_ID;
}
}
if (guide_found)
success = TRUE;
}
}
......
......@@ -143,36 +143,39 @@ HELP
vars => [ 'GList *guides', 'gboolean guide_found' ],
code => <<'CODE'
{
success = (gimage->guides == NULL);
guide_found = FALSE;
for (guides = gimage->guides; guides; guides = g_list_next (guides))
if (gimage->guides != NULL)
{
GimpGuide *g = (GimpGuide *) guides->data;
if (g->position < 0)
continue;
if (guide == 0) /* init - Return first guide ID in list */
{
next_guide = g->guide_ID;
success = TRUE;
break;
}
success = FALSE;
guide_found = FALSE;
if (! guide_found)
for (guides = gimage->guides; guides; guides = g_list_next (guides))
{
if (g->guide_ID == guide)
guide_found = TRUE;
GimpGuide *g = (GimpGuide *) guides->data;
if (g->position < 0)
continue;
if (guide == 0) /* init - Return first guide ID in list */
{
next_guide = g->guide_ID;
guide_found = TRUE;
break;
}
if (! guide_found)
{
if (g->guide_ID == guide)
guide_found = TRUE;
}
else
{
next_guide = g->guide_ID;
}
}
else
{
next_guide = g->guide_ID;
success = TRUE;
break;
}
if (guide_found)
success = TRUE;
}
}
CODE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment