As proposed on IRC. This will allow people to debug their fonts (for
instance when there are permission issues or whatnot) by knowing the
list of problematic fonts in an error dialog at startup (and not only on
terminal).
The debug menu is currently not included in stable versions.
Include the menu unconditionally, but hide it, and its associated
actions, by default in stable versions. Allow enabling the menu
using a new --show-debug-menu command-line option, in the same vein
as --show-playground.
and initialize units in gimp_init(). This was completely
over-engineered but in the end boils down to a bad hack that needs a
static "the_unit_gimp" pointer anyway, so let's at least have the hacks
in one file.
The page is shown by default in unstable but needs --show-playground
in stable versions. There is nothing yet on that page. Also, the icon
needs improvement...
g_test_init() makes any warning message fatale by default. While it
makes sense for the main OS that we build on (Linux), I believe that
our tests on Windows are more useful when they finish, even with some
warnings, than stopping because some stupid font warning would occur
(case I encountered, did not know the solution of, and is not really
relevant to the rest of the test).
In particular, we were not building these for win32, which has no
symbolic link concept. So let's use $(LN_S) defined by autoconf for this
purpose, as it will copy files for platforms without ln support.
Moreover this way, we don't create one such folder for each and every
test run and fill up the tmp directory with countless directories, that
we never clean up.
On Win32, this fixes 3 tests which were failing because of the missing
icons.
Call gimp_cpu_accel_set_use() in app_run(). Add "use_cpu_accel"
parameter to gimp_new() and keep it around in the Gimp instance. Pass
the flag to plug-ins again.
And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.
The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.
Warning
g_thread_init has been deprecated since version 2.32 and should not be used in newly-written code. This function is no longer necessary. The GLib threading system is automatically initialized at the start of your program.
We should initialize and restore GIMP also in gimp_init_for_testing(),
not only in gimp_init_for_gui_testing(), because also non-UI tests
needs e.g. plug-ins to be available.
Introduce a few pixels of error margin in sessionrc, otherwise the
tests are too fragile, widgets have a tendency to change size a bit
and window managers have a tendency to move windows a bit.
Still needs more work, should probably do the same on book positions
too...
Instead of including dialogs/dialogs.h everywhere, introduce
gimp_dialog_factory_get_singleton(). The dialog factory singleton is
still initialized by dialogs.c though.
Right now the assumption is that we never will have another dialog
factory instance around. There were so many problems before when we
had four of them, so let's just keep one of them around.
Add gimp_test_run_temp_mainloop() which is a helper function for tests
that wants to run a main loop for a while. Useful when you want GIMP's
state to settle before doing tests.
In order to allow test cases to test GUI code, add
gimp_init_for_gui_testing() which is like gimp_init_for_testing() but
includes initializations of GUI parts.
* tests.[ch]: initialize base so we have a tile cache and add
parameter "gboolean use_cpu_accel" so we can test stuff both with
and without using CPU features.
* tests/test-layer-grouping.c: changed accordingly. Call g_thread_init()
so the tile cache works (and to be on the safe side in general).
Enable us to have regression testing by introducing a core testing
framework that uses the GLib JUnit-like test library.
Do this by adding a new subdir app/tests that will contain all our
tests (it contains one trivial test already). Also add app/tests.[ch]
with a new function gimp_init_for_testing() so that test cases can
easily setup the core object system.