Commit Graph

3470 Commits

Author SHA1 Message Date
Benjamin Otte
c796b30136 testcolumnview: Use GtkInscription
This test is suddenly MASSIVELY faster.

I wonder why.
Could it be because inscription does exactly what it was made for?
2022-06-10 04:34:23 +02:00
Matthias Clasen
b41206abab tests: Make fontchooser test build on macOS
Not sure what changed here, but we want to
be able to build this without fontconfig too.
2021-12-29 09:15:26 -05:00
Matthias Clasen
db46a8dd06 Add a testcase for scroll-to-mark
This should help for figuring out #4325.
2021-12-01 17:22:19 -05:00
Benjamin Otte
ef09cbee2f build: Fix build with sysprof-capture but without sysprof 2021-09-26 09:41:55 +02:00
Benjamin Otte
c84d5b1f7f tests: Update rendernode test to use textures 2021-09-16 23:59:37 +02:00
Matthias Clasen
643a91bd08 Fix the testupload test
This can only ever have worked by accident.
2021-09-10 08:28:32 -04:00
Matthias Clasen
a06858ccd9 Add a custom input test
This shows the minimal work required to hook up an
im context to a custom widget.
2021-08-17 22:33:26 -04:00
Caolán McNamara
bbf7454fc9 make testdnd trashcan work again
so that dragging into the 'trashcan' is detected
2021-06-23 15:09:44 +01:00
Matthias Clasen
28990285e2 testgaction: Add more widgetry
Add some toggle and check buttons to test that they
work as expected as GtkActionables.
2021-06-10 08:10:25 -04:00
Matthias Clasen
c7ad8d29e9 Fix the GAction test
We weren't setting the state of the stateful actions.
2021-06-10 08:10:08 -04:00
Matthias Clasen
dba8d1ff77 tests: Fix check vs toggle button confusion
Check buttons aren't toggle buttons anymore.
2021-06-10 07:49:08 -04:00
Matthias Clasen
9ac22c1088 GtkFileFilter: Add suffix matches
This is less flexible than a glob pattern, but it is
explicitly case-insensitive, to match the behavior
on Windows.

Fixes: #3705
2021-06-04 21:10:01 -04:00
Matthias Clasen
b2b044ce95 Move text history tests
We can test internal apis in our testsuite now,
so move the text history tests there, to have them
run in ci.
2021-05-26 07:34:28 -04:00
Matthias Clasen
c391cf38e2 testzoom: Fix the in-place rotate 2021-05-13 19:37:16 -04:00
Matthias Clasen
5be785bff8 Add a transform test
This reveals some issues with scale handling.
2021-05-12 21:50:32 -04:00
Alexander Mikhaylenko
43e33b2990 test: Ensure .image-button on header bar buttons 2021-05-09 20:55:26 +05:00
Alexander Mikhaylenko
5d59415c2d test: Use more appropriate back/forward icons 2021-05-09 20:52:48 +05:00
Matthias Clasen
6e40f4f357 Remove assertions in tests 2021-04-12 21:22:46 -04:00
Matthias Clasen
7332b4f1d9 Add a test for popover positioning
This is useful for testing the interaction of arrows, shadows
or offsets with popover positioning.
2021-02-14 10:11:17 -05:00
Timm Bäder
fc99081658 showrendernode: Monitor input file 2021-01-29 09:45:25 +01:00
Matthias Clasen
1ac9400712 Drop unused logo resource
The inspector no longer sets a window icon.
2021-01-28 12:27:07 -05:00
xndcn
34ffdc6e3f gl: Fix implicit leaking of shader object
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.

So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
2020-12-29 23:50:45 +08:00
Emmanuele Bassi
99e0929d6c build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00
Jonas Ådahl
d2c95a1b13 gdk: Replace 'WITHDRAWN' state with async 'is-mapped' boolean
It was used by all surfaces to track 'is-mapped', but still part of the
GdkToplevelState, and is now replaced with a separate boolean in the
GdkSurface structure.

It also caused issues when a widget was unmapped, and due to that
unmapped a popover which hid its corresponding surface. When this
surface was hidden, it emitted a state change event, which would then go
back into GTK and queue a resize on popover widget, which would travel
back down to the widget that was originally unmapped, causing confusino
when doing future allocations.

To summarize, one should not hide widgets during allocation, and to
avoid this, make this new is-mapped boolean asynchronous when hiding a
surface, meaning the notification event for the changed mapped state
will be emitted in an idle callback. This avoids the above described
reentry issue.
2020-12-07 20:37:30 +01:00
Jonas Ådahl
d7d738d745 tests/animated-resizing: Use gtk_window_default_size() instead
This will actually make it resize on-demand, as the default size is the
size used when computing the window size when the size is not fixed.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
8e3ee58e3f tests/animated-resizing: Don't try to resize during frame dispatch
This will not work on X11 because it's too late to resize, due to
resizing being asynchronous i.e. it won't be complete before we need to
draw.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
b738054344 gdk: Remove GdkSurface::size-changed
It's not emitted, and everyone should use the GdkSurface::layout signal
from now on.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2854d0339c tests/testgtk: Remove 'Resize' button
The gtk_window_resize() API is going away, so remove this test.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
98fffe6f23 tests/animated-resizing: Resize widget instead of window
This means the window needs to be marked as non-resizable, otherwise it
won't shrink.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
f083849ebb tests: Use gtk_window_set_default_size() when appropriate
Replace the usage of gtk_window_resize() with
gtk_window_set_default_size() where possible.
2020-12-07 09:46:39 +01:00
Benjamin Otte
eb9c204535 gtk: Remove GtkFileChooserButton
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Benjamin Otte
a51f11999a tests: Remove testsvg
That demo lives in gtk-demo now.
2020-12-02 20:17:28 +01:00
Benjamin Otte
1c7daece7a Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

See merge request GNOME/gtk!2855
2020-11-17 19:08:01 +00:00
Benjamin Otte
eded9459df tests: Fix for new tranfer behavior of constructors
We were still unreffing a listmodel where the reference wasn't ours
anymore.
2020-11-17 19:04:39 +01:00
Emmanuele Bassi
153c6424d3 Remove pointless inout arguments
GtkTreeView.get_tooltip_context() takes an inout X and Y coordinates,
but the "out" side is a side effect: the conversion from widget-relative
to bin window-relative coordinates is not documented, and can be done
using public API, if needed.

GtkIconView.get_tooltip_context() follows the same pattern, and takes
two inout arguments for the coordinates, but it does not change them any
more, after GtkIconView's bin window was dropped in commit 8dc5e13e.

There's really no point in having these `inout` arguments, and while
GtkTreeView and GtkIconView are certainly de-emphasised in GTK4, and we
nudge developers to move to the new list views, we should take advantage
of the API break to remove warts.
2020-11-17 16:38:12 +00:00
Matthias Clasen
121e61cf01 gsk: Avoid using gtk css types in public api
Using GtkCssSection in public headers here may be
ok from the C perspective, since it all ends up in
the same library anyway. But it causes circular
dependency problems for our gir files that are still
split by namespace.

To avoid this problem, copy the GtkCssLocation struct
struct as GskParseLocation, and pass take two of them
instead of a GtkCssSection in the error callback.

Update all users.

Fixes: #2454
2020-11-16 23:27:44 -05:00
Arnaud Bonatti
f7de0bc9c8 Fix tests with regard to GtkBuilder <requires>. 2020-11-07 16:17:36 +01:00
Timm Bäder
a2291fb989 showrendernode: Pass error to deserialize() 2020-10-22 17:46:33 +02:00
Timm Bäder
da0abfce3a showrendernode: Plug GOptionContext memory leak 2020-10-14 15:06:12 -04:00
Timm Bäder
958e4be86d testfilechooser: Stop listening to ::selection-changed
Doesn't exist anymore.
2020-10-14 15:06:12 -04:00
Matthias Clasen
593907f7b0 testupload: Test more formats
Copy the format conversion code from GdkMemoryTexture
so we can produce all formats, and test them all.

The upload fast paths assume that the stride is a
multiple of four, so some of the padding values cause
it to fail. Apart from that, things seem to work for
all combinations.
2020-09-26 17:26:12 -04:00
Matthias Clasen
d56ad7c40c Add a test for various texture uploads
Create textures with various characteristics (alpha, premultiplication,
stride) that trigger different code paths in the gl texture upload
function, and show the resulting images. If all goes well, they all
should look the same.

On my system, this tests texture upload for memory formats
GDK_MEMORY_B8G8R8A8_PREMULTIPLIED, GDK_MEMORY_R8G8B8A8, and
GDK_MEMORY_R8G8B8, and it works with both gl and gles.
2020-09-26 09:20:00 -04:00
Matthias Clasen
a9de1d702e Merge branch 'matthiasc/for-master' into 'master'
columnview: Simplify column constructors

See merge request GNOME/gtk!2622
2020-09-25 18:25:09 +00:00
Matthias Clasen
0c3f42e06e columnview: Simplify column constructors
Drop gtk_column_view_column_new_with_factory and
just make gtk_column_view_column_new accept a
nullable factory. This follows what we've been
doing elsewhere.

Update all callers.
2020-09-25 13:57:10 -04:00
Carlos Garnacho
b1606db839 gtkscrolledwindow: Drop gtk_scrolled_window_set_capture_button_press()
This API is kinda stuck in the GdkEvent days, we now negotiate ownership
of the input sequence via GtkGestures. Remove it as it reflects a way to
work that was not exactly accurate and it will turn plainly wrong soon.
2020-09-25 18:57:40 +02:00
Matthias Clasen
929a56e53c Clean up lots of GTK+ -> GTK
Replace most remaining uses of GTK+ in the docs and
user-visible strings by GTK. Also remove some leftover
"Was added in 3.x" sentences from the docs.
2020-09-12 12:01:04 -04:00
Matthias Clasen
b5f3ac9718 Add a testcase for controls in headerbars
This is meant to help with figuring out entry
selection drag issues.
2020-09-12 10:58:07 -04:00
Matthias Clasen
93078e52c0 gdk: Rename GdkSurfaceState to GdkToplevelState
That is what it is.

Fixes: #2790
2020-09-10 00:39:03 -04:00
Matthias Clasen
cb2b0688ca Merge branch 'filter-constructors' into 'master'
Filter constructors

See merge request GNOME/gtk!2360
2020-09-08 12:58:27 +00:00
Matthias Clasen
24389a0ef5 Make sorter constructors return exact types
Make functions like gtk_custom_sorter_new() return
the actual type they construct.

Update all callers.
2020-09-05 21:50:15 -04:00