pdb: Set choice args to default in gimp-file-load
This patch resolves the same issue as 8021b464,
but for `gimp-file-load`.
This commit is contained in:
parent
24c8f86c85
commit
714e9041d8
2 changed files with 22 additions and 4 deletions
|
|
@ -84,8 +84,17 @@ file_load_invoker (GimpProcedure *procedure,
|
|||
gimp_value_array_index (new_args, 1));
|
||||
|
||||
for (i = 2; i < proc->num_args; i++)
|
||||
if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
if (GIMP_IS_PARAM_SPEC_CHOICE (proc->args[i]))
|
||||
{
|
||||
GParamSpecString *string_spec = G_PARAM_SPEC_STRING (proc->args[i]);
|
||||
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i),
|
||||
string_spec->default_value);
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
{
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
}
|
||||
|
||||
return_vals =
|
||||
gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
|
||||
|
|
|
|||
|
|
@ -76,8 +76,17 @@ HELP
|
|||
gimp_value_array_index (new_args, 1));
|
||||
|
||||
for (i = 2; i < proc->num_args; i++)
|
||||
if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
if (GIMP_IS_PARAM_SPEC_CHOICE (proc->args[i]))
|
||||
{
|
||||
GParamSpecString *string_spec = G_PARAM_SPEC_STRING (proc->args[i]);
|
||||
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i),
|
||||
string_spec->default_value);
|
||||
}
|
||||
else if (G_IS_PARAM_SPEC_STRING (proc->args[i]))
|
||||
{
|
||||
g_value_set_static_string (gimp_value_array_index (new_args, i), "");
|
||||
}
|
||||
|
||||
return_vals =
|
||||
gimp_pdb_execute_procedure_by_name_args (gimp->pdb,
|
||||
|
|
|
|||
Loading…
Reference in a new issue