Commit Graph

958 Commits

Author SHA1 Message Date
Mike Gorse
8f29a0633b A11y: Add support for AtkTableCell 2018-12-14 19:25:27 +00:00
Timm Bäder
e0a7d28339 testuite Add translucent offscreen rendering test case 2018-12-02 16:15:17 +01:00
Carlos Garnacho
21d0e30903 testsuite: Fix gestures tests for the legacy controller
Let it create one with the right propagation phase, so the event propagation
chain stays the same.
2018-10-15 17:39:04 +02:00
Carlos Garnacho
bb0e964f56 testsuite: Fix gestures test
Was broken by the removal of the default GtkEventControllerLegacy.
2018-10-15 17:39:04 +02:00
Chun-wei Fan
cebf5ed46c testsuite/gtk/filterlistmodel.c: Avoid GCCism
Pointer arithmetic on gpointers (void *) is a GCCism, so avoid that by
being more explicit with things.
2018-10-09 16:26:36 +08:00
Chun-wei Fan
1ca906008e testsuite/gtk/[flatten|sort]listmodel.c: Avoid VLA usage
Visual Studio is unlikely to support VLAs at any point, so avoid using
them and use g_newa() instead.
2018-10-09 16:26:21 +08:00
Timm Bäder
26302cada5 Update expected node files
We don't technically hide the arrow nodes anymore.
2018-09-24 21:05:07 +02:00
Simon McVittie
a0d83bdfa7 testsuite: Install accessibility-dump executable alongside tests
The installed-tests want to run this.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:41:49 +01:00
Simon McVittie
fa8190328d testsuite: Fix installed-test metadata for autotestkeywords
The executable is called autotestkeywords, so we shouldn't try to run
an executable named keywords. Also rename the metadata file to match.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:40:37 +01:00
Simon McVittie
d19cba429d reftests: Fix path to installed-tests in .test metadata
The installed-tests are now namespaced as gtk-4.0 to avoid colliding
with GTK+ 3, but these files weren't updated.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:37:06 +01:00
Benjamin Otte
5bf009a203 cssrbtree: Fix a crasher
After removing elements, there were a few cases where the tree wasn't
properly balanced which could further down violate assumptions about the
layout.

Attached is the original testcase that triggered it. I didn't bother
simplifying it.
2018-09-19 04:31:29 +02:00
Benjamin Otte
545c5f18b2 testsuite: Disable some tests for older glib 2018-09-17 04:30:28 +02:00
Benjamin Otte
5571217218 testsuite: Add tests for GtkSortListModel 2018-09-17 03:57:37 +02:00
Benjamin Otte
b6acc31d44 GtkMapListModel: add 2018-09-16 18:50:17 +02:00
Benjamin Otte
6d0fe46cba propertylookuplistmodel: Add
This model just takes an object and a property name and recursively
looks it up. In particular, I want it for:

widget, widget.parent, widget.parent.parent, ...
2018-09-16 18:50:17 +02:00
Benjamin Otte
2237009983 testsuite: Disable some tests with older glib
Fixes CI.
2018-09-16 18:50:17 +02:00
Benjamin Otte
32ec7dec61 gtk: Add GtkFlattenListModel
We can flatten lists of lists into lists now!
2018-09-16 18:50:17 +02:00
Benjamin Otte
4b5fb5ec79 treelistmodel: Refactor to add GtkTreeListRow
This patch does multiple things:

1. Add a custom persistent per-row object.
2. Move all per-row API to that object. This means notifications are now
   possible.
3. Add a "passthrough" construct-only property to the TreeListModel that
   influences if the model returns these new object or passes through
   the ones from the model.

This greatly simplifies the code needed to be written for widgetry,
because one can just connect the per-row object to the expanders that
expand and collapse rows.

As an added power feature, these objects can also be passed through
further models (like filter models).

It also adds kind of a hack to Adwaita to make the test look neat.
2018-09-16 18:50:17 +02:00
Benjamin Otte
4f70f72349 gtk: Add GtkFilterListModel
This is a GListModel implementation that filters the given source model.
2018-09-16 18:50:17 +02:00
Benjamin Otte
573c63973a gtk: Add GtkTreeListModel
This is a GListModel implementation with a neat API that can be used to
implement trees inside GtkListBox.
2018-09-16 18:50:17 +02:00
Matthias Clasen
099b967885 Don't fail the build if c++ isn't found
The intention of this check was to skip the keyword
test if no c++ compiler is found. But the meson
docs say that add_languages() will abort unless we
pass required: false.
2018-08-18 02:14:56 +00:00
Benjamin Otte
50d5666db0 container: Remove focus chains
They're prectically unused.

Widgets who want to influcence the focus chain behavior should implement
GtkWidgetClass::focus and deal with focus there.
2018-07-31 22:34:27 +02:00
Carlos Garnacho
1570c41efa testsuite: Update window test to use gestures when interactive 2018-07-30 13:14:12 +02:00
Matthias Clasen
b6d990af25 tests: Update a11y tests
Some things changed.
2018-07-27 14:23:20 -04:00
Matthias Clasen
766e2b1e63 testsuite: Update the list of used icons
We use some more now...
2018-07-27 13:37:00 -04:00
Matthias Clasen
32de29bb68 testsuite: Sort icon names
This is easier to keep track of.
2018-07-27 07:12:23 -04:00
Benjamin Otte
5d9d73b090 testsuite: Fix DragContext => Drag renaming 2018-07-24 20:55:45 +02:00
Matthias Clasen
1d72e3e193 Drop builtin icon test
We don't have these icons anymore.
2018-07-22 17:16:20 +00:00
Matthias Clasen
806c659efe Drop unused old icons
We don't need to ship the deprecated old stock-id named
icons and the drag cursors - we don't use them from resources
anyway.
2018-07-20 08:06:07 -04:00
Matthias Clasen
14f86ae24d testsuite: Add emoji icon names
We check for all icon names that are used in gtk.
2018-07-19 17:48:06 -04:00
Daniel Boles
ca94ff10ce testsuite/gtk/defaultvalue: Actually build...& fix
It looks like this got dropped during the move from autotools and never
restored. I can see why, since making it work wasn't a hugely fun task!

Notes on some less then obvious details:
 * PlacesSidebar is private now and didn't seem to be to be particularly
   easy to adapt to, so this moves to checking for it by name, not TYPE.
   I couldn't find a (fast) better way; if you know how, please clean up
 * added 2 casts to avoid warnings from the new type-propagating ref()
 * GdkClipboard and GdkContentProvider need some properties dodged
 * GtkToolItemGroup is gone
 * fixed indentation and used TypeName:property-name syntax in a print()
2018-06-29 20:05:21 +01:00
Daniel Boles
8aa4b5150e notify test: Remove more nonexistent properties 2018-06-27 17:17:05 +01:00
Timm Bäder
ecaa16c367 notify test: Remove some non-existant properties 2018-06-27 18:03:23 +02:00
Timm Bäder
2f8284a386 testsuite: Remove a GtkColorButton special case
The comment above explains neatly why subclassing GtkButton for
GtkColorButton was a bad idea. Nowadays it's a GtkWidget subclass
containing a GtkButton so let's remove the special case here.
2018-06-27 18:03:23 +02:00
Timm Bäder
73cad1e784 Remove some GtkRecentChooserMenu references
Doesn't exist anymore.
2018-06-27 18:03:23 +02:00
Benjamin Otte
0c76264953 reftests: Fix compilation
FOREIGN surfaces are gone.
2018-06-26 00:53:39 +02:00
Timm Bäder
33e113d607 testsuite: Print tested property name in notify test 2018-06-20 20:47:17 +02:00
Benjamin Otte
f247d268d4 dnd: Add GdkDrop base class for GdkDragContext
The ultimate goal of this patch series is to split GdkDragContext into
GdkDrop + GdkDrag classes for the destination and source side of a dnd
operation.

The refactoring is meant to work something like this:
1. Introduce GdkDrop as a base class
2. Make all drop related code (like GdkEvent) use GdkDrop instead of
   GdkDragContext. Move/duplicate APIs to allow that.
3. Port all drop contexts in the backends from GdkDragContext to GdkDrop
4. Delete all APIs in GdkDragContext that aren't needed anymore.
5. Make GdkDragContext no longer a GdkDrop subclass
6. Rename GdkDragContext to GdkDrag
2018-06-18 23:49:19 +02:00
Timm Bäder
fffb3161bc notebook: Stop reversing tabs based on text direction 2018-06-18 17:35:02 +02:00
Timm Bäder
01d4538223 box: Don't reorder children based on text direction
Make :first-child always be the first child, i.e. the leftest one in LTR
and the rightest one in RTL.
2018-06-18 17:35:02 +02:00
Timm Bäder
da27627696 paned: Don't reorder css nodes based on text direction 2018-06-18 17:35:02 +02:00
Philippe Normand
2f181df1cf gtkmain: Add gtk_get_main_thread()
This utility function can be useful to know which thread was initialized for
GTK+.
2018-06-08 18:41:54 +01:00
Philippe Normand
542ad4fdc5 gtkmain: Add gtk_is_initialized()
This utility function can be useful to check whether GTK+ was already
initialized or not.
2018-06-08 18:39:38 +01:00
Benjamin Otte
7e574fa98c gdk: Get rid of gdk_event_free()
Events are objects, so use g_object_unref().
2018-05-29 21:53:44 +02:00
Timm Bäder
5c339f2844 Add basic searchbar set_key_capture_widget tests
Make sure we're correctly resetting the internal key capture widget
pointer when the widget goes away.
2018-05-19 10:18:50 +02:00
Benjamin Otte
34d1ebc562 dnd: Make "formats" a construct-only property
... and hide the member variable inside the DragContextPrivate.
2018-05-07 18:55:09 +02:00
Matthias Clasen
1dcb76bc26 Merge branch 'wip/carlosg/controller' into 'master'
carlosg/controller

See merge request GNOME/gtk!131
2018-05-01 12:35:53 +00:00
Benjamin Otte
4aaeb7de19 dnd: Make GdkDragContext::device a (construct-only) property
Also remove gdk_drag_context_set_device() and insist on backends using
the property.
2018-04-27 14:32:28 +02:00
Benjamin Otte
4ddc94b293 multipressgesture: Port to new API model 2018-04-26 17:59:42 +02:00
Benjamin Otte
703d5340f1 rotategesture: Port to new API model 2018-04-26 17:59:41 +02:00