Commit Graph

52101 Commits

Author SHA1 Message Date
Timm Bäder
d027e365d3 glarea: Make the code snippet compile 2017-10-12 15:42:03 +02:00
Timm Bäder
114f232a99 drawingarea: Fix code snippet
Remove state parameter to gtk_style_context_get_color
2017-10-12 15:42:03 +02:00
Timm Bäder
f2ca2e1242 window: Make code snippets compile
Fix the wrong signature of a size_allocate signal handler
2017-10-12 15:42:03 +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
Carlos Garnacho
d4a6c2c241 gtkwidget: Check return value before running bubble phase
If the target widget gets the event consumed on the target phase,
we should not attempt to bubble up, not even within the same widget.
2017-10-12 14:47:15 +02:00
Carlos Garnacho
564ae6967d gtkwidget: Lookup target widget when propagating emulated pressed
After a gesture first claims, and later rejects a touch sequence,
a press event will be propagated further along. However propagation
got messed up since we only emitted as far as the toplevel.
2017-10-12 14:47:15 +02:00
Matthias Clasen
cb19bbba0c Update the css style test
The new font-variant support affected the output here.
2017-10-12 17:23:35 +08:00
Matthias Clasen
18519a7ca0 Make css node and style tests run
Just like the previous commit, we need to set G_TEST_SRCDIR.
2017-10-12 16:06:03 +08:00
Matthias Clasen
37f1d180c3 Make css parser tests run
We need to set G_TEST_SRCDIR and friends for this to do anything.
Setting it reveals that a bunch of the tests are broken.
2017-10-12 15:58:05 +08:00
Matthias Clasen
9ea8235cc7 Update some a11y tests 2017-10-11 20:09:21 -05:00
Matthias Clasen
f09b5a8953 Fix a typo 2017-10-11 19:59:07 -05:00
Matthias Clasen
eb71cd195a testsuite: cosmetics
Put all tests in a suite, and order them in a nicer way.
This makes the test output look better.
2017-10-11 19:33:43 -05:00
Daniel Boles
9c3479b605 Settings: Mention Shift+primary click on Range too
This already existed, and since this doc blurb is already inflating
dramatically, what’s another half a line?
2017-10-11 22:35:31 +01:00
Daniel Boles
46e46ba099 Settings: Reflect resurrected middleclick in Range
and while here, make the explanation more explicit as to which values do
what, & use general Range terminology instead of focussing on scrollbars

https://bugzilla.gnome.org/show_bug.cgi?id=787669
2017-10-11 21:55:41 +01:00
Daniel Boles
1e8a166e34 ToggleButton: Actually show buttons in new snippet
Also, create a Window, instead of a Dialog without a transient parent,
which is (noisily) discouraged. Then s/content_area/box/g to match.
2017-10-11 21:15:54 +01:00
Emmanuele Bassi
eaae832697 docs: Clarify the visibility of buttons in GtkStackSwitcher
If a page in the GtkStack is not visible, then the GtkStackSwitcher
won't show a button for it.
2017-10-11 20:21:28 +01:00
Matthias Clasen
2120ea60ed range: Bring back middle clicks
It does not hurt us to keep middle clicks doing the same
as shift-primary clicks. This makes the transition from gtk2
less painful in terms of muscle memory.

https://bugzilla.gnome.org/show_bug.cgi?id=787669
2017-10-11 14:07:53 -05:00
Philip Withnall
7e8831d668 gtktextview: Add a missing g_assert_not_reached() for switch default
Clarifies the code and helps catch invalid enum values before they
propagate further. Also add a comment about why two seemingly legitimate
values are not handled there (they’re handled higher up in the file).

Coverity CID: 1457700

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=788787
2017-10-11 17:26:54 +01:00
Timm Bäder
1c232ed583 bindings: Fix code snippet
Just use a more realistic example, adapted from gtklistbox.c
2017-10-11 13:01:27 +02:00
Timm Bäder
da3d2593b2 accellabel: Fix code snippet 2017-10-11 12:56:42 +02:00
Timm Bäder
bec55e216c aboutdialog: Fix code snippets
Define all variables and fix a missing comma in the first
gtk_show_about_dialog call.
2017-10-11 12:55:01 +02:00
Timm Bäder
0f8abcd112 applicationwindow: Fix code sample
Declare all variables, use proper GtkApplication constructor and the
right GTK_APPLICATION() cast for gtk_application* API.
2017-10-11 12:41:47 +02:00
Timm Bäder
236098f89b togglebutton: Fix code snippet
Remove gtk_box_pack_start usage, gtk_dialog_get_content_area, fix wrong
gtk_dialog_new parameters and actually add a output_state callback.
2017-10-11 12:35:55 +02:00
Timm Bäder
cc5fb1db03 gtksettings: Fix code snippet
gtk_init does not take any arguments anymore and
GTK_TYPE_IMAGE_MENU_ITEM is gone.
2017-10-11 12:21:20 +02:00
Timm Bäder
8ff713840b label: Make all code snippets properly compile 2017-10-11 12:18:22 +02:00
Timm Bäder
b2fd6dd3dd accellabel: Document new API 2017-10-11 11:08:46 +02:00
Timm Bäder
e19dae4b74 conview: Fix rubberband coordinates when scrolling 2017-10-11 10:55:20 +02:00
Timm Bäder
21108475a8 iconview: Remove double-MAX when updating rubberband 2017-10-11 10:50:03 +02:00
Timm Bäder
9455c92b99 rendericon: Fix texture transformation
Use the one from snapshot_icon, which works.
2017-10-11 09:24:35 +02:00
Timm Bäder
c8add3d169 modelmenuitem: Fix icon/label alignment
gtk_box_pack_end will put the label child at the right side of the label
(in LTR orientation), but we want it left, directly next to the icon.
Also remove the spacing from the box child as this is a theme thing.
2017-10-11 09:03:40 +02:00
Timm Bäder
b3fedda29e grid: Only pass baselines to children that request it 2017-10-11 08:50:21 +02:00
Timm Bäder
e7e3ef9d3e grid: Simplify allocating children
allocation->x and allocation->y are always 0. MAX'ing width/height with
1 is also wrong now since 0 is a valid width/height for widgets.
2017-10-11 08:50:21 +02:00
Timm Bäder
804476a07f eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps
The > 1 meant it only emits the signal for -2/+2 steps.
2017-10-11 08:50:21 +02:00
Timm Bäder
ac7e1081b5 tests: Add testgridbaseline
Which shows that GtkGrid currently computes baselines for all rows even
though not all of them might request a baseline.
2017-10-11 08:50:18 +02:00
Timm Bäder
abed139a59 cssnode: Delay getting the parent style until we need it
There's an early return before.

Look at all those saved cycles.
2017-10-11 07:35:09 +02:00
Matthias Clasen
5d86d209e9 Don't set child position in a ui file
It is not necessary, and causes assertions in some of
our tests.
2017-10-10 19:40:29 -04:00
Benjamin Otte
0836e8cf59 cssnode: Don't put wrong styles in the style cache
~Company ╡ so TL;DR: we put the static style in the cache, but then
       ⤷ ╡ compute a child style from the animated style in the cache
       ⤷ ╡ and we put the child style also in the cache (because
       ⤷ ╡ it's not animated)
       ⤷ ╡ then we run the animation, but reuse the cache every time
       ⤷ ╡ for both child and parent
       ⤷ ╡ so after the animation is done, we end up with a cache that
       ⤷ ╡ has the correct static style for the parent but an
       ⤷ ╡ incorrect static style for the child
       ⤷ ╡ because that static style was computed from the
       ⤷ ╡ initial animated style

This fixes https://bugzilla.gnome.org/show_bug.cgi?id=763517
2017-10-10 21:45:18 +02:00
Timm Bäder
a22ef67b17 cssnodedeclaration: Add gtk_css_node_declaration_to_string 2017-10-10 20:59:57 +02:00
Timm Bäder
7e8f2f6178 build: Drop redundant workaround
This is fixed and we require a meson > 0.39 anyway.
2017-10-10 12:53:06 +02:00
Timm Bäder
af734c4007 rendernode: Don't leak mem_surface 2017-10-10 09:49:35 +02:00
Timm Bäder
657983cfda Don't try to snapshot invisible icons
These spew criticals when width == 0 || height == 0.
2017-10-10 09:49:35 +02:00
Timm Bäder
f50832864e scalebutton: Fix comparison for empty icon list 2017-10-10 09:49:35 +02:00
Timm Bäder
c1af127c28 stylecontext: Fix doc comment
There is no @cr here anymore.
2017-10-10 09:49:35 +02:00
Timm Bäder
63eb3517be GdkDisplay: Add a private _emit_opened
So we don't have to use the slower g_signal_emit_by_name in startup
paths.
2017-10-10 09:49:35 +02:00
Timm Bäder
4a03e86d4f textdisplay: Remove widgets parameter from gtk_text_layout_draw
All calls in gtk+ were passing NULL anyway.
2017-10-10 09:49:35 +02:00
Timm Bäder
b994cac6dd grid: Drop priv pointer 2017-10-10 09:49:35 +02:00
Matthias Clasen
a4deb7e7b4 Reshuffle the css tests a bit 2017-10-10 00:18:21 -04:00
Matthias Clasen
8c41365437 Reshuffle the a11y tests a bit 2017-10-10 00:16:31 -04:00
Matthias Clasen
c57b402d9d Add an install-tests option
Use this to enable or disable installed tests.
2017-10-10 00:14:48 -04:00