Commit Graph

78 Commits

Author SHA1 Message Date
Simon Budig 997e4b5f6c test-ui: re-enable one of the tests, our gtk-dependency is big enough now. 2023-05-21 01:22:00 +02:00
Simon Budig 36eda4ae9c fix some warning related warnings 2023-05-20 18:25:10 +02:00
Jehan d4fb4362c9 app: fix unit tests with GUI.
Run them with the new GApplication logic, otherwise the various new
parts (such as actions) are not properly loaded.
2023-04-12 22:07:09 +02:00
Jehan 38d0abc026 app: prevent multiple registrations of a same action.
Pre-GIMP-3.0 code logics would re-allocate several GimpMenuFactory or
GimpUIManager for no good reason. While it was still working with old GtkAction
code, with our new GAction-based code, we were ending up overriding an action
with a new version of the same action, while keeping reference to old actions.
This made for discrepancies of the enabled or visible state of actions.

The new code keeps singleton of some objects and references to already
registered GimpUIManager or GimpActionGroups objects and make sure no actions
with the same name are created twice.
2023-04-12 22:07:09 +02:00
Jehan 6dae2c1d33 app: remove unused function.
gimp_ui_get_dialog() is not used anymore anywhere.
2020-09-21 21:00:30 +02:00
Jehan 5cf71f3220 app: test-ui multi-layer aware.
This is actually commented-out test code, but still to be thorough in
case we ever re-enable this code.
2020-05-17 18:57:32 +02:00
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 8516aedade app: on make check, search menu XML files in both buildir and srcdir
Turn GIMP_TESTING_MENUS_DIR into GIMP_TESTING_MENUS_PATH and look in
all its dirs for the menu file.
2018-07-01 19:33:51 +02:00
Michael Natterer e237d431de app: fix some stuff in tests, down to 3 failing
- set GIMP3_DIRECTORY env variable not GIMP2_DIRECTORY
- make sure the cursors resource gets compiled in
- remove tab autosizing test, that code is gone
2018-05-29 00:44:51 +02:00
Michael Natterer baaa2cd7ca app: remove the entire dockable tab auto-sizing code
It was totally broken and could never work like this in GTK+ 3.x, and
if it can be reimplemented it should be started from scratch.
2018-05-26 16:28:58 +02:00
Ell 3673352c99 app: update tests for new GDK/GIMP API
This only makes the tests build, though they still fail.
2018-05-26 04:11:50 -04:00
Jehan 7642715c17 app: allow setting parent for dialogs created by GimpDialogFactory.
Fixes a bunch of:
> Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
2018-05-20 21:06:33 +02:00
luz.paz 4a77ff2d3d Bug 795557 - Misc. typo fixes in source, comments and doxygen (pt3)
Found via `codespell` and grep.
2018-04-25 23:49:06 +02:00
luz.paz 7fdb963e01 Bug 794996 - Misc. typo fixes in comments in app/
Found via `codespell -q 3 --skip="./po*"`
2018-04-08 21:25:56 +02:00
Ell 7da24fd97b app: bump GIMP_UI_WINDOW_POSITION_EPSILON in test-ui.c
The current value (25) is a bit too low over here (getting 28),
bump it to 30.
2017-11-13 17:19:05 -05:00
Michael Natterer 730573375d app: use GIMP_LAYER_MODE_NORMAL for most tests in app/tests/ 2017-08-20 14:09:35 +02:00
Michael Natterer 3cf423f0cd *: rename NORMAL to NORMAL_LEGACY and NORMAL_LINEAR to NORMAL
and make NORMAL_LEGACY immutable.
2017-02-26 16:26:34 +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
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 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 3daa2ab96b app: #include "gimplayer-new.c" in tests/ where needed 2015-07-03 12:36:33 +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
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
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 c14738806e app: use gimp_image_get_layer_format() instead of dealing with image_type 2012-05-02 17:50:57 +02: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 6c880859ea app/tests: Fix sporadic '/gimp-ui/repeatedly_switch_window_mode' failure 2011-07-03 11:28:42 +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 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 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
Michael Natterer 1cdaa2846f app: some forgotten s/GDK_foo/GDK_KEY_foo/ 2011-03-29 18:53:02 +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 4fd051cc0d app/tests: Remove invalid redeclaration
I forgot this...
2010-10-26 14:34:10 +02: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 9e6f5000a5 app/tests: Give possible solution to 'keyboard_zoom_focus' failing 2010-10-26 14:21:27 +02:00
Martin Nordholts c1c42f193d app: Remove 'use_cpu_accel' from gimp_init_for_{,gui_}testing()
Remove silly 'use_cpu_accel' parameter from gimp_init_for_testing()
and gimp_init_for_gui_testing().
2010-10-09 18:50:34 +02:00
Martin Nordholts 185deee3b2 app: Don't run UI tests when there is no DISPLAY 2010-10-03 11:14:35 +02:00
Martin Nordholts ea5190e630 app/tests: Fix gimp_display_shell_transform_xy() build 2010-09-26 12:47:24 +02:00
Martin Nordholts 3c2f0809e3 app/tests: Increase GIMP_UI_WINDOW_POSITION_EPSILON
Increase GIMP_UI_WINDOW_POSITION_EPSILON, we had a nightly build that
failed with

  assertion failed ((int)abs (y_before_hide - y_after_show) <=
                    GIMP_UI_WINDOW_POSITION_EPSILON): (21 <= 10)

so appearently we need to be more liberal.
2010-09-12 18:37:00 +02:00
Martin Nordholts fa6eb03fb2 app/tests: Add 'paintbrush_is_standard_tool' regression test
Add 'paintbrush_is_standard_tool' regression test to prevent bug
624177 from happening again.
2010-08-26 19:05:57 +02:00
Martin Nordholts 706900c4f6 Bug 589010 - Don't make Alt-Clicked layers active
Add a "pre-clicked" signal to GimpCellRendererViewable that can
prevent a selection from happening. Move the Alt-Click code in
GimpLayerTreeView to this signal and if a layer is Alt-Clicked, don't
go ahead and make the layer active. Also add a test for this use case.
2010-06-27 21:46:53 +02:00
Martin Nordholts 66e2866a78 app/tests: Make "create_new_image_via_dialog" result more useful
Also add a layer in "create_new_image_via_dialog" so the created
image is more useful in following tests.
2010-06-27 13:37:41 +02:00
Martin Nordholts d8f8acdff3 app/tests: Add convenience macro GIMP_PAUSE() 2010-06-27 13:30:06 +02:00