Issue #12012: Don't require GUI for C source and HTML export
This commit is contained in:
parent
1dcc8585ef
commit
4d84ac748b
2 changed files with 16 additions and 19 deletions
|
|
@ -124,7 +124,8 @@ csource_create_procedure (GimpPlugIn *plug_in,
|
|||
gimp_procedure_set_documentation (procedure,
|
||||
_("Dump image data in RGB(A) format "
|
||||
"for C source"),
|
||||
_("CSource cannot be run non-interactively."),
|
||||
_("Dump image data in RGB(A) format "
|
||||
"for C source"),
|
||||
name);
|
||||
gimp_procedure_set_attribution (procedure,
|
||||
"Tim Janik",
|
||||
|
|
@ -225,13 +226,6 @@ csource_export (GimpProcedure *procedure,
|
|||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
if (run_mode != GIMP_RUN_INTERACTIVE)
|
||||
return gimp_procedure_new_return_values (procedure,
|
||||
GIMP_PDB_CALLING_ERROR,
|
||||
NULL);
|
||||
|
||||
gimp_ui_init (PLUG_IN_BINARY);
|
||||
|
||||
export = gimp_export_options_get_image (options, &image);
|
||||
drawables = gimp_image_list_layers (image);
|
||||
|
||||
|
|
@ -239,8 +233,13 @@ csource_export (GimpProcedure *procedure,
|
|||
"save-alpha", gimp_drawable_has_alpha (drawables->data),
|
||||
NULL);
|
||||
|
||||
if (! save_dialog (image, procedure, G_OBJECT (config)))
|
||||
status = GIMP_PDB_CANCEL;
|
||||
if (run_mode == GIMP_RUN_INTERACTIVE)
|
||||
{
|
||||
gimp_ui_init (PLUG_IN_BINARY);
|
||||
|
||||
if (! save_dialog (image, procedure, G_OBJECT (config)))
|
||||
status = GIMP_PDB_CANCEL;
|
||||
}
|
||||
|
||||
g_object_get (config,
|
||||
"prefixed-name", &prefixed_name,
|
||||
|
|
|
|||
|
|
@ -276,15 +276,13 @@ html_export (GimpProcedure *procedure,
|
|||
|
||||
gegl_init (NULL, NULL);
|
||||
|
||||
if (run_mode != GIMP_RUN_INTERACTIVE)
|
||||
return gimp_procedure_new_return_values (procedure,
|
||||
GIMP_PDB_CALLING_ERROR,
|
||||
NULL);
|
||||
|
||||
if (! save_dialog (image, procedure, G_OBJECT (config)))
|
||||
return gimp_procedure_new_return_values (procedure,
|
||||
GIMP_PDB_CANCEL,
|
||||
NULL);
|
||||
if (run_mode == GIMP_RUN_INTERACTIVE)
|
||||
{
|
||||
if (! save_dialog (image, procedure, G_OBJECT (config)))
|
||||
return gimp_procedure_new_return_values (procedure,
|
||||
GIMP_PDB_CANCEL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
export = gimp_export_options_get_image (options, &image);
|
||||
drawables = gimp_image_list_layers (image);
|
||||
|
|
|
|||
Loading…
Reference in a new issue