Commit Graph

271 Commits

Author SHA1 Message Date
Michael Natterer 152adbb1bd Rename GIMP_LAYER_MODE_FOO_BROKEN to GIMP_LAYER_MODE_FOO_LEGACY
"Broken" sounds like it needs fixing, but it's legacy compat stuff
that will have to stay for all eternity.
2017-01-09 01:27:20 +01:00
Michael Natterer 66060e3307 app, libgimp*, plug-ins: replace enum GimpLayerModeEffects by GimpLayerMode
with proper value names. Mark most values as _BROKEN because they use
weird alpha compositing that has to die. Move GimpLayerModeEffects to
libgimpbase, deprecate it, and set it as compat enum for GimpLayerMode.
Add the GimpLayerModeEffects values as compat constants to script-fu
and pygimp.
2017-01-08 23:00:19 +01:00
Nils Philippsen ce2e95139a use better prefix for previous patch 2016-07-31 20:53:11 +02:00
Nils Philippsen 454c60970f avoid clashing with remove(3) prototype 2016-07-31 20:50:29 +02:00
Jehan 8a37c928eb app, plug-ins, libgimp*: clean out all remaining trailing spaces/tabs.
Rather than just discovering them by chance, a simple grep and some
search and replace are much more efficient! :-)
Cleaning only done on C and automake files.
2016-06-02 02:04:26 +02:00
Michael Natterer 0bfa402c1a Argh, this was meant to be squashed into the previous commit... 2016-05-26 22:18:50 +02:00
Michael Natterer 97ea600623 app: s/Default/Color/ in the testing icon theme Makefile rules 2016-01-11 20:35:32 +01:00
Michael Natterer 2a43ab240b app: don't access GimpSamplePoint members directly
Use the new accessors instead. Clean up guide and sample point code in
image crop and resize a bit.
2016-01-04 22:06:27 +01:00
Michael Natterer 31a15570eb app: use less weird paths for creating the test icon theme 2016-01-04 00:10:30 +01:00
Michael Natterer 5455b8bfd0 app: move some stuff out of app/file/
file-procedure.[ch] is gone and its functions moved to
GimpPlugInManager where they belong (the manager keeps around the
lists of load, save and export procedures).

Utility functions from file-utils.[ch] that have nothing to do with
image files moved to core/gimp-utils.[ch].
2016-01-03 23:38:08 +01:00
Daniel Sabo c97a529968 app: Change mypaint dependency from libmypaint-gegl to just libmypaint 2015-12-28 09:18:46 -08:00
Michael Natterer 5df4b07b04 app: fix icon theme location in tests 2015-12-22 21:27:20 +01:00
Michael Natterer 7ed2e5db18 app: disable the dock hiding/showing test
it fails for unknown reasons. The actual functionality (keeping the
canvas in place) works absolutely fine in a real GIMP session...
2015-11-25 21:29:56 +01:00
Michael Natterer 4266f86e08 app: remove tons of linker workarounds from Makefilea
either linkers got smarter or our structure got better, or this breaks
on whatever other linkers again...
2015-08-27 21:44:15 +02:00
Michael Natterer 46eef4d09d app: remove references to plug_in_icc_profile_apply_rgb() from Makefiles 2015-08-27 13:52:26 +02:00
Nils Philippsen 9171de3b80 tests: link against -lm
(see commit 4c7338c097)
2015-07-16 14:27:04 +02:00
Michael Natterer 64e506a052 app: test-ui.c: use gimp_channel_is_empty() to check for a selection 2015-07-03 19:38:07 +02:00
Michael Natterer 731cfc7532 app: use gimp_item_bounds() in test-xcf.c 2015-07-03 19:38:07 +02:00
Michael Natterer 3daa2ab96b app: #include "gimplayer-new.c" in tests/ where needed 2015-07-03 12:36:33 +02:00
Michael Natterer db09d0f3d3 app: move functions to create layers to new files gimplayer-new.[ch] 2015-06-17 13:21:01 +02:00
Michael Natterer b4f85a0022 app: link tests to Z_LIBS 2015-04-15 13:13:47 +02:00
Michael Natterer 02fd23e3b8 app: link tests against LIBMYPAINTGEGL_LIBS 2015-04-13 02:14:28 +02:00
Michael Natterer 77b816791a app: fix test sessionrc files to expect the new "Color History" palette
it's now the default palette for --no-data because it's generated
and always exists.
2014-12-07 22:31:00 +01: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 c4dbb34199 Fix make distcheck.
Use srcdir/abs_srcdir in Makefile.am for dealing with VPATH builds.
2014-08-16 18:59:30 +02: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
Jehan b1fc539f6c tests: build the test icon theme for all platforms.
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.
2014-08-15 21:21:41 +00:00
Michael Natterer b9e234f042 app: fix tests test-save-and-export and test-xcf 2014-07-08 10:07:18 +02:00
Michael Natterer d6dc10cc97 app: don't use deprecated enum value in text-xcf.c 2014-05-13 00:24:41 +02:00
Mukund Sivaraman 81e955ed1b build: Add HarfBuzz dependency 2014-05-03 00:27:47 +05:30
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 a0479e8d8b app: link the tests against lcms 2014-03-16 19:52:17 +01:00
Daniel Sabo afc40ffda0 Add automake 1.13+ test outputs to .gitignore 2014-01-10 15:31:34 -08:00
Hartmut Kuhse 21bed1e2fb Completely rewrite metadata handling using gexiv2
Based on original patches from Hartmut Kuhse and modified
by Michael Natterer. Changes include:

- remove libexif dependency and add a hard dependency on gexiv2
- typedef GExiv2Metadata to GimpMetadata to avoid having to
  include gexiv2 globally
- add basic GimpMetadata handling functions to libgimpbase
- add image and image file specific metadata functions to libgimp,
  including the exif orientation image rotate dialog
- port plug-ins to use the new APIs
- port file-tiff-save's UI to GtkBuilder
- add new plug-in "metadata" to view the image's metadata
- keep metadata around as GimpImage member in the core
- update the image's metadata on image size, resolution and precision
  changes
- obsolete the old metadata parasites
- migrate the old parasites to new GimpMetadata object on XCF load
2013-10-27 01:02:17 +02:00
Jehan f4d676c8bb tests: sessionrc-expected* updated with new (tabs-position) settings.
3 tests were failing on a `make distcheck` because of this.
2013-10-13 22:22:21 +13:00
Jehan 6ee77e5635 Bug 709878 - test-session-* skipped when xvfb-run is unavailable.
Also add a GIMP_EXIT_TEST_SKIPPED #define, to return the SKIP exit value
documented by automake.
2013-10-11 21:57:42 +13:00
Michael Natterer 3617e4fde9 app: port all URI comparisons in test-save-and-export.c to g_file_equal()
so they keep succeeding when code gets ported to GFile/GIO which
canonicalizes URIs.
2013-10-09 21:35:23 +02:00
Michael Natterer b14f96dbd0 app: fix tests after the GimpPrecision enum change 2013-06-23 17:24:03 +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
Michael Natterer 66ff5dd70b Remove all calls to g_type_init(), it's deprecated
The type system is initialized automatically now.
2013-05-25 22:44:20 +02:00
Michael Henning 2df4fa2d6f tests: fix running make check with both parallel make and xvfb
Before, the xvfbs would all try to be on DISPLAY=:99, which
caused issues.
2013-05-12 19:38:59 -04:00
Michael Natterer a078ca3f5f app: change serialization of the right docks width in SWM (again)
Use "right-docks-width" and always a positive value instead of
"right-docks-position" (as opponsed to "left-docks-width", that
distinction is a GtkPaned implementation detail and does not belong
into a config file). Parse all old values too. Also fix a glitch in
the deserialization code which might fix bug #700147.
2013-05-13 00:00:57 +02:00
Michael Natterer c865d8f141 Bug 622054 - Levels Tool gray point picker causes lockup
Bail out in gimp_levels_config_adjust_by_colors() if pure
back or white was picked as gray (gamma).
2013-03-27 22:28:29 +01:00
Michael Natterer e6d1234456 app: fix expected single-window sessionrc so tests pass again 2013-02-28 01:29:53 +01:00
Michael Natterer 8e19da16ab tests: update expected sessionrc files for the show-button-bar change 2013-02-18 01:31:07 +01:00
Ville Skyttä 6b0d1038cc Bug 692641 - Various spelling fixes 2013-01-27 18:59:02 +01:00
Michael Natterer b8e2496bf3 app: fix the tests so make check succeeds again
- disable maximize_state_in_aux_data because it doesn'T work without WM
- fix window_role for the new unique tock and toolbox roles
2012-11-19 23:22:32 +01:00
Michael Natterer d46041665c app: disable UI test alt_click_is_layer_to_selection()
It makes assumptions about widget positions that don't work on Jenkins.
2012-08-04 01:53:55 +02:00
Michael Natterer fc28e60dec app: un-fail (not fix) test-ui so make check runs again
keyboard_zoom_focus: disabled, because it fails randomly

restore_recently_closed_multi_column_dock: tracked down the
failure to GTK+ and disabled until we depend on GTK+ >= 2.24.11

repeatedly_switch_window_mode: disabled, I have no clue how to
fix this. These UI tests run way too much code to be useful.
2012-08-03 23:43:09 +02:00
Michael Natterer 6c025d52bf app: make app/tests/ build again 2012-06-20 22:13:06 +02:00
Michael Natterer 2bf48b5f19 app: remove leftover operation testing junk from tests Makefile.am 2012-06-17 00:22:48 +02:00
Ville Sokk 1edb18c30a app: modified and moved gegl operation testing to operations/tests 2012-06-14 21:30:00 +03:00
Ville Sokk e35427071b app: added test for gegl operations 2012-06-14 21:29:52 +03:00
Ville Sokk 4148d4a5af app: fixed typos in testing code 2012-06-05 22:03:26 +03:00
Michael Henning 89760cf044 app: Save the maximized state of the main window in the sessionrc file. 2012-05-27 20:42:02 +02:00
Michael Natterer b058137145 Bug 676389 - Compilation fails using clang because of -u options passed to linker
Use -Wl,-u,symbol to makes things build instead of just -u symbol.
2012-05-20 19:29:44 +02:00
Michael Natterer 91392f85e5 app: make tests build again 2012-05-19 01:27:37 +02:00
Michael Natterer ba4034f8dc app: fix tests: must not link against libgimp 2012-05-10 22:48:37 +02:00
Martin Nordholts d7db79c2f2 app: Make tests build
In particular: link.
2012-05-10 22:12:58 +02:00
Michael Natterer af2ad3228f app: fail less badly in tests 2012-05-05 20:36:54 +02:00
Michael Muré 9966bcfd13 remove now useless and deprecated g_thread_init
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.
2012-05-03 20:44:07 +09:00
Martin Nordholts 1adfcfaf58 app/tests: Build and initialize GEGL
2 tests left that doesn't pass, will fix
2012-05-02 22:32:41 +02:00
Martin Nordholts 563d3c10d6 Make 'make check' compile 2012-05-02 21:53:38 +02:00
Michael Natterer c07325a005 app: add "precision" argument to gimp_image_new() 2012-05-02 17:51:09 +02:00
Michael Natterer a9e60bf6ce app: make the tests build again 2012-05-02 17:51:03 +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 105d2207ef app: require a non-NULL format in gimp_tile_manager_create_buffer() 2012-05-02 17:50:56 +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
Michael Natterer 411b1b6f4b app: make test-gimptilebackendtilemanager.c build again 2012-05-02 17:46:02 +02:00
Martin Nordholts 08cbf159c1 app/tests: Update gegl_buffer_get() code so it builds 2012-04-01 11:44:12 +02:00
Øyvind Kolås 2ea41ea3f6 tests: update API usage of gimptilebackendtilemanager test 2012-03-13 13:09:59 +00:00
Martin Nordholts 6335190ff7 app/tests: The single-window-mode setting is in the sessionrc now
We don't need to have a special gimprc because of it.
2012-01-10 19:47:52 +01:00
Michael Natterer 3821eb1a56 app: update test sessionrc files for the moved session config properties 2011-11-05 21:13:16 +01:00
Martin Nordholts d32e1ed351 app/tests: Simplify
Use g_test_add_func() and g_test_add_data_func().
2011-10-15 13:19:04 +02:00
Martin Nordholts 16ca43e4c8 Revert "app: Add /gimptilebackendtilemanager/basic_write unit test"
This reverts commit e4d6726bde.
We need a GEGL release to depend on first.
2011-10-02 18:41:11 +02:00
Martin Nordholts e4d6726bde app: Add /gimptilebackendtilemanager/basic_write unit test
Rename the 'basic_usage' test to 'basic_read' and add 'basic_write'
test. Implement GimpTileBackendTileManagerPrivate enough to make them
pass.

Note that these tests currently do not work with GIMP's "effective
tile size" optimization.
2011-10-02 18:25:08 +02:00
Martin Nordholts cb242a484e app: Add basic GimpTileBackendTileManager unit test
Add a super basic GimpTileBackendTileManager unit test and implement
GimpTileBackendTileManager enough to make it pass. Still a lot of work
left to do, this was just to get things up and running.
2011-09-30 12:00:40 +02:00
Martin Nordholts 2b2ecd1af1 app/tests: Remove static Gimp *gimp
Say no to evilness.
2011-09-30 07:56:47 +02:00
Martin Nordholts 172c3eb935 app/tests: Add single-window mode specific tests 2011-07-20 16:36:36 +02:00
Martin Nordholts 6c880859ea app/tests: Fix sporadic '/gimp-ui/repeatedly_switch_window_mode' failure 2011-07-03 11:28:42 +02:00
Martin Nordholts f55f26c9b8 app/tests: Add single-window mode session files test
Rename and copy some session files and add a single-window mode
session files test.
2011-06-14 23:34:12 +02:00
Martin Nordholts e74d220930 app: Restore docks in an idle handler
In single-window mode, gimp_session_managed_set_aux_info() will set
the size of the dock areas at the sides. If we don't wait for those
areas to get their size-allocation, we can't properly restore the
docks inside them, so do that in an idle callback.

Also add a required call to gimp_test_run_mainloop_until_idle()
because of this in the 'automatic_tab_style' test.
2011-06-14 23:34:12 +02:00
Martin Nordholts bed298be13 app: Remember column width in multi-column dock windows 2011-05-31 23:15:39 +02:00
Martin Nordholts 981546c02e app/tests: Make sessionrc-2-6 more realistic
GIMP 2.6 session files can't have many docks in a dock window, so
remove that from the GIMP 2.6 session file we use for compatibility
testing. Also remove the "gimp-single-image-window" entry.

The downside is that we need a separate 'expected'-file, but we need
to live with that.
2011-05-31 23:15:38 +02:00
Martin Nordholts 10aa3921a0 app: Rememeber if image windows are opened
Rememeber if image windows are opened because we want the
gimp_session_info_restore() code to run for the single-image window
once that code is in place.
2011-05-28 16:18:34 +02:00
Martin Nordholts a456a70bfd app/tests: Add test for gimp_session_info_read_geometry() fix
Add regression test for "app: Give configure event info to
gimp_session_info_read_geometry()", commit
93fd257c52, which fails without that fix
being present.
2011-05-27 22:34:24 +02:00
Martin Nordholts cd72389404 app/tests: Add '/gimp-ui/close_image'
Add '/gimp-ui/close_image', mainly so that we can do tests that
becomes much harder if there is an image around.
2011-05-27 22:33:55 +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 9325120291 app/tests: Distribute new session files 2011-05-20 18:19:56 +02:00
Martin Nordholts 87e69d2312 app/tests: Add test for GIMP 2.8 multi window session files
Move code in test-session-management.c to a common place so we can
have several variants of session management tests. We can't easily run
all session management tests in a single process, because some parts
of Gimp (the GObject) initialization eeks if done twice in the same
process.

Rename test-session-management.c to test-session-2-6-compatibility.c
and create a new test for GIMP 2.8 multi-window mode session files,
namely test-session-2-8-compatibility-multi-window.c. Copy and rename
sessionrc files accordingly.
2011-05-18 21:30:04 +02:00
Martin Nordholts 4121ac3738 app: Use GLib test framework in test-session-management.c
Use GLib test framework in test-session-management.c. Also rename the
test to 'session_2_6_compatibility'.
2011-05-18 21:11:07 +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 0f19471e22 app: Make GimpDockContainer::get_docks() return a new list
Make GimpDockContainer::get_docks() return a new list and not just a
pointer to a list so that GimpImageWindow can implement it (who needs
to merge its two GimpDockColumns lists).
2011-05-13 21:04:23 +02:00
Martin Nordholts 4b9243fc60 app: Make GimpDockWindow implement GimpDockContainer
Make GimpDockWindow implement the GimpDockContainer interface. The
plan is to make GimpImageWindow also implement the GimpDockContainer
interface when we start to session manage docks in single-window mode.
2011-05-09 19:55:51 +02:00
Martin Nordholts d9264c6bd5 app/tests: Fixup test-gimpidtable.c
Fixup of test-gimpidtable.c of things sleepy eyes and brains missed.
2011-05-06 07:23:16 +02:00
Martin Nordholts c4097d4ff4 app: void * -> gpointer in GimpIdTable 2011-05-04 23:14:21 +02:00
Martin Nordholts 9fefa22efe app: Add GimpIdTable utility class
Not written in Vala... ;)
2011-05-04 22:54:35 +02:00
Martin Nordholts a4aa6add43 app/tests: Assert on existance of files before trying to open them
Assert on existance of files before trying to open them so that that
reason for failure becomes clear when that is the cause.
2011-04-10 12:12:15 +02:00
Martin Nordholts a5204631f3 app/tests: Use plug-ins from build dir, in particular file-png
Use a selected set of plug-ins from the build dir rather than the
install dir. In particular 'file-png' for the
'/gimp-save-and-export/imported_file_uris' test. We might need to use
other plug-ins from the build dir as well later, but for the ones from
'plug-ins/common' is enough.
2011-04-08 08:50:59 +02:00