Commit Graph

3487 Commits

Author SHA1 Message Date
Matthias Clasen
9948053cd7 Deprecate GtkDialog
GtkDialog is too flexible in terms of UI (headerbars vs action bar,
etc), and has archaic APIs. It is time to retire it.
2022-10-29 15:27:53 -04:00
Matthias Clasen
f54ab91ff3 Deprecate GtkFileChooser and implementations
These are being replaced by GtkFileDialog.

This commit only moves the headers for GtkFileChooserWidget and
GtkFileChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFileChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
66b062a976 Deprecate GtkMessageDialog
It is getting replaced by GtkAlertDialog

This commit only moves the header to deprecated/,
and keeps the implementation in gtk/, since it will
eventually be salvaged into a private, dialog-free
widget.
2022-10-29 13:31:41 -04:00
Matthias Clasen
15572b0183 Deprecate GtkFontChooser and implementations
These are being replaced by GtkFontDialog
and GtkFontDialogButton

This commit only moves the headers for GtkFontChooserWidget and
GtkFontChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFontChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
a51a6a3ee2 Deprecate GtkColorChooser and implementations
These are being replaced by GtkColorDialog
and GtkColorDialogButton.

This commit only moves the headers for GtkColorChooserWidget
and GtkColorChooserDialog to deprecated/, and keeps the
implementations in gtk/, since they will eventually be
salvaged into a private GtkColorChooserWindow.
2022-10-29 13:31:41 -04:00
Chun-wei Fan
1a5a65acd0 tests/testmountoperation.c: Fix build on Windows
Sadly, we can't just use an interger for a GPid on Windows, so just cast
it.  Sounds silly for non-Windows, but that's life...
2022-10-17 12:36:17 +08:00
Matthias Clasen
ac3177ce95 tests: Ignore deprecations
Some of our tests use deprecated style context api.
Most of them should be ported to use global style
providers eventually. For now, ignore deprecations.
2022-10-12 15:35:00 -04:00
Matthias Clasen
299fbfd722 tests: Ignore deprecations for render api 2022-10-12 15:35:00 -04:00
Matthias Clasen
69e4c9b01e tests: Ignore deprecations
Eventually, most of these tests should be dropped.
2022-10-11 17:18:21 -04:00
Benjamin Otte
0db5c7f421 testgtk: Use global css provider 2022-10-09 10:13:44 -04:00
Benjamin Otte
ed83272f35 tests: Use per-screen CSS providers 2022-10-09 10:13:10 -04:00
Matthias Clasen
e1f69ea278 testmountoperation: Test process dialog
Without this, it is hard to trigger the
dialog. Event with this, we have to force
GtkMountOperation to use its own dialog.
2022-10-04 21:26:07 -04:00
Matthias Clasen
7e9ca5b41d Deprecate GtkEntryCompletion
We want to drop cell renderers and tree models
in GTK 5. The functionality of GtkEntryCompletion
may be replaced by a new widget in GTK 5.
2022-10-03 23:23:56 -04:00
Matthias Clasen
a527a4d82e Deprecate the app chooser widgets
These are a family of pretty specialized widgets, and
are very rarely used. Instead of porting them away
from GtkTreeView and GtkComboBox, deprecate them.
2022-10-03 23:02:09 -04:00
Marc-André Lureau
a75de5fb90 gdk/win32: correct gdk_win32_surface_get_handle return type
The associated surface window handle is a HWND, not a HGDIOBJ.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-08-23 16:17:19 +04:00
Matthias Clasen
1097003f6f Beef up testfontchooserdialog
Allow testing levels.
2022-07-03 12:50:30 -04:00
Ivan Molodetskikh
53f3b4b9d9 tests: Add testdatatable
Add a GtkColumnView scrolling performance test similar to the one used
previously in https://gitlab.gnome.org/GNOME/gtk/-/issues/3334.

The test creates a table with 20 columns and 10,000 rows and scrolls it
to a random position every frame, while measuring the frame times.

There is a commandline flag to pick the cell widget between none (for
benchmarking raw column view scrolling) and various label types. There
is also a commandline switch to disable automatic scrolling in case a
manual assessment is desired. Finally, there's an argument for
controlling the number of columns.
2022-06-28 21:52:49 -07:00
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