app: allow gimp command-line to run in console mode
When non-interactive mode is requested (the -i command-line flag), _and_ we've compiled the app with UI support enabled, allow `gimp` to branch into the console-based version of the app -- equivalent to running it using `gimp-console`. This avoids GTK-related failures open a display when one is not not available (for example, when running `gimp` within a container or a VM without a graphical display).
This commit is contained in:
parent
ecd47d3d23
commit
ea0574b86c
1 changed files with 8 additions and 1 deletions
|
|
@ -242,7 +242,14 @@ app_run (const gchar *full_prog_name,
|
|||
g_clear_object (&default_folder);
|
||||
|
||||
#ifndef GIMP_CONSOLE_COMPILATION
|
||||
app = gimp_app_new (gimp, no_splash, quit, as_new, filenames, batch_interpreter, batch_commands);
|
||||
if (no_interface)
|
||||
{
|
||||
app = gimp_console_app_new (gimp, quit, as_new, filenames, batch_interpreter, batch_commands);
|
||||
}
|
||||
else
|
||||
{
|
||||
app = gimp_app_new (gimp, no_splash, quit, as_new, filenames, batch_interpreter, batch_commands);
|
||||
}
|
||||
#else
|
||||
app = gimp_console_app_new (gimp, quit, as_new, filenames, batch_interpreter, batch_commands);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue