Commit Graph

35 Commits

Author SHA1 Message Date
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
Martin Nordholts 1a9eb3e923 app/tests: Use gtk_test_init() 2010-06-27 11:08:42 +02:00
Martin Nordholts a5c0d74599 app/tests: Merge some tests
Remove two GIMP initializations by putting
"gimp-window-management/window_roles" into "gimp-ui" and removing
"gimp-layer-groups/add_layer" which we already have in
"gimp-layers". And we can have layer group tests there too.
2010-06-27 10:40:55 +02:00
Martin Nordholts 7670ae7e87 app/tests: Add alt_click_is_layer_to_selection
Add a regression test that makes sure its possible to Alt-Click on a
layer in the layers dockable to create a selection from it.

Change sessionrc to have only one page in the GimpDockbook to
avoid problems with gtk_test_find_widget().
2010-06-27 10:40:55 +02:00
Martin Nordholts 1c72e5e406 app/tests: Make gimp_ui_find_dock_window() more generic 2010-06-27 10:40:55 +02:00
Martin Nordholts f0e90007f7 app/tests: Remove gimp_ui_synthesize_plus_key_event() crack
Make gimp_ui_synthesize_plus_key_event() generic and implement it with
gdk_test_simulate_key(). We can't use gtk_test_widget_send_key()
because its input window logic doesn't seem to work very well.
2010-06-21 21:19:15 +02:00
Martin Nordholts 7e3898da09 app/tests: Add keyboard zoom focus regression test
Add keyboard zoom focus regression test. We also need a new display
shell utility function
gimp_display_shell_push_zoom_focus_pointer_pos() for that.
2010-06-18 20:57:59 +02:00
Martin Nordholts 3f6a3e749c app/tests: cleanup 2010-06-18 20:31:33 +02:00
Martin Nordholts 782ba9bcb9 app/tests: Make it easier to add tests
Minimize the effort to add a new test by removing prototypes for tests
and adding macros to register tests.
2010-06-14 18:53:38 +02:00
Martin Nordholts 9b86acd16b Add 'Automatic' Tab Style support
Add support for a new type of Tab Style called 'Automatic'. This tab
style makes the GimpDockbook use the biggest actual tab style it can
for its auto tab style dockables, based on its widget allocation.

The tab style candidates for auto tab style are "Status + Blurb",
"Status + Text" and "Status". A docked widget can also say that it
wants to use "Icon" instead of "Status" for its auto tab style. The
'Tool Options' dockable does this. This is to be as backwards
compatible with the old tab style setup, we make 'automatic' the
default everywhere.

We have quite a bit of dependency to internal layout code in
GtkNotebook, but the current code should be pixel perfect and rather
complete.

Also add a basic regression test.
2010-06-12 01:23:42 +02:00
Martin Nordholts d7dc2dc1ab app: Make tooltips in the toolbox work again
We need to be able to pass a GimpUIManager to
gimp_dialog_factory_dialog_new(), so make that possible. Also make
sure to set ui_manager in gimp_dialog_factory_dialog_new_internal()
when we create both a dock window and a dock, so tooltips works in
toolboxes created from scratch.
2010-05-16 12:19:18 +02:00
Martin Nordholts 7b8352bfa0 app/tests: Make test that closes dock window use multi-column variant
Make test that closes dock window use multi-column variant so it
catches a bunch of warnings that occurs when closing multi-column dock
windows.
2010-03-07 09:00:08 +01:00
Martin Nordholts bdfbddd5e8 app/tests: Generalize gimp_ui_find_non_toolbox_dock_window()
Generalize gimp_ui_find_non_toolbox_dock_window() by renaming it to
gimp_ui_find_dock_window() and adding a parameter with a function that
will be used to find the toolbox.
2010-03-07 08:55:18 +01:00
Martin Nordholts 11b1300b6f app: Introduce gimp_dialog_factory_get_singleton()
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.
2010-02-28 23:23:24 +01:00
Martin Nordholts 947e28596f app: Remove gimp_dialog_factory_from_name()
We only have one dialog factory now, and
gimp_dialog_factory_from_name() doesn't provide compile-time type
safety, so use global_dialog_factory directly instead.
2010-02-28 20:02:45 +01:00
Martin Nordholts 18f3be6bd3 Bug 602223 - Can't hide docks with Tab in single-window mode
Add a "hide-docks" config and connect the Windows->Hide docks menu
item to it. Also connect the image window to the config property so it
can hide/show its docks when it needs to.

Also add and use a utility function
gimp_image_window_keep_canvas_pos() to ensure that the image in the
window remains fixed when toggling visiblity of docks. One problem:
When GimpDrawTool is active on the canvas, there is flicker. The end
position is correct though.

Also add regression testing for this fix to test-ui.c
2010-02-24 19:53:48 +01:00
Martin Nordholts 82b2e2cff5 app/tests: Update test-ui.c, gimp_dialog_factories_toggle() is removed 2010-02-24 19:53:48 +01:00
Martin Nordholts 8b458fb591 app: Merge "toplevel" and "dock" dialog factories
Merge "toplevel" and "dock" dialog factories. The end goal is to have
only one dialog factory.
2010-02-20 09:28:26 +01:00
Martin Nordholts b081d91370 app/tests: Add regression test for hide/show of dock windows
Add regression test for hide/show of dock windows that makes sure that
dock window positions are kept after a hide/show cycle. Also introduce
a helper function gimp_ui_find_non_toolbox_dock_window().
2010-02-18 07:25:07 +01:00
Martin Nordholts 33d66f5c7e app/tests: Add regression test for Recently Closed Docks
Add a simple regression test for Windows → Recently Closed Docks.
2010-02-13 20:10:40 +01:00
Martin Nordholts 5093109122 app: Fix gimp_ui_get_ui_manager() to allow arbitrary test exec order
Make gimp_ui_get_ui_manager() in test-ui.c handle when there is no
empty display so we can put the new-image test before the
single-window mode tests. We want the single-window mode tests lasts
because they are so flickery.
2010-02-13 20:10:40 +01: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 8c10d1c451 app/tests: Add simple tests to switch to and from single-window mode 2010-01-17 10:43:16 +01:00
Martin Nordholts f8060aed27 app/tests: Add "/gimp-ui/create-new-image-via-dialog" test
Add a test to create a new image via the new image dialog that would
have caught the regression fixed by:
db2221c9 "app: Fix gimp_dialog_factory_constructor()".
2010-01-16 23:05:18 +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 14ca90ac2f app/tests: Clean up test-ui.c a bit 2009-12-28 11:00:40 +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
Martin Nordholts 5e9aa1281c app/tests: Add regression test "/gimp-ui/tool-options-editor-updates"
Add a new test suite called "test-ui" which will contain several UI
related tests. Right now it just contains a test to make sure that the
tool options editor is updated when the tool changes
("/gimp-ui/tool-options-editor-updates").
2009-12-24 17:50:39 +01:00