renamed member "arg_type" to "type".

2006-03-30  Michael Natterer  <mitch@gimp.org>

	* app/pdb/procedural_db.h (structs Argument and ProcArg): renamed
	member "arg_type" to "type".

	* app/pdb/procedural_db.c
	* app/pdb/procedural-db-query.c
	* app/actions/plug-in-commands.c
	* app/core/gimppdbprogress.c
	* app/plug-in/plug-in-params.c
	* app/plug-in/plug-in-progress.c
	* app/plug-in/plug-in-rc.c
	* tools/pdbgen/pdb/fileops.pdb
	* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.

	* app/pdb/fileops_cmds.c
	* app/pdb/procedural_db_cmds.c: regenerated.
This commit is contained in:
Michael Natterer 2006-03-30 10:06:54 +00:00 committed by Michael Natterer
parent 0768628ac9
commit 55578d0d3e
22 changed files with 154 additions and 162 deletions

View File

@ -1,3 +1,21 @@
2006-03-30 Michael Natterer <mitch@gimp.org>
* app/pdb/procedural_db.h (structs Argument and ProcArg): renamed
member "arg_type" to "type".
* app/pdb/procedural_db.c
* app/pdb/procedural-db-query.c
* app/actions/plug-in-commands.c
* app/core/gimppdbprogress.c
* app/plug-in/plug-in-params.c
* app/plug-in/plug-in-progress.c
* app/plug-in/plug-in-rc.c
* tools/pdbgen/pdb/fileops.pdb
* tools/pdbgen/pdb/procedural_db.pdb: changed accordingly.
* app/pdb/fileops_cmds.c
* app/pdb/procedural_db_cmds.c: regenerated.
2006-03-30 Sven Neumann <sven@gimp.org>
* app/base/siox.c (siox_foreground_extract): actually increment

View File

@ -89,7 +89,7 @@ plug_in_run_cmd_callback (GtkAction *action,
case GIMP_PLUGIN:
case GIMP_TEMPORARY:
if (proc_rec->num_args > n_args &&
proc_rec->args[n_args].arg_type == GIMP_PDB_IMAGE)
proc_rec->args[n_args].type == GIMP_PDB_IMAGE)
{
display = action_data_get_display (data);
@ -99,7 +99,7 @@ plug_in_run_cmd_callback (GtkAction *action,
n_args++;
if (proc_rec->num_args > n_args &&
proc_rec->args[n_args].arg_type == GIMP_PDB_DRAWABLE)
proc_rec->args[n_args].type == GIMP_PDB_DRAWABLE)
{
GimpDrawable *drawable;
@ -133,10 +133,10 @@ plug_in_run_cmd_callback (GtkAction *action,
display ? gimp_display_get_ID (display) : -1);
/* remember only "standard" plug-ins */
if (proc_rec->proc_type == GIMP_PLUGIN &&
proc_rec->num_args >= 3 &&
proc_rec->args[1].arg_type == GIMP_PDB_IMAGE &&
proc_rec->args[2].arg_type == GIMP_PDB_DRAWABLE)
if (proc_rec->proc_type == GIMP_PLUGIN &&
proc_rec->num_args >= 3 &&
proc_rec->args[1].type == GIMP_PDB_IMAGE &&
proc_rec->args[2].type == GIMP_PDB_DRAWABLE)
{
gimp_set_last_plug_in (gimp, proc_def);
}

View File

@ -266,7 +266,7 @@ gimp_pdb_progress_run_callback (GimpPdbProgress *progress,
"The corresponding plug-in may have crashed."),
g_type_name (G_TYPE_FROM_INSTANCE (progress)));
}
else if (n_return_vals >= 2 && return_vals[1].arg_type == GIMP_PDB_FLOAT)
else if (n_return_vals >= 2 && return_vals[1].type == GIMP_PDB_FLOAT)
{
retval = g_value_get_double (&return_vals[1].value);
}

View File

@ -443,12 +443,12 @@ fileops_register_magic_load_handler (Gimp *gimp,
proc = procedural_db_lookup (gimp, canonical);
if (proc && ((proc->num_args < 3) ||
(proc->num_values < 1) ||
(proc->args[0].arg_type != GIMP_PDB_INT32) ||
(proc->args[1].arg_type != GIMP_PDB_STRING) ||
(proc->args[2].arg_type != GIMP_PDB_STRING) ||
(proc->values[0].arg_type != GIMP_PDB_IMAGE)))
if (proc && ((proc->num_args < 3) ||
(proc->num_values < 1) ||
(proc->args[0].type != GIMP_PDB_INT32) ||
(proc->args[1].type != GIMP_PDB_STRING) ||
(proc->args[2].type != GIMP_PDB_STRING) ||
(proc->values[0].type != GIMP_PDB_IMAGE)))
{
g_message ("load handler \"%s\" does not take the standard load handler args",
canonical);
@ -513,7 +513,7 @@ file_load_invoker (ProcRecord *proc_record,
g_value_transform (&args[i].value, &new_args[i].value);
for (i = 3; i < proc->num_args; i++)
if (proc->args[i].arg_type == GIMP_PDB_STRING)
if (proc->args[i].type == GIMP_PDB_STRING)
g_value_set_string (&new_args[i].value, "");
return_vals = procedural_db_execute (gimp, context, progress,
@ -733,7 +733,7 @@ file_save_invoker (ProcRecord *proc_record,
g_value_transform (&args[i].value, &new_args[i].value);
for (i = 5; i < proc->num_args; i++)
if (proc->args[i].arg_type == GIMP_PDB_STRING)
if (proc->args[i].type == GIMP_PDB_STRING)
g_value_set_string (&new_args[i].value, "");
return_vals = procedural_db_execute (gimp, context, progress,
@ -994,12 +994,12 @@ register_save_handler_invoker (ProcRecord *proc_record,
proc = procedural_db_lookup (gimp, canonical);
if (proc && ((proc->num_args < 5) ||
(proc->args[0].arg_type != GIMP_PDB_INT32) ||
(proc->args[1].arg_type != GIMP_PDB_IMAGE) ||
(proc->args[2].arg_type != GIMP_PDB_DRAWABLE) ||
(proc->args[3].arg_type != GIMP_PDB_STRING) ||
(proc->args[4].arg_type != GIMP_PDB_STRING)))
if (proc && ((proc->num_args < 5) ||
(proc->args[0].type != GIMP_PDB_INT32) ||
(proc->args[1].type != GIMP_PDB_IMAGE) ||
(proc->args[2].type != GIMP_PDB_DRAWABLE) ||
(proc->args[3].type != GIMP_PDB_STRING) ||
(proc->args[4].type != GIMP_PDB_STRING)))
{
g_message ("save handler \"%s\" does not take the standard save handler args",
canonical);

View File

@ -404,8 +404,7 @@ procedural_db_print_entry (gpointer key,
{
fprintf (file, "( ");
arg_value = g_enum_get_value (arg_class,
procedure->args[i].arg_type);
arg_value = g_enum_get_value (arg_class, procedure->args[i].type);
output_string (file, g_param_spec_get_name (procedure->args[i].pspec));
output_string (file, arg_value->value_name);
@ -420,8 +419,7 @@ procedural_db_print_entry (gpointer key,
{
fprintf (file, "( ");
arg_value = g_enum_get_value (arg_class,
procedure->values[i].arg_type);
arg_value = g_enum_get_value (arg_class, procedure->values[i].type);
output_string (file, g_param_spec_get_name (procedure->values[i].pspec));
output_string (file, arg_value->value_name);

View File

@ -270,13 +270,10 @@ procedural_db_execute_proc (Gimp *gimp,
for (i = 0; i < MIN (n_args, procedure->num_args); i++)
{
if (args[i].arg_type != procedure->args[i].arg_type)
if (args[i].type != procedure->args[i].type)
{
gchar *type_name;
gchar *got;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
got = procedural_db_type_name (args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
gchar *got = procedural_db_type_name (args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) type mismatch "
@ -297,9 +294,7 @@ procedural_db_execute_proc (Gimp *gimp,
g_param_value_validate (procedure->args[i].pspec,
&args[i].value))
{
gchar *type_name;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) out of bounds."),
@ -469,9 +464,9 @@ procedural_db_run_proc (Gimp *gimp,
if (arg_type == GIMP_PDB_END)
break;
if (arg_type != params[i].arg_type)
if (arg_type != params[i].type)
{
gchar *expected = procedural_db_type_name (proc->args[i].arg_type);
gchar *expected = procedural_db_type_name (proc->args[i].type);
gchar *got = procedural_db_type_name (arg_type);
procedural_db_destroy_args (params, proc->num_args, FALSE);
@ -631,7 +626,7 @@ procedural_db_destroy_args (Argument *args,
for (i = n_args - 1; i >= 0; i--)
{
switch (args[i].arg_type)
switch (args[i].type)
{
case GIMP_PDB_INT32:
case GIMP_PDB_INT16:
@ -720,8 +715,8 @@ procedural_db_add_argument (ProcRecord *procedure,
for (i = 0; i < procedure->num_args; i++)
if (procedure->args[i].pspec == NULL)
{
procedure->args[i].arg_type = arg_type;
procedure->args[i].pspec = pspec;
procedure->args[i].type = arg_type;
procedure->args[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -746,8 +741,8 @@ procedural_db_add_return_value (ProcRecord *procedure,
for (i = 0; i < procedure->num_values; i++)
if (procedure->values[i].pspec == NULL)
{
procedure->values[i].arg_type = arg_type;
procedure->values[i].pspec = pspec;
procedure->values[i].type = arg_type;
procedure->values[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -766,7 +761,7 @@ procedural_db_argument_init (Argument *arg,
g_return_if_fail (arg != NULL);
g_return_if_fail (proc_arg != NULL);
arg->arg_type = proc_arg->arg_type;
arg->type = proc_arg->type;
g_value_init (&arg->value, proc_arg->pspec->value_type);
}
@ -934,7 +929,7 @@ procedural_db_compat_arg_init (Argument *arg,
{
g_return_if_fail (arg != NULL);
arg->arg_type = arg_type;
arg->type = arg_type;
switch (arg_type)
{

View File

@ -22,7 +22,7 @@
struct _Argument
{
GimpPDBArgType arg_type;
GimpPDBArgType type;
GValue value;
};
@ -67,7 +67,7 @@ struct _TempExec
struct _ProcArg
{
GimpPDBArgType arg_type; /* Argument type (int, char, char *, etc) */
GimpPDBArgType type; /* Argument type (int, char, char *, etc) */
GParamSpec *pspec;
};

View File

@ -404,8 +404,7 @@ procedural_db_print_entry (gpointer key,
{
fprintf (file, "( ");
arg_value = g_enum_get_value (arg_class,
procedure->args[i].arg_type);
arg_value = g_enum_get_value (arg_class, procedure->args[i].type);
output_string (file, g_param_spec_get_name (procedure->args[i].pspec));
output_string (file, arg_value->value_name);
@ -420,8 +419,7 @@ procedural_db_print_entry (gpointer key,
{
fprintf (file, "( ");
arg_value = g_enum_get_value (arg_class,
procedure->values[i].arg_type);
arg_value = g_enum_get_value (arg_class, procedure->values[i].type);
output_string (file, g_param_spec_get_name (procedure->values[i].pspec));
output_string (file, arg_value->value_name);

View File

@ -270,13 +270,10 @@ procedural_db_execute_proc (Gimp *gimp,
for (i = 0; i < MIN (n_args, procedure->num_args); i++)
{
if (args[i].arg_type != procedure->args[i].arg_type)
if (args[i].type != procedure->args[i].type)
{
gchar *type_name;
gchar *got;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
got = procedural_db_type_name (args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
gchar *got = procedural_db_type_name (args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) type mismatch "
@ -297,9 +294,7 @@ procedural_db_execute_proc (Gimp *gimp,
g_param_value_validate (procedure->args[i].pspec,
&args[i].value))
{
gchar *type_name;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) out of bounds."),
@ -469,9 +464,9 @@ procedural_db_run_proc (Gimp *gimp,
if (arg_type == GIMP_PDB_END)
break;
if (arg_type != params[i].arg_type)
if (arg_type != params[i].type)
{
gchar *expected = procedural_db_type_name (proc->args[i].arg_type);
gchar *expected = procedural_db_type_name (proc->args[i].type);
gchar *got = procedural_db_type_name (arg_type);
procedural_db_destroy_args (params, proc->num_args, FALSE);
@ -631,7 +626,7 @@ procedural_db_destroy_args (Argument *args,
for (i = n_args - 1; i >= 0; i--)
{
switch (args[i].arg_type)
switch (args[i].type)
{
case GIMP_PDB_INT32:
case GIMP_PDB_INT16:
@ -720,8 +715,8 @@ procedural_db_add_argument (ProcRecord *procedure,
for (i = 0; i < procedure->num_args; i++)
if (procedure->args[i].pspec == NULL)
{
procedure->args[i].arg_type = arg_type;
procedure->args[i].pspec = pspec;
procedure->args[i].type = arg_type;
procedure->args[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -746,8 +741,8 @@ procedural_db_add_return_value (ProcRecord *procedure,
for (i = 0; i < procedure->num_values; i++)
if (procedure->values[i].pspec == NULL)
{
procedure->values[i].arg_type = arg_type;
procedure->values[i].pspec = pspec;
procedure->values[i].type = arg_type;
procedure->values[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -766,7 +761,7 @@ procedural_db_argument_init (Argument *arg,
g_return_if_fail (arg != NULL);
g_return_if_fail (proc_arg != NULL);
arg->arg_type = proc_arg->arg_type;
arg->type = proc_arg->type;
g_value_init (&arg->value, proc_arg->pspec->value_type);
}
@ -934,7 +929,7 @@ procedural_db_compat_arg_init (Argument *arg,
{
g_return_if_fail (arg != NULL);
arg->arg_type = arg_type;
arg->type = arg_type;
switch (arg_type)
{

View File

@ -22,7 +22,7 @@
struct _Argument
{
GimpPDBArgType arg_type;
GimpPDBArgType type;
GValue value;
};
@ -67,7 +67,7 @@ struct _TempExec
struct _ProcArg
{
GimpPDBArgType arg_type; /* Argument type (int, char, char *, etc) */
GimpPDBArgType type; /* Argument type (int, char, char *, etc) */
GParamSpec *pspec;
};

View File

@ -270,13 +270,10 @@ procedural_db_execute_proc (Gimp *gimp,
for (i = 0; i < MIN (n_args, procedure->num_args); i++)
{
if (args[i].arg_type != procedure->args[i].arg_type)
if (args[i].type != procedure->args[i].type)
{
gchar *type_name;
gchar *got;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
got = procedural_db_type_name (args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
gchar *got = procedural_db_type_name (args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) type mismatch "
@ -297,9 +294,7 @@ procedural_db_execute_proc (Gimp *gimp,
g_param_value_validate (procedure->args[i].pspec,
&args[i].value))
{
gchar *type_name;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) out of bounds."),
@ -469,9 +464,9 @@ procedural_db_run_proc (Gimp *gimp,
if (arg_type == GIMP_PDB_END)
break;
if (arg_type != params[i].arg_type)
if (arg_type != params[i].type)
{
gchar *expected = procedural_db_type_name (proc->args[i].arg_type);
gchar *expected = procedural_db_type_name (proc->args[i].type);
gchar *got = procedural_db_type_name (arg_type);
procedural_db_destroy_args (params, proc->num_args, FALSE);
@ -631,7 +626,7 @@ procedural_db_destroy_args (Argument *args,
for (i = n_args - 1; i >= 0; i--)
{
switch (args[i].arg_type)
switch (args[i].type)
{
case GIMP_PDB_INT32:
case GIMP_PDB_INT16:
@ -720,8 +715,8 @@ procedural_db_add_argument (ProcRecord *procedure,
for (i = 0; i < procedure->num_args; i++)
if (procedure->args[i].pspec == NULL)
{
procedure->args[i].arg_type = arg_type;
procedure->args[i].pspec = pspec;
procedure->args[i].type = arg_type;
procedure->args[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -746,8 +741,8 @@ procedural_db_add_return_value (ProcRecord *procedure,
for (i = 0; i < procedure->num_values; i++)
if (procedure->values[i].pspec == NULL)
{
procedure->values[i].arg_type = arg_type;
procedure->values[i].pspec = pspec;
procedure->values[i].type = arg_type;
procedure->values[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -766,7 +761,7 @@ procedural_db_argument_init (Argument *arg,
g_return_if_fail (arg != NULL);
g_return_if_fail (proc_arg != NULL);
arg->arg_type = proc_arg->arg_type;
arg->type = proc_arg->type;
g_value_init (&arg->value, proc_arg->pspec->value_type);
}
@ -934,7 +929,7 @@ procedural_db_compat_arg_init (Argument *arg,
{
g_return_if_fail (arg != NULL);
arg->arg_type = arg_type;
arg->type = arg_type;
switch (arg_type)
{

View File

@ -22,7 +22,7 @@
struct _Argument
{
GimpPDBArgType arg_type;
GimpPDBArgType type;
GValue value;
};
@ -67,7 +67,7 @@ struct _TempExec
struct _ProcArg
{
GimpPDBArgType arg_type; /* Argument type (int, char, char *, etc) */
GimpPDBArgType type; /* Argument type (int, char, char *, etc) */
GParamSpec *pspec;
};

View File

@ -404,8 +404,7 @@ procedural_db_print_entry (gpointer key,
{
fprintf (file, "( ");
arg_value = g_enum_get_value (arg_class,
procedure->args[i].arg_type);
arg_value = g_enum_get_value (arg_class, procedure->args[i].type);
output_string (file, g_param_spec_get_name (procedure->args[i].pspec));
output_string (file, arg_value->value_name);
@ -420,8 +419,7 @@ procedural_db_print_entry (gpointer key,
{
fprintf (file, "( ");
arg_value = g_enum_get_value (arg_class,
procedure->values[i].arg_type);
arg_value = g_enum_get_value (arg_class, procedure->values[i].type);
output_string (file, g_param_spec_get_name (procedure->values[i].pspec));
output_string (file, arg_value->value_name);

View File

@ -270,13 +270,10 @@ procedural_db_execute_proc (Gimp *gimp,
for (i = 0; i < MIN (n_args, procedure->num_args); i++)
{
if (args[i].arg_type != procedure->args[i].arg_type)
if (args[i].type != procedure->args[i].type)
{
gchar *type_name;
gchar *got;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
got = procedural_db_type_name (args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
gchar *got = procedural_db_type_name (args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) type mismatch "
@ -297,9 +294,7 @@ procedural_db_execute_proc (Gimp *gimp,
g_param_value_validate (procedure->args[i].pspec,
&args[i].value))
{
gchar *type_name;
type_name = procedural_db_type_name (procedure->args[i].arg_type);
gchar *type_name = procedural_db_type_name (procedure->args[i].type);
g_message (_("PDB calling error for procedure '%s':\n"
"Argument '%s' (#%d, type %s) out of bounds."),
@ -469,9 +464,9 @@ procedural_db_run_proc (Gimp *gimp,
if (arg_type == GIMP_PDB_END)
break;
if (arg_type != params[i].arg_type)
if (arg_type != params[i].type)
{
gchar *expected = procedural_db_type_name (proc->args[i].arg_type);
gchar *expected = procedural_db_type_name (proc->args[i].type);
gchar *got = procedural_db_type_name (arg_type);
procedural_db_destroy_args (params, proc->num_args, FALSE);
@ -631,7 +626,7 @@ procedural_db_destroy_args (Argument *args,
for (i = n_args - 1; i >= 0; i--)
{
switch (args[i].arg_type)
switch (args[i].type)
{
case GIMP_PDB_INT32:
case GIMP_PDB_INT16:
@ -720,8 +715,8 @@ procedural_db_add_argument (ProcRecord *procedure,
for (i = 0; i < procedure->num_args; i++)
if (procedure->args[i].pspec == NULL)
{
procedure->args[i].arg_type = arg_type;
procedure->args[i].pspec = pspec;
procedure->args[i].type = arg_type;
procedure->args[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -746,8 +741,8 @@ procedural_db_add_return_value (ProcRecord *procedure,
for (i = 0; i < procedure->num_values; i++)
if (procedure->values[i].pspec == NULL)
{
procedure->values[i].arg_type = arg_type;
procedure->values[i].pspec = pspec;
procedure->values[i].type = arg_type;
procedure->values[i].pspec = pspec;
g_param_spec_ref (pspec);
g_param_spec_sink (pspec);
@ -766,7 +761,7 @@ procedural_db_argument_init (Argument *arg,
g_return_if_fail (arg != NULL);
g_return_if_fail (proc_arg != NULL);
arg->arg_type = proc_arg->arg_type;
arg->type = proc_arg->type;
g_value_init (&arg->value, proc_arg->pspec->value_type);
}
@ -934,7 +929,7 @@ procedural_db_compat_arg_init (Argument *arg,
{
g_return_if_fail (arg != NULL);
arg->arg_type = arg_type;
arg->type = arg_type;
switch (arg_type)
{

View File

@ -22,7 +22,7 @@
struct _Argument
{
GimpPDBArgType arg_type;
GimpPDBArgType type;
GValue value;
};
@ -67,7 +67,7 @@ struct _TempExec
struct _ProcArg
{
GimpPDBArgType arg_type; /* Argument type (int, char, char *, etc) */
GimpPDBArgType type; /* Argument type (int, char, char *, etc) */
GParamSpec *pspec;
};

View File

@ -641,7 +641,7 @@ procedural_db_proc_arg_invoker (ProcRecord *proc_record,
{
ProcArg *arg = &proc->args[arg_num];
arg_type = arg->arg_type;
arg_type = arg->type;
arg_name = g_strdup (g_param_spec_get_name (arg->pspec));
arg_desc = g_strdup (g_param_spec_get_blurb (arg->pspec));
}
@ -719,7 +719,7 @@ procedural_db_proc_val_invoker (ProcRecord *proc_record,
{
ProcArg *val = &proc->values[val_num];
val_type = val->arg_type;
val_type = val->type;
val_name = g_strdup (g_param_spec_get_name (val->pspec));
val_desc = g_strdup (g_param_spec_get_blurb (val->pspec));
}

View File

@ -203,12 +203,12 @@ plug_in_progress_install (PlugIn *plug_in,
proc_rec = procedural_db_lookup (plug_in->gimp, progress_callback);
if (! proc_rec ||
proc_rec->num_args != 3 ||
proc_rec->args[0].arg_type != GIMP_PDB_INT32 ||
proc_rec->args[1].arg_type != GIMP_PDB_STRING ||
proc_rec->args[2].arg_type != GIMP_PDB_FLOAT ||
proc_rec->proc_type != GIMP_TEMPORARY ||
if (! proc_rec ||
proc_rec->num_args != 3 ||
proc_rec->args[0].type != GIMP_PDB_INT32 ||
proc_rec->args[1].type != GIMP_PDB_STRING ||
proc_rec->args[2].type != GIMP_PDB_FLOAT ||
proc_rec->proc_type != GIMP_TEMPORARY ||
proc_rec->exec_method.temporary.plug_in != plug_in)
{
return FALSE;

View File

@ -61,7 +61,7 @@ plug_in_params_to_args (ProcArg *proc_args,
{
GValue *value = &args[i].value;
if (i < n_proc_args && proc_args[i].arg_type == params[i].type)
if (i < n_proc_args && proc_args[i].type == params[i].type)
{
procedural_db_argument_init (&args[i], &proc_args[i]);
}
@ -70,7 +70,7 @@ plug_in_params_to_args (ProcArg *proc_args,
procedural_db_compat_arg_init (&args[i], params[i].type);
}
switch (args[i].arg_type)
switch (args[i].type)
{
case GIMP_PDB_INT32:
if (G_VALUE_HOLDS_INT (value))
@ -258,9 +258,9 @@ plug_in_args_to_params (Argument *args,
{
GValue *value = &args[i].value;
params[i].type = args[i].arg_type;
params[i].type = args[i].type;
switch (args[i].arg_type)
switch (args[i].type)
{
case GIMP_PDB_INT32:
if (G_VALUE_HOLDS_INT (value))
@ -552,11 +552,11 @@ plug_in_param_defs_check (const gchar *plug_in_name,
args = g_new0 (ProcArg, n_args);
for (i = 0; i < n_args; i++)
args[i].arg_type = params[i].type;
args[i].type = params[i].type;
return_args = g_new0 (ProcArg, n_return_vals);
for (i = 0; i < n_return_vals; i++)
return_args[i].arg_type = return_vals[i].type;
return_args[i].type = return_vals[i].type;
success = plug_in_proc_args_check (plug_in_name,
plug_in_prog,
@ -606,7 +606,7 @@ plug_in_proc_args_check (const gchar *plug_in_name,
strcmp (prefix, "<Image>") == 0)
{
if ((n_args < 1) ||
(args[0].arg_type != GIMP_PDB_INT32))
(args[0].type != GIMP_PDB_INT32))
{
g_set_error (error, 0, 0,
"Plug-In \"%s\"\n(%s)\n\n"
@ -622,10 +622,10 @@ plug_in_proc_args_check (const gchar *plug_in_name,
}
else if (strcmp (prefix, "<Load>") == 0)
{
if ((n_args < 3) ||
(args[0].arg_type != GIMP_PDB_INT32) ||
(args[1].arg_type != GIMP_PDB_STRING) ||
(args[2].arg_type != GIMP_PDB_STRING))
if ((n_args < 3) ||
(args[0].type != GIMP_PDB_INT32) ||
(args[1].type != GIMP_PDB_STRING) ||
(args[2].type != GIMP_PDB_STRING))
{
g_set_error (error, 0, 0,
"Plug-In \"%s\"\n(%s)\n\n"
@ -641,12 +641,12 @@ plug_in_proc_args_check (const gchar *plug_in_name,
}
else if (strcmp (prefix, "<Save>") == 0)
{
if ((n_args < 5) ||
(args[0].arg_type != GIMP_PDB_INT32) ||
(args[1].arg_type != GIMP_PDB_IMAGE) ||
(args[2].arg_type != GIMP_PDB_DRAWABLE) ||
(args[3].arg_type != GIMP_PDB_STRING) ||
(args[4].arg_type != GIMP_PDB_STRING))
if ((n_args < 5) ||
(args[0].type != GIMP_PDB_INT32) ||
(args[1].type != GIMP_PDB_IMAGE) ||
(args[2].type != GIMP_PDB_DRAWABLE) ||
(args[3].type != GIMP_PDB_STRING) ||
(args[4].type != GIMP_PDB_STRING))
{
g_set_error (error, 0, 0,
"Plug-In \"%s\"\n(%s)\n\n"
@ -668,7 +668,7 @@ plug_in_proc_args_check (const gchar *plug_in_name,
strcmp (prefix, "<Buffers>") == 0)
{
if ((n_args < 1) ||
(args[0].arg_type != GIMP_PDB_INT32))
(args[0].type != GIMP_PDB_INT32))
{
g_set_error (error, 0, 0,
"Plug-In \"%s\"\n(%s)\n\n"

View File

@ -203,12 +203,12 @@ plug_in_progress_install (PlugIn *plug_in,
proc_rec = procedural_db_lookup (plug_in->gimp, progress_callback);
if (! proc_rec ||
proc_rec->num_args != 3 ||
proc_rec->args[0].arg_type != GIMP_PDB_INT32 ||
proc_rec->args[1].arg_type != GIMP_PDB_STRING ||
proc_rec->args[2].arg_type != GIMP_PDB_FLOAT ||
proc_rec->proc_type != GIMP_TEMPORARY ||
if (! proc_rec ||
proc_rec->num_args != 3 ||
proc_rec->args[0].type != GIMP_PDB_INT32 ||
proc_rec->args[1].type != GIMP_PDB_STRING ||
proc_rec->args[2].type != GIMP_PDB_FLOAT ||
proc_rec->proc_type != GIMP_TEMPORARY ||
proc_rec->exec_method.temporary.plug_in != plug_in)
{
return FALSE;

View File

@ -881,7 +881,7 @@ plug_in_rc_write (GSList *plug_in_defs,
{
gimp_config_writer_open (writer, "proc-arg");
gimp_config_writer_printf (writer, "%d",
proc_def->db_info.args[i].arg_type);
proc_def->db_info.args[i].type);
gimp_config_writer_string (writer,
g_param_spec_get_name (proc_def->db_info.args[i].pspec));
@ -895,7 +895,7 @@ plug_in_rc_write (GSList *plug_in_defs,
{
gimp_config_writer_open (writer, "proc-arg");
gimp_config_writer_printf (writer, "%d",
proc_def->db_info.values[i].arg_type);
proc_def->db_info.values[i].type);
gimp_config_writer_string (writer,
g_param_spec_get_name (proc_def->db_info.values[i].pspec));

View File

@ -81,7 +81,7 @@ HELP
g_value_transform (&args[i].value, &new_args[i].value);
for (i = 3; i < proc->num_args; i++)
if (proc->args[i].arg_type == GIMP_PDB_STRING)
if (proc->args[i].type == GIMP_PDB_STRING)
g_value_set_string (&new_args[i].value, "");
return_vals = procedural_db_execute (gimp, context, progress,
@ -210,7 +210,7 @@ HELP
g_value_transform (&args[i].value, &new_args[i].value);
for (i = 5; i < proc->num_args; i++)
if (proc->args[i].arg_type == GIMP_PDB_STRING)
if (proc->args[i].type == GIMP_PDB_STRING)
g_value_set_string (&new_args[i].value, "");
return_vals = procedural_db_execute (gimp, context, progress,
@ -514,12 +514,12 @@ HELP
proc = procedural_db_lookup (gimp, canonical);
if (proc && ((proc->num_args < 5) ||
(proc->args[0].arg_type != GIMP_PDB_INT32) ||
(proc->args[1].arg_type != GIMP_PDB_IMAGE) ||
(proc->args[2].arg_type != GIMP_PDB_DRAWABLE) ||
(proc->args[3].arg_type != GIMP_PDB_STRING) ||
(proc->args[4].arg_type != GIMP_PDB_STRING)))
if (proc && ((proc->num_args < 5) ||
(proc->args[0].type != GIMP_PDB_INT32) ||
(proc->args[1].type != GIMP_PDB_IMAGE) ||
(proc->args[2].type != GIMP_PDB_DRAWABLE) ||
(proc->args[3].type != GIMP_PDB_STRING) ||
(proc->args[4].type != GIMP_PDB_STRING)))
{
g_message ("save handler \"%s\" does not take the standard save handler args",
canonical);
@ -636,12 +636,12 @@ fileops_register_magic_load_handler (Gimp *gimp,
proc = procedural_db_lookup (gimp, canonical);
if (proc && ((proc->num_args < 3) ||
(proc->num_values < 1) ||
(proc->args[0].arg_type != GIMP_PDB_INT32) ||
(proc->args[1].arg_type != GIMP_PDB_STRING) ||
(proc->args[2].arg_type != GIMP_PDB_STRING) ||
(proc->values[0].arg_type != GIMP_PDB_IMAGE)))
if (proc && ((proc->num_args < 3) ||
(proc->num_values < 1) ||
(proc->args[0].type != GIMP_PDB_INT32) ||
(proc->args[1].type != GIMP_PDB_STRING) ||
(proc->args[2].type != GIMP_PDB_STRING) ||
(proc->values[0].type != GIMP_PDB_IMAGE)))
{
g_message ("load handler \"%s\" does not take the standard load handler args",
canonical);

View File

@ -76,7 +76,7 @@ HELP
{
ProcArg *$type = \&proc->${real_type}\[${type}_num];
${type}_type = ${type}->arg_type;
${type}_type = ${type}->type;
${type}_name = g_strdup (g_param_spec_get_name (${type}->pspec));
${type}_desc = g_strdup (g_param_spec_get_blurb (${type}->pspec));
}