mirror of https://github.com/GNOME/gimp.git
removed the gimp_path_set_tattoo function because tattoos are "unique and
* app/paths_cmds.c, tools/pdbgen/pdb/paths.pdb: removed the gimp_path_set_tattoo function because tattoos are "unique and permanent"
This commit is contained in:
parent
f2b98f7a95
commit
5eb77e90e8
|
@ -1,3 +1,9 @@
|
||||||
|
2000-02-05 Jay Cox <jaycox@earthlink.net>
|
||||||
|
|
||||||
|
* app/paths_cmds.c, tools/pdbgen/pdb/paths.pdb:
|
||||||
|
removed the gimp_path_set_tattoo function because tattoos are
|
||||||
|
"unique and permanent"
|
||||||
|
|
||||||
Fri Feb 4 18:27:16 CET 2000 Stanislav Brabec <utx@penguin.cz>
|
Fri Feb 4 18:27:16 CET 2000 Stanislav Brabec <utx@penguin.cz>
|
||||||
|
|
||||||
* app/global_edit.c: edit_fill with foreground, not background.
|
* app/global_edit.c: edit_fill with foreground, not background.
|
||||||
|
|
|
@ -37,7 +37,6 @@ static ProcRecord get_path_by_tattoo_proc;
|
||||||
static ProcRecord path_delete_proc;
|
static ProcRecord path_delete_proc;
|
||||||
static ProcRecord path_get_locked_proc;
|
static ProcRecord path_get_locked_proc;
|
||||||
static ProcRecord path_set_locked_proc;
|
static ProcRecord path_set_locked_proc;
|
||||||
static ProcRecord path_set_tattoo_proc;
|
|
||||||
|
|
||||||
void
|
void
|
||||||
register_paths_procs (void)
|
register_paths_procs (void)
|
||||||
|
@ -54,7 +53,6 @@ register_paths_procs (void)
|
||||||
procedural_db_register (&path_delete_proc);
|
procedural_db_register (&path_delete_proc);
|
||||||
procedural_db_register (&path_get_locked_proc);
|
procedural_db_register (&path_get_locked_proc);
|
||||||
procedural_db_register (&path_set_locked_proc);
|
procedural_db_register (&path_set_locked_proc);
|
||||||
procedural_db_register (&path_set_tattoo_proc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static Argument *
|
static Argument *
|
||||||
|
@ -1042,90 +1040,3 @@ static ProcRecord path_set_locked_proc =
|
||||||
NULL,
|
NULL,
|
||||||
{ { path_set_locked_invoker } }
|
{ { path_set_locked_invoker } }
|
||||||
};
|
};
|
||||||
|
|
||||||
static Argument *
|
|
||||||
path_set_tattoo_invoker (Argument *args)
|
|
||||||
{
|
|
||||||
gboolean success = TRUE;
|
|
||||||
GimpImage *gimage;
|
|
||||||
gchar *pname;
|
|
||||||
gint32 tattovalue = 0;
|
|
||||||
PathsList *plist;
|
|
||||||
PATHP pptr = NULL;
|
|
||||||
|
|
||||||
gimage = pdb_id_to_image (args[0].value.pdb_int);
|
|
||||||
if (gimage == NULL)
|
|
||||||
success = FALSE;
|
|
||||||
|
|
||||||
pname = (gchar *) args[1].value.pdb_pointer;
|
|
||||||
if (pname == NULL)
|
|
||||||
success = FALSE;
|
|
||||||
|
|
||||||
tattovalue = args[2].value.pdb_int;
|
|
||||||
|
|
||||||
if (success)
|
|
||||||
{
|
|
||||||
/* Get the path with the given name */
|
|
||||||
plist = gimage->paths;
|
|
||||||
|
|
||||||
if (plist && plist->bz_paths)
|
|
||||||
{
|
|
||||||
GSList *pl = plist->bz_paths;
|
|
||||||
|
|
||||||
while (pl)
|
|
||||||
{
|
|
||||||
pptr = pl->data;
|
|
||||||
|
|
||||||
if (!strcmp (pname, pptr->name->str))
|
|
||||||
break; /* Found the path */
|
|
||||||
|
|
||||||
pl = pl->next;
|
|
||||||
pptr = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pl && pptr)
|
|
||||||
pptr->tattoo = tattovalue ;
|
|
||||||
else
|
|
||||||
success = FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
success = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return procedural_db_return_args (&path_set_tattoo_proc, success);
|
|
||||||
}
|
|
||||||
|
|
||||||
static ProcArg path_set_tattoo_inargs[] =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
PDB_IMAGE,
|
|
||||||
"image",
|
|
||||||
"The image"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
PDB_STRING,
|
|
||||||
"pathname",
|
|
||||||
"the name of the path whose tattoo should be set"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
PDB_INT32,
|
|
||||||
"tattovalue",
|
|
||||||
"The tattoo associated with the name path. Only values returned from 'path_get_tattoo' should be used here"
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static ProcRecord path_set_tattoo_proc =
|
|
||||||
{
|
|
||||||
"gimp_path_set_tattoo",
|
|
||||||
"Sets the tattoo associated with the name path.",
|
|
||||||
"This procedure sets the tattoo associated with the specified path. A tattoo is a unique and permenant identifier attached to a path that can be used to uniquely identify a path within an image even between sessions. Note that the value passed to this function must have been obtained from a previous call to path_get_tattoo.",
|
|
||||||
"Andy Thomas",
|
|
||||||
"Andy Thomas",
|
|
||||||
"1999",
|
|
||||||
PDB_INTERNAL,
|
|
||||||
3,
|
|
||||||
path_set_tattoo_inargs,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
{ { path_set_tattoo_invoker } }
|
|
||||||
};
|
|
||||||
|
|
|
@ -371,7 +371,7 @@ sub path_get_tattoo {
|
||||||
$blurb = 'Returns the tattoo associated with the name path.';
|
$blurb = 'Returns the tattoo associated with the name path.';
|
||||||
|
|
||||||
$help = <<'HELP';
|
$help = <<'HELP';
|
||||||
This procedure returns the tattoo associated with the specified path. A tattoo is a unique and permenant identifier attached to a path that can be used to uniquely identify a path within an image even between sessions.
|
This procedure returns the tattoo associated with the specified path. A tattoo is a unique and permanent identifier attached to a path that can be used to uniquely identify a path within an image even between sessions.
|
||||||
HELP
|
HELP
|
||||||
|
|
||||||
&pdb_misc;
|
&pdb_misc;
|
||||||
|
@ -422,57 +422,6 @@ CODE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub path_set_tattoo {
|
|
||||||
$blurb = 'Sets the tattoo associated with the name path.';
|
|
||||||
|
|
||||||
$help = <<'HELP';
|
|
||||||
This procedure sets the tattoo associated with the specified path. A tattoo is a unique and permenant identifier attached to a path that can be used to uniquely identify a path within an image even between sessions. Note that the value passed to this function must have been obtained from a previous call to path_get_tattoo.
|
|
||||||
HELP
|
|
||||||
|
|
||||||
&pdb_misc;
|
|
||||||
|
|
||||||
@inargs = (
|
|
||||||
&std_image_arg,
|
|
||||||
{ name => 'pathname', type => 'string',
|
|
||||||
desc => 'the name of the path whose tattoo should be set',
|
|
||||||
alias => 'pname' },
|
|
||||||
{ name => 'tattovalue', type => 'int32',
|
|
||||||
desc => 'The tattoo associated with the name path. Only values returned from \'path_get_tattoo\' should be used here', init => 1 }
|
|
||||||
);
|
|
||||||
|
|
||||||
%invoke = (
|
|
||||||
vars => [ 'PathsList *plist', 'PATHP pptr = NULL' ],
|
|
||||||
code => <<'CODE'
|
|
||||||
{
|
|
||||||
/* Get the path with the given name */
|
|
||||||
plist = gimage->paths;
|
|
||||||
|
|
||||||
if (plist && plist->bz_paths)
|
|
||||||
{
|
|
||||||
GSList *pl = plist->bz_paths;
|
|
||||||
|
|
||||||
while (pl)
|
|
||||||
{
|
|
||||||
pptr = pl->data;
|
|
||||||
|
|
||||||
if (!strcmp (pname, pptr->name->str))
|
|
||||||
break; /* Found the path */
|
|
||||||
|
|
||||||
pl = pl->next;
|
|
||||||
pptr = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pl && pptr)
|
|
||||||
pptr->tattoo = tattovalue ;
|
|
||||||
else
|
|
||||||
success = FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
success = FALSE;
|
|
||||||
}
|
|
||||||
CODE
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
sub get_path_by_tattoo {
|
sub get_path_by_tattoo {
|
||||||
$blurb = 'Return the name of the path with the given tattoo.';
|
$blurb = 'Return the name of the path with the given tattoo.';
|
||||||
|
|
Loading…
Reference in New Issue