mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
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:
@@ -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,
|
||||
|
Reference in New Issue
Block a user