Commit Graph

366 Commits

Author SHA1 Message Date
Christoph Reiter
1253e7bfcb tests: Make GSETTINGS_SCHEMA_DIR point to the compiled schemas in the build dir
With autotools the schemas were compiled into each test suite directory
and the tests set GSETTINGS_SCHEMA_DIR to the test build directory.

With meson's gnome.compile_schemas() we can not define a target directory
so just make sure it is built in the gtk directory and set GSETTINGS_SCHEMA_DIR
to the gtk build directory when running the tests.

This makes the gtk+:gtk suite pass when no gtk is installed on the system.
2018-02-17 09:48:12 +01:00
Matthias Clasen
8891967f2b gtk testsuite: Stop using gtk_widget_show_now
If this is a problem, it needs to be handled explicitly.
2018-02-04 23:23:15 +01:00
Benjamin Otte
cf030e9ffc rbtree: Privatize header
According to meson it's the only private header that doesn't conform to
the *private.h naming.

Fix that.
2018-02-03 16:24:13 +01:00
Benjamin Otte
55874470ff gtk: Remove GtkRecentChooser
It's not used any more, recent files are only used by the filtchooser
and that one uses GtkRecentManager directly.
2018-02-02 23:01:31 +01:00
Matthias Clasen
f942d6f53c Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 23:29:13 +03:00
Matthias Clasen
e2f3b9b1cc tree model sort: Fix set_sort_column
We were failing to change the sort order for the
default sort column in some cases. Fix that, and
add a testcase for this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=792459

Add a testcase for the previous fix
2018-01-16 18:17:54 -05:00
Matthias Clasen
33ec75944f Fix the icontheme test
We rely on log messages here. Since logging is per-display
now, we need to set a display on our custom icontheme object
to get the expected log messages.
2018-01-16 15:42:28 -05:00
Matthias Clasen
0c1ac9add4 testsuite: Stop using ::button-press-event
We can use the generic ::event signal instead.
2018-01-16 14:14:10 -05:00
Matthias Clasen
9a3b61ec9d Drop GtkPlacesSidebar from public API
This is a bit of filechooser internals that gets shared with
nautilus, which is fine, but it shouldn't be part of our
public API. There are no other users than nautilus.
2018-01-08 14:38:55 -05:00
Matthias Clasen
ab256384b8 testsuite: Drop commented out and useless code
These two uses of ::delete-event were pointless.
2018-01-02 18:14:13 -05:00
Matthias Clasen
90b016ef73 Fix the textbuffer test
The test was assuming that gtk_text_buffer_paste_clipboard is
synchronous, which is no longer the case.
2017-12-26 23:15:30 -05:00
Matthias Clasen
7be6d18f27 Fix objects-finalize test
This test needs similar fixes to the notify test to
pass a display to GDK objects when instantiating them.
2017-12-26 20:11:09 -05:00
Matthias Clasen
1b6750c1f1 Fix notify test
We need to pass a display when creating more GDK objects now.
2017-12-26 20:06:06 -05:00
Matthias Clasen
e92c0e85ec Replace gdk_keymap_get_for_display by gdk_display_get_keymap
Replace all uses of the old function by the new one.
No functional change.
2017-12-15 07:44:58 -05:00
Matthias Clasen
fd85ff0c7a Drop gdk_keymap_get_default()
It is better to use the explicit keymap getter - the
default display may not even use the current gdk backend.
2017-12-14 23:57:54 -05:00
Timm Bäder
484e453780 Fix a few overlooked casts
glib warns about these now.
2017-12-09 13:14:00 +01:00
Benjamin Otte
2d5c82b4ec gtk: Remove GtkClipboard 2017-12-03 05:46:49 +01:00
Benjamin Otte
f53848c360 textview: Redo clipboard handling
Instead of using GtkClipboard and handling everything ourselves, we now
put GtkTextBuffer into the GdkClipboard and register (de)serializers for
text/plain.
2017-12-03 05:46:48 +01:00
Matthias Clasen
0b39631464 textview: Replace pixbufs by textures
This affects a few apis, such as gtk_text_iter_get_pixbuf,
gtk_text_buffer_insert_pixbuf and GtkTextBuffer::insert-pixbuf,
which have all been replaced by texture equivalents.

Update all callers.
2017-11-29 23:22:13 -05:00
Benjamin Otte
9a6ec4e959 contentformats: Rename GtkTargetList
It's now called GdkContentsFormat
2017-11-20 23:12:33 +01:00
Benjamin Otte
c863ac0f90 dnd: Remove GtkTargetEntry and GtkTargetFlags
warning: We don't do any same-app checks anymore so you currently can
copy local data into external apps.

This will be fixed later.
2017-11-20 23:12:33 +01:00
Matthias Clasen
95876cbc9c Remove gdk/gdkx.h
It was just a kludge.
2017-11-16 23:00:01 -05:00
Benjamin Otte
3f5178dc21 selection: Remove the info uint
Instead of allowing people to pass a uint user-data, insist on them
comparing mime types.

The user data was a uint instead of a pointer anyway, so uniqueness
could not be guaranteed and it caused more issues than it was worth.
And that's ignoring the fact that it basically wasn't used.
2017-11-16 22:59:43 +01:00
Benjamin Otte
3da65ff233 scalebutton: Remove icon size 2017-11-15 14:22:16 -05:00
Benjamin Otte
a7754a14b5 toolbar: Remove icon sizes 2017-11-15 14:22:16 -05:00
Benjamin Otte
7efc5a1558 clipboard: Consistently use GtkTargetList
Some code was using GtkTargetList, some used GtkTargetEntry and some
GtkTargetPair.
2017-11-15 19:07:16 +01:00
Benjamin Otte
13ca03efb1 cellrendererpixbuf: Remove stock-detail property
GTK3 didn't use that property already...
2017-11-14 18:37:38 -05:00
Benjamin Otte
ed1b6a9bed gdkwindow: Remove event_mask arguments from constructors 2017-11-13 23:41:38 +01:00
Benjamin Otte
e2996732b9 testsuite: Remove cursor tests
Cursors always exist now, it does not make sense to test that their
creation fails anymore.
2017-11-04 00:07:13 +01:00
Benjamin Otte
e294f71555 x11: Redo cursor handling completely
Instead of creating a GdkX11Cursor, create GdkCursors. Cache the XCursor
in a hash table instead.

Also, make use of the new fallback mechanism for fallback code: Make
sure to provide cursors for the names that are guaranteed to exist, but
do not do bad attempts at displaying texture surfaces.
Black/White/transparent is not a replacement for those.
2017-11-04 00:07:13 +01:00
Benjamin Otte
e60da87a94 testsuite: Update for screen => display property changes 2017-10-31 19:00:56 +01:00
Benjamin Otte
07164e098a window: Turn gtk_window_set_screen() into gtk_window_set_display()
And have a priv->display instead of a priv->screen.

Includes turning gtk_menu_set_screen() into gtk_menu_set_display(),
because that function just forwards to its window.
2017-10-31 08:25:37 +01:00
Benjamin Otte
9151e0b9f5 stylecontext: Port to use display instead of screen 2017-10-31 03:05:54 +01:00
Matthias Clasen
c54294e2e1 Add a forgotten file 2017-10-18 18:52:06 +02:00
Matthias Clasen
2f96592e80 Use the cairo renderer for gtk tests for now
We haven't tracked down yet why the window size tests
fail with Vulkan, so use cairo for now.
2017-10-18 17:30:20 +02:00
Matthias Clasen
4a22704d82 Fix test environments 2017-10-18 17:30:20 +02:00
Matthias Clasen
896316a9d1 Install gtk tests
Some of these currently fail on my system.
2017-10-18 17:30:20 +02:00
Matthias Clasen
abe7d8a846 More testsuite cosmetics
Unify the test naming some more.
2017-10-18 17:30:20 +02:00
Matthias Clasen
2a71a4382a testsuite: Use the cairo renderer for now 2017-10-18 17:30:20 +02:00
Carlos Garnacho
06b21b4bec testsuite: Make all gesture test touches happen in the middle of the window
The event coordinates are (so far) irrelevant to what we are testing here,
just make all events happen in the middle of the window in order to ensure
all widgets receive it. More importantly, avoid using fixed pixel distances,
since we don't get guarantees about window sizes.

Fixes the gestures testsuite on X11.
2017-10-12 18:32:27 +02:00
Carlos Garnacho
40a2b91a6c testsuite: Update gestures test to pointer emulation removal
Now all widgets are mandated to handle the real thing, which means no
pointer events are emulated for the pointer emulating touch. The output
of these tests relied on this fact, so update to the tests handling real
touch events.
2017-10-12 14:47:15 +02:00
Carlos Garnacho
ff31bdd334 testsuite: Fix gesture test inconsistencies due to legacy event handling
Legacy GtkWidget vmethods are now handled on an event controller, which
due to being the very first controller added to every widget, runs in
a different order than the previously hardcoded.

Probably testing legacy events is not really futurible, specially after
we stop installing this legacy controller by default. I'll leave the
choice to remove these specific tests for later though.
2017-10-12 14:47:15 +02:00
Timm Bäder
c8c39af454 testsuite: Add test case for previous commit
This previously led to a loop in the child widgets.
2017-09-29 12:16:06 +02:00
Timm Bäder
18837248a6 build: Add widgetorder unit test to build system 2017-09-29 12:10:42 +02:00
Debarshi Ray
60cee7339f GtkBuilder: Enforce "class" as a mandatory attribute for <object>
https://bugzilla.gnome.org/show_bug.cgi?id=786931
2017-09-25 15:26:34 +02:00
Matthias Clasen
b350db58e0 testsuite: Use GdkEvent API 2017-09-19 18:39:03 +02:00
Chun-wei Fan
60297b9fc7 testsuite: Fix builder test on Windows/MSVC
Visual Studio does not support things like -Wl,export-dynamic, so we
need to export those symbols by using __declspec(dllexport).  So, we
decorate these with macros which we define accordingly for this purpose.

https://bugzilla.gnome.org/show_bug.cgi?id=785210
2017-09-15 21:41:15 +08:00
Debarshi Ray
fd9aec27fc GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:41:01 +02:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Benjamin Otte
77c9ef1b7b testsuite: Don't use GtkEventBox in gestures test 2017-08-02 16:58:17 +01:00