Commit Graph

22 Commits

Author SHA1 Message Date
Michael Natterer db09d0f3d3 app: move functions to create layers to new files gimplayer-new.[ch] 2015-06-17 13:21:01 +02:00
Jehan 56f0dc06fc Win32 has a gdk_test_simulate_key() implementation since GTK+ 2.24.25.
See bug 734879: commits c87c5cd in GTK+ master, and 03c5335 in gtk-2-24
branch.
2014-11-06 16:47:57 +01:00
Jehan 2b64efc11d tests: gimp_test_utils_synthesize_key_event() not working for win32.
gdk_test_simulate_key() has currently no win32 implementation.
Add this implementation in our code until a patch to GTK+ for this is
merged. This fixes 2 `make check` tests for win32.
2014-08-15 21:23:02 +00:00
Michael Natterer 7f23fbec34 app: add screen and monitor to all display and image window constructors
so they appear on the proper monitor as well.
2014-05-02 20:21:41 +02:00
Michael Natterer 843866e7e7 app: make things behave more reasonable with multiple monitors
There is now a preference option that determines whether windows
should be opened on the same monitor as before. It should be disabled
when the machine gets monitors plugged/unplugged dynamically ("laptop")
and enabled when there is a static multi-monitor setup ("wokstation").
This is merely the current simplistic policy on top of the newly added
underlying infrastructure:

- pass integer monitor numbers around in all places where we already
  pass around a GdkScreen. Pass the "current" monitor to these changed
  APIs, where "current" is either the monitor where the action-triggering
  widget is, or if that is unavailable the monitor where the mouse is.

- add gimp_widget_get_monitor() in order to easily get to the monitor,
  just like gtk_widget_get_screen().

- add screen and monitor parameters in some places that were missed
  before.

- in sessionrc, save all window positions relative to the window's
  monitor, and save the monitor separately, if it's not the screen's
  primary monitor.

- when restoring window positions, use the stored monitor when the new
  prefs options says so (use the screen's primary monitor if there is
  no stored monitor), otherwise use current monitor that is now passed
  around.
2014-05-02 03:01:23 +02:00
Michael Natterer caf73f5f35 Add support for both gamma-corrected and linear for all bit depths
- Add new enum GimpComponentType which contains u8, u16, u32 etc.
- Change GimpPrecision to be u8-linear, u8-gamma, u16-linear etc.
- Add all the needed formats to gimp-babl.c
- Bump the XCF version to 5 and make sure version 4 with the old
  GimpPrecision enum values is loaded correctly

This change blows up the precision enums in "New Image" and
Image->Precision so we can test all this stuff. It is undecided what
format will be user-visible options in 2.10.
2013-06-23 16:51:24 +02:00
Ville Sokk 4148d4a5af app: fixed typos in testing code 2012-06-05 22:03:26 +03:00
Michael Natterer c07325a005 app: add "precision" argument to gimp_image_new() 2012-05-02 17:51:09 +02:00
Michael Natterer c14738806e app: use gimp_image_get_layer_format() instead of dealing with image_type 2012-05-02 17:50:57 +02:00
Michael Natterer 765c2cfea2 app: replace GimpDraable's type by a Babl format
and change gimp_drawable_new() and all gimp_layer_new() variants to
take formats instead of types.
2012-05-02 17:46:06 +02:00
Martin Nordholts 2095c9307b app/tests: Fix typo in gimp-app-test-utils.c 2011-05-27 22:33:54 +02:00
Martin Nordholts e255998775 app/tests: Expose gimp_test_utils_set_env_to_subpath() 2011-05-18 21:11:07 +02:00
Martin Nordholts 3728f6f7d7 app/tests: Add gimp_test_utils_create_image_from_dalog() 2011-02-02 22:29:24 +01:00
Martin Nordholts e7b7bb7136 app/tests: Make gimp_ui_get_ui_manager() a global test util
Make gimp_ui_get_ui_manager() a global test util and make
gimp_test_utils_create_image() return void, clients can reach the new
image and display from the Gimp instance.
2010-10-26 14:23:09 +02:00
Martin Nordholts 62ece2ff18 app/tests: Make gimp_ui_synthesize_key_event() a global test util 2010-10-26 14:23:09 +02:00
Martin Nordholts 3d82d40f5b app/tests: Improve gimp_test_utils_set_env_to_subdir() hint
Improve gimp_test_utils_set_env_to_subdir() hint by making it stand
out more from normal gdb output.
2010-10-26 14:23:08 +02:00
Martin Nordholts 2056042e96 app/tests: Add gimp_test_utils_create_image() 2010-10-26 14:22:53 +02:00
Martin Nordholts f77c400957 app/tests: Generalize gimp_test_utils_set_gimp2_directory()
Support both builddir and srcdir with
gimp_test_utils_set_gimp2_directory() so we can have gimpdir-output in
the build dir.
2010-01-30 08:07:24 +01:00
Martin Nordholts 3612ef2d76 app: Have separate output gimpdir for test cases
Make our test cases write gimpdir files in a dedicate output directory
by changing GIMP2_DIRECTORY at runtime. This ends the writing to the
source directory which make distcheck doesn't like, and it also allows
us to have a separate expected sessionrc for the session management
test. In that test we load a GIMP 2.6 formated sessionrc but write one
updated for 2.8.

We perform this change by passing the builddir through an environment
variable to the test cases. The patch also does some generalizations
in gimp-app-test-utils.c and adapts test cases accordingly.

Also do an adjustment in sessionrc on the toolbox size since
GIMP/GTK+/X/whatever has a tendency to adjust that during runs. The
new size is stable for the moment.
2010-01-29 18:33:22 +01:00
Martin Nordholts 0e9f434277 app/tests: Explain why gimp_test_utils_get_source_subdir() might fail 2010-01-16 23:51:23 +01:00
Martin Nordholts e87c77bcfc app: Allow tests to override the menus directory
In order to let tests run against the source dir, allow them to
override the menus directory. Add utility functions for this and
adjust gimpuimanager.c accordingly.
2010-01-08 15:05:15 +01:00
Martin Nordholts 780ebd7c24 app/tests: Fix warnings about files not existing
Let each test sets GIMP2_DIRECTORY on their own through the help of a
new test utility function gimp_test_utils_set_gimp2_directory() that
is compiled into its own lib which tests are then linked with. Also,
instead of using "/tmp/gimpdir", we use "gimpdir-empty" in the source
dir. This way we get rid of a bunch of annoying warnings when running
the tests and have more control.
2009-12-24 23:01:48 +01:00