mirror of https://github.com/GNOME/gimp.git
app: show playground if any of the experimental feature is enabled.
Basically if you enabled OpenCL or any of the experimental tools, it will show the Playground in Preferences. Otherwise, say you enabled some experimental feature months ago (e.g. with the CLI option) and you now experience crashes or whatnot. And you forgot how to change it, and only remembered that there was something in Preferences. It would make you crazy to not find the tab again to disable the option. This is even more important as OpenCL is moving from a normal option to a playground option. So you might not even have ever seen the Playground tab in Preferences and would not know how to disable OpenCL after you enabled it originally in "System Resources" tab. So now Playground is visible with any of these 3 conditions: * If you use an unstable version. * If you run GIMP with --show-playground option. * If you previously enabled one of the playground options.
This commit is contained in:
parent
0f806d0e9c
commit
d3ef6cfb18
|
@ -777,6 +777,34 @@ gimp_load_config (Gimp *gimp,
|
|||
g_signal_connect_object (gimp->edit_config, "notify",
|
||||
G_CALLBACK (gimp_edit_config_notify),
|
||||
gimp->config, 0);
|
||||
|
||||
if (! gimp->show_playground)
|
||||
{
|
||||
gboolean use_opencl;
|
||||
gboolean use_npd_tool;
|
||||
gboolean use_seamless_clone_tool;
|
||||
|
||||
/* Playground preferences is shown by default for unstable
|
||||
* versions and if the associated CLI option was set. Additionally
|
||||
* we want to show it if any of the playground options had been
|
||||
* enabled. Otherwise you might end up getting blocked with a
|
||||
* playground feature and forget where you can even disable it.
|
||||
*
|
||||
* Also we check this once at start when loading config, and not
|
||||
* inside preferences-dialog.c because we don't want to end up
|
||||
* with inconsistent behavior where you open once the Preferences,
|
||||
* deactivate features, then back to preferences and the tab is
|
||||
* gone.
|
||||
*/
|
||||
|
||||
g_object_get (gimp->edit_config,
|
||||
"use-opencl", &use_opencl,
|
||||
"playground-npd-tool", &use_npd_tool,
|
||||
"playground-seamless-clone-tool", &use_seamless_clone_tool,
|
||||
NULL);
|
||||
if (use_opencl || use_npd_tool || use_seamless_clone_tool)
|
||||
gimp->show_playground = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue