Matthias Clasen
abcf2e3bf7
node-editor: Don't use the ::query-tooltip signal
...
Use the vfunc, the signal is going away.
2020-05-09 23:24:59 -04:00
Matthias Clasen
a123d99fcd
inspector: Don't use the ::query-tooltip signal
...
Use the vfunc, the signal is going away.
2020-05-09 22:49:55 -04:00
Matthias Clasen
4f760a9a2a
volumebutton: Don't use the ::query-tooltip signal
...
Use the vfunc, the signal is going away.
2020-05-09 22:31:00 -04:00
Matthias Clasen
7e6be71d38
volumebutton: Enable the tooltips
...
Little point in having a query-tooltip handler if
we don't make sure ::query-tooltip is emitted.
2020-05-09 22:31:00 -04:00
Matthias Clasen
ed46982cc5
volumebutton: Remove broken a11y code
...
The accessible of a button is not an AtkImage,
so whatever this code was trying to do isn't
working. Remove it.
2020-05-09 22:30:59 -04:00
Matthias Clasen
e92270f928
iconview: Stop using the ::query-tooltip signal
...
Use the vfunc instead. The signal is going away.
2020-05-09 22:30:59 -04:00
Matthias Clasen
79a96b9bef
treeview: Don't use the ::query-tooltip signal
...
Use the vfunc instead.
2020-05-09 22:30:59 -04:00
Matthias Clasen
ff55264e60
linkbutton: Don't use the ::query-tooltip signal
...
As a subclass, GtkLinkButton should override the
vfunc. The signal will be going away.
2020-05-09 22:30:59 -04:00
Daniel Șerbănescu
3d6fdffb7c
Update Romanian translation
2020-05-09 18:19:28 +00:00
Florentina Mușat
b14339dc56
Update Romanian translation
2020-05-09 17:18:59 +00:00
Kristjan SCHMIDT
f2dce6d847
Update Esperanto translation
2020-05-09 10:20:43 +00:00
Matthias Clasen
53ca60adbf
Merge branch 'carlosgc/content-provider-union-write' into 'master'
...
clipboard: GdkContentProviderUnion should return after writing the first matched format
See merge request GNOME/gtk!1856
2020-05-08 15:50:33 +00:00
Matthias Clasen
20f160495d
Merge branch 'tintou/gsk-transform-autocleanup' into 'master'
...
gsk: Add GskTransform autocleanup definition
See merge request GNOME/gtk!1859
2020-05-08 15:05:50 +00:00
Matthias Clasen
61d39a09a5
Merge branch 'gbsneto/css-dequeue-fix' into 'master'
...
csswidgetnode: Don't check for container
See merge request GNOME/gtk!1861
2020-05-08 14:55:46 +00:00
Matthias Clasen
0e251906fb
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1860
2020-05-08 14:51:59 +00:00
Georges Basile Stavracas Neto
2cc6c4d2d1
csswidgetnode: Don't check for container
...
The conditions to queue and dequeue a CSS validation
are different; while queueing checks if the widget is
a root, dequeueing checks that AND if the widget is
a container.
GtkWindow is not a GtkContainer anymore, and that is
causing validations to be queued, but never dequeued.
Don't require the widget to be a GtkContainer for
dequeuing.
2020-05-08 10:57:41 -03:00
Matthias Clasen
6efdaa9ffd
placeview: Hide the protocols grid when its empty
...
Seeing just the bold headings at the bottom of the
popover is confusing, so just hide the entire grid
in this case.
2020-05-08 09:20:02 -04:00
Matthias Clasen
d06cdf6318
droptarget: Fix confusion around ::leave signal
...
The leave signal should not take any arguments,
don't pass the GdkDrop. Update the documentation,
fix the emission and update users to match.
This was showing up as crash when dragging files
over the places sidebar.
2020-05-08 08:50:44 -04:00
Corentin Noël
7df572d308
gsk: Add GskTransform autocleanup definition
2020-05-08 09:14:55 +02:00
Carlos Garcia Campos
739137ccf9
clipboard: GdkContentProviderUnion should return after writing the first matched format
...
It continues trying with the other providers due to a missing early
return.
2020-05-07 11:27:45 +02:00
Matthias Clasen
42ca760f9c
Merge branch 'matthiasc/for-master' into 'master'
...
Fix an inspector crash
See merge request GNOME/gtk!1855
2020-05-07 02:56:04 +00:00
Matthias Clasen
57d3719583
Fix an inspector crash
...
Fix the listmodel semantics of the controller model,
by making get_item return a reference.
This was broken in 4b9e5304cc
.
2020-05-06 22:25:51 -04:00
Matthias Clasen
0b5b350f3e
Merge branch 'matthiasc/for-master' into 'master'
...
modelbutton: Unify activation code paths
See merge request GNOME/gtk!1854
2020-05-07 01:40:39 +00:00
Matthias Clasen
236fc57329
modelbutton: Unify activation code paths
...
Opening submenus by Enter or Space wasn't working,
because we had different code paths for activation
via keynav and via click. Unify them.
2020-05-06 20:27:04 -04:00
Emmanuele Bassi
7686b13a1e
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!1853
2020-05-06 22:53:42 +00:00
Emmanuele Bassi
56d3a79990
Annotate gtk_text_child_anchor_get_widgets() correctly
...
We switched from returning a list to returning a C array, which means we
need to update the introspection annotation and the documentation to
match the implementation.
2020-05-06 23:09:53 +01:00
Emmanuele Bassi
ddd113ac98
Annotate gdk_motion_event_get_history() correctly
...
We moved from returning a list to returning a C array, and this requires
a change in the annotations.
2020-05-06 23:05:19 +01:00
Georges Basile Stavracas Neto
962de8f1ee
Merge branch 'gbsneto/array-clear-func' into 'master'
...
icontheme: Don't free array element
Closes #2717
See merge request GNOME/gtk!1851
2020-05-06 22:02:17 +00:00
Matthias Clasen
2415c02bbd
Merge branch 'wip/exalm/polish' into 'master'
...
Random polish
See merge request GNOME/gtk!1850
2020-05-06 21:47:47 +00:00
Matthias Clasen
e25cb8b907
Merge branch 'matthiasc/for-master' into 'master'
...
nodeeditor: Don't use container api on list box rows
See merge request GNOME/gtk!1852
2020-05-06 21:35:08 +00:00
Georges Basile Stavracas Neto
6fc706f983
icontheme: Don't free array element
...
When setting a clear function on a GArray, unlike
most other places, this free func is expected to
*not* free the array element itself -- only its
contents.
Don't free the array element.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2717
2020-05-06 18:14:36 -03:00
Matthias Clasen
e09287a109
nodeeditor: Don't use container api on list box rows
...
GtkListBoxRow is not a container anymore.
2020-05-06 17:03:12 -04:00
Alexander Mikhaylenko
efe21869fb
widget-factory: Remove duplicate margin-start
2020-05-07 01:29:33 +05:00
Alexander Mikhaylenko
2f898e8bb9
widget-factory: Align spinbutton in the list on page 2
2020-05-07 01:29:20 +05:00
Alexander Mikhaylenko
059cc3b818
video: Use more appropriate revealer transition
2020-05-07 01:21:26 +05:00
Matthias Clasen
68011e99ac
Merge branch 'gbsneto/fix-text-child-header' into 'master'
...
textchild: Include <gtk/gtkwidget.h>
See merge request GNOME/gtk!1846
2020-05-06 20:13:22 +00:00
Matthias Clasen
d2b508d95c
Merge branch 'master.struct.msvc' into 'master'
...
gtk/gtkaccelgroup.c: Fix build on Visual Studio
See merge request GNOME/gtk!1785
2020-05-06 20:02:27 +00:00
Matthias Clasen
433295127c
Merge branch 'wip/exalm/row' into 'master'
...
placesview: Stop using gtk_container_add() for GtkListBoxRow
See merge request GNOME/gtk!1849
2020-05-06 20:01:45 +00:00
Alexander Mikhaylenko
24e3556c30
adwaita: Remove a redundant -gtk-icon-shadow: none
...
Buttons have no icon shadows anymore anyway.
2020-05-07 01:01:12 +05:00
Alexander Mikhaylenko
c17aa12235
adwaita: Don't style window menu button anymore
...
Those were removed with the introduction of GtkWindowControls, no need to
exclude them from the round style anymore.
2020-05-07 00:59:44 +05:00
Alexander Mikhaylenko
40c8d8ba9f
adwaita: Use tabular figures where appropriate
...
Port 82b9be3297
from GTK3.
2020-05-07 00:37:55 +05:00
Matthias Clasen
92fc2156ff
Merge branch 'drop-click-gesture-area' into 'master'
...
gestureclick: Drop the area
See merge request GNOME/gtk!1847
2020-05-06 19:25:32 +00:00
Matthias Clasen
4f08b4be9c
Merge branch 'master-disable-introspection' into 'master'
...
CI: disable introspection with mingw to avoid flaky builds
See merge request GNOME/gtk!1848
2020-05-06 19:24:58 +00:00
Christoph Reiter
94202e6339
CI: use bash style variable expansion for the mingw cache key
...
It doesn't understand the powershell syntax which leads to the cache
key being empty which leads to cache restore being skipped
which leads to slow builds not using ccache.
See https://gitlab.com/gitlab-org/gitlab-runner/-/issues/2747
2020-05-06 21:23:14 +02:00
Jakub Steiner
5815604853
Merge branch 'wip/jimmac/HC-focus' into 'master'
...
HC: more contrasty focus rings
See merge request GNOME/gtk!1845
2020-05-06 19:22:27 +00:00
Alexander Mikhaylenko
f47aba05b0
adwaita: Make popover border transparent
...
Port 379669b153
from GTK3.
2020-05-07 00:19:27 +05:00
Matthias Clasen
8239186c26
Merge branch 'abolish-size-allocate' into 'master'
...
Abolish size allocate
Closes #2705
See merge request GNOME/gtk!1833
2020-05-06 19:15:31 +00:00
Alexander Mikhaylenko
3a5fdfcfda
adwaita: Update app icon shadow
...
Port f95f3c707a
from GTK3.
2020-05-07 00:15:19 +05:00
Alexander Mikhaylenko
8007891132
placesview: Stop using gtk_container_add() for GtkListBoxRow
2020-05-07 00:08:46 +05:00
Matthias Clasen
b0fe4dec2c
Update CONTRIBUTING.md
...
Point to discourse, rather than mailing lists.
Based on a suggestion by sujiniku,
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1763
2020-05-06 15:08:36 -04:00
Matthias Clasen
b86d81872c
Merge branch 'matthiasc/for-master' into 'master'
...
keymap: Remove leftover code
See merge request GNOME/gtk!1844
2020-05-06 19:01:25 +00:00
Christoph Reiter
1e0f860a75
CI: disable introspection with mingw to avoid flaky builds
...
g-i has started to fail and it's not clear why, so disable it for
now to keep the build green.
See https://gitlab.gnome.org/GNOME/gobject-introspection/-/issues/340
2020-05-06 20:34:39 +02:00
Matthias Clasen
8efebbaf46
Merge branch 'wip/jimmac/dark-seuggested' into 'master'
...
Adwaita: tone down suggested focus ring for dark
See merge request GNOME/gtk!1843
2020-05-06 18:32:09 +00:00
Matthias Clasen
56e590bd31
widget: Drop the ::size-allocate signal
...
This signal is mainly used for bad things, and we
don't want to emit signals during layout if we can
avoid it.
If you are subclassing, you should either use a
layout manager or override the size_allocate vfunc.
If you are using a GtkDrawingArea or GtkGLArea,
use their ::resize signals to learn about size
changes.
Fixes : #2705
2020-05-06 14:27:45 -04:00
Matthias Clasen
64b673853b
tooltipwindow: Stop using the ::size-allocate signal
...
Instead of connecting to ::size-allocate, call
gtk_native_set_tooltip and rely on the native
to allocate the tooltip window.
2020-05-06 14:27:45 -04:00
Matthias Clasen
3872da535f
tooltipwindow: Drop some dead code
2020-05-06 14:27:45 -04:00
Matthias Clasen
1f0024a7f0
tooltip: Add private api to allocate the window
...
Add private gtk_tooltip_maybe_allocate() function
and use it from GtkWindow and GtkPopover.
This will let us stop using the ::size-allocate signal,
without having to redo all the tooltip management first.
That will happen later.
2020-05-06 14:27:45 -04:00
Emmanuele Bassi
cb94c7d69e
Explicitly update widget a11y bounds when allocating
...
The a11y machinery is using signal subscription to get notified of size
changes and notify listeners in turn. This is suboptimal for a couple of
reasons:
- if something connects to the GtkWidget::size-allocate signal we need
to emit it; currently, we have an optimization in place that will
skip the signal emission if there are no handlers, and it would be
nice to go through the fast path
- the accessibility implementation is part of GTK, and should not go
through additional hoops like any out-of-tree API consumer
2020-05-06 14:27:45 -04:00
Matthias Clasen
82e92582bd
tests: Stop using ::size-allocate
2020-05-06 14:27:45 -04:00
Matthias Clasen
92bcf4c7a7
inspector: Stop using ::size-allocate
...
This signal is going away. Currently, there is no
other way for the inspector to monitor the allocation.
2020-05-06 14:27:45 -04:00
Matthias Clasen
b21a027d10
examples: Use GtkDrawingArea::resize
...
This signal is a replacement for this (ab)use
of the ::size-allocate signal, which is going away.
2020-05-06 14:27:45 -04:00
Matthias Clasen
cad890ee29
gtk-demo: Use GtkDrawingArea::resize
...
This signal is a replacement for this (ab)use
of ::size-allocate.
2020-05-06 14:27:45 -04:00
Matthias Clasen
e4894a69d4
drawingarea: Add a ::resize signal
...
This can be used as a replacement for ::size-allocate
to prepare size-dependent resources, like a backing
surface. It mirrors the GtkGLArea::resize signal.
2020-05-06 14:27:45 -04:00
Matthias Clasen
0aec11f292
a11y: Avoid a gratitious use of ::size-allocate
...
The paned widget has a position property, just
use it.
2020-05-06 14:27:45 -04:00
Matthias Clasen
7280618c7d
cellarea: Cosmetics
...
Remove an occurrence of size-allocate in a comment.
2020-05-06 14:27:45 -04:00
Matthias Clasen
6c8f5f9d17
treeview: Cosmetic change
...
Remove an occurrence of size-allocate in a comment.
2020-05-06 14:27:45 -04:00
Matthias Clasen
91d261a0b3
window: Remove some outdated info from the docs
...
Remove references to ::size-allocate and ::configure-event
from the docs.
2020-05-06 14:27:45 -04:00
Matthias Clasen
77ffc1f9ed
keymap: Remove leftover code
...
When I removed the 0-termination for the entries for
each keyval, I remove the code initializing the key,
but accidentally left the code that adds it to the
array, so gdk_keymap_get_cached_entries_for_keyval
returns one extra, uninitialized value at the end
of the array. Stop doing that.
2020-05-06 14:27:45 -04:00
Matthias Clasen
8ad49b33ed
gestureclick: Drop the area
...
This is a rarely used api, and our general trend has been
to use widgets whenever we need an area singled out.
2020-05-06 14:19:50 -04:00
Georges Basile Stavracas Neto
79d6190684
textchild: Include <gtk/gtkwidget.h>
...
This header is exported, so it needs to include
the gtkwidget.h header with the gtk/ prefix.
This was broken in 289b157e32
2020-05-06 15:13:03 -03:00
Jakub Steiner
edc57e4282
HC: more contrasty focus rings
2020-05-06 19:28:05 +02:00
Matthias Clasen
baf82cdf7a
keymap: Remove leftover code
...
When I removed the 0-termination for the entries for
each keyval, I remove the code initializing the key,
but accidentally left the code that adds it to the
array, so gdk_keymap_get_cached_entries_for_keyval
returns one extra, uninitialized value at the end
of the array. Stop doing that.
2020-05-06 13:15:45 -04:00
Jakub Steiner
3fa691a1ab
Adwaita: tone down suggested focus ring for dark
2020-05-06 19:14:19 +02:00
Jakub Steiner
053617a283
Merge branch 'wip/exalm/focus-entries2' into 'master'
...
Adwaita: Make error/warning entry focus more subtle
See merge request GNOME/gtk!1842
2020-05-06 16:53:14 +00:00
Alexander Mikhaylenko
40926a28ee
Adwaita: Make error/warning entry focus more subtle
...
Add 50% alpha to it like to the main focus color.
2020-05-06 20:23:26 +05:00
Jakub Steiner
e2058aaecd
Merge branch 'wip/jimmac/suggested-destructive-focus' into 'master'
...
Adwaita: suggested destrictive button focus
Closes #2704
See merge request GNOME/gtk!1841
2020-05-06 15:23:01 +00:00
Jakub Steiner
efd009e6d8
Adwaita: suggested destrictive button focus
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2704
2020-05-06 16:12:57 +02:00
Jakub Steiner
b32519966f
Merge branch 'wip/jimmac/global-var' into 'master'
...
Adwaita: make parser happy wrt global variables
Closes #2703
See merge request GNOME/gtk!1840
2020-05-06 13:29:29 +00:00
Matthias Clasen
8bb133072d
Merge branch 'fix-inspector-popover' into 'master'
...
inspector: Fix css tree popovers
See merge request GNOME/gtk!1838
2020-05-06 12:55:18 +00:00
Jakub Steiner
926764be0d
Adwaita: make parser happy wrt global variables
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2703
2020-05-06 14:12:44 +02:00
Matthias Clasen
b96509c030
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!1828
2020-05-06 03:55:55 +00:00
Matthias Clasen
81c68b86ea
inspector: Fix css tree popovers
...
Adding popovers to a treeview doesn't work. Instead,
attach them to the cssnodetree widget, which is using
a layout manager - popovers work in that case.
2020-05-05 23:51:37 -04:00
Matthias Clasen
824c730362
Merge branch 'abolish-destroy' into 'master'
...
Abolish destroy
See merge request GNOME/gtk!1835
2020-05-06 00:37:04 +00:00
Matthias Clasen
a4cfbec5c2
widget: Drop the destroy vfunc
...
We still emit the ::destroy signal, but if you
want a vfunc, use dispose.
2020-05-05 18:25:29 -04:00
Matthias Clasen
84944f1c63
gtk-demo: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:25:29 -04:00
Matthias Clasen
1086acce92
container: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:25:29 -04:00
Matthias Clasen
d03b1524e6
placesview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:25:28 -04:00
Matthias Clasen
82f4b1630c
printunixdialog: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
77d15b1751
window: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
401f8a7f31
treeview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
3d4bb76694
textview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
327da3de9a
statusbar: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
d46252ca21
notebook: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
d2cbc454f6
iconview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
49fcf41693
shortcutssection: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
8baefaf4d8
radiobutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
c60ffeedfa
range: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
c8066bcd8b
spinbutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
9f4cea190a
viewport: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
7639d3daa0
text: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
8683925fe0
modelbutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
4c7cafdba8
label: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
03f145e868
filechooserbutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
1b44a64ef7
expander: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
37e381e95d
combobox: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
e0f95844c1
actionbar: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
539f06147a
Merge branch 'misc-cleanups' into 'master'
...
Misc cleanups
See merge request GNOME/gtk!1832
2020-05-05 21:02:25 +00:00
Matthias Clasen
d2b55dff2d
Merge branch 'wip/exalm/controls-dispose' into 'master'
...
windowcontrols: Unparent children in dispose rather than finalize
See merge request GNOME/gtk!1831
2020-05-05 18:19:00 +00:00
Matthias Clasen
0070cff32d
widget-factory: Use symboli icons in the toolbar
...
That is the style that is commonly used nowadays, even
in traditional apps.
2020-05-05 10:45:47 -04:00
Matthias Clasen
88e890c29c
widget-factory: Remove unused css
...
We no longer show the various frame styles.
2020-05-05 10:45:47 -04:00
Matthias Clasen
e33da18577
window: Lower the visible focus timeout
...
Five seconds felt too long for some people in
initial feedback, so lets lower the timeout to
3 seconds.
2020-05-05 10:45:47 -04:00
Matthias Clasen
cda1a25a5a
assistant: Drop the Private struct
2020-05-05 10:45:47 -04:00
Matthias Clasen
a9103ccd7c
placesview: Drop the Private struct
2020-05-05 10:45:47 -04:00
Matthias Clasen
8effa10e79
searchbar: Drop the Private struct
2020-05-05 10:45:47 -04:00
Alexander Mikhaylenko
7906f09c75
windowcontrols: Unparent children in dispose rather than finalize
2020-05-05 19:43:55 +05:00
Jakub Steiner
4cdb9ed322
Merge branch 'wip/jimmac/notebook-tab-focus' into 'master'
...
Adwaita: notebook tab focus ring
See merge request GNOME/gtk!1830
2020-05-05 13:42:25 +00:00
Matthias Clasen
b74a3de299
Merge branch 'bin-removal' into 'master'
...
Bin removal
See merge request GNOME/gtk!1820
2020-05-05 12:55:50 +00:00
Jakub Steiner
774d61c682
Adwaita: notebook tab focus ring
...
- prelight the tab, not a label (visually)
2020-05-05 13:57:33 +02:00
Jakub Steiner
642924a0f1
Merge branch 'wip/jimmac/oldstyle-toolbars' into 'master'
...
Adwaita: old style toolbar buttons
See merge request GNOME/gtk!1829
2020-05-05 09:53:05 +00:00
Jakub Steiner
d827fe711d
Adwaita: old style toolbar buttons
...
- style toolbar buttons
2020-05-05 10:55:14 +02:00
Timm Bäder
d328374c94
shortcutcontroller: Check for NULL GtkNative of widget
...
And just continue in that case.
2020-05-05 08:20:10 +02:00
Timm Bäder
7f009b9952
label: Be more defensive against non-existant focus_link
2020-05-05 08:20:10 +02:00
Timm Bäder
27b4b5ee32
surface: remove double assignment
2020-05-05 08:20:10 +02:00
Timm Bäder
0e73bfa202
shortcutmanager: Speed up default_remove_controller a bit
...
Only call get_n_items on the model once and remove two unnecessary
casts.
2020-05-05 08:20:10 +02:00
Timm Bäder
fb9b54d4b2
shortcutcontroller: Use a GArray instead of a linked list
2020-05-05 08:20:10 +02:00
Timm Bäder
cdb4d71125
cssprovider: Pass a GtkArray around when matching
...
We just use the resulting GPtrArray to set the values on a GtkCssLookup
and it had mostly a size of 1, in extremes a size of 11.
2020-05-05 08:20:10 +02:00
Timm Bäder
8b4d84981e
gtk.supp: Update
...
Make some rules more general and add some more epoxy/mesa suppressions.
2020-05-05 08:20:10 +02:00
Timm Bäder
4996097219
cssselector: Use a GtkArray to count exact matches
...
The list here is at most 3 elements long in my tests.
2020-05-05 08:20:10 +02:00
Timm Bäder
0c4dcd9d57
add GtkArray
...
Try to use stack space if we can and only fall back to the GPtrArray if
we must.
2020-05-05 08:20:10 +02:00
Timm Bäder
aaecb3d84b
main: Save some type checks
...
We already have the typecheck-less versions of get_realized(),
get_parent() and is_sensitive() in gtkwidgetprivate.h, so use them here.
2020-05-05 08:20:10 +02:00
Timm Bäder
771b3ea6f3
eventcontroller: Remove some unnecessary casts
...
Instead of comparing two GtkWidget*s by casting the two GtkNative*s, we
can as well compare two GtkNative*s. Also if gtk_widget_get_native()
returns NULL, the code previously failed.
2020-05-05 08:20:10 +02:00
Timm Bäder
75e202f02b
widget: Use an unchecked cast in _get_native()
...
This is either no chagne because we know for a fact that the returned
value is a GtkNative - after all thats's the type we pass to
gtk_widget_get_ancestor().
Or it is a bug fix since casting NULL to a GtkNative using GTK_NATIVE()
is not going to work, but the API contract of gtk_widget_get_native()
explicitly allows a NULL return value.
2020-05-05 08:20:10 +02:00
Timm Bäder
94d3fd84b5
window: Remove unused private function
2020-05-05 08:20:10 +02:00
Timm Bäder
a40abcf74d
scalebutton: Shorten finalize() implementation
2020-05-05 08:20:09 +02:00
Timm Bäder
9f90eb41c8
scalebutton: Remove unused click_id member
2020-05-05 08:20:09 +02:00
Timm Bäder
4b9e5304cc
widget: Save controllers list in a GPtrArray
2020-05-05 08:20:09 +02:00
Timm Bäder
ef623aaabc
widget: Only do a IS_ROOT type check if the parent is unset
...
So we do less type checks
2020-05-05 08:20:09 +02:00
Timm Bäder
de40b0b061
placesview: Remove frame
...
We don't need a double border here.
2020-05-05 08:20:09 +02:00
Timm Bäder
356dea3349
cssselector: Avoid some GList allocations
2020-05-05 08:20:09 +02:00
Timm Bäder
63bbc79f48
icontheme: Save dir_mtimes in a GArray, not a GList
2020-05-05 08:20:09 +02:00
Timm Bäder
d80c130d7f
GdkEvent: Save history in a GArray
...
Instead of a less efficient GList.
2020-05-05 08:20:09 +02:00
Timm Bäder
14b27446a3
stylecontext: Remove _list_classes() from public API
...
Applications can use gtk_widget_get_css_classes these days.
2020-05-05 08:20:09 +02:00
Timm Bäder
289b157e32
textchild: Return an array from get_widgets
...
Yay, one GList less.
2020-05-05 08:20:09 +02:00
Timm Bäder
85237c8665
gdkdisplay-wayland: Fix a possibly uninitialized out value
2020-05-05 08:20:09 +02:00
Timm Bäder
61195df7a3
widget: Use early-out style in gtk_widget_realize()
...
This is much more common in the current code base and reduces the
indentation level by one.
2020-05-05 08:20:09 +02:00
Timm Bäder
ce07c0559d
shorthandproperty: Use alloca() when parsing properties
2020-05-05 08:20:09 +02:00
Timm Bäder
f4edbdfc1f
shorthandproperty: Return unset/initial/inherit as-is
...
We don't even need an array value these days.
2020-05-05 08:20:09 +02:00
Timm Bäder
526187d36c
shorthandproperty: Use alloc a for data array
2020-05-05 08:20:09 +02:00
Timm Bäder
96673d5106
popover: Remove an unused gtk_widget_get_allocation() call
2020-05-05 08:20:09 +02:00
Timm Bäder
88f5d4547c
label: Remove a debug leftover
2020-05-05 08:20:09 +02:00
Timm Bäder
34976a791c
gskpango: Make get_color a bit shorter
...
Don't copy from crenderer->fg_color just to override from the local
color again.
2020-05-05 08:20:09 +02:00
Timm Bäder
ad73afcd79
label: Unref style_attrs list
2020-05-05 08:20:09 +02:00
Matthias Clasen
4735d38e31
docs: Fixup for an uninitialized variable
2020-05-04 22:53:08 -04:00
Matthias Clasen
17c21513a8
testsuite: Update a testcase
...
Our testcase for flipping icons used media icons which
were recently changed to not do rtl flipping anymore.
2020-05-04 22:53:08 -04:00
Matthias Clasen
3c165b3b77
Drop GtkBin
...
It is no longer used anywhere.
2020-05-04 22:53:08 -04:00
Matthias Clasen
cac514f647
testtooltips: Derive demo from GtkWidget
2020-05-04 22:53:08 -04:00
Matthias Clasen
8d0773fad0
inspector: Derive recorder from GtkWidget
2020-05-04 22:53:08 -04:00
Matthias Clasen
fa848e94d2
gtk-demo: Port blur demo from GtkBin
2020-05-04 22:53:08 -04:00
Matthias Clasen
d8e47383cb
Add a test for bin child conversion
2020-05-04 22:53:08 -04:00
Matthias Clasen
dec5707ca9
builder-tool: Convert former bin children
...
Convert from <child> elements to <property name="child">
for former GtkBin subclasses. Update test results
to match.
2020-05-04 22:53:08 -04:00
Matthias Clasen
0ec5a3f0d9
tooltipwindow: Derive from GtkWidget
2020-05-04 22:53:08 -04:00
Matthias Clasen
aae25c4fa0
combobox: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
ec394e805b
Use gtk_combo_box_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
5d26af06e4
combobox: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
44f9a51827
testkineticscrolling: Make this work again
...
There was an errant g_free here, and lots of
redundant gtk_widget_show.
2020-05-04 22:53:08 -04:00
Matthias Clasen
e2781af16f
testgtk: Fix g_object_new use
...
This is the kind of thing that happens with varargs apis.
2020-05-04 22:53:08 -04:00
Matthias Clasen
b96d7b62d1
Add gtk_overlay_remove_overlay
...
Now that GtkOverlay is not a container anymore,
gtk_container_remove can't be used for this anymore,
so add a separate api.
2020-05-04 22:53:08 -04:00
Matthias Clasen
edd5d36159
overlay: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
77af8e303d
Use gtk_overlay_set_child throughout
...
Replace all uses of gtk_container_add on overlays
by gtk_overlay_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
53f9737dcf
overlay: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
3a9883b3ca
searchbar: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for search bars.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
99ef14b59f
Use gtk_search_bar_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
e2abe6dd29
searchbar: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
12ecbd1508
listboxrow: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
b8d1a9eb0d
flowboxchild: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
41322e2a7a
revealer: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
649ae635a7
Use gtk_revealer_set_child throughout
...
Replace all uses of gtk_container_add on revealers
with gtk_revealer_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
686be577d5
revealer: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
9a65ed9ada
window: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
Update the accessible implementation to match, remove
remnants of container implementations in GtkWindow
subclasses, and fix livecycle issues around destroy
vs dispose in GtkAssistant.
After this commit, using gtk_container_add on window
subclasses is not allowed anymore, but adding childing
with <child> in ui files still works.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
f59f355190
Use gtk_window_set_child throughout
...
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
b9b1bf85e1
window: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
4aa5fba0b5
button: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for buttons.
See #2681
2020-05-04 22:53:07 -04:00
Matthias Clasen
97d0e8c6e0
css testsuite: Remove an obsolete test
...
This was testing something that shouldn't be possible
anyway: Adding more than one child to a bin. With the
bin removal, this now just overrides the child so
only one child is left in the end.
Just remove the test.
2020-05-04 22:53:07 -04:00
Matthias Clasen
07441ad000
css tests: Update expected results
...
Now that GtkCheckButton is using a box layout,
we are no longer reordering the css nodes according
to text direction.
2020-05-04 22:53:07 -04:00
Matthias Clasen
183431c918
checkbutton: Modernize
...
Stop implementing GtkContainer, and just use a box layout
instead of doing our own thing manually.
2020-05-04 22:53:07 -04:00
Matthias Clasen
af6e0ee2b3
Use gtk_button_set_child throughout
...
Replace all uses of gtk_container_add on buttons
by gtk_button_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
04e4a02cd0
button: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
9d7b77f874
scrolledwindow: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for aspect
frames.
See #2681
2020-05-04 22:53:07 -04:00
Matthias Clasen
67759d4c3e
Use gtk_scrolled_window_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_scrolled_window_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
54b613392b
scrolledwindow: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
ee1f8d8d06
popover: Derive from GtkWidget
2020-05-04 22:53:07 -04:00
Matthias Clasen
8e261056b9
Use gtk_popover_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_popover_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
ee284a560a
popover: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
e098ffb88d
viewport: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable in order to keep
the <child> element working for viewports in ui files.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
e9ddf0fda5
Use gtk_viewport_set_child throughout
...
Replace all uses of gtk_container_add on viewports
by gtk_viewport_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
937c94bab5
viewport: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
71433d01b3
aspect frame use fixup
2020-05-04 17:01:18 -04:00
Matthias Clasen
4a133b4eef
fishbow: fixup premature popover
2020-05-04 17:01:18 -04:00
Matthias Clasen
5b06b08a0e
aspectframe: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for aspect
frames.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
1f63896c6b
Use gtk_aspect_frame_set_child throughout
...
Replace all uses of gtk_container_add on aspect frames
by gtk_aspect_frame_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
e137152520
aspectframe: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
25826eafe3
frame: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
1706b80815
Use gtk_frame_set_child throughout
...
Replace all uses of gtk_container_add for
frames with gtk_frame_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
7f975472a7
frame: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
8c1072fad1
Merge branch 'wip/jimmac/notebook-focus' into 'master'
...
Adwaita: notebook tab focus
See merge request GNOME/gtk!1825
2020-05-04 20:10:46 +00:00
Matthias Clasen
188a61f02d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1826
2020-05-04 19:02:40 +00:00
Jakub Steiner
2d1b7d128e
Merge branch 'wip/jimmac/colorswatch-fix' into 'master'
...
Adwaita: colorswatch focus rings
Closes #2695
See merge request GNOME/gtk!1827
2020-05-04 18:07:38 +00:00
Jakub Steiner
9dfac6fe3f
Adwaita: colorswatch focus rings
...
- there used to be different outline color for light and dark buttons,
but it's complexity I can live without. blue focus rings fit all.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2695
2020-05-04 18:16:08 +02:00
Jakub Steiner
a3f042b5b4
Adwaita: notebook tab focus
...
- just like entries tabs need to be handled with focus-within
2020-05-04 17:54:12 +02:00
Jakub Steiner
d62e2faee6
Merge branch 'wip/exalm/entries' into 'master'
...
Adwaita: Convert entries to the new focus rings
See merge request GNOME/gtk!1824
2020-05-04 15:14:55 +00:00
Matthias Clasen
53d86d411a
Adwaita: Style .toolbar
...
We don't have GtkToolbar anymore, so we are more likely
to meet a .toolbar style class, than a toolbar element.
2020-05-04 10:51:11 -04:00
Matthias Clasen
8bd2043a40
widget-factory: Add .toolbar
...
We dropped GtkToobar, but we still want to present
something that looks the part here, so add a style
class.
2020-05-04 10:50:34 -04:00
Alexander Mikhaylenko
d2b5beffbf
Adwaita: Convert entries to the new focus rings
2020-05-04 19:24:24 +05:00
Daniel Mustieles
d64d46912e
Updated Spanish translation
2020-05-04 15:52:57 +02:00
Matthias Clasen
837b141747
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1823
2020-05-04 12:31:25 +00:00
Matthias Clasen
92ac66f16a
testframe: Drop padding
...
No need to emulate features that GtkFrame no longer has.
2020-05-04 07:37:38 -04:00
Matthias Clasen
130ae89e54
frame: Fix xalign handling
...
SEtting a nonzero xalign on frames had no
effect, since we were always using the full
allocation with here, instead of what the label
needs. Found by using testframe for a second.
2020-05-04 07:37:31 -04:00
Matthias Clasen
77cf6cd406
frame: Don't queue a resize if xalign changes
...
We only need to allocate children in this case.
While we touch it, rewrite the setter to modern
style.
2020-05-04 07:37:25 -04:00
Jakub Steiner
2dcb2400d1
Merge branch 'wip/jimmac/avoid-wobbly-windows' into 'master'
...
Adwaita: make transition offset more subtle
See merge request GNOME/gtk!1822
2020-05-04 10:24:32 +00:00
Jakub Steiner
8127d70b8a
Adwaita: make transition offset more subtle
...
- be less like wobbly windows
2020-05-04 11:29:19 +02:00
Jakub Steiner
ab0ad4a0d7
Merge branch 'wip/jimmac/emphasize-focus-change' into 'master'
...
Adwaita: bring more attention to focus change
See merge request GNOME/gtk!1803
2020-05-04 08:49:40 +00:00
Cheng-Chia Tseng
05ad3c543a
Update Chinese (Taiwan) translation
2020-05-03 13:29:03 +00:00
Matthias Clasen
b4d5ddcae5
Merge branch 'filechooser-translation' into 'master'
...
filechooser: Translate type column
Closes #2690
See merge request GNOME/gtk!1816
2020-05-03 01:10:24 +00:00
Matthias Clasen
817112ab3c
filechooser: Translate type column
...
When the code for this was copied from nautilus,
we forgot to adapt it for running in a library
instead of an application - gettext() doesn't work
in a library.
Fixes : #2690
2020-05-02 19:57:38 -04:00
Matthias Clasen
0b4a1bb62f
Merge branch 'wip/exalm/subtitle' into 'master'
...
appchooserdialog: Don't show subtitle label when subtitle is null
See merge request GNOME/gtk!1815
2020-05-02 20:06:08 +00:00
Alexander Mikhaylenko
80867acf94
appchooserdialog: Don't show subtitle label when subtitle is null
...
Looks like 67822d0c9a
and
3f1bd3722d
collided, and subtitle can be null
now. Add a check so that we don't end up with empty label in that case.
2020-05-02 23:35:44 +05:00
Yuri Chornoivan
32740a720a
Update Ukrainian translation
2020-05-02 06:27:02 +00:00
Matthias Clasen
fd1fe0eed5
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add more detail to the drawing overview
See merge request GNOME/gtk!1811
2020-05-01 21:09:38 +00:00
Benjamin Otte
fa90747815
Merge branch 'wip/exalm/headerbar-title' into 'master'
...
Headerbar title/subtitle cleanups
See merge request GNOME/gtk!1807
2020-05-01 19:39:27 +00:00
Asier Sarasua Garmendia
c31431c5fa
Update Basque translation
2020-05-01 19:25:55 +00:00
Matthias Clasen
e393465fd7
widget-factory: Fix a typo
...
We wanted to move the conflicting global shortcuts
to the bubble phase, so they don't override the
entry bindings.
2020-05-01 14:24:21 -04:00
Matthias Clasen
8653a5e27b
dragicon: Derive from GtkWidget
...
This wasn't meant to derive from GtkContainer.
2020-05-01 14:24:21 -04:00
Matthias Clasen
431545877e
docs: Add more detail to the drawing overview
2020-05-01 14:24:21 -04:00
Matthias Clasen
c3c2bc513e
Merge branch 'for-master' into 'master'
...
appchooserdialog: Don't show broken subtitles
See merge request GNOME/gtk!1809
2020-05-01 18:13:12 +00:00
Alexander Mikhaylenko
ab59562170
headerbar: Document GtkBuilder child types, add a title example
2020-05-01 21:39:32 +05:00
Florian Müllner
3f1bd3722d
appchooserdialog: Don't show broken subtitles
...
Commit 07beb6dba2
made GtkAppChooserWidget useful with no content-type,
however when used in a GtkAppChooserDialog, this will lead to a confusing
"Opening (null) files" subtitle.
Fix this by omitting the subtitle altogether in that case.
2020-05-01 18:21:53 +02:00
Matthias Clasen
120f13c95d
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Some revisions of the input overview
See merge request GNOME/gtk!1808
2020-05-01 16:02:43 +00:00
Yuri Chornoivan
4822e02be3
Update Ukrainian translation
2020-05-01 15:56:57 +00:00
Alexander Mikhaylenko
6b4bed2c7a
builder-tool: Rename GtkHeaderBar:custom-title to title-widget
...
Add a test.
2020-05-01 20:11:19 +05:00
Alexander Mikhaylenko
739f681076
headerbar: Rename custom-title to title-widget
...
Now that all the other title-related properties are gone, custom title can
have a more mundane name.
2020-05-01 20:11:19 +05:00
Alexander Mikhaylenko
c2e4e1af73
headerbar: Remove user-settable title
...
Use window title, or custom title widget if it's set. Remove 'title'
property.
Update demos and tests to set the title on the window instead of
headerbar.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
35d50f88c8
headerbar: Remove subtitle
...
Also remove the box containing title and subtitle, as there's only one
label now.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
fa0509c473
filechooserdialog: Create title and subtitle manually
...
title and subtitle properties will go away in the following commits, stop
using them.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
67822d0c9a
appchooserdialog: Create title and subtitle manually
...
title and subtitle properties will go away in the following commits, stop
using them.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
43a453e465
headerbar: Remove has-subtitle property
...
Subtitle will go too in the next commit, but has-subtitle goes first as
it's broken right now anyway.
2020-05-01 19:48:05 +05:00
Matthias Clasen
74dcbae1f3
docs: Some revisions of the input overview
...
Remove some less than accurate details, and add
an illustration.
2020-05-01 09:26:06 -04:00
Matthias Clasen
850549ba83
Merge branch 'matthiasc/for-master' into 'master'
...
Keynav improvements for widget-factory
See merge request GNOME/gtk!1804
2020-05-01 12:02:13 +00:00
Piotr Drąg
689673188b
Update POTFILES.in and POTFILES.skip
2020-05-01 11:56:37 +02:00
Matthias Clasen
b1bedbc71a
widget-factory: Improve demo keynav
...
We have example cut/copy/paste actions for which we want
the usual shortcuts to show up in the menus, but they should
not break the expected shortcuts in entries. So, move them
to a capture phase shortcut controller.
2020-04-30 20:08:15 -04:00
Matthias Clasen
f31c85ff99
widget-factory: Add mnemonics to the stack pages
2020-04-30 19:18:09 -04:00
Matthias Clasen
cb056a1e8f
stack: Add a :use-underline property
...
Add GtkStackPage:use-underline, and use it when
constructing labels in the stack switcher.
2020-04-30 19:17:34 -04:00
Matthias Clasen
57bf4ac59a
Merge branch 'speed-up-event-matching' into 'master'
...
keymap: Cache key info
See merge request GNOME/gtk!1800
2020-04-30 22:57:33 +00:00
Jakub Steiner
8165616b3c
Adwaita: bring more attention to focus change
...
- as discussed in https://gitlab.gnome.org/GNOME/gtk/-/issues/2644 it's desirable to bring attention to what's focused. Instead of pressing `alt` just simply changing focus with `tab` can have a similar effect
Extends https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1802
2020-05-01 00:14:44 +02:00
Jakub Steiner
e3b9f9a3bf
Merge branch 'theme-focus-ring-mixin' into 'master'
...
Adwaita: Use a mixin for visible focus rings
Closes #2653
See merge request GNOME/gtk!1802
2020-04-30 18:35:57 +00:00
Matthias Clasen
99c3928cec
keymap: Cache key info
...
We currently calling gdk_display_map_keyval up to
once per key event per shortcut trigger, and that function
does an expensive loop over the entire keymap and
allocates an array. Avoid this by caching the entries
in a single array, and have a lookup table for finding
the entries for a keyval.
To do this, change the GdkKeymap.get_entries_for_keyval
signature, and change the ::keys-changed signal to be
RUN_FIRST, since we want to clear the cache in the class
handler before running signal handlers. These changes are
possible now, since keymaps are no longer public API.
2020-04-30 13:05:52 -04:00
nana-4
2fa876e839
Adwaita: Use a mixin for visible focus rings
...
The focus-ring() mixin allows we to flexibly style the focus ring for
each widget. By using this, we can get rid of the "Outlines" section,
which is out of place in the _common.scss file.
This commit also has the following changes:
- Transition the focus rings on most widgets.
- Add a missing focus ring to iconview.
- Move the expander-widget focus ring to its title.
- Move the notebook focus ring to its checked tab.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2653
2020-05-01 02:03:23 +09:00
Daniel Mustieles
700a2df110
Updated Spanish translation
2020-04-30 12:53:45 +02:00
Daniel Mustieles
efa4174828
Updated Spanish translation
2020-04-30 12:53:01 +02:00
Matthias Clasen
e5c430266e
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Move menu model docs
See merge request GNOME/gtk!1799
2020-04-30 01:31:36 +00:00
Matthias Clasen
3bbcaa9e8f
docs: Move menu model docs
...
It makes more sense to document the menu model XML
format in the GtkPopoverMenu docs than in
GtkApplicationWindow.
2020-04-29 20:30:40 -04:00
Matthias Clasen
11351eb76b
Merge branch 'win32-new-runner' into 'master'
...
CI: Switch to new Windows runners
See merge request GNOME/gtk!1797
2020-04-29 22:14:09 +00:00
Yuri Chornoivan
062f0fe0b2
Update Ukrainian translation
2020-04-29 20:16:31 +00:00
Yuri Chornoivan
02ac248541
Update Ukrainian translation
2020-04-29 20:15:38 +00:00
Christoph Reiter
662539acf7
CI: Switch to new Windows runners
...
They use powershell instead of cmd.exe, use the tag win32-ps instead of win32,
and run Windows 2016 instead of 2012r2.
The old runners will be switched off in the comming weeks.
2020-04-29 20:12:34 +02:00
Matthias Clasen
4a44c1b7bf
Merge branch 'soundcheck' into 'master'
...
Add a quick sound test
See merge request GNOME/gtk!1796
2020-04-29 15:29:02 +00:00
Matthias Clasen
f8ef15b555
Add a quick sound test
...
Just to show that our media infrastructure is up
to playing little beeps and bings.
2020-04-29 10:54:40 -04:00
Emmanuele Bassi
76cc1cae00
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!1795
2020-04-29 13:39:44 +00:00
Emmanuele Bassi
1b64a17547
docs: Link the license file from the README
2020-04-29 12:49:35 +01:00
Emmanuele Bassi
f1741584e6
docs: Link the contribution guide from the README
...
Hopefully people will read it.
2020-04-29 12:49:05 +01:00
Emmanuele Bassi
55d2f190ef
docs: Update link to the discussion forum
...
The README file still links to the old web page about mailing lists; the
link is now a 404 after the website redesign, and we don't use mailing
lists any more, in favour of Discourse.
2020-04-29 12:47:57 +01:00
Matthias Clasen
3209d0f937
Merge branch 'wip/jtojnar/join-paths' into 'master'
...
build: clean up .pc generation
See merge request GNOME/gtk!1793
2020-04-29 11:34:07 +00:00
Chun-wei Fan
d0a8d263ac
gtk/gtkaccelgroup.c: Fix build on Visual Studio
...
Visual Studio does not allow one to initialize structure members with
non-constant expressions, caused by using strlen(s), so fix this by
using sizeof(s) - 1 instead.
2020-04-29 15:02:03 +08:00
Jan Tojnar
6d9db8610e
build: clean up .pc generation
...
Path concatenation is much nicer than the unwieldy format method.
Since paths returned by get_option are relative to prefix, they will be joined as before.
As a bonus, this fixes weird platforms like NixOS that actually pass absolute includedir under a different prefix.
2020-04-29 07:42:53 +02:00
Matthias Clasen
ac3d3c647e
Merge branch 'popup-positioning-fix' into 'master'
...
popover: Fix repositioning logic
See merge request GNOME/gtk!1792
2020-04-29 04:47:39 +00:00
Matthias Clasen
91d8c230f3
popover: Fix repositioning logic
...
When the arrow changes position, we need to queue
an allocation to ensure that gtk_widget_allocate
actually calls our ->size_allocate vfunc.
2020-04-28 23:26:19 -04:00
Matthias Clasen
b47e721ab6
Merge branch 'class-action-init' into 'master'
...
Reshuffle action muxer initialization
See merge request GNOME/gtk!1789
2020-04-29 02:04:37 +00:00
Matthias Clasen
0a2e0775b6
Merge branch 'drop-stack-homogeneous' into 'master'
...
Drop stack homogeneous
Closes #2673
See merge request GNOME/gtk!1791
2020-04-29 00:55:01 +00:00
Matthias Clasen
c4a47e218f
Speed up class action hookup
...
No need to construct a detailed signal name for
every action when we can just look up the signal ID
once and use the quark that the GParamSpec already
has. Also, we don't need to loop over the actions
every time we get a notification.
2020-04-28 20:22:26 -04:00
Matthias Clasen
2e2121c7ad
builder-tool: Replace GtkStack:homogeneous
...
Replace this property by h/vhomogeneous.
Add a test.
2020-04-28 20:00:51 -04:00
Matthias Clasen
5f01f6f36b
Drop GtkStack:homogeneous
...
We have hhomogeneous and vhomogeneous properties
that can be set individually.
Fixes : #2673
2020-04-28 20:00:12 -04:00
Matthias Clasen
5ec53e6a11
Merge branch 'popup-controls-hiding' into 'master'
...
video: Don't hide the controls while the popup is shown
See merge request GNOME/gtk!1787
2020-04-28 22:41:16 +00:00
Matthias Clasen
b968ced567
Reshuffle action muxer initialization
...
We were having a problem where property actions were
not getting state updates because prop_actions_connect
was triggered from some instance_init function while
the widget class is not in place yet.
Delay that call until the widget is fully constructed,
so we can guarantee that we are dealing with the
correct class private struct, and see all class actions.
2020-04-28 18:37:43 -04:00
Matthias Clasen
3fee02808b
Merge branch 'widget-factory-larger-logo' into 'master'
...
Widget factory larger logo
See merge request GNOME/gtk!1786
2020-04-28 20:29:36 +00:00
Matthias Clasen
dc7081599d
video: Don't hide the controls while the popup is shown
...
We don't get motion events from the popup (due to grabs),
so just don't hide as long as we're grab shadowed. This
makes the controls stay up until the volume popup is
dismissed.
2020-04-28 15:11:26 -04:00
Matthias Clasen
ccb890f065
Use a slightly larger version of the logo animation
...
This is large enough to not make the media controls
slider shrink to nothing.
2020-04-28 14:00:52 -04:00
Daniel Mustieles
6784772c9d
Updated Spanish translation
2020-04-28 17:49:39 +02:00
Emmanuele Bassi
65c56ea812
Merge branch 'drop-realize-invariant' into 'master'
...
Drop parent->realized => child->realized invariant
See merge request GNOME/gtk!1783
2020-04-28 14:11:55 +00:00
Emmanuele Bassi
064eb6a87f
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!1782
2020-04-28 13:06:26 +00:00
Alexander Larsson
c6104fe7fd
Drop parent->realized => child->realized invariant
...
We already dropped this invariant in gtk_widget_verify_invariants()
because it was not true in all cases. Also, it is not really useful
these days as we extended what it means to be a "child" to also
include widgets in different toplevels.
For example, a popup in a popup button need not be realized just
because the button is in a realized window. The main invariants
we want are:
* Parent is realized before child
* Widget is realized before it is mapped
This sounds like its not a huge deal, but in fact it is a massive win
for things like menus, because when we go between menus in a menubar
each switch between two open menus involves a lot of intermingled
crossing events to different surfaces and for each of these the
tooltip window of the toplevel gets assigned to the new surface. This
shouldn't be a huge deal, as the tooltip window is not even visible,
but due to the realized invariant it get re-realized each time it gets
re-assigned.
2020-04-28 14:32:57 +02:00
Emmanuele Bassi
555230ec9c
Annotate more functions returning GListModel
...
Now that we can have an element-type annotation, we should use it where
needed.
2020-04-28 13:31:59 +01:00
Emmanuele Bassi
2a11f5f889
Use attributes instead of element-type annotation
...
The `element-type` annotation is for GList and GSList only, and turns
out adding support for GListModel in gobject-introspection breaks Vala
and the GIR for GIO.
Instead of using `element-type`, we can use the `attributes` annotation,
which is ignored by code generators based on the GIR data.
2020-04-28 13:31:29 +01:00
Matthias Clasen
f66950f48c
Merge branch 'inspector-media' into 'master'
...
Inspector media
See merge request GNOME/gtk!1781
2020-04-28 05:25:50 +00:00
Matthias Clasen
5477c1cdfe
inspector: Show the media backend
2020-04-28 00:37:54 -04:00
Matthias Clasen
75c75e001c
mediafile: Privately export function to the extension
...
We want to show this information in the inspector.
2020-04-28 00:37:54 -04:00
Matthias Clasen
af32092f16
Merge branch 'popover-flip-arrow-fix' into 'master'
...
popover: Allocate after setting final_position
Closes #2671
See merge request GNOME/gtk!1780
2020-04-28 03:42:01 +00:00
Matthias Clasen
b54ef5c398
Merge branch 'menu-section-title-fixup' into 'master'
...
popovermenu: Don't put a separator before the first section
Closes #2672
See merge request GNOME/gtk!1779
2020-04-28 01:55:24 +00:00
Matthias Clasen
473709fee3
popover: Allocate after setting final_position
...
When we find out that we've been flipped, set
final_position and final_rect before allocating
the popover. This prevents 'smashed-in beak' disease.
Fixes : #2671
2020-04-27 20:58:03 -04:00
Matthias Clasen
a837b57849
popovermenu: Don't put a separator before the first section
...
When we have section titles, we were not hiding the
separator before the first section as we should;
fix this.
Fixes : #2672
2020-04-27 20:27:39 -04:00
Matthias Clasen
12adf6362f
Merge branch 'matthiasc/for-master' into 'master'
...
widget-factory: Enable page transitions by default
See merge request GNOME/gtk!1777
2020-04-27 23:15:40 +00:00
Matthias Clasen
80185b0f2a
widget-factory: Enable page transitions by default
...
No need to make this an easter egg.
2020-04-27 14:33:07 -04:00
Daniel Mustieles
99dd33a9a3
Updated Spanish translation
2020-04-27 18:14:43 +02:00
Matthias Clasen
789586c385
Merge branch 'BUG_filechooser_async_data_loss_GTK4' into 'master'
...
GtkFilechooserWidget: prevent oblivious selection of file
See merge request GNOME/gtk!1688
2020-04-27 13:22:47 +00:00
Matthias Clasen
bedf3a2db9
Merge branch 'wip/exalm/tnum' into 'master'
...
mediacontrols: Use tabular figures for time and duration
See merge request GNOME/gtk!1774
2020-04-27 12:59:35 +00:00
Alexander Mikhaylenko
422c78badf
mediacontrols: Use tabular figures for time and duration
...
In particular, this prevents gtk4-widget-factory from jumping every
second.
2020-04-27 17:28:20 +05:00
Matthias Clasen
b3710279bc
Merge branch '2657-avoid-use-after-free-suggestion' into 'master'
...
Resolve "Use-after-free crash in `thaw_updates()`"
Closes #2657
See merge request GNOME/gtk!1771
2020-04-27 12:16:54 +00:00
Matthias Clasen
5a25c7fd64
Merge branch 'matthiasc/for-master' into 'master'
...
Miscellaneous bug fixes
Closes #2666 and #2016
See merge request GNOME/gtk!1773
2020-04-27 12:11:37 +00:00
Matthias Clasen
429e0bfaec
filechooser: Correct an annotation
...
Clarify that gtk_file_chooser_add_filter is only taking
ownership of a floating reference, which translates to
"transfer none", not "transfer full".
Fixes : #2016
2020-04-27 00:35:47 -04:00
Matthias Clasen
fc450e313b
placesview: Fix translator comments
...
These comments were applied to the wrong strings
by xgettext.
Fixes : #2666
2020-04-27 00:23:49 -04:00
Matthias Clasen
f18eef7e6f
filechooser: Fix type-to-search
...
We need to capture the keys and forward them
to the search entry, for anything to happen.
2020-04-27 00:14:38 -04:00
Matthias Clasen
bf1a9b2b0d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1772
2020-04-27 03:30:30 +00:00
Matthias Clasen
a3368ab7e9
widget-factory: Revamp transition effects
...
Use a quick crossfade for the main pages, and use
the rotation for the small stack on page 2, where
it looks less out of place.
2020-04-26 22:30:34 -04:00
Matthias Clasen
1ae898bf0b
gtk-demo: Add a shortcuts window
...
Its not very impressive here, but still good to have.
2020-04-26 22:14:10 -04:00
Matthias Clasen
91c7b24815
icon-browser: Add a gear menu
...
Add an about dialog, and make the inspector available.
2020-04-26 22:00:18 -04:00
Matthias Clasen
af2903d263
widget-factory: Improve the textview on page 3
...
Remove an extra frame, make the buttons linked, and
add tooltips.
2020-04-26 21:13:16 -04:00
Matthias Clasen
9ca2a09427
widget-factory: Move the password entry
...
Move the password entry to the other entries. That
fits the overall organization better, and makes all
the typographical styles fit.
2020-04-26 20:54:09 -04:00
Matthias Clasen
50b930fb1c
widget-factory: Make the list on page 2 grow to the bottom
...
Add a few more items to the list to make it fill up the space.
2020-04-26 20:35:51 -04:00
Matthias Clasen
3ed285ab71
widget-factory: Show typographical style classes
...
This nicely fills the gap on page 1.
2020-04-26 20:25:11 -04:00
Matthias Clasen
34862dbbb6
gtk-demo: Include pango version in about dialog
...
This is useful information.
2020-04-26 20:02:10 -04:00
Matthias Clasen
1bdaa99347
widget-factory: Include pango version in about dialog
...
This is useful information.
2020-04-26 20:01:31 -04:00
Matthias Clasen
ad22c463b8
widget-factory: Add a password entry
...
Thats a new widget that was missing.
2020-04-26 19:34:36 -04:00
Emmanuele Bassi
62d98ac60c
Merge branch 'patch-1' into 'master'
...
Remove a "-" from comment
See merge request GNOME/gtk!1770
2020-04-26 21:42:10 +00:00
Peter Bloomfield
b9155dcb1a
file-system-model: Refactor a helper
...
Push more common code into the helper for
gtk_file_system_model_query_done() and
gtk_file_system_model_one_query_done().
2020-04-26 17:38:49 -04:00
Peter Bloomfield
d85f02a994
file-system-model: Avoid use-after free
...
This is a possible fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/2657
Use a NULL return from g_file_query_info_finish() to detect cancellation
of the query, and avoid derferencing a stale pointer.
2020-04-26 16:47:23 -04:00
scootergrisen
01ebd00f97
Remove a "-"
2020-04-26 20:44:04 +00:00
Matthias Clasen
7da995da1d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1768
2020-04-26 20:24:37 +00:00
Matthias Clasen
dc99a7aa61
stackswitcher: Drop the Private struct
2020-04-26 15:48:46 -04:00
Matthias Clasen
508ed21786
progressbar: Drop the Private struct
2020-04-26 15:44:44 -04:00
Matthias Clasen
2356c9b503
overlay: Drop the Private struct
2020-04-26 15:38:09 -04:00
Matthias Clasen
bf77694557
linkbutton: Drop the Private struct
2020-04-26 15:38:09 -04:00
Matthias Clasen
5bd2b49064
fontchooserdialog: Drop the Private struct
2020-04-26 15:38:09 -04:00
Matthias Clasen
a78e0f1188
fontchooserwidget: Drop the Private struct
2020-04-26 15:38:09 -04:00
Matthias Clasen
7ede3b919c
calendar: Drop the Private struct
2020-04-26 15:38:09 -04:00
Matthias Clasen
2ea7f47089
separator: Drop the Private struct
2020-04-26 15:38:09 -04:00
Matthias Clasen
9156be6bf1
viewport: Drop the Private struct
2020-04-26 15:38:09 -04:00
Matthias Clasen
0b6cd34b1d
Merge branch 'matthiasc/for-master' into 'master'
...
widget-factory improvements
See merge request GNOME/gtk!1767
2020-04-26 19:20:47 +00:00
Matthias Clasen
e1b25eaf5a
wayland: Fall back to an unthemed default cursor
...
In the absence of icon themes (such as in a freshly
created toolbox container), we should not just fall back
to "no cursor", since that makes it hard even to close
the application. Fall back to an included default cursor
of last resort.
2020-04-26 14:42:45 -04:00
Matthias Clasen
7eeeb3f229
gdk: Include a default cursor as resource
...
Provide a fallback cursor of last resort. Otherwise,
we end up with no visible cursor if there is no
cursor theme installed, wihch is less than helpful.
2020-04-26 14:41:52 -04:00
Matthias Clasen
7ca8efa0f5
vulkan: Update error codes enum
...
Do the silly update exercise.
2020-04-26 14:08:40 -04:00
Matthias Clasen
9f579edfdb
widget-factory: Put a video widget in
...
The designers wanted the frame column gone for a long
time, since inset/outset/groove etc are not the coolest
features anymore.
Keep one frame, and put a GtkVideo in it.
This opens up some real estate on page 1. Suggestions
welcome for how to fill it.
2020-04-26 14:08:40 -04:00
Matthias Clasen
2dfd1404ff
inspector: Make the resource tab play videos
...
We can do this easily, so why not. This can be
seen in action with gtk-logo.webm, e.g. in gtk4-demo.
2020-04-26 14:08:40 -04:00
Matthias Clasen
f6af2d63b0
widget-factory: Implement the print action
...
Implement enough here to show a print dialog.
2020-04-26 14:08:35 -04:00
Matthias Clasen
764e43b871
Merge branch 'wip/exalm/windowcontrols-fix' into 'master'
...
Adwaita: remove margin from GtkWindowControls when empty
See merge request GNOME/gtk!1766
2020-04-26 16:11:49 +00:00
Alexander Mikhaylenko
7874b29ec2
Adwaita: remove margin from GtkWindowControls when empty
2020-04-26 20:24:20 +05:00
Matthias Clasen
8de774dde1
widget-factory: Make print a window action
...
We want to pass the parent window when opening
a print dialog, so this is naturally a window
action.
2020-04-26 10:45:40 -04:00
Matthias Clasen
a8e04ee81d
Merge branch 'matthiasc/for-master' into 'master'
...
More reftest fixes
See merge request GNOME/gtk!1765
2020-04-26 14:30:10 +00:00
Matthias Clasen
8410e6f129
widget-factory: Some cosmetics
...
Hook the Print button on page 3 up to the app.print
action. This doesn't do anything now, but we might
use it to show a print dialog.
2020-04-26 10:02:11 -04:00
Matthias Clasen
ecf8e6f692
widget-factory: Improve the layout on page 3
...
Make the entries in the third column expand,
to align things.
2020-04-26 10:00:14 -04:00
Matthias Clasen
dde32b5098
reftests: Remove window-show-contents-on-map from xfails
...
This test passes now.
2020-04-26 09:47:16 -04:00
Matthias Clasen
2571a2af18
reftests: Fix the window-show-contents-on-map test
...
Despite the name, the test was not in fact showing
contents on map anymore, since widgets are visible
by default. Setting visible to FALSE makes the test
work as expected again.
2020-04-26 09:47:16 -04:00
Matthias Clasen
fa2a8ac1bb
reftests: Remove window-show-contents-on-map from xfails
...
This test passes now.
2020-04-26 09:18:54 -04:00
Matthias Clasen
ccc38746d5
Merge branch 'clipboard-demo-fixes' into 'master'
...
More gtk-demo fixes
See merge request GNOME/gtk!1764
2020-04-26 13:17:42 +00:00
Matthias Clasen
56565b12d8
reftests: Fix the window-show-contents-on-map test
...
Despite the name, the test was not in fact showing
contents on map anymore, since widgets are visible
by default. Setting visible to FALSE makes the test
work as expected again.
2020-04-26 09:16:25 -04:00
Matthias Clasen
7f1e82d1bc
Merge branch 'wip/exalm/titlebuttons' into 'master'
...
GtkWindowControls + GtkHeaderBar cleanups
See merge request GNOME/gtk!1755
2020-04-26 13:09:35 +00:00
Alexander Mikhaylenko
b5d61eb2c8
docs: Add GtkWindowControls to docs
2020-04-26 15:13:15 +05:00
Alexander Mikhaylenko
5321f8f195
headerbar: Use GtkWindowControls
...
Now that the title buttons are encapsulated in a separate widget, use
it in the header bar.
Hide them when empty, so that they don't add extra spacing.
2020-04-26 15:13:15 +05:00
Alexander Mikhaylenko
4aa8f6f73c
Add GtkWindowControls
...
Move some code out of GtkHeaderBar and into a separate widget, making it
reusable in process.
See https://gitlab.gnome.org/GNOME/gtk/issues/2242
2020-04-26 15:13:15 +05:00
Matthias Clasen
6f7bd37aeb
widget-factory: Update copyright year
2020-04-26 00:45:06 -04:00
Matthias Clasen
f645c063fb
gtk-demo: Update copyright year
2020-04-26 00:44:48 -04:00
Matthias Clasen
44e31855ca
gtk-demo: Remove the colorsel demo
...
We already have a color selector demo in "Pickers".
2020-04-26 00:28:13 -04:00
Matthias Clasen
c6fc7d88c2
gtk-demo: Minor cosmetic fixes
...
Some minor cosmetic fixes to some of the demos.
2020-04-26 00:28:13 -04:00
Matthias Clasen
f6c8af6609
gtk-demo: Improve the dnd demo
...
The DND demo didn't have DND, since it was first created!
Time to fix this. Copying most of testdnd3.c here.
2020-04-26 00:28:13 -04:00
Matthias Clasen
796bc9bde1
Merge branch 'clipboard-demo-fixes' into 'master'
...
Clipboard demo fixes
See merge request GNOME/gtk!1762
2020-04-26 02:13:33 +00:00
Matthias Clasen
f8f391ceb9
gtk-demo: Polish the clipboard demo
...
The DND part of this demo was broken by recent
icon theme changes. Make it work again.
And make the demo nicer by breaking out a
DemoImage widget.
2020-04-25 21:29:39 -04:00
Matthias Clasen
637890517b
Move the idle sizer to the gtkroot.c
...
This is needed since we already have a second GtkRoot
implementation with GtkDragIcon, and DND is causing
critical warnings due to this.
2020-04-25 21:03:57 -04:00
Matthias Clasen
ae7fd6f129
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1761
2020-04-25 19:26:36 +00:00
Matthias Clasen
99d7130da3
reftests: Remove background-image-multiple from xfails
...
It no longer fails.
2020-04-25 13:26:14 -04:00
Matthias Clasen
b64f889cd9
fixed: Fix an oversight in size requisition
...
We need to take orientation into account when applying
child transforms. This is what broke the background-image-multiple
reftest.
2020-04-25 13:18:34 -04:00
Matthias Clasen
ba1633ce75
Merge branch 'matthiasc/for-master' into 'master'
...
Fix menu keynav
See merge request GNOME/gtk!1760
2020-04-25 16:56:18 +00:00
Matthias Clasen
ac3e604bb6
reftests: Use transform syntax
...
This is supposed to fix the background-image-multiple
reftest, but it doesn't. There's an actual bug here.
2020-04-25 12:47:17 -04:00
Matthias Clasen
fdc4335eba
menu: Dismiss submenus during keynav
...
We need to dismiss submenus explicitly on left arrow,
otherwise the grab interferes with our keynav.
2020-04-25 12:14:04 -04:00
Matthias Clasen
4936e7f859
Cosmetics
...
Reduce casting.
2020-04-25 11:54:29 -04:00
Matthias Clasen
8b64e29ba6
menu: Ignore leaves due to grabs
...
When we open a submenu we get a leave due to the grab,
but we don't want to unset the active item then.
2020-04-25 11:46:43 -04:00
Matthias Clasen
95424d3f44
Merge branch 'matthiasc/for-master' into 'master'
...
Don't autoinclude backend-specific headers
See merge request GNOME/gtk!1759
2020-04-25 15:37:41 +00:00
Piotr Drąg
9cc5eb6161
Update POTFILES.in
2020-04-25 13:38:18 +02:00
Matthias Clasen
79e1c66657
gsk: Don't autoinclude backend-specific headers
...
Don't install headers for code that we don't build.
And don't include those headers in gsk.h.
Just as we do in gdk, require applications to include
the backend-specific headers they need explicitly.
Update the one affected demo, gtk4-node-editor.
2020-04-24 21:40:30 -04:00
Matthias Clasen
02fa948914
widget-factory: Improve the theme selector
...
Implement the "Current style" choice using
gtk_settings_reset_property, so we go back to
following the settings changes.
2020-04-24 21:12:20 -04:00
Matthias Clasen
b54178e6a4
Merge branch 'wip/carlosg/input-fixes' into 'master'
...
Some input fixes
See merge request GNOME/gtk!1757
2020-04-25 00:29:33 +00:00
Matthias Clasen
bb50b2cec9
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1758
2020-04-24 23:07:23 +00:00
Matthias Clasen
1d86a89ccf
testsuite: Take textview-border-windows out of xfails
...
The textview-border-window reftest passes now, so
take it out of the xfails.
2020-04-24 18:35:22 -04:00
Matthias Clasen
c192038027
reftests: Avoid text caret from interfering
...
We are comparing a transparent label to a transparent
text view, so need to make sure the caret does not show
up in the text view to ruin the comparison.
2020-04-24 18:33:57 -04:00
Carlos Garnacho
2c23546ba9
gtktexthandle: Set parent through API call
...
The GtkWidget::parent property went readonly, use the API call
to ensure the text handle has a parent set.
2020-04-25 00:09:41 +02:00
Carlos Garnacho
9ed579505d
gtktreeview: Ensure to transiently prelight on touch input
...
Some machinery (like clicking on expander) relies on prelight state
being up to date, but we don't set prelight on touch events. Do that
transiently, as long as a row is clicked.
Fixes tapping on expanders.
2020-04-24 23:14:51 +02:00
Carlos Garnacho
41b7f03d55
gdk/wayland: Ensure to clean up stale touchpoint data on surface destroy
...
If the wl_surface receiving touch events is destroyed, we will get no
wl_touch.up event to remove the touchpoint from our internal accounting.
Check for this, and drop touchpoints happening in surfaces that do
disappear during operation.
2020-04-24 23:11:00 +02:00
Carlos Garnacho
67e1acd4d7
gtkpopover: Roll back properly if presenting the popup fails
...
If the popover fails to be shown, it would internally undo visible
and mapped state. If we just proceed as normal, the widget enters
in inconsistent state, and a grab remains issued on the invisible
widget, preventing further input from the input device.
2020-04-24 23:06:52 +02:00
Carlos Garnacho
d104efe06e
gtkwindow: Correct device check
...
This function to revoke implicit grabs may be called with a NULL
device, which means all devices should be revoked. Fix the check
so this actually happens.
Fixes implicit grabs (maybe) being unset in result to a GTK grab.
2020-04-24 23:04:27 +02:00
Carlos Garnacho
2a877a9be5
gtkwindowgroup: Take default group into account when listing windows
...
Otherwise, no windows belong to the default group, paradoxically.
2020-04-24 23:03:13 +02:00
Matthias Clasen
cb14fcca4c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1756
2020-04-24 20:50:01 +00:00
Carlos Garnacho
777fd92eba
gtkpadcontroller: Avoid filling action list with empty elements
...
We don't need to set the array size if we are adding elements afterwards.
2020-04-24 22:21:08 +02:00
Carlos Garnacho
ccfffb2578
demos: Initialize brush size in "paint" demo
...
Otherwise lines end up with 0 thickness.
2020-04-24 22:20:09 +02:00
Matthias Clasen
894e1d0885
testsuite: Take border-color-transparent out of xfails
...
The border-color-transparent reftest passes now, so
take it out of the xfails.
2020-04-24 15:20:58 -04:00
Matthias Clasen
c8d4a48c03
reftests: Avoid theme influence
...
Reset to defaults in background-color-transparent,
to avoid theme influence in the results.
2020-04-24 15:19:24 -04:00
Matthias Clasen
7ce964a455
reftests: Avoid decorations
...
Window decorations always cause trouble between ci
and local test runs, so turn them off for the
background-color-transparent reftest.
2020-04-24 15:18:02 -04:00
Alexander Mikhaylenko
2791c522d8
headerbar: Remove decoration-layout-set property
...
It's unnecessary and only complicates the API. Use decoration-layout if
it's not NULL, and GtkSettings otherwise.
2020-04-24 23:54:07 +05:00
Alexander Mikhaylenko
18114bafe0
headerbar: Remove title button separators
...
They have had opacity: 0 for a while, just remove them.
2020-04-24 23:54:07 +05:00
Alexander Mikhaylenko
197fe80857
testsuite: Fix swapped params in notify test
...
The expected and counted params are swapped in literally every call, so
swapping the params to match them.
2020-04-24 23:54:07 +05:00
Matthias Clasen
8871327b08
Merge branch 'grab-leftovers' into 'master'
...
Drop gtk_widget_has_grab
See merge request GNOME/gtk!1752
2020-04-23 19:24:59 +00:00
Matthias Clasen
b2deab6adf
Drop gtk_widget_has_grab
...
This was just a leftover in our public api.
All other grab-related apis are gone.
2020-04-23 14:10:44 -04:00
Benjamin Otte
389575ee18
Merge branch 'wip/exalm/window-headerbar' into 'master'
...
First steps for #2242
See merge request GNOME/gtk!1739
2020-04-23 15:26:30 +00:00
Matthias Clasen
fd47e86689
Merge branch 'focus-ring-experiment' into 'master'
...
Tweak visible focus behavior
See merge request GNOME/gtk!1750
2020-04-23 15:20:54 +00:00
Alexander Mikhaylenko
7c4694ca3c
window: Stop listening to headerbar title changes
...
Remove another dependency.
2020-04-23 19:26:10 +05:00
Alexander Mikhaylenko
610d5794ac
headerbar: Update window buttons automatically
...
Update the layout when any of the following properties changes:
* modal
* transient-for
* resizable
* deletable
Stop updating it from GtkWindow, make that function static.
2020-04-23 19:26:10 +05:00
Matthias Clasen
b0f2cd02ad
window: Tweak visible focus behavior
...
Only turn on visible focus when a key event actually leads
to a change in focus location (ie, 'keynav').
Make the visible focus disappear after 5 seconds of no
keyboard interaction, to avoid permanent focus ring
distraction.
As an extra bonus, make it so that we make the focus
visible while the Alt key is pressed. This gives us
a 'find my focus!' shortcut, and goes well with the
prexisting use of Alt for finding mnemonics.
Discussed in: #2644
2020-04-23 09:33:26 -04:00
Jakub Steiner
7fe51a876c
Merge branch 'wip/jimmac/uniform-checkboxes' into 'master'
...
Adwaita: lower glyph contrast for checkboxes
See merge request GNOME/gtk!1745
2020-04-23 11:44:47 +00:00
Jakub Steiner
424a86a6a6
Adwaita: lower glyph contrast for checkboxes
...
- stylistic choice didn't sit well with majority of the design team
2020-04-23 10:53:02 +02:00
Matthias Clasen
861bff44a8
Merge branch 'matthiasc/for-master' into 'master'
...
menusectionbox: Improve circular button spacing
Closes #2626
See merge request GNOME/gtk!1743
2020-04-23 04:02:12 +00:00
Matthias Clasen
f4b1762072
Adwaita: Add padding to circular button rows in menus
...
The lack of this was negatively affecting the spacing
of these buttons.
Fixes : #2626
2020-04-22 22:42:04 -04:00
Matthias Clasen
ba45d7a991
menusectionbox: Improve circular button spacing
...
In the n == 2 case, we want to avoid the buttons being
drawn all the way out to the ends of the box, but in the
n >= 3 case, that is exactly what we want for the first
and last button.
2020-04-22 22:16:46 -04:00
Benjamin Otte
8b1e857a67
Merge branch 'fix-icontheme-invalidation' into 'master'
...
Fix icontheme invalidation
See merge request GNOME/gtk!1733
2020-04-23 00:13:26 +00:00
Matthias Clasen
94906d076a
Drop gtk_widget_reset_style
...
There was a single call left that should not be necessary.
Also drop no longer used attached-window functionality.
2020-04-22 19:30:48 -04:00
Matthias Clasen
a199060728
Drop gtk_style_context_reset_widgets
...
This is no longer used.
2020-04-22 19:30:48 -04:00
Matthias Clasen
7b4378bc46
widget: Update when font settings change
...
Update the pango context when font-related settings
change, using the new GtkSystemSetting mechanism.
2020-04-22 19:30:48 -04:00
Matthias Clasen
679863af4f
image: Invalidate icon helper when icon theme changes
...
This is necessary to drop the cached image.
2020-04-22 19:30:48 -04:00
Matthias Clasen
a59cb5dfa6
icontheme: Call gtk_system_setting_changed
...
When the icon theme changes, we want to both initiate
a css SOURCE change (since css values may depend on the
icon theme), as well as calling gtk_system_setting_changed,
since widgets need to drop cached images, e.g. in GtkIconHelper.
2020-04-22 19:30:48 -04:00
Matthias Clasen
4b13d99cfe
settings: Call gtk_system_setting_changed
...
Replace calls to gtk_style_context_reset_widgets by
gtk_system_setting_changed, with the appropriate setting,
and add style invalidation where required.
2020-04-22 19:29:59 -04:00
Matthias Clasen
129b8bb7f1
window: Use gtk_system_setting_change
...
Propagate GTK_SYSTEM_SETTING_DISPLAY when the display
of the window changes.
2020-04-22 19:29:15 -04:00
Matthias Clasen
723d57eeb5
widget: Add a system_setting_changed vfunc
...
This gives us a hook to walk the widget tree whenever a global
setting changes and do per-widget invalidations. This will
replace gtk_style_context_reset_widgets().
2020-04-22 19:29:15 -04:00
Matthias Clasen
58ca3b05c9
css: Compare icon theme serials
...
When comparing to icon theme image values for equality,
take the serial of the icon theme at compute time into
account.
2020-04-22 19:22:41 -04:00
Emmanuele Bassi
21fcef7306
Merge branch 'ci-custom-layout' into 'master'
...
Fix annotations for GtkCustomLayout
See merge request GNOME/gtk!1740
2020-04-22 19:23:17 +00:00
Matthias Clasen
fe6ef5256b
icontheme: Keep a serial
...
This will let us identify when we have to re-lookup
icons because they may have changed despite the theme
object being the same.
2020-04-22 15:18:16 -04:00
Emmanuele Bassi
c0d18ebff2
Fix annotations for GtkCustomLayout
...
Silence the warnings from the introspection scanner.
2020-04-22 19:24:45 +01:00
Alexander Mikhaylenko
451c3279ee
window: Introduce actions for window buttons
...
Add the following actions:
* window.close
* window.toggle-maximize
* window.minimize
Ensure they are disabled when not appropriate, such as for modal windows.
Use them in GtkHeaderBar.
2020-04-22 23:01:12 +05:00
Alexander Mikhaylenko
016eac0645
header-bar: Track window icon changes
...
Listen to icon-name changes if it's in a GtkWindow. This allows to remove a
special case for headerbar-as-titlebar from GtkWindow.
2020-04-22 23:01:12 +05:00
Alexander Mikhaylenko
cead405831
header-bar: Don't assume there's only one icon
...
Instead of tracking the titlebar icon widget, and updating it when the icon
changes, update the window buttons completely.
2020-04-22 23:01:12 +05:00
Matthias Clasen
2ddff872cd
css: Drop the -gtk-icon-theme property
...
We want to always use the current icon theme, and only
have the minimum amount of custom properties.
2020-04-22 12:35:30 -04:00
Matthias Clasen
7aeef71a49
css: Get the icon theme via the settings
...
We don't have a css value for it anymore, but we
still need the current icon theme to interpret
icon names.
2020-04-22 12:35:30 -04:00
Matthias Clasen
98611735ec
Stop using the -gtk-icon-theme style property
...
We want to just use the current icon theme, always.
2020-04-22 12:35:22 -04:00
Alexander Mikhaylenko
2240eb5c99
header-bar: Stop showing application menu
...
The application menu isn't particular relevant anymore, and the support for
showing fallback appmenu as a headerbar icon is one of the things tying
GtkWindow to GtkHeaderBar.
Remove support for "menu" window decoration element completely, update
GtkHeaderBar docs.
2020-04-22 21:30:19 +05:00
Alexander Larsson
e75bc2833d
icon-theme: Fix deadlock in GktIconTheme dispose
...
When freeing the display GtkIconTheme and that was the last owner we
ran into a deadlock, because we unref the "next-to-last" ref inside a
gtk_icon_theme_ref_aquire/release() pair, which makes the final unref
to happen in the release(), while the ref lock still was held.
The unref triggers dispose which tries to NULL out the ref, but that then
deadlocks on the mutex being held by the caller already.
We fix this by moving the release unref outside the lock. This is safe
because refcounts are atomic, and we *do* own the ref.
2020-04-22 12:20:57 -04:00
Jakub Steiner
bca608c531
Merge branch 'wip/jimmac/HC-slider-border' into 'master'
...
HC: fix switch slider borders
See merge request GNOME/gtk!1737
2020-04-22 11:47:54 +00:00
Jakub Steiner
9fe6bc0792
HC: fix switch slider borders
...
- HC got caught up on a condition made for color (suggested) buttons.
the rule just made the slider a tag lighter on dark probably due to the
overlaid AA making it stronger. Got rid of it for now, if someone cares
enough we can reintroduce an exception (that doesn't break HC).
2020-04-22 11:59:40 +02:00
Matthias Clasen
e026a04e03
Merge branch 'fix-placesview-popover' into 'master'
...
placesview: Fix up the address entry help popover
Closes #2642
See merge request GNOME/gtk!1731
2020-04-21 22:27:57 +00:00
Emmanuele Bassi
30c386dde9
Merge branch 'missing-annotation' into 'master'
...
widget: Add missing callback annotation
See merge request GNOME/gtk!1732
2020-04-21 21:56:43 +00:00
Matthias Clasen
0ff67fa854
Merge branch 'wip/chergert/fix-toggle-caret-visibility' into 'master'
...
textview: fix assertion when toggling caret visibility
Closes #2647
See merge request GNOME/gtk!1736
2020-04-21 21:11:53 +00:00
Christian Hergert
55dd737ea0
textview: fix assertion when toggling caret visibility
...
When toggling caret visibility (with F7) we would hit an assertion if the
cursor is currently blinking. This adjusts things to ensure that we should
be showing the carent when scheduling our blink timeouts.
Fixes #2647
2020-04-21 13:39:50 -07:00
Matthias Clasen
c09b5ea7b4
Merge branch 'menu-section-title' into 'master'
...
Menu section title
See merge request GNOME/gtk!1735
2020-04-21 19:35:44 +00:00
Matthias Clasen
1edfd80528
Adwaita: Some styling for menu section titles
...
More fine-tuning needed.
2020-04-21 14:55:14 -04:00
Matthias Clasen
654af88529
Change the approach to menu section titles
...
Put the label below the separator, and give
it the title style class.
2020-04-21 14:48:39 -04:00
Florian Müllner
8e2ffb3b46
widget: Add missing callback annotation
...
GI can only figure out the correct scope if there's a GDestroyNotify
or GAsyncReadyCallback parameter.
2020-04-21 16:35:07 +02:00
Claudio Saavedra
e818bf8514
docs: migration guide fixes
2020-04-21 15:37:45 +03:00
Claudio Saavedra
0af16a77fc
docs: fix typo
2020-04-21 14:49:13 +03:00
Matthias Clasen
0ebcf8c02e
placesview: Fix up the address entry help popover
...
Popovers without parent don't work anymore. Set a
parent, a fix up the position.
Fixes : #2642
2020-04-21 07:43:52 -04:00
Jakub Steiner
76b16720fc
Merge branch 'wip/jimmac/hc-public-colors' into 'master'
...
HC: export public colors
Closes #2641
See merge request GNOME/gtk!1730
2020-04-21 11:08:28 +00:00
Jakub Steiner
89ebe9e456
HC: export public colors
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2641
2020-04-21 12:39:34 +02:00
Matthias Clasen
af7537ac79
3.98.3
2020-04-21 00:32:23 -04:00
Matthias Clasen
6185cf95fb
Fix label accessibility
...
Emit accessible change signals after setting the
new selection limits. This was broken in
commit f6bedd0d5e
, and showed up as broken
accessibility tests.
2020-04-20 23:16:23 -04:00
Matthias Clasen
fbcd0212ea
Merge branch 'container-focus-cleanup' into 'master'
...
Strip down GtkContainer
See merge request GNOME/gtk!1722
2020-04-20 21:20:57 +00:00
Matthias Clasen
b55195fa2e
Move the idle sizer to GtkWindow
...
This was only living in gtkcontainer.c for historic
reasons. Move it closer to where it belongs, and
rename it from 'idle' to 'layout', since it is
really about the layout phase of the frame clock,
nowadays.
2020-04-20 16:30:45 -04:00
Matthias Clasen
841c4a8cfe
container: Cosmetic doc cleanup
...
Remove remnants of child properties from the
documentation. They no longer exist.
2020-04-20 16:30:45 -04:00
Matthias Clasen
d756c6e282
Move set_focus_child to GtkWidget
...
Move the set_focus_child vfunc from GtkContainer
to GtkWidget. This removes the last focus functionality
from GtkContainer.
Update the two users.
2020-04-20 16:30:43 -04:00
Matthias Clasen
eeb41c82d1
NEWS: More updates
2020-04-20 16:29:30 -04:00
Matthias Clasen
ecf313097c
Merge branch 'wip/carlosg/grabbing-popovers' into 'master'
...
gtkpopover: Set GTK grab on autohide popovers
Closes #2446
See merge request GNOME/gtk!1729
2020-04-20 19:01:55 +00:00
Carlos Garnacho
b20f21df24
gtkpopover: Set GTK grab on autohide popovers
...
These popovers handle clicks outside the widget, and expect input
to be routed through it when it is shown. This pretty much matches
the characteristics of GTK grabs, and setting one up will ensure
the cancellation of event controllers that were active at the time
of showing the popover.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2446
2020-04-20 20:28:05 +02:00
Matthias Clasen
2869f80bc0
Merge branch 'docs-work' into 'master'
...
Docs work
See merge request GNOME/gtk!1727
2020-04-20 05:33:02 +00:00
Matthias Clasen
b4c79bad34
Assorted documentation fixes
2020-04-20 00:38:58 -04:00
Matthias Clasen
013cc09651
widget: Remove some leftovers
...
gtk_widget_can_activate_accel is gone, so remove the
vfunc and declaration.
2020-04-19 23:44:50 -04:00
Matthias Clasen
cd077d1aa6
Merge branch 'BUG_regression_select_folder_GTK4' into 'master'
...
GtkFileChooserWidget: fix refactor regression
Closes #2635
See merge request GNOME/gtk!1726
2020-04-19 23:15:28 +00:00
Nelson Benítez León
66e802596a
GtkFileChooserWidget: fix refactor regression
...
Commit 4a3742979d
which removed
GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER slipped
a bad g_assert() refactoring, which is causing
a crash when selecting a folder in a GtkFileChooserButton
dialog.
Fixes #2635
2020-04-19 18:00:37 -04:00
Matthias Clasen
e91907d427
Docs: Various tweaks
...
Tweak the docs for library initialization, versioning
and settings, and remove some outdated information.
2020-04-19 16:26:25 -04:00
Matthias Clasen
dbf12d87a1
Add GtkShortcutLabel to the docs
2020-04-19 15:41:51 -04:00
Matthias Clasen
0b6af3bf23
Add GtkCenterLayout to the docs
2020-04-19 15:38:31 -04:00
Matthias Clasen
bc7da45902
docs: Restructure a bit
...
Split the overview sections off into its own "concepts part.
2020-04-19 13:15:05 -04:00
Matthias Clasen
a3de542274
Merge branch 'matthiasc/for-master' into 'master'
...
Remove GdkGeometry from public API
See merge request GNOME/gtk!1720
2020-04-19 16:40:03 +00:00
Matthias Clasen
7f3125fc69
Some minor documentation fixes
2020-04-19 10:42:10 -04:00
Matthias Clasen
70fed08e8f
Remove GdkGeometry from public API
...
The api to configure surfaces is now GdkToplevelLayout
and GdkPopupLayout. Unfortunately, there's still quite
a bit of internal use of GdkGeometry that will take some
time to clean up, so move it go gdkinternals.h for now.
2020-04-19 10:42:10 -04:00
Matthias Clasen
3c987f073e
Remove GdkGeometry from public API
...
The api to configure surfaces is now GdkToplevelLayout
and GdkPopupLayout. Unfortunately, there's still quite
a bit of internal use of GdkGeometry that will take some
time to clean up, so move it go gdkinternals.h for now.
2020-04-19 10:41:18 -04:00
Timm Bäder
ef832fd770
Merge branch 'fix-infobar-styling' into 'master'
...
Adwaita: Fix and simplify infobar styling
See merge request GNOME/gtk!1711
2020-04-19 13:11:13 +00:00
nana-4
2afd10b537
Adwaita: Fix and simplify infobar styling
...
- Apply sizing regardless of style class.
- Fix bottom border not reaching the bottom corners.
- Remove unnecessary style overrides that should have been removed
during the redesign.
2020-04-19 20:10:52 +09:00
Timm Bäder
f1da4cfae1
Merge branch 'theme-link-styling-fixes' into 'master'
...
Adwaita: Fix link styling
See merge request GNOME/gtk!1721
2020-04-19 08:37:15 +00:00
nana-4
47bfa49118
Adwaita: Fix link styling
...
- Fix broken visited link styling by avoiding invalid selector
`🔗 visited` - CSS :link and :visited are mutually exclusive.
- In link button, move %link from the child label to the parent button,
so that the hover/active effect is applied within the whole button and
the visited style is applied correctly.
- Remove invalid selectors `:backdrop:backdrop`.
2020-04-19 15:21:40 +09:00
Matthias Clasen
2cd152c2ed
Merge branch 'fix-css-filter-transitions' into 'master'
...
css: Allow transitioning between different units again
See merge request GNOME/gtk!1719
2020-04-19 02:00:26 +00:00
Matthias Clasen
a7cad79092
css: Allow transitioning between different units again
...
This turns out to be necessary for transitioning filters,
and we run into criticals if transitioning numbers
unexpectedly returns NULL. I've observed that with
* {
filter: invert(80%);
}
This was broken in c9e972eecb
.
2020-04-18 21:10:32 -04:00
Matthias Clasen
661b8c3d1a
Merge branch 'matthiasc/for-master' into 'master'
...
css: Give none singletons unique names
See merge request GNOME/gtk!1718
2020-04-18 22:52:15 +00:00
Matthias Clasen
853de6c511
Merge branch 'wip/fix-multi-popup-hide' into 'master'
...
Fix autohiding popup chain
See merge request GNOME/gtk!1717
2020-04-18 22:33:52 +00:00
Matthias Clasen
45bcffd637
statusbar: Don't use a frame
...
This frame serves no purpose anymore, and now that frames
draw frames, it shows up annoyingly.
2020-04-18 17:29:13 -04:00
Matthias Clasen
1e7c56db19
Merge branch 'focus-adjustment' into 'master'
...
Drop container focus adjustments
See merge request GNOME/gtk!1716
2020-04-18 20:59:50 +00:00
Jonas Ådahl
ab59459f7a
wayland: Don't continue showing if xdg_popup creation failed
...
We don't create a grabbing popup if it's not the top most one, as that
is a protocol violation, and complain if anything attempts to do it.
What we didn't do is handle this gracefully in the code that tries to
create said popup.
Fix this by dropping the attempt to show the popup on the floor, instead
of setting various state making it look like it succeeded. This won't
actually fix anything, but it'll result in a bit more accurate warnings
logged, as the state more correctly corresponds to the reality.
2020-04-18 22:57:25 +02:00
Jonas Ådahl
0a79eb02ac
surface: Hide chained autohiding popups together
...
When we autohide a popup surface with a grab, hide all other auto hiding
popups up the popup chain. The end result is that when you click outside
a menu with submenus open, the whole menu chain is dismissed.
2020-04-18 22:33:52 +02:00
Jonas Ådahl
aa72318581
popover: Fix indentation
2020-04-18 22:33:29 +02:00
Matthias Clasen
0bc6a5c791
Merge branch 'BUG_sibebarplaces_avoid_click_focus_GTK4' into 'master'
...
GtkPlacesSidebar: avoid location clicks to grab focus
See merge request GNOME/gtk!1715
2020-04-18 19:51:29 +00:00
Matthias Clasen
ef8e8ba14d
css: Give none singletons unique names
...
This makes for a less confusing experience in gdb.
2020-04-18 15:24:13 -04:00
Matthias Clasen
b55b1773c0
docs: Mention focus adjustments in the migration guide
2020-04-18 14:59:52 -04:00
Matthias Clasen
1c472cca00
Drop gtk_container_set_focus_[hv]adjustment
...
This functionality should be provided by scrollables, see
for example by the recently added GtkViewport:scroll-to-focus.
2020-04-18 14:59:44 -04:00
Matthias Clasen
8c0fbb2294
tests: Stop using focus adjustments
...
Set scroll-to-focus instead, in testgtk.
2020-04-18 14:52:50 -04:00
Matthias Clasen
ee4a7798c9
flowbox: Stop setting focus adjustments
2020-04-18 14:45:29 -04:00
Matthias Clasen
b339bde6a5
inspector: Use the new scroll-to-focus
2020-04-18 14:43:48 -04:00
Matthias Clasen
13b6b9f2b4
scrolledwindow: Stop setting focus adjustments
...
Stop setting focus adjustments on the automatically
generated viewport.
2020-04-18 14:43:48 -04:00
Matthias Clasen
b315dce757
Add a test for scroll-to-focus
2020-04-18 14:43:48 -04:00
Matthias Clasen
66347fa3bf
viewport: Add GtkViewport:scroll-to-focus
...
And implement this property by listening for focus
changes, and updating the adjustments. This is a
replacement for setting focus adjustments on containers.
2020-04-18 14:43:48 -04:00
Nelson Benítez León
2c7d54791c
GtkPlacesSidebar: avoid location clicks to grab focus
...
Sibebar location rows should not grab focus on click.
Fixes filechooser issue #1469
2020-04-18 14:43:02 -04:00
Matthias Clasen
af858d51a8
Merge branch 'css-docs' into 'master'
...
Shorten CSS docs
See merge request GNOME/gtk!1712
2020-04-18 18:39:01 +00:00
Matthias Clasen
84fd7cf704
Shorten CSS docs
...
Fold the two CSS chapters into one, make more compact
tables of selectors and properties, and stop explaining
general CSS syntax.
2020-04-18 12:34:17 -04:00
Matthias Clasen
250036259a
widget-factory: Make color swatches non-focusable
2020-04-18 03:29:13 -04:00
Matthias Clasen
8e45e15a11
colorchooser: Fix a crash
...
Don't crash when we start removing custom colors
that happen to be currently selected.
2020-04-18 03:29:13 -04:00
Matthias Clasen
323394e8b5
emojichooser: Drop focus adjustment setting
...
It is not needed here, we are now scrolling
differently.
2020-04-18 03:29:13 -04:00
Matthias Clasen
d53f3a54b1
filechooser: Cosmetic doc changes
2020-04-17 20:08:21 -04:00
Matthias Clasen
e880abfaf3
drawingarea: Cosmetic docs fix
2020-04-17 20:05:04 -04:00
Matthias Clasen
16906eb0a9
NEWS: More updates
2020-04-17 19:57:15 -04:00
Matthias Clasen
6a4f788976
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #1899 and #2627
See merge request GNOME/gtk!1709
2020-04-17 23:34:15 +00:00
Emmanuele Bassi
6b79f691ef
Merge branch 'ebassi/for-master' into 'master'
...
cups: Disable deprecation warnings
See merge request GNOME/gtk!1710
2020-04-17 23:28:18 +00:00
Matthias Clasen
49f2012d24
migration docs: Updates
...
Mention shadow type, relief, aspect frame.
2020-04-17 18:46:12 -04:00
Emmanuele Bassi
18c11ac94f
cups: Disable deprecation warnings
...
It seems newer releases of CUPS removed the ability to disable
deprecation warnings by defining a pre-processor symbol, so we
have to resort to the usual begin/end ignore deprecation pragmas
to avoid a ton of deprecation warnings.
2020-04-17 23:38:06 +01:00
Emmanuele Bassi
25237095c9
Merge branch 'for-master' into 'master'
...
For master
See merge request GNOME/gtk!1708
2020-04-17 22:11:28 +00:00
Matthias Clasen
19dbbf6fa5
aspectframe: Modernize
...
Make GtkAspectFrame not derive from GtkFrame anymore,
since frames now always draw, well, a frame. Also,
add proper setters for the properties of GtkAspectFrame.
Update our sole user.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2627
2020-04-17 17:38:52 -04:00
Emmanuele Bassi
dd23a37ca1
Reconcile documentation with declaration and definition
...
The arguments name in the documentation must match declaration and
definition, or gtk-doc and g-ir-scanner will get very cross at us.
2020-04-17 22:34:10 +01:00
Emmanuele Bassi
d46e1288a4
Copy axes when rewriting events
2020-04-17 22:23:32 +01:00
Matthias Clasen
b5d17d2f9b
Adwaita: Add focus to expander
...
We were not drawing a focus indication at all for
expanders. Bring it back. Also, make the color plane
focus snug.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/1899
2020-04-17 16:24:44 -04:00
Matthias Clasen
5a362c6759
nodeeditor: Don't set has-focus
...
That is now a readonly property. Set focus-widget
on the toplevel instead.
2020-04-17 16:17:01 -04:00
Matthias Clasen
3e19b9502d
Merge branch 'menu-section-title' into 'master'
...
popovermenu: Reinstate section title handling
See merge request GNOME/gtk!1707
2020-04-17 19:27:02 +00:00
Matthias Clasen
39793e8043
Merge branch 'matthiasc/for-master' into 'master'
...
gsk: Fall back to cairo if compiling shaders fails
See merge request GNOME/gtk!1706
2020-04-17 18:17:32 +00:00
Matthias Clasen
79267674ff
popovermenu: Reinstate section title handling
...
We were creating a hbox with separators around the label,
but forgot to arrange sizing to prevent the separators from
shrinking into nothingness.
2020-04-17 13:53:56 -04:00
Matthias Clasen
c920796967
gsk: Fall back to cairo if compiling shaders fails
...
There was already some fallback in place here, but
in other places we were just asserting.
2020-04-17 13:42:33 -04:00
Matthias Clasen
908590e032
Merge branch 'matthiasc/for-master' into 'master'
...
gsk: Fall back to cairo if compiling shaders fails
See merge request GNOME/gtk!1705
2020-04-17 17:41:08 +00:00
Matthias Clasen
416d82c81e
widget-factory: Add a menu section title
...
If you can't see it, you can't theme it.
2020-04-17 13:29:56 -04:00
Matthias Clasen
d4e53b14cb
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1703
2020-04-17 16:23:29 +00:00
Matthias Clasen
96f9f9585f
reftests: Stop using shadow-type
2020-04-17 11:06:16 -04:00
Matthias Clasen
ad7118ef9a
calendar: Fix focus keynav
...
This broke when the calendar was broken into widgets.
2020-04-17 10:57:36 -04:00
Matthias Clasen
909120ec78
Drop GtkReliefStyle
...
We are not using this enum anymore.
2020-04-17 10:57:36 -04:00
Matthias Clasen
12d5fdd457
menubutton: Drop relief
...
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
df1816a29c
button: Drop relief
...
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
fdbbef863d
Drop GtkShadowType
...
We are not using this enum anymore.
2020-04-17 10:57:36 -04:00
Matthias Clasen
47ac0db66c
viewport: Drop shadow-type
...
The viewport draws a frame at the same place as
the scrolled window, so there is really no need
to have that ability in both. Just drop the frame
from viewports.
2020-04-17 10:57:36 -04:00
Matthias Clasen
edae2a8dc5
frame: Drop shadow-type
...
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
2020-04-17 10:57:36 -04:00
Matthias Clasen
ffbc58d328
treeviewcolumn: Stop using a frame
...
There is no desire to draw a frame here, so don't use a GtkFrame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
285aa226e5
scrolledwindow: Drop shadow-type
...
We were only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00
Matthias Clasen
f297d0684d
scrolledwindow: Document the .frame style class
2020-04-17 10:57:36 -04:00
Timm Bäder
c7d871570f
Revert "modelbutton: Emit ::clicked() before closing the popover"
...
This reverts commit 57f913b753
.
2020-04-17 16:43:17 +02:00
Matthias Clasen
7caed3a462
Merge branch 'assorted-menu-fixes' into 'master'
...
Assorted menu fixes
See merge request GNOME/gtk!1704
2020-04-17 14:12:20 +00:00
Timm Bäder
f4acde371e
snapshot: Avoid a save/restore pair if we can
2020-04-17 15:21:00 +02:00
Timm Bäder
aad67743b9
label: Ignore setting attrs from NULL to NULL
2020-04-17 15:21:00 +02:00
Timm Bäder
1886648652
text: unconditionally unref attr list
...
pango_attr_list_unref() works on NULL
2020-04-17 15:21:00 +02:00
Timm Bäder
67c2665028
text: Avoid creating a PangoAttrList we don't need
...
It's going to be empty, unless we have preedit_attrs
2020-04-17 15:21:00 +02:00
Timm Bäder
dda7a850da
meson: Use summary()
...
Instead of doing our own. Bumps the dependency to 0.53 though.
2020-04-17 15:21:00 +02:00
Timm Bäder
b8ef164c2b
meson: Trivial formattting
2020-04-17 15:21:00 +02:00
Timm Bäder
5d61abd748
label: Redraw when text attrs are affected by css change
...
GtkWidget doesn't do it automatically and probably shouldn't
2020-04-17 15:21:00 +02:00
Timm Bäder
9f6ec5b7d4
label: Don't create an unnecessary attribute list
2020-04-17 15:21:00 +02:00
Timm Bäder
78e6475f9f
label: Only parse mnemonic attributes if we need to
2020-04-17 15:21:00 +02:00
Timm Bäder
6289f7eecd
label: Ignore AFFECTS_ATTRS css changes if we can
...
It's only interesting if we either already have attributes, or the new
style adds some.
2020-04-17 15:21:00 +02:00
Timm Bäder
9ad0dbb145
label: Inline function into only caller
2020-04-17 15:21:00 +02:00
Timm Bäder
db9fbb3918
label: Remove some unused quarks
2020-04-17 15:21:00 +02:00
Timm Bäder
afaa352142
label: Remove priv pointer
2020-04-17 15:21:00 +02:00
Timm Bäder
3b7cb31157
label: Stop connecting to notify::gtk-enable-accels
...
Leftover from when GtkAccelLabel was a GtkLabel subclass. GtkAccelLabel
connects to this itself these days though.
2020-04-17 15:21:00 +02:00
Timm Bäder
f0b33cdc53
label: Set underline text and markup in one step
...
Try to unify the way we parse the mnemonic character
2020-04-17 15:21:00 +02:00
Timm Bäder
203b0c9c9d
label: Fold set_pattern_internal into only caller
2020-04-17 15:21:00 +02:00
Timm Bäder
1ea24e98c1
adwaita: don't extent %link in linkbuttons
...
We already do that for the label inside the button.
2020-04-17 15:21:00 +02:00
Timm Bäder
36248c609d
label: Remove GtkLabel:track-visited-links
...
Always track visited state of links. This way all visited links in all
labels look the same. Whether the theme wants to style :visited is the
theme's business.
2020-04-17 15:21:00 +02:00
Timm Bäder
f6bedd0d5e
label: Remove a11y-only properties
...
Update them manually instead.
2020-04-17 15:21:00 +02:00
Timm Bäder
8f96b38539
label: Fold function into only caller
...
This makes it more obvious that gtk_label_setup_mnemonic() depends on
the root of the widget and it therefore makes sense to call it in
::root/::unroot.
2020-04-17 15:21:00 +02:00
Timm Bäder
813be8a921
label: Don't normalize booleans in internal setters
...
We almost always pass a literal TRUE/FALSE to them.
2020-04-17 15:21:00 +02:00
Timm Bäder
21ac2330af
stylecontext: Remove get_pango_attributes
...
Make the only caller use GtkCssNode API.
2020-04-17 15:21:00 +02:00
Timm Bäder
584a71ae96
cssstyle: Only create PangoAttrList if there are attribtues
...
Don't allocate a new GString if we never need it and therefore don't
create the PangoAttrList if we have no attributes anyway. Update callers
to handle the possible NULL return value.
2020-04-17 15:21:00 +02:00
Timm Bäder
2e14ea84f3
label: Pull all pango attributes from the theme
...
Dont' force an underline attribute here. Just ask the theme for the
text-decoration.
2020-04-17 15:21:00 +02:00
Timm Bäder
4737495e3c
label: Fix an old TODO comment
2020-04-17 15:21:00 +02:00
Timm Bäder
57f913b753
modelbutton: Emit ::clicked() before closing the popover
...
The clicked handler might still need the popover.
2020-04-17 15:21:00 +02:00
Timm Bäder
4851081a77
label: Remove public pattern API
2020-04-17 15:21:00 +02:00
Timm Bäder
13fde6f4cd
label: Shorten set_markup_internal a bit
2020-04-17 15:21:00 +02:00
Timm Bäder
1db53e6676
label: Avoid duplicating a string
...
We only use str_for_accel if with_uline is TRUE.
2020-04-17 15:21:00 +02:00
Timm Bäder
74b5eaa700
label: Pass <markup> length directly when parsing markup
2020-04-17 15:21:00 +02:00
Timm Bäder
b16157bc0d
label: Remove a double if (needs_root) check
...
The code is clearer and shorter this way.
2020-04-17 15:21:00 +02:00
Timm Bäder
7a98e79d90
label: Use widget API to add style class
2020-04-17 15:21:00 +02:00
Timm Bäder
c588d8f858
label: Clear select info before creating a new one
...
E.g. set_markup_internal will create a new select_info, but then we were
destroying it again, just to recreate it later.
2020-04-17 15:21:00 +02:00
Timm Bäder
23cffdfe42
label: Save a few LOC
2020-04-17 15:21:00 +02:00
Timm Bäder
99998d25f8
label: Save links in an array
...
Stop using GList for this.
2020-04-17 15:21:00 +02:00
Timm Bäder
ca47e96d35
widget: Return an array from list_devices
...
To forther reduce the GList usage in the code base.
2020-04-17 15:21:00 +02:00
Timm Bäder
e583349956
accelgroup: Restructure gtk_accelerator_name
...
To fix invalid reads and make the function a bit shorter while we're at
it.
Fixes #2602
2020-04-17 15:21:00 +02:00
Timm Bäder
7bc4daae2f
main: Stop using GList when propagating events
...
There are still some cases missing.
2020-04-17 15:21:00 +02:00
Matthias Clasen
3469a63453
widget-factory: Use a model for the complex menu
...
We had the model already in the ui file, but weren't
using it.
2020-04-17 09:07:17 -04:00
Matthias Clasen
17cb92889a
modelbutton: Don't show accels without text
...
We don't want to show accelerators in iconic buttons.
2020-04-17 09:04:26 -04:00
Matthias Clasen
4a20a3fdb2
widget-factory: Catch errors
...
This speeds up the debugging when doing quick experimental
changes to widget-factory.ui.
2020-04-17 08:55:56 -04:00
Matthias Clasen
726a7ac705
inspector: Fix a crash
...
Don't crash while picking. The event signal broke
when GdkEvent was turned into a type instance,
since the automatic marshallers don't know how to
deal with that. Manually set the right marshaller.
2020-04-17 08:37:45 -04:00
Matthias Clasen
60329c3cda
Merge branch 'event-types' into 'master'
...
Rework event types
Closes #2585
See merge request GNOME/gtk!1702
2020-04-16 20:36:24 +00:00
Emmanuele Bassi
f28aa1ba02
Restructure the GdkEvent type hierarchy
...
GdkEvent has been a "I-can't-believe-this-is-not-OOP" type for ages,
using a union of sub-types. This has always been problematic when it
comes to implementing accessor functions: either you get generic API
that takes a GdkEvent and uses a massive switch() to determine which
event types have the data you're looking for; or you create namespaced
accessors, but break language bindings horribly, as boxed types cannot
have derived types.
The recent conversion of GskRenderNode (which had similar issues) to
GTypeInstance, and the fact that GdkEvent is now a completely opaque
type, provide us with the chance of moving GdkEvent to GTypeInstance,
and have sub-types for GdkEvent.
The change from boxed type to GTypeInstance is pretty small, all things
considered, but ends up cascading to a larger commit, as we still have
backends and code in GTK trying to access GdkEvent structures directly.
Additionally, the naming of the public getter functions requires
renaming all the data structures to conform to the namespace/type-name
pattern.
2020-04-16 19:54:02 +01:00
Emmanuele Bassi
96cfb12946
Fix annotations for GtkEventController
2020-04-16 19:40:00 +01:00
Emmanuele Bassi
5abb6f2a61
Fix annotation for gtk_show_uri_full()
...
The callback is now an asynchronous closure.
2020-04-16 19:40:00 +01:00
Emmanuele Bassi
0d065bca6d
Fix compiler warning
...
Newer versions of GCC are fairly aggressive with NULL checks.
2020-04-16 19:40:00 +01:00
Matthias Clasen
b3b194532d
Merge branch 'matthiasc/for-master' into 'master'
...
themes: Fix HighContrast dependencies
See merge request GNOME/gtk!1701
2020-04-16 18:05:19 +00:00
Matthias Clasen
1d1e1c5e83
Merge branch 'css-focus-changes' into 'master'
...
Add a focus-within state
See merge request GNOME/gtk!1700
2020-04-16 18:01:29 +00:00
Matthias Clasen
d36e41c6b8
themes: Fix HighContrast dependencies
...
HighContrast themes now depend on sass files from Adwaita.
2020-04-16 12:40:37 -04:00
Matthias Clasen
4516bfbc88
Adwaita: Some adjustments for :focus-within
...
Use :focus-within for focus in entries, since the
actual focus is on the text within, and :focus for
notebooks, since we don't want to draw an outline
around the notebook when the focus is in content.
2020-04-16 12:31:17 -04:00
Matthias Clasen
5095e87bb7
testsuite: Add some checks for focus states
...
This is some opportunistic checking in a test that
is really about focus chains, but better than nothing.
2020-04-16 12:31:17 -04:00
Matthias Clasen
54b99d281b
Add a focus-within state
...
This is used for widgets that contain the focus widget,
reserving the focused state for the focus location itself.
This aligns our focus state handling with
https://www.w3.org/TR/selectors-4/
2020-04-16 12:31:01 -04:00
Matthias Clasen
3cb023d0df
Merge branch 'monitor-signals-x11' into 'master'
...
x11: emit ::enter/leave-monitor
See merge request GNOME/gtk!1699
2020-04-16 15:43:47 +00:00
Olivier Fourdan
86f295f929
x11: emit ::enter/leave-monitor
...
For the X11 backend, keep a list of monitors for which the surface
intersects the monitor area.
Whenever the X11 surface is configured, check against the list of
monitors to determine whether it enters a new monitor or if it left a
monitor, to emit the corresponding ::enter/leave-monitor signals just
like a Wayland compositor would.
As monitors can be added, removed or reconfigured at any time, redo
those checks whenever any of these events occur.
2020-04-16 16:23:57 +02:00
Matthias Clasen
e83d87c20a
Add :focus-visible to css docs
2020-04-15 23:14:34 -04:00
Matthias Clasen
03080f29b9
css: use :focus-visible instead of :focus(visible)
...
This is aligning our language with
https://www.w3.org/TR/selectors-4/
2020-04-15 23:09:36 -04:00
Matthias Clasen
3d988d5fe9
Merge branch 'matthiasc/for-master' into 'master'
...
window: Don't set is-active twice
See merge request GNOME/gtk!1698
2020-04-15 22:26:25 +00:00
Matthias Clasen
dbd578eaef
window: Don't set is-active twice
...
We are listening to focus change events for this
no need to duplicate the work in ::state-changed.
2020-04-15 17:08:15 -04:00
Nelson Benítez León
45d7051dff
GtkFilechooserWidget: prevent oblivious selection of file
...
which could happen after confirming the "file overwrite"
dialog and may result in a different file being overwritten
causing data loss.
The oblivious file selection can be done by a mouse
click or keyboard press sent inadvertently just after
confirming the "file overwrite" dialog (and before the
enclosing GtkfilechooserDialog is closed).
Fixed by adding a flag to ignore any button/key press
events sent to the file list. We set this flag just
after the user accepts the "file overwrite" dialog (which
means the enclosing GtkfilechooserDialog is about to
get closed). And we restablish the flag when the dialog
is shown again (in its map() handler).
Fixes data loss issue #2288
2020-04-15 16:46:43 -04:00
Matthias Clasen
ec848dc83f
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2612
See merge request GNOME/gtk!1695
2020-04-15 19:28:32 +00:00
Matthias Clasen
d7bdfae8bb
Updates to NEWS
2020-04-15 15:22:53 -04:00
Matthias Clasen
8e9406a082
Move key event rewriting
...
Stop rewriting key and focus events on the GDK side.
Instead deliver them as they are, and propagate them
from the root on the gtk side, in gtkmain.c. And
stop complaining about focus events on popups - we
can just ignore them if we have no use for them.
2020-04-15 14:56:32 -04:00
Matthias Clasen
031b248c20
window: Fix setting :is-active
...
We want to listen to focus events from the windowing
system here, relying on crossing events for this doesn't
work.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2612
2020-04-15 14:43:00 -04:00
Matthias Clasen
a2a194f71e
eventcontroller: Fix signal marshallers
...
GdkEvent is no longer a GObject. Any signals taking
events as arguments need to have their marshallers
fixed. Thankfully, we have few of these left.
2020-04-15 14:36:04 -04:00
Jakub Steiner
bb8c2016a8
Merge branch 'wip/jimmac/drop-text-shadow' into 'master'
...
Adwaita: drop text shadows for buttons
Closes #2280
See merge request GNOME/gtk!1693
2020-04-15 17:21:32 +00:00
Jakub Steiner
b6353a6369
Adwaita: drop text shadows for buttons
...
- People seem to misunderstand the unsharp-mask-like increase
of visual contrast for "fuziness". That is not the reason for
the change. The stylistic change of just going with flat
text label allows to simplify the code and drop complexity.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2280
2020-04-15 18:27:49 +02:00
Matthias Clasen
6882121341
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1694
2020-04-15 16:23:14 +00:00
Jakub Steiner
97ceb03008
Merge branch 'wip/jimmac/checkradio-focus' into 'master'
...
Adwaita: check & radio focus ring
See merge request GNOME/gtk!1690
2020-04-15 15:47:14 +00:00
Jakub Steiner
a5234f2d09
Merge branch 'wip/jimmac/active-state-for-checkradios' into 'master'
...
Adwaita: fix active state for radios & checkboxes
Closes #2493
See merge request GNOME/gtk!1689
2020-04-15 15:47:09 +00:00
Jakub Steiner
faaf80dd46
Merge branch 'wip/jimmac/levelbar-punch' into 'master'
...
Adwaita: no edge highlight
Closes #2494
See merge request GNOME/gtk!1691
2020-04-15 15:45:05 +00:00
Matthias Clasen
b072ad9993
widget-factory: Add menu style class in popovers
...
We have a hand-rolled popover menu on page 3 that looks
really bad right now. Adding the menu style class makes
it all better.
2020-04-15 11:36:09 -04:00
Jakub Steiner
90fb58e923
Merge branch 'wip/jimmac/treeview-borders' into 'master'
...
Adwaita: slightly increase contrast for treeview borders
Closes #2238
See merge request GNOME/gtk!1692
2020-04-15 15:35:32 +00:00
Jakub Steiner
e6fcac29b5
Adwaita: slightly increase contrast for treeview borders
...
- sligtly increase contrast for the treeview borders
- FIXME: High Contrast seems to drop the borders completely,
there might be some trickery for using border-left-color and
border-top-color this way as even forcing the color 'red' seems
to render invisible on HC.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2238
2020-04-15 14:55:33 +02:00
Matthias Clasen
71f8649f7f
docs: Small revision of input handling overview
...
Remove a vestigial touch events section.
2020-04-15 08:08:12 -04:00
Jakub Steiner
3f9ee61a36
Adwaita: no edge highlight
...
- Levelbars and progressbars are indicators, not controls. They don't
need no affordance signifier. Make it flat!
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2494
2020-04-15 13:56:12 +02:00
Jakub Steiner
097b585bbc
Adwaita: check & radio focus ring
...
- this slipped through Frederik's patch
2020-04-15 13:45:59 +02:00
Jakub Steiner
ed2a4e2d93
Adwaita: fix active state for radios & checkboxes
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2493
2020-04-15 13:34:41 +02:00
Matthias Clasen
fb2502fa5f
Merge branch 'emoji-keynav' into 'master'
...
Emoji keynav
See merge request GNOME/gtk!1687
2020-04-15 05:34:03 +00:00
Matthias Clasen
c4e66ec485
Merge branch 'arnaudb/fix-typo' into 'master'
...
Fix typo in IconTheme.
See merge request GNOME/gtk!1686
2020-04-14 19:27:34 +00:00
Matthias Clasen
4e6b62e564
emojichooser: link sections for keynav
...
Make Up/Down jump between sections in the Emoji grid.
2020-04-14 15:07:58 -04:00
Matthias Clasen
8f75df1cb3
flowbox: Add a private api to disable move-cursor
...
Without this, it seems impossible to make cross-section
keynav in the Emoji chooser work. I've tried, but got
lost between the focus, grab_focus, move_cursor and
keynav-failed vfuncs and signals, and their competing
implementations GtkFlowBox and GtkEmojiChooser.
2020-04-14 15:07:47 -04:00
Matthias Clasen
037b0259d8
flowbox: Remove can-focus handling
...
With the new meaning of can-focus, this doesn't make
sense anymore.
2020-04-14 15:07:10 -04:00
Arnaud Bonatti
8c769ea3f3
Fix typo in IconTheme.
...
The add_search_path() method was
using the resource_path property
in place of the search_path one.
2020-04-14 20:43:06 +02:00
Matthias Clasen
7179e8d5f3
emojichooser: Improve keynav, again
...
When the focus is moved to one of the Emoji children,
scroll it into view.
2020-04-14 13:25:20 -04:00
Matthias Clasen
325a485315
emojichooser: Improve keynav
...
Add an action to scroll to the next or previous section,
and bind it to Ctrl-n/Ctrl-p.
2020-04-14 13:25:20 -04:00
Emin Tufan Çetin
54300e1cc3
Update Turkish translation
2020-04-14 16:09:12 +00:00
Sabri Ünal
db2e07758f
Update Turkish translation
2020-04-14 16:01:18 +00:00
Matthias Clasen
eb5b3083ff
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1685
2020-04-14 14:07:54 +00:00
Matthias Clasen
cd42227c29
Merge branch 'library-versioning' into 'master'
...
build: Prepare library versioning
See merge request GNOME/gtk!1684
2020-04-14 14:00:42 +00:00
Matthias Clasen
6870159c1d
build: Prepare library versioning
...
Set version and soversion separately for the library.
When we do the 4.0 release, we will set:
gtk_soversion = '1'
gtk_library_version = '1.0.0'
See https://gitlab.gnome.org/GNOME/gtk/-/issues/1963
2020-04-14 09:15:31 -04:00
Matthias Clasen
a072e16297
appchooserwidget: Drop the Private struct
2020-04-13 20:04:32 -04:00
Matthias Clasen
78ac2f2d5b
lockbutton: Drop the Private struct
2020-04-13 20:04:32 -04:00
Matthias Clasen
9f5955e1b1
expander: Drop the Private struct
2020-04-13 20:04:32 -04:00
Matthias Clasen
fa759272b0
colorswatch: Drop the Private struct
2020-04-13 20:04:32 -04:00
Matthias Clasen
d802b35578
Merge branch 'wip/matthiasc/monitor-signals' into 'master'
...
Add enter/leave signals for monitors
See merge request GNOME/gtk!1680
2020-04-13 23:25:55 +00:00
Matthias Clasen
fdf812b7d7
Merge branch 'use-gtk-doc-for-gtk4' into 'master'
...
Use gtk-doc from the gtk-doc-for-gtk4 branch
See merge request GNOME/gtk!1683
2020-04-13 23:21:57 +00:00
Matthias Clasen
1205f74106
Always use gtk-doc as a subproject for now
...
We need the support for actions syntax, among
other things.
2020-04-13 16:40:57 -04:00
Matthias Clasen
906c3c570a
Switch the gtk-doc subproject to the gtk-doc-for-gtk4 branch
...
This branch contains assorted fixes and enhancements that
are needed to build the gtk4 docs.
2020-04-13 16:40:11 -04:00
Mathieu H
57a56538eb
Remove the blacklist list in convert-emoji.c since now it is supported
2020-04-13 16:29:02 -04:00
Aurimas Černius
6fbc9e8c3e
Updated Lithuanian translation
2020-04-13 22:43:30 +03:00
Matthias Clasen
d27adb10a0
surface: Document coordinate systems a bit
...
Mention that sizes are in application pixels.
Also, remove some X11-specific docs.
2020-04-13 09:29:11 -04:00
Matthias Clasen
f97180beee
inspector: Show scales other than 2
...
We were hardcoding that monitor scales can only be
1 or 2. Not true.
2020-04-13 09:17:46 -04:00
Matthias Clasen
209398d736
wayland: emit ::enter/leave-monitor
...
These signals directly mirror the surface_enter/leave events
of the Wayland protocol, so this is very staightforward.
2020-04-13 07:54:31 -04:00
Matthias Clasen
3ee18b88b9
gdk: Add ::enter/leave-monitor signals
...
These are useful to keep track of what monitors a window is on.
2020-04-13 07:54:31 -04:00
Matthias Clasen
64b0c63190
Merge branch 'modal-buttons' into 'master'
...
Modal buttons
See merge request GNOME/gtk!1679
2020-04-13 11:15:14 +00:00
Matthias Clasen
8ff540eb4c
appchooserbutton: Drop the Private struct
2020-04-13 01:08:52 -04:00
Matthias Clasen
9194b7388f
Add a GtkAppChooserButton:modal property
...
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:43:19 -04:00
Matthias Clasen
6831d3e28e
fontbutton: Drop the Private struct
2020-04-13 00:32:50 -04:00
Matthias Clasen
800f1c03d5
Add a GtkFontButton:modal property
...
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:28:34 -04:00
Matthias Clasen
7a0355fcb1
colorbutton: Drop the Private struct
2020-04-13 00:28:11 -04:00
Matthias Clasen
15d58a868a
Add a GtkColorButton:modal property
...
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-13 00:17:00 -04:00
Matthias Clasen
61f21fc9e9
filechooserbutton: Make dialog modal by default
...
This is the expected behavior, so default to it.
2020-04-13 00:12:30 -04:00
Matthias Clasen
9e068d3a46
filechooserbutton: Drop the Private struct
2020-04-12 23:57:49 -04:00
Matthias Clasen
2aa136a19c
Add a GtkFileChooserButton:modal property
...
Nowadays, dialogs are expected to be attached, typically,
and that only happens when they are marked as modal.
2020-04-12 23:45:03 -04:00
Matthias Clasen
1dfd514f7f
Merge branch 'matthiasc/for-master' into 'master'
...
Adwaita: visible focus outline for color swatches
See merge request GNOME/gtk!1678
2020-04-13 03:42:26 +00:00
Matthias Clasen
08fbd012ec
window: Make resize cursors work for modal dialogs
...
We were inadvertedly not letting the grab_widget determine
a cursor. This was showing up as resize cursors not appearing.
2020-04-12 22:18:50 -04:00
Matthias Clasen
638508fa20
gtk-demo: Group the OpenGL demos
2020-04-12 21:58:07 -04:00
Matthias Clasen
ce6c7bae51
gtk-demo: Add a gears demo
2020-04-12 20:52:15 -04:00
Matthias Clasen
19f7b7ed40
Adwaita: visible focus outline for color swatches
...
Make the focus outline for color swatches visible
again.
2020-04-12 20:13:50 -04:00
Matthias Clasen
e3dba28666
Merge branch 'arnaudb/better-substitution' into 'master'
...
Fix some gtk-builder-tool substitutions.
See merge request GNOME/gtk!1675
2020-04-12 22:53:54 +00:00
Matthias Clasen
88aa548965
Merge branch 'matthiasc/for-master' into 'master'
...
text: Fix placing the cursor on click
See merge request GNOME/gtk!1673
2020-04-12 22:07:20 +00:00
Matthias Clasen
17a9b13af2
text: Be more careful with cached layouts
...
If we call any functions that may call ensure_layout
themeselves, we risk having the cached layout pulled
out from underneath. Better play it safe and take a
reference.
2020-04-12 17:32:57 -04:00
Matthias Clasen
1efa781a19
window: Cosmetic cleanup
...
Use a convenience function to get the current event time.
2020-04-12 17:32:13 -04:00
Matthias Clasen
0a19d7ef08
textview: Fix an erroneous unref
...
This was left behind by accident in 0ee58e9ef4
.
2020-04-12 17:32:13 -04:00
Arnaud Bonatti
926fb208ba
Coding style improvements.
2020-04-12 21:21:24 +02:00
Arnaud Bonatti
e76dee07c5
Fix tests for margin-left and margin-right.
2020-04-12 19:28:33 +02:00
Arnaud Bonatti
11a43cf554
Replace also margin-left and margin-right.
2020-04-12 19:28:29 +02:00
Arnaud Bonatti
a7218da202
Fix tests for hexpand and vexpand.
2020-04-12 19:28:29 +02:00
Arnaud Bonatti
ed362fcc5b
Fix --3to4 tests for margin substitution.
2020-04-12 19:28:29 +02:00
Arnaud Bonatti
17ec74da35
Fix a gtk-builder-tool substitution.
...
The margin-left and margin-right properties have been
removed in favor of margin-start and margin-end ones.
2020-04-12 19:28:29 +02:00
Matthias Clasen
754d6d1a04
wayland: Avoid criticals when unsetting transient parents
...
Must not check the display when parent is NULL.
2020-04-12 12:10:18 -04:00
Matthias Clasen
ff53d5ba11
stylecontext: Respect cursor aspect ratio everywhere
...
We were using the new cursor aspect ratio setting in
the snapshotting code, but not in gtk_render_insertion_cursor.
Make them both behave the same.
2020-04-12 11:44:13 -04:00
Matthias Clasen
7233a70d47
reftest: get backtraces
...
In the hope of making ci-only failures less of a black hole,
add a backtrace to the messsage for criticals.
This could eventually go into GLib (pass backtrace symbols along
as a log field for criticals), but for now this will do.
2020-04-12 11:44:13 -04:00
Emmanuele Bassi
12990b3520
Merge branch 'ci-error-report' into 'master'
...
ci: Count 'ERROR' codes as failures
See merge request GNOME/gtk!1674
2020-04-12 13:58:55 +00:00
Emmanuele Bassi
95d807ab61
ci: Count 'ERROR' codes as failures
...
Otherwise they'll be dropped from our reports.
2020-04-12 14:28:59 +01:00
Matthias Clasen
8a1a96a47e
text: Fix placing the cursor on click
...
Commit c297d45b8a
accidentally removed the
check for the right modifier mask, causing us to
always extend the selection.
2020-04-12 09:19:12 -04:00
sicklylife
c31916081f
Update Japanese translation
2020-04-12 08:53:45 +00:00
Piotr Drąg
0a1e19f4e3
Update POTFILES.in
2020-04-12 10:45:54 +02:00
Matthias Clasen
7d3f3b7ab8
Merge branch 'show-uri-async' into 'master'
...
Redo gtk_show_uri_on_window
See merge request GNOME/gtk!1671
2020-04-12 02:27:38 +00:00
Matthias Clasen
432b741ab7
gtk: Port all users to the new gtk_show_uri()
...
We were only handling the error in one place anyway.
2020-04-11 22:10:08 -04:00
Matthias Clasen
703f18ce66
Redo gtk_show_uri_on_window
...
Make this a full async function, and add a simple wrapper.
Call gtk_show_uri_full() if you need control over the
results, and use gtk_show_uri() if you are fine with
ignoring any errors.
2020-04-11 21:56:32 -04:00
Matthias Clasen
4da82bde7b
Merge branch 'current-event-apis' into 'master'
...
Current event apis
See merge request GNOME/gtk!1668
2020-04-12 00:24:14 +00:00
Matthias Clasen
feee281cf8
Drop gtk_get_current_ apis
...
We have event controller apis to replace these.
There is one remaining use of gtk_get_current_event_time
in gtkwindow.c, so we can't drop the implementation yet.
Add a section in the migration guide for this.
2020-04-11 17:29:27 -04:00
Matthias Clasen
443fd4d63d
tests: Stop using gtk_get_current_ apis
...
Replace these by equivalent event controller
apis where needed.
2020-04-11 17:29:27 -04:00
Matthias Clasen
4b346538e2
gtk: Port widgets away from gtk_get_current_ apis
...
This commit handles complicated cases where we selections.
We handle this by adding extend and modify parameters to
the ::move-cursor signals, and adjust the bindings
accordingly.
2020-04-11 17:29:27 -04:00
Matthias Clasen
0ee58e9ef4
gtk: Port widgets away from gtk_get_current_ apis
...
Use the event controller equivalents where needed.
This commit covers the simple cases.
2020-04-11 17:29:27 -04:00
Matthias Clasen
bd56bc9055
Add gtk_event_controller_get_current_event[_state]
...
For now these are private, to replace internal uses
of gtk_get_current_event[_state], but we may want to
make them public.
2020-04-11 17:29:27 -04:00
Matthias Clasen
3e7e862415
gtk: Just use current time for showing urls
...
We don't really have an event anywhere close in most
cases, and we already pass GDK_CURRENT_TIME in half
the cases anyway.
If we want to be serious about this, we need to pass
the event itself, since future focus-stealing protocols
may not rely on just a timestamp.
2020-04-11 17:29:27 -04:00
Matthias Clasen
4eeb413047
entrycompletion: Remove an unused field
...
No point in storing a device that is never used.
2020-04-11 17:29:27 -04:00
Matthias Clasen
661f3466c2
Merge branch 'matthiasc/for-master' into 'master'
...
broadway: Fix the build
See merge request GNOME/gtk!1670
2020-04-11 21:16:11 +00:00
Matthias Clasen
e735554ced
broadway: Fix the build
...
We need to depend on gdkenum_h, since we are (indirectly)
including gdkenumtypes.h in the broadway server build.
2020-04-11 16:24:05 -04:00
Matthias Clasen
520ea7c39d
Merge branch 'jjardon/more_licenses' into 'master'
...
gtk/gtkaboutdialog: Add some more very common licenses:
See merge request GNOME/gtk!1667
2020-04-11 16:47:32 +00:00
Javier Jardón
ffa345e4ab
gtk/gtkaboutdialog: Add some more very common licenses:
...
- BSD 3-Clause "New" or "Revised" license
- Apache License 2.0
- Mozilla Public License 2.0
2020-04-11 16:49:09 +01:00
Emmanuele Bassi
e072d9b28b
Merge branch 'gsk-public-symbols' into 'master'
...
Install all headers with public symbols
Closes #2607
See merge request GNOME/gtk!1666
2020-04-11 15:21:11 +00:00
Matthias Clasen
9f5b04e65c
Merge branch 'action-docs' into 'master'
...
Action docs
See merge request GNOME/gtk!1665
2020-04-11 15:12:22 +00:00
Emmanuele Bassi
d08310096c
Conditionally include the GSK broadway and vulkan symbols
...
In case GTK is built without these features.
2020-04-11 15:42:51 +01:00
Emmanuele Bassi
20d0d6fae2
Revert "Do not install GSK headers for missing backends"
...
This reverts commit cd5cded430
.
The headers are public, but the symbols availability is conditional on
the GTK build.
2020-04-11 15:41:47 +01:00
Matthias Clasen
6b9ac1043b
Document actions
2020-04-11 10:07:31 -04:00
Matthias Clasen
c5b4066714
gdk: Small documentation fixes
2020-04-11 10:07:31 -04:00
Matthias Clasen
b09b2dd2cd
testsuite: Make actions test order-independent
...
We only want to check that the actions are what we
expect, not that they are registered in a particular
order.
2020-04-11 10:07:31 -04:00
Matthias Clasen
72a0828101
Merge branch 'respect-window-cursors' into 'master'
...
window: Respect widget cursors
See merge request GNOME/gtk!1663
2020-04-10 18:56:44 +00:00
Matthias Clasen
7379c34a39
window: Respect widget cursors
...
gtk_widget_set_cursor can be used on a GtkWindow; we
should not blow away the result when temporarily installing
resize cursors.
2020-04-10 14:36:55 -04:00
Matthias Clasen
6cd1b9955b
Merge branch 'remove-style-reset' into 'master'
...
Remove gtk_style_context_reset_widgets
See merge request GNOME/gtk!1662
2020-04-10 17:36:03 +00:00
Matthias Clasen
a6a31827bc
Remove gtk_style_context_reset_widgets
...
This should never be necessary to call from the outside.
Whenever we fail to update styles properly, it is a bug.
2020-04-10 12:45:28 -04:00
Matthias Clasen
84939a612c
Merge branch 'reduce-style-context-use' into 'master'
...
Use gtk_widget_add/remove_css_class more
See merge request GNOME/gtk!1661
2020-04-10 16:43:05 +00:00
Matthias Clasen
394ea32e93
Use gtk_widget_add/remove_css_class more
...
Replace most uses of gtk_style_context_add/remove_class
by the new APIs. The only remaining uses of the old API
are in save/restore situations.
2020-04-10 12:09:57 -04:00
Matthias Clasen
2bd36d490b
Merge branch 'fix-accel-length' into 'master'
...
accelgroup: Fix an invalid write
Closes #2602
See merge request GNOME/gtk!1660
2020-04-10 13:27:07 +00:00
Matthias Clasen
ad1bc75dd2
accelgroup: Fix an invalid write
...
This was lost by accident in d110fddbce
.
Fixes : #2602
2020-04-10 08:24:03 -04:00
Piotr Drąg
7505c1fd7c
Update POTFILES.in and POTFILES.skip
2020-04-10 13:56:58 +02:00
Matthias Clasen
8780906b93
Merge branch 'fix-radiobuttons' into 'master'
...
radiobutton: Fix selection on focus-in
Closes #2326
See merge request GNOME/gtk!1658
2020-04-10 04:17:37 +00:00
Matthias Clasen
0ed2e970be
Merge branch 'popover-initial-focus' into 'master'
...
Popover initial focus
See merge request GNOME/gtk!1657
2020-04-10 04:17:15 +00:00
Matthias Clasen
58253d567f
radiobutton: Fix selection on focus-in
...
We need to unselect the previously selected button
to preserve radioness.
Fixes : #2326
2020-04-09 22:38:30 -04:00
Matthias Clasen
c09c61769c
modelbutton: Catch focus-in more carefully
...
We need to unset the propagation limit on the focus
controller, else we miss the focus-in when the focus
enters the popover upon initial popup, when it comes
from the parent button.
2020-04-09 22:22:28 -04:00
Matthias Clasen
9b5dc35650
popovermenu: Remove debug spew
2020-04-09 21:41:02 -04:00
Matthias Clasen
3c9ada14fe
Merge branch 'label-double-focus' into 'master'
...
Avoid double focus in labels
Closes #135
See merge request GNOME/gtk!1656
2020-04-10 01:34:49 +00:00
Matthias Clasen
6b4d6c3771
Merge branch 'scale-button-double-focus' into 'master'
...
scalebutton: Don't derive from GtkButton
See merge request GNOME/gtk!1655
2020-04-10 01:21:25 +00:00
Matthias Clasen
b15f16e8db
Adwaita: Don't render focus around labels with links
...
This avoids the 'double outline' problem for labels
with links.
Fixes : #135
2020-04-09 21:19:36 -04:00
Matthias Clasen
e3b9dfef1c
label: Improve link styling
...
Add a .link style class on labels that contain links,
so we can avoid the focus outline around the label
when individual links are focused, and use the link
node when rendering the focus on links.
2020-04-09 21:19:22 -04:00
Matthias Clasen
822c2aba36
scalebutton: Don't derive from GtkButton
...
Make GtkScaleButton a widget that has a toggle button
as a child, just like all the other button widgets now.
The immediate benefit of this arrangement is to avoid
the "double focus" problem when we pop up the popup.
Update accessible, demos and tests to match.
2020-04-09 20:43:45 -04:00
Matthias Clasen
a11f9fea76
Merge branch 'wip/matthiasc/can-focus' into 'master'
...
Implement new focus behavior
See merge request GNOME/gtk!1652
2020-04-10 00:26:53 +00:00
Matthias Clasen
f16c829190
Mention focus changes in the migration guide
2020-04-09 18:26:31 -04:00
Matthias Clasen
16c820c2f0
Small documentation tweaks
...
Update the docs for GtkWidget:can-focus and :focus-on-click.
2020-04-09 18:26:31 -04:00
Matthias Clasen
72ae6daa1e
Move focus to the parent if a popover is dismissed
...
This is better than just dropping focus altogether,
and is expected behavior in most cases.
2020-04-09 18:26:31 -04:00
Matthias Clasen
35ba24d2e8
Update a11y test results
2020-04-09 18:26:10 -04:00
Matthias Clasen
508cb6160c
a11y: Fix focusable state
...
The :can-focus property is no longer very useful to
give an indication of what is focusable, since it is
TRUE for almost all widgets now. Patch things up
to by looking at known widget types.
2020-04-09 18:14:15 -04:00
Matthias Clasen
b9a76ddd75
Fix the tools tests to not set can-focus
2020-04-09 17:50:29 -04:00
Matthias Clasen
038190c5a8
Disable focus-chain test that depends on the environment
...
The color editor shows a color picker button only if it
finds a suitable implementation, which it does not in ci.
So disable the focus-chain test for page 3.
2020-04-09 17:50:29 -04:00
Matthias Clasen
2ae08e632c
color editor: Make the sample non-focusable again
...
This is one of the situations, where can-focus can still
be used to tweak focus behavior of leaf widgets. Color
swatches are focusable by default to allow selecting colors
with the keyboard. But when used as color samples, they
should not take focus.
2020-04-09 17:50:29 -04:00
Matthias Clasen
99eed078bd
Remove focusable-container tests
...
Like the previous commit, these tests were relying
on setting :can-focus to make an unsuspecting container
focusable, which does not work anymore.
2020-04-09 17:50:29 -04:00
Matthias Clasen
6720552afd
Remove the focus test
...
This test was expecting to make existing widgets like
GtkBox focusable by setting :can-focus. That just doesn't
work anymore.
The focus chain testing that is done here is already
better covered by test-focus-chain, so lets just remove this.
2020-04-09 17:50:29 -04:00
Matthias Clasen
6f01508aa8
Fix up focus chain result
...
The notebook grab_focus change in the previous commit made
backwards tabbing work as expected, and thereby changed the
output of one of the focus-chain tests.
2020-04-09 17:50:29 -04:00
Matthias Clasen
632524f679
Reinstate expected focus behavior
...
After the :can-focus change in the previous commit, widgets
need to set suitable focus and grab_focus implementations
to implement the desired focus behavior.
This commit does that for all widgets.
2020-04-09 17:50:29 -04:00
Matthias Clasen
22e1827f84
Change the default value of GtkWidget:can-focus
...
Make widgets can-focus by default, and change the semantics
of can-focus to be recursive . If it is set to FALSE, focus
can not enter the widget or its descendents at all anymore.
This commit temporarily breaks focus behavior of widgets
that did not expect to receive focus.
2020-04-09 17:50:29 -04:00
Matthias Clasen
3c39613d9c
widget: Add common focus vfunc implementations
...
Privately export a number of implementations for the focus
and grab_focus vfuncs that cover many common cases.
2020-04-09 17:50:29 -04:00
Matthias Clasen
46ff9f891a
gizmo: Allow passing changing focus behavior
...
We need this in popovers. Maybe it could be done better
by defining one-off custom widgets.
2020-04-09 17:50:29 -04:00
Matthias Clasen
97ff1b83dc
widget: Make the :has-focus property readonly
...
The only place where this should be set is when making
a widget the focus-widget of a window. We still keep
the property around in readonly form, since there are
a few places where we rely on property notification
for it.
2020-04-09 17:50:29 -04:00
Matthias Clasen
9416856420
testsuite: Stop setting :has-focus
...
This is not necessary, whenever we want to set the initial
focus in a ui file, we can set GtkWindow:focus-widget.
2020-04-09 17:50:29 -04:00
Matthias Clasen
c1459cc45b
widget: Drop the :is-focus property
...
This property doesn't carry any new information compared
to GtkWindow:focus-widget. We still keep the gtk_widget_is_focus
getter, as a convenient shortcut.
2020-04-09 17:50:29 -04:00
Matthias Clasen
4fe8c037c7
reftests: Stop using can-focus
2020-04-09 17:50:29 -04:00
Matthias Clasen
b1afe5ff23
a11y tests: Stop using can-focus
2020-04-09 17:50:29 -04:00
Matthias Clasen
bbd4fb8798
testsuite: Stop using can-focus
2020-04-09 17:50:29 -04:00
Matthias Clasen
b3b29e37fd
inspector: Drop more uses of can-focus
2020-04-09 17:50:29 -04:00
Matthias Clasen
f996ba6585
inspector: Remove can-focus from ui files
2020-04-09 17:50:29 -04:00
Matthias Clasen
7ca36cd2d4
Stop setting can-focus in ui files
...
None of these settings are necessary.
2020-04-09 17:50:29 -04:00
Matthias Clasen
2a18f2150d
window: Make set_focus equal to grab_focus
...
Make gtk_window_set_focus call gtk_widget_grab_focus internally.
This means that set_focus can now end up putting the focus on
a child of the passed-in widget, and makes the focus-widget
property work for setting initial focus to (the child of) an
entry in a ui file.
2020-04-09 17:50:28 -04:00
Matthias Clasen
a65fd81106
root: Reorganize focus handling
...
Make :focus-widget a GtkWindow property and add vfuncs
to the GtkRoot interface instead of the property.
2020-04-09 17:50:28 -04:00
Matthias Clasen
ff8217db40
Add more focus chain tests
...
Test page 2 and 3 of widget-factory as well, and try other directions.
2020-04-09 17:50:28 -04:00
Matthias Clasen
a3861bf9a0
Fix running focus-chain tests in ci
...
The widget-factory ui files require geettings
(for the color chooser), so set GSETTINGS_SCHEMA_DIR.
2020-04-09 17:50:28 -04:00
Matthias Clasen
b86c1446a4
notbook: Fix a bug in focus handling
...
After the header widget was introduced, focus would get
stuck in a loop between actions and tabs.
This could be seen in the notebook on page 3 of
widget-factory.
2020-04-09 17:50:28 -04:00
Matthias Clasen
9ce58bdb0c
coloreditor: Draw a focus around the color plane
...
Not doing it was just an oversight.
2020-04-09 14:11:18 -04:00
Matthias Clasen
9f252f0ceb
colorplane: Set a css name
...
Every widget should have one.
2020-04-09 14:10:23 -04:00
Matthias Clasen
7008a531bb
Merge branch 'wip/xdg-popup-move' into 'master'
...
Wayland popup moving
See merge request GNOME/gtk!1017
2020-04-08 23:59:02 +00:00
Jonas Ådahl
458b8a6554
wayland: Move transient-for field to GdkWaylandToplevel
...
A toplevel will only ever be transient-for to another toplevel, and only
a toplevel will ever be transient-for, so move the field into the
GdkWaylandToplevel, and make it a pointer to another GdkWaylandToplevel.
2020-04-08 23:32:47 +02:00
Jonas Ådahl
307cc69adb
wayland: Add surface to toplevel list only if toplevel
...
It was using another check (has parent) to do this, but now we have a
much more obvious way of creating surfaces, so we can use the type
directly.
2020-04-08 23:32:47 +02:00
Jonas Ådahl
ab6b5ae568
wayland: Remove own pointer to the popup parent
...
It's there already as the GdkSurface::parent, no need to duplicate.
2020-04-08 23:32:47 +02:00
Jonas Ådahl
0e601c0a70
wayland: Move toplevel/popup/drag surface definitions higher up
...
We them up there, so that code higher up compared to where they are
defined now can make use of them. Also add a few macros for type
checking and casting.
2020-04-08 23:32:47 +02:00
Jonas Ådahl
5425edff82
wayland: Move popups with xdg_popup.reposition
...
The third version of xdg-shell introduces support for explicit popup
repositioning. If available, make use of this to implement popup
repositioning.
Note that this does *NOT* include atomic parent-child state
synchronization. For that,
https://gitlab.freedesktop.org/wayland/wayland-protocols/issues/13 will
be needed.
This currently uses my own fork of wayland-protocols which adds meson
support, so that we can use it as a subproject. Eventually when
wayland-protocols' meson support lands upstream, we should change it to
point there.
Silence some meson warnings while at it to make CI happy.
This also bumps the glib requirement, since g_warning_once() is used.
2020-04-08 23:32:47 +02:00
Jonas Ådahl
213c471bb7
build: Change wrap revisions to use master instead of origin/master
...
Using origin/master crashes meson.
2020-04-08 23:32:47 +02:00
Jakub Steiner
9ae0fe7f3a
Merge branch 'Gtk4_blue_focus_rings' into 'master'
...
Blue outlines / focus rings
See merge request GNOME/gtk!1629
2020-04-08 21:12:57 +00:00
Frederik F
abe6876f7c
Blue outlines / focus rings
...
- introduce two new colors: $focus_border_color for focused / outlined elements and $_coloured_focus_border_color for focused / outlined elements with a colored background color, like suggested/destructive buttons or selected elements
- set outline / focus color, offset and style accordingly for all widgets
- adapt entry focus color
2020-04-08 21:12:57 +00:00
Matthias Clasen
53d74fd2dc
Merge branch 'render-node-types' into 'master'
...
Turn GskRenderNode into a fundamental type
See merge request GNOME/gtk!1649
2020-04-08 20:55:14 +00:00
Emmanuele Bassi
3f0a830f3c
Properly annotate the render node constructors
...
Now that the GskRenderNode subclasses are recognised as proper
sub-types, we can annotate the constructors with their type. The C API
remains the same.
2020-04-08 16:17:08 +01:00
Emmanuele Bassi
e0323fcdc2
Add get_type() functions for GskRenderNode subclasses
...
The introspection scanner tries to match a type name with a get_type()
function, in order to correctly identify a type as a class.
If the function is not available, we have two choices:
- add some special case inside the introspection scanner, similar to
how GParamSpec subclasses are handled in GObject
- add a simple get_type() function
The latter is the simplest approach, and we don't need to change that
much, since we still register all render nodes at once.
2020-04-08 16:07:04 +01:00
Emmanuele Bassi
cd5cded430
Do not install GSK headers for missing backends
...
Broadway and Vulkan renderers are optional; if GTK hasn't been built
with their GSK renderers, we should not install their headers.
2020-04-08 15:41:21 +01:00
Emmanuele Bassi
54e4e6cd23
Improve the gtktypefuncs.inc generator
...
Remove the plug/socket exception, and add exceptions for non-X11
windowing systems.
Additionally, speed up the file generation by avoiding string
concatenation in Python.
2020-04-08 15:41:19 +01:00
Emmanuele Bassi
59852d3425
Add missing transfer annotation
2020-04-08 15:40:15 +01:00
Emmanuele Bassi
d701a89281
Turn GskRenderNode into a derivable type
...
Language bindings—especially ones based on introspection—cannot deal
with custom type hiearchies. Luckily for us, GType has a derivable type
with low overhead: GTypeInstance.
By turning GskRenderNode into a GTypeInstance, and creating derived
types for each class of node, we can provide an introspectable API to
our non-C API consumers, with no functional change to the C API itself.
2020-04-08 15:40:15 +01:00
Emmanuele Bassi
5e095cd208
Add macro for exported variables
...
The logic is based on the similar macro in GLib, but with the
appropriate GDK symbols.
2020-04-08 15:40:15 +01:00
Emmanuele Bassi
d2bdf3d5a1
Merge branch 'ci-meson-bump' into 'master'
...
ci: Update the version of Meson in our Docker image
See merge request GNOME/gtk!1651
2020-04-08 12:17:50 +00:00
Emmanuele Bassi
e692385baa
ci: Update the version of Meson in our Docker image
...
Needed for !1017 .
2020-04-08 12:26:58 +01:00
Matthias Clasen
1e8df851e9
Merge branch 'matthiasc/for-master' into 'master'
...
Remove an unused backend includes
See merge request GNOME/gtk!1648
2020-04-07 20:30:43 +00:00
Matthias Clasen
904db0a8f7
Merge branch 'imcontextsimple-drop-ifdefs' into 'master'
...
impcontextsimple: Drop ifdef'ed platform dependencies
See merge request GNOME/gtk!1647
2020-04-07 19:27:51 +00:00
Matthias Clasen
6b7cc8baa6
Remove an unused backend includes
...
These includes are just leftovers.
Every time where we do an #ifdef GDK_WINDOWING... in gtk/,
something went wrong. Don't do it needlessly.
2020-04-07 15:13:18 -04:00
Matthias Clasen
71fe843d99
impcontextsimple: Drop ifdef'ed platform dependencies
...
The proper way to do this would be to adapt the tables
to have the right data for the platform. Since 4.0 is
a new start in many ways, lets clean this up.
2020-04-07 14:54:04 -04:00
Matthias Clasen
552a681816
Merge branch 'private-x11-types' into 'master'
...
Do not parse all GDK-X11 source files
See merge request GNOME/gtk!1646
2020-04-07 18:18:55 +00:00
Emmanuele Bassi
2f0016eb08
Rename gdkx11keys.h
...
The header is now private, so it should follow the same naming scheme
for private GDK-X11 headers.
2020-04-07 18:12:58 +01:00
Emmanuele Bassi
f87291cac2
Hide GdkX11Keymap's GType function
...
It's not a public object.
2020-04-07 18:10:01 +01:00
Emmanuele Bassi
37c3ba2645
Do not parse all GDK-X11 source files
...
We don't need all of them, only the ones that contain public API. This
allows us to reduce the chance of a stray symbol getting incorrectly
added to the introspection data.
2020-04-07 18:06:08 +01:00
Matthias Clasen
ba05787a06
Merge branch 'attribute-docs' into 'master'
...
entry: Document buildable support
See merge request GNOME/gtk!1643
2020-04-07 04:15:33 +00:00
Matthias Clasen
12b97ffd24
entry: Document buildable support
2020-04-06 23:33:22 -04:00
Matthias Clasen
1ae60cb713
entry: Add <attributes> support
...
Make entries support the same <attributes> syntax
as labels.
Closes : #1335
2020-04-06 22:59:54 -04:00
Matthias Clasen
3371e3aa49
Move label attribute parser code
...
We want to reuse the parser for <attributes> in several
widgets, so move it to a shared place.
2020-04-06 22:59:45 -04:00
Matthias Clasen
baeae71d12
Merge branch 'cross-postinstall' into 'master'
...
meson: Don't execute post-install.py if cross compiling
See merge request GNOME/gtk!1636
2020-04-06 23:59:33 +00:00
Matthias Clasen
f8be3229b1
Merge branch 'fix-event-match' into 'master'
...
shortcuttrigger: Don't trigger on key releases
See merge request GNOME/gtk!1642
2020-04-06 23:44:32 +00:00
Matthias Clasen
b9cfcf07e0
Merge branch 'wip/chergert/fix-shortcut-param-order' into 'master'
...
widget: fix parameter ordering to match implementation
Closes #2586
See merge request GNOME/gtk!1641
2020-04-06 23:30:26 +00:00
Matthias Clasen
eb649d8204
shortcuttrigger: Don't trigger on key releases
...
This broke when the event type check in gdk_key_event_matches
was removed and replaced by a precondition that accepts both
key press and release events.
Add the check in gtk_keyval_trigger_trigger instead.
2020-04-06 19:16:41 -04:00
Christian Hergert
4a00f3bc9a
widget: fix parameter ordering to match implementation
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2586
2020-04-06 15:44:19 -07:00
Matthias Clasen
0b17658a82
Replace most uses of <Primary> with <Control>
...
The only place where we are still using <Primary> is
in tests, to ensure we keep parsing it. Otherwise,
<Control> is now the preferred syntax.
2020-04-06 17:05:52 -04:00
Matthias Clasen
2486f46c0b
Merge branch 'keymap-rework-2' into 'master'
...
Keymap rework 2
See merge request GNOME/gtk!1635
2020-04-06 20:56:06 +00:00
Matthias Clasen
c03b7e4d45
reftests: Comment out a test that fails only in ci
...
Fixing such only-in-ci failures is just too hard,
unfortunately.
2020-04-06 16:32:03 -04:00
Matthias Clasen
e7a8a4eb06
Update migration guide
...
Rewrite the sections about keymaps and menus, and add
hints about modifiers.
2020-04-06 16:32:03 -04:00
Matthias Clasen
70fbf8dbb6
accelgroup: Small documentation updates
...
Mention GtkShortcutTrigger, and remove references
to <Release>.
2020-04-06 16:32:03 -04:00
Matthias Clasen
93a1b3027d
Reshuffle keymap docs
...
Since GdkKeymap api is on longer public, move relevant
documentation to the long description.
2020-04-06 16:32:03 -04:00
Matthias Clasen
1de7719e34
Drop gtk_accelerator_set_default_mod_mask
...
Our new approach to modifiers works with a fixed set,
there is really no need to customize the modifier
masks if the backends are all supposed to deliver
the same modifiers.
2020-04-06 16:32:03 -04:00
Matthias Clasen
f7f103a322
gdk: Remove gdk_keymap_get_modifier_mask
...
This function is no longer public and no longer used.
2020-04-06 16:32:03 -04:00
Matthias Clasen
14be8f6b73
Remove uses of modifier intents in gdkevents.c
...
This removes the use of the context menu and shift group
intents in gdkevents.c. If it turns out to be important,
we need to introduce vfuncs for gdk_event_triggers_context_menu
and gdk_event_matches.
2020-04-06 16:32:03 -04:00
Matthias Clasen
99a344f791
display: Remove gdk_display_get_modifier_mask
...
This is not used anymore.
2020-04-06 16:32:03 -04:00
Matthias Clasen
3419d9c04f
gtk: Drop gtk_widget_get_modifier_mask
...
This is not used anymore.
2020-04-06 16:32:03 -04:00
Matthias Clasen
c297d45b8a
gtk: Stop using modifier intents
...
Reviewing the existing settings, the only backend with
some differences in the modifier intent settings is OS X,
and we would rather have that implemented by interpreting
the existing modifiers in the appropriate way.
X11 Wayland Win32 OS X
primary ctrl ctrl ctrl mod2
mnemonic alt alt alt alt
context menu - - - ctrl
extend sel shift shift shift shift
modify sel ctrl ctrl ctrl mod2
no text alt|ctrl alt|ctrl alt|ctrl mod2|ctrl
shift group varies - - alt
GTK now uses the following modifiers:
primary ctrl
mnemonic alt
extend sel shift
modify sel ctrl
no text alt|ctrl
The context menu and shift group intents were not used
in GTK at all.
Update tests to no longer expect <Primary> to roundtrip
through the accelerator parsing and formatting code.
2020-04-06 16:32:03 -04:00
Matthias Clasen
dce8d251c6
keymap: Remove virtual modifier mapping functions
...
These are not used anymore.
Drop the vfuncs and their implementations in the
broadway, x11, wayland and win32 backends as well.
2020-04-06 16:32:03 -04:00
Matthias Clasen
89ad7893ad
gdk: Make GdkKeymap a private api
...
We have replacement apis in GdkDevice and GdkDisplay.
2020-04-06 16:32:03 -04:00
Matthias Clasen
da6faf321c
Merge branch 'misc-meson-fixes' into 'master'
...
Reduce useless relinking on configure and fix check for buildtype arguments
See merge request GNOME/gtk!1614
2020-04-06 20:22:01 +00:00
Justin van Steijn
c8b791a763
Update Dutch translation
2020-04-06 19:40:22 +00:00
Matthias Clasen
0eb728aa51
imcontextsimple: Disable some win32-only code
...
This code needs to be redone differently, since keymaps are no
longer going to be exposed. There should really not be this much
ifdef-ed backend-specific code here anyway. Or any, really.
2020-04-06 15:33:49 -04:00
Matthias Clasen
3300686bef
gdk: Clean up GdkModifierType
...
Remove MOD2..MOD5. Backends are expected to just set
the named modifiers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
0a96a483c6
gdk: Redo key events
...
Add all of the keyboard translation results in the key event,
so we can translate the keyboard state at the time the event
is created, and avoid doing state translation at match time.
We actually need to carry two sets of translation results,
since we ignore CapsLock when matching accelerators, in
gdk_event_matches().
At the same time, drop the scancode field - it is only ever
set on win32, and is basically unused in GTK.
Update all callers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
5071367794
gtk: Remove handling of virtual modifiers
...
These are going away. We expect to just have
named modifiers in modifier masks now, so we
longer juggle 'real' and 'virtual' modifiers.
2020-04-06 15:13:54 -04:00
Matthias Clasen
5ce05a8fd0
events: Stop doing elaborate virtual modifier handling
...
These are going away in the GdkModifierType cleanup.
Just compare the modifiers we got.
2020-04-06 15:13:54 -04:00
Matthias Clasen
be2a0971c2
broadway: Stop using MOD2..MOD5
...
These are going away in the GdkModifierType cleanup.
2020-04-06 15:13:53 -04:00
Matthias Clasen
25e9a54902
win32: Stop using MODx modifiers
...
The win32 backend is using GDK_MOD2_MASK for AltGr,
so define GDK_MOD2_MASK locally to keep this working,
but remove any mention of GDK_MOD3_MASK,...,GDK_MOD5_MASK.
2020-04-06 15:13:00 -04:00
Yuri Chornoivan
df1c6b6b68
Update Ukrainian translation
2020-04-06 15:46:52 +00:00
Yuri Chornoivan
00c791fcf9
Update Ukrainian translation
2020-04-06 14:06:17 +00:00
Matthias Clasen
a5e73820da
Merge branch 'fno-common' into 'master'
...
Add a missing extern, to fix building with -fno-common
See merge request GNOME/gtk!1631
2020-04-06 12:47:55 +00:00
Matthias Clasen
7fa103717d
wayland: Stop setting MOD2..MOD5
...
These are going away in the GdkModifierType cleanup.
2020-04-06 01:40:49 -04:00
Matthias Clasen
f8646b9733
gdk: Remove reserved bit from GdkModifierType
...
This really has no purpose and obscures the header.
2020-04-06 01:40:49 -04:00
Matthias Clasen
d110fddbce
gtk: Stop using GDK_MODx_MASK
...
These are never used in practice, and we never want to
see them in the UI, so stop supporting them. This is
in preparation for cleaning up GdkModifierType.
2020-04-06 01:40:49 -04:00
Matthias Clasen
b02db72e17
Rename GDK_MOD1_MASK to GDK_ALT_MASK
...
We've hardcoded Mod1 = Alt for a long time, there is
no need to keep the confusing naming around anymore.
2020-04-06 01:40:49 -04:00
Matthias Clasen
e8f30c836d
tests: Stop using gtk_accelerator_set_default_mod_mask
...
This is not doing anything useful here.
2020-04-06 01:40:49 -04:00
Matthias Clasen
6eaadba008
testsuite: Stop using keymap apis
2020-04-06 01:40:49 -04:00
Matthias Clasen
4495bacfd1
gtk: Use display apis for keymap mapping
...
This removes the last uses of GdkKeymap from GTK.
2020-04-06 01:40:49 -04:00
Matthias Clasen
234a21905c
gtk: Stop using keymap apis
...
Stop using most keymap apis in GTK. Only a few calls
related to virtual modifiers are left.
2020-04-06 01:40:49 -04:00
Matthias Clasen
13213c710f
x11: Notify new device properties
2020-04-06 01:40:49 -04:00
Matthias Clasen
e165267924
wayland: Notify new device properties
2020-04-06 01:40:49 -04:00
Matthias Clasen
00b25d5594
Move keymap mapping functions to GdkDisplay
...
We want to stop exposing GdkKeymap, so this
functionality needs a new home.
2020-04-06 01:40:40 -04:00
Matthias Clasen
31fb5c287a
Move GdkKeymapKey to gdktypes.h
...
We are going to use this type in a different header.
2020-04-05 23:43:41 -04:00
Matthias Clasen
416ec580dc
gdk: Move modifier mask api to GdkDisplay
...
GdkKeymap is on the way out.
2020-04-05 23:43:41 -04:00
Matthias Clasen
ee14be8ac1
gdk: Add keymap properties to GdkDevice
...
GdkKeymap is on the way out.
2020-04-05 23:43:41 -04:00
Matthias Clasen
f27470aaf4
passwordentry: Show caps lock warning more
...
Show the caps lock warning regardless of whether we
have the peek icon or not.
2020-04-05 23:43:41 -04:00
Matthias Clasen
90eda2b17c
Drop some no longer used code
2020-04-05 23:43:41 -04:00
Matthias Clasen
68d43c8e5c
cell renderer accel: Use gdk_event_get_match
2020-04-05 23:43:41 -04:00
Matthias Clasen
c9aef3fc4d
Add gdk_event_get_match
...
This is a counterpart to gdk_event_matches() that can
be used to obtain a shortcut matching an event.
2020-04-05 23:37:13 -04:00
Matthias Clasen
e8330c5eec
Add gdk_event_matches
...
Move the elaborate key event matching code from
GtkShortcutTrigger to GdkEvent, which greatly reduces
the amount of keymap api use outside of GDK.
2020-04-05 23:37:13 -04:00
Martin Storsjö
531766fe64
meson: Don't execute post-install.py if cross compiling
2020-04-05 22:57:22 +03:00
Martin Storsjö
25a53276e0
Add a missing extern, to fix building with -fno-common
...
With C compilers defaulting to -fcommon, this isn't an issue, but
upcoming compilers (GCC 10 and Clang 11) will default to -fno-common,
ending up with duplicate definitions of these variables.
2020-04-05 00:43:16 +03:00
Matthias Clasen
1149502767
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1630
2020-04-04 21:09:12 +00:00
Matthias Clasen
33928a52c3
gtk-demo: Fix a crash
...
Using the assistant demo repeatedly was crashing.
2020-04-04 15:35:18 -04:00
Matthias Clasen
b636df7784
Merge branch 'matthiasc/for-master' into 'master'
...
shortcuts: documentation fixes
See merge request GNOME/gtk!1628
2020-04-04 15:33:41 -04:00
Matthias Clasen
005739371c
Merge branch 'matthiasc/for-master' into 'master'
...
shortcuts: documentation fixes
See merge request GNOME/gtk!1628
2020-04-04 16:31:43 +00:00
Matthias Clasen
ec854fc503
shortcuts: documentation fixes
...
Update symbol lists, and add examples for parsing triggers
and actions.
2020-04-04 12:22:43 -04:00
Piotr Drąg
e75e975a38
Update POTFILES.skip
2020-04-04 11:56:04 +02:00
Matthias Clasen
2bf81b51d9
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1626
2020-04-04 05:00:22 +00:00
Matthias Clasen
22211f29fb
colorbutton: Don't add a customize menu
...
The color swatch in the button does not need a
context menu. Turn it off.
2020-04-04 00:28:52 -04:00
Matthias Clasen
8991275fbd
colorbutton: Fix focus
...
The colorbutton contains a button which contains a colorswatch.
We want the focus to go straight to the button, nowhere else,
so mark the swatch as !can-focus.
Adapt tests to match.
2020-04-04 00:28:45 -04:00
Matthias Clasen
f2d6a7b36a
demos: Remove can-focus from ui files
2020-04-04 00:28:34 -04:00
Matthias Clasen
e43eb951d6
Merge branch 'scrollbar-a11y' into 'master'
...
Add GtkScrollbarAccessible
See merge request GNOME/gtk!1623
2020-04-04 04:03:40 +00:00
Matthias Clasen
5205fa0ff7
scrollbar: Be more defensive
...
Somehow the scrollbar accessible manages to call
gtk_scrollbar_get_adjustment when priv->range is NULL.
Survive taht.
2020-04-03 23:31:45 -04:00
Matthias Clasen
842af79e97
Merge branch 'shortcut-action-parse' into 'master'
...
Shortcut action parse
See merge request GNOME/gtk!1625
2020-04-04 03:12:10 +00:00
Matthias Clasen
6b292af6ac
testsuite: Add tests for parsing shortcut actions
2020-04-03 22:42:00 -04:00
Matthias Clasen
1424dd9786
Add an api to parse shortcut actions
...
This is so we can test this code. While doing it
I also fixed the missing else that was caused it
not to work.
2020-04-03 22:41:15 -04:00
Matthias Clasen
339d3e41b0
Add GtkScrollbarAccessible
...
When GtkScrollbar stopped being a GtkRange,
GtkRangeAccessible stopped working for scrollbars.
Update a11y tests to match.
2020-04-03 15:20:27 -04:00
Carlos Garnacho
9a2f7338df
Merge branch 'wip/carlosg/fix-surrounding-text-master' into 'master'
...
imwayland: Clamp the surrounding string end correctly
Closes #2565
See merge request GNOME/gtk!1621
2020-04-03 18:37:44 +00:00
Matthias Clasen
bdb127e54c
Merge branch 'focus-test' into 'master'
...
Focus test
See merge request GNOME/gtk!1622
2020-04-03 18:23:27 +00:00
Carlos Garnacho
e5d23aaaaf
imwayland: Clamp the surrounding string end correctly
...
In the paths where len > MAX_LEN and cursor/anchor are separated by
at least MAX_LEN from text edges, we were clamping the right end of
the surrounding string at MAX_LEN. Oops.
This end anchor may go as far as the string length, although just
up to len - MAX_LEN in real terms (due to the condition above that
caches cursor/anchor positions being near enough the text end).
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2565
(cherry-picked from commit d7fb15c822
)
2020-04-03 19:55:55 +02:00
Matthias Clasen
d662512c44
testsuite: Add a big focus chain testcase
2020-04-03 11:35:34 -04:00
Matthias Clasen
324af2f701
testsuite: Try harder to record a full focus chain
...
It is hard to avoid widgets with the same name in a
large ui file - try harder to record a full focus chain
before decide that we've wrapped, by including the widget
address in the comparison. Note that we don't include
the addresses in the generated output, since that would
make expected output vary from run to run.
2020-04-03 11:35:26 -04:00
Emmanuele Bassi
de481a7b5e
Merge branch 'gir-fixes' into 'master'
...
Annotation fixes
See merge request GNOME/gtk!1616
2020-04-03 15:21:59 +00:00
Matthias Clasen
c8018e267a
Merge branch 'move-gdkgrab-decl' into 'master'
...
gdk: Move GdkGrabStatus and GdkGrabOwnership decl.
See merge request GNOME/gtk!1615
2020-04-03 15:03:51 +00:00
Emmanuele Bassi
4e264a74be
Annotation fixes
...
Match the arguments name in the declaration and the definition, and make
sure we have the proper transfer annotations.
2020-04-03 15:30:56 +01:00
Olivier Fourdan
4f49d83e43
gdk: Move GdkGrabStatus and GdkGrabOwnership decl.
...
With the removal of `gdk_seat_grab` we do not need to keep the
definitions of `GdkGrabStatus` and `GdkGrabOwnership` public.
Move those definitions to become internal only.
2020-04-03 15:23:01 +02:00
Nirbheek Chauhan
eaef24c527
meson: Fix check for builtype arguments
...
`get_option('buildtype')` will return `'custom'` for most combinations
of `-Doptimization` and `-Ddebug`, but those two will always be set
correctly if only `-Dbuildtype` is set. So we should look at those
options directly.
For the two-way mapping between `buildtype` and `optimization`
+ `debug`, see this table:
https://mesonbuild.com/Builtin-options.html#build-type-options
2020-04-03 18:41:55 +05:30
Nirbheek Chauhan
777435c470
meson: Reduce useless relinking on reconfigure
...
When we reconfigure, `configure_file()` is called again, and
`*.gresource.xml` files are regenerated, which causes many (all?)
binaries to be relinked. Now we only write those out if the contents
actually changed (or if the output didn't already exist).
This is exactly what Meson already does with `configure_file()` when
`command:` is not used.
While we're at it, also do the same for `gen-c-array.py` and
`gentypefuncs.py` for completeness. Now even if the input to those
changes, re-building of those custom targets may not result in
relinking if the outputted C files have the same contents.
2020-04-03 18:41:55 +05:30
Timm Bäder
fb325afc79
shortcutcontroller: fix transfer full annotation
2020-04-03 08:03:32 +02:00
Timm Bäder
046190cb8a
window: Don't leak toplevel layout
2020-04-03 07:37:54 +02:00
Matthias Clasen
53592497a4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1611
2020-04-03 01:07:14 +00:00
Matthias Clasen
cffa45d5ff
wayland: Add a comment about keyboard state handling
...
Clarify a point that took me a few hours to fully track
down, so lets preserve what I found for the next poor
sould coming this way.
2020-04-02 17:43:14 -04:00
Matthias Clasen
14166b09b5
a11y tests: Update for focus state changes
2020-04-02 17:35:15 -04:00
Matthias Clasen
8a0035333a
a11y: Set focus-related states properly
...
Entries and menubuttons are no longer focusable themselves,
they have focusable children. Since we don't have accessible
objects for those, transfer the focus-related state (focusable
and focused) from the children to the main accessible object.
2020-04-02 17:35:09 -04:00
Matthias Clasen
1f8e633fff
window: tie focus to surface state changes
...
We don't get a focus-out on the event controller, when
the surface is losing keyboard focus, since we are not
moving our focus to some other widget, so we are never
unsetting the mnemonics-visible property. Do that in
response to surface state changes instead.
2020-04-02 17:21:01 -04:00
Matthias Clasen
6e6b4a851f
Merge branch 'cherry-picked-wayland-keyboard-fix' into 'master'
...
gdk/wayland: Clear modifiers when we lose keyboard focus
Closes #2112
See merge request GNOME/gtk!1610
2020-04-02 20:43:29 +00:00
Jan Alexander Steffens (heftig)
7444b15d47
gdk/wayland: Clear modifiers when we lose keyboard focus
...
When we `Alt+Tab` away from a GTK application, it loses keyboard focus.
If we don't clear the modifiers, events from other devices that we
receive while unfocused will assume `Alt` is still pressed. This results
in e.g. Firefox navigating through the history instead of scrolling the
page when using the mouse wheel on it.
We don't get any information about modifiers while we are missing
keyboard focus, so assuming no modifiers are active is the best we can
do.
The shell sends us a modifier update immediately before we regain
keyboard focus, so the state shouldn't get out of sync.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2112
2020-04-02 16:18:18 -04:00
Matthias Clasen
dd625abfc1
Merge branch 'wip/smcv/libdir-independent-valgrind-suppressions' into 'master'
...
supp: Use a single suppressions file for lib, lib64 and multiarch
See merge request GNOME/gtk!1603
2020-04-02 14:46:45 +00:00
Matthias Clasen
b6f6df9662
Merge branch 'im-context-wayland-fixes' into 'master'
...
Im context wayland fixes
See merge request GNOME/gtk!1605
2020-04-02 13:29:32 +00:00
Matthias Clasen
aaa4e40a1f
imcontexsimple: Move Compose file loading to class_init
...
This ensures that it is done only once.
2020-04-02 09:04:23 -04:00
Matthias Clasen
8ec254e2bb
imcontextsimple: Simpify Compose file loading
...
We are not loading the Compose file for individual contexts,
it just gets added to a global list. So don't pass an im context
along. This will let us move the loading out of the initialization
of individual contexts, and only do it once.
2020-04-02 09:02:05 -04:00
Matthias Clasen
2a9911724f
imcontextsimple: Load ~/.Compose unconditionally
...
There is nothing display-specific in the ~/.Compose file,
so we can just try to load it without looking at the
display we are on.
2020-04-02 09:02:05 -04:00
Matthias Clasen
a9b4ac3d59
imcontextsimple: Add a profiler mark for IO
...
We are loading a file here, thankfully in a thread, but
we do it every time an entry is created. Add a profiler
mark, to make this visible.
2020-04-02 09:02:05 -04:00
Simon McVittie
9df7f0197d
supp: Use a single suppressions file for lib, lib64 and multiarch
...
In addition to the traditional library directory lib and the 64-bit
multilib directory lib64, this will cover Debian-style multiarch
(lib/x86_64-linux-gnu etc.), Arch Linux 32-bit (lib32), x32 and
various others.
Signed-off-by: Simon McVittie <smcv@debian.org >
2020-04-02 09:18:55 +01:00
Matthias Clasen
f169d23cdb
Merge branch 'fix-menu-flicker' into 'master'
...
Fix crossing event generation
Closes #2536
See merge request GNOME/gtk!1601
2020-04-02 05:19:13 +00:00
Matthias Clasen
fcd36e59b1
Fix crossing event generation
...
We were not properly setting the new_descendent field
in Crossing structs for GTK_CROSSING_OUT events. This
was causing extraneous ::leave signals to be emitted,
and make model buttons in popover menus flicker when
hovered.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2536
2020-04-02 00:39:46 -04:00
Matthias Clasen
8196478b19
Merge branch 'drop-popover-demo' into 'master'
...
gtk-demo: Remove the popover demo
Closes #2429
See merge request GNOME/gtk!1600
2020-04-01 20:40:17 +00:00
Matthias Clasen
e31bbb41d2
gtk-demo: Remove the popover demo
...
It doesn't work anymore, since popovers now need
support in the parent, and we don't really need
a demo just for popovers. They are used everywhere
already.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2429
2020-04-01 15:45:13 -04:00
Emmanuele Bassi
9c948909ac
Merge branch 'flow-box-typo' into 'master'
...
gtkflowbox: Fix a minor typo in the documentation
See merge request GNOME/gtk!1599
2020-04-01 13:45:19 +00:00
Philip Withnall
544b8d5a7f
gtkflowbox: Fix a minor typo in the documentation
...
Signed-off-by: Philip Withnall <withnall@endlessm.com >
2020-04-01 14:04:46 +01:00
Matthias Clasen
6ae5d9ac22
Merge branch 'matthiasc/for-master' into 'master'
...
keynav: Fix Shift-Tab
See merge request GNOME/gtk!1598
2020-04-01 05:04:02 +00:00
Matthias Clasen
63c6af8d13
Merge branch 'cursor-aspect-ratio' into 'master'
...
Add a cursor-aspect-ratio setting
See merge request GNOME/gtk!1597
2020-04-01 05:02:15 +00:00
Matthias Clasen
199a539ae7
Update the settings test
2020-04-01 00:24:56 -04:00
Matthias Clasen
dc3d778e01
keynav: Fix Shift-Tab
...
This was broken by the shortcuts branch merge.
2020-04-01 00:21:19 -04:00
Matthias Clasen
2154b8e745
Add a cursor-aspect-ratio setting
...
Add a setting that controls how thick the text caret is drawn.
The default value is 0.04.
2020-03-31 23:30:20 -04:00
Matthias Clasen
9f93464ea4
3.98.2
2020-03-31 21:09:30 -04:00
Matthias Clasen
5987bc5d71
Merge branch 'wip/carlosg/stuck-pointer-focus' into 'master'
...
gtkmain: Do not try to coalesce/ignore crossing events
See merge request GNOME/gtk!1594
2020-04-01 00:16:26 +00:00
Matthias Clasen
298218b1d2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1593
2020-03-31 23:19:09 +00:00
Carlos Garnacho
fa7f6ad910
gtkmain: Do not try to coalesce/ignore crossing events
...
Under grabbing circumstances we used to get several crossing events,
some corresponding to the grab itself and some corresponding to
pointer motion.
The backends now do a better job at keeping those simple, which
means we sit listening for events that don't actually arrive. This
triggers pointer focus issues when dragging windows or opening
grabbing popups.
Actually obey those events, they will be the only ones we get now.
2020-04-01 00:40:17 +02:00
Matthias Clasen
b92b7f45b5
testsuite: Add a test for transforms in builder files
2020-03-31 16:49:51 -04:00
Matthias Clasen
2bacc0d4ef
testsuite: Add a test for parsing layout properties
...
and drop the child properties test that doesn't
do anything anymore.
2020-03-31 16:49:51 -04:00
Matthias Clasen
e4fb4b635c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1591
2020-03-31 18:32:18 +00:00
Matthias Clasen
5432f73095
window: Fix residual resizing issues
...
After the GdkToplevel split, GtkWindow occasionally
forgets its minimum size. Fix this by keeping a GdkToplevelLayout
around and reusing it.
2020-03-31 13:07:44 -04:00
Chun-wei Fan
2f64651a3f
meson.build: Fix Visual Studio builds
...
We need to make the C++ language available before we can access the C++
compiler object...
2020-03-31 12:00:26 +08:00
Matthias Clasen
0852d66f6e
NEWS: Updates
2020-03-30 21:58:24 -04:00
Matthias Clasen
f3e826f4d6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1589
2020-03-31 00:39:37 +00:00
Matthias Clasen
15eb3bbbf1
shortcutcontroller: Document buildable support
2020-03-30 20:09:29 -04:00
Matthias Clasen
96f822434f
testsuite: Add a builder test for shortcut controllers
2020-03-30 20:08:25 -04:00
Matthias Clasen
ace183f38f
shortcutcontroller: Fix builder support
...
The GtkBuilder support was not working anymore after
triggers and actions have been turned into objects.
Fix this.
2020-03-30 19:02:35 -04:00
Matthias Clasen
5bf030413b
Add new api to the docs
2020-03-30 14:12:14 -04:00
Matthias Clasen
2a3dab5b94
Merge branch 'wip/hadess/portal-fixes' into 'master'
...
Portal fixes
See merge request GNOME/gtk!1585
2020-03-30 17:45:40 +00:00
Matthias Clasen
96f0c26306
Merge branch 'issue982' into 'master'
...
gdk: Add gdk_toplevel_inhibit_system_shortcuts API
Closes #982
See merge request GNOME/gtk!1542
2020-03-30 17:41:12 +00:00
Bastien Nocera
8cf41c1b66
filechoosernativeportal: Fall back if portal is too old
...
Add portal version checking as originally implemented for the GTK 3.x
branch.
See: 35fec1c6b2
2020-03-30 18:31:24 +02:00
Bastien Nocera
027ca22def
Add portal version checking helper
...
Add gtk_get_portal_interface_version() to check the version of a portal.
2020-03-30 18:31:23 +02:00
Bastien Nocera
bd55c5842e
colorpickerportal: Simplify version fetching code
...
Simplify version checking code by using a function to fetch the uint out
of the GVariant and don't throw a warning if it can't be fetched.
2020-03-30 18:31:23 +02:00
Olivier Fourdan
c3ff175e3f
win32: Add inhibit shortcut properties
...
Win32 backend doesn't have support for inhibit shortcuts, yet it needs
support the standard set of GdkToplevel properties.
Add support for the "inhibit-list" object property to GdkToplevel on
win32.
2020-03-30 18:25:36 +02:00
Olivier Fourdan
b22c7b8b77
broadway: Add inhibit shortcut properties
...
Broadway doesn't have support for inhibit shortcuts, yet it needs to
support the standard set of GdkToplevel properties.
Add support for the "inhibit-list" object property to GdkToplevel on
Broadway.
2020-03-30 18:25:36 +02:00
Olivier Fourdan
83027c68f1
x11: Implement inhibit_system_shortcuts API
...
On X11, there is no such equivalent to the inhibit shortcut protocol
found on Wayland.
To implement the inhibit_system_shortcuts API on X11, we emulate the
same behavior using grabs on the keyboard.
To avoid keeping active grabs on the keyboard that would affect other
X11 applications even when the surface isn't focused, the X11
implementation takes care of releasing the grabs as soon as the toplevel
loses focus.
2020-03-30 18:25:36 +02:00
Olivier Fourdan
44931a66df
x11: Use gdk_x11_* rather than gdk_wayland_*
...
Rename the local functions for the x11 backend as gdk_x11_* rather than
gdk_wayland_*
2020-03-30 18:25:36 +02:00
Olivier Fourdan
36d986f33c
wayland: Implement inhibit_system_shortcuts API
...
On Wayland, this is a direct mapping with the inhibit shortcut protocol
that GDK already supports.
Simply wire the new API to the existing entries.
2020-03-30 18:25:36 +02:00
Olivier Fourdan
5ac73be976
wayland: Use a GdkSeat as key for our internal hash table
...
With the current implementation, we use a `wl_seat` as the key for our
internal has table where we store the Wayland shortcuts inhibitors.
There is however no technical reason for this, and we could use a
GdkSeat instead, which will ease the implementation of the GdkToplevel
shortcut inhibition API.
2020-03-30 18:25:36 +02:00
Olivier Fourdan
a07a69e24e
gdk: add internal gdk_surface_get_seat_from_event()
...
This can come handy to get the seat from a surface/event.
2020-03-30 18:25:36 +02:00
Olivier Fourdan
3e1f59af61
gdk: Add gdk_toplevel_inhibit_system_shortcuts API
...
With the removal of grabs from the public API, we need a replacement API
to let applications bypass system keyboard shortcuts.
A typical use case for this API is remote desktop or virtual machine
viewers which need to inhibit the default system keyboard shortcuts so
that the remote session or virtual host gets those instead of the local
environment.
Close: https://gitlab.gnome.org/GNOME/gtk/issues/982
2020-03-30 18:25:36 +02:00
Matthias Clasen
da47ccaf3c
Merge branch 'wip/jimmac/avoid-t-word' into 'master'
...
widget-factory: avoid the T word
See merge request GNOME/gtk!1586
2020-03-30 15:15:51 +00:00
Jakub Steiner
e9082fd9f3
widget-factory: avoid the T word
...
- style variant sound more appropriate
2020-03-30 14:28:47 +02:00
Matthias Clasen
61e88c7421
Merge branch 'matthiasc/for-master' into 'master'
...
widget: Remove a leftover vfunc
See merge request GNOME/gtk!1584
2020-03-30 11:37:57 +00:00
Matthias Clasen
de31bb59a1
window: Remove initial-focus leftovers
...
We removed the way to set initial_focus a year ago,
time to get rid of the leftovers.
2020-03-29 23:39:54 -04:00
Matthias Clasen
07bb29153b
widget: Remove a leftover vfunc
...
The popup-menu signal is gone, so we can remove the vfunc.
2020-03-29 23:18:56 -04:00
Yosef Or Boczko
b35e5eeaf6
Update Hebrew translation
2020-03-29 15:34:36 +00:00
Yosef Or Boczko
c0a450e41b
Update Hebrew translation
2020-03-29 15:33:40 +00:00
Timm Bäder
785b33f169
widget: Return an array from list_controllers
...
Minimize the GList usage throughout the code base.
2020-03-29 15:32:54 +02:00
Matthias Clasen
af749dc1dc
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1583
2020-03-29 13:18:35 +00:00
Matthias Clasen
47982ae272
coloreditor: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
0020b735d9
colorchooserdialog: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
e05c1b0244
colorchooserwidget: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
d0b4f9eb29
notebook: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
03375b723a
listbox: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
e2beb6ec50
levelbar: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
ef32cff771
spinbutton: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
366b007024
filechooserwidget: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
40337aa1b3
printunixdialog: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
0bb38b903e
printjob: Drop the Private struct
2020-03-29 09:04:19 -04:00
Matthias Clasen
8acd9ffc76
testsuite: Fix notify test no not fail on the 30th
...
We are setting the month property to 10 different values,
checking that the change succeeds. But the calendar defaults
to the current date, so on every 30th of the month, we
try to set a date of Febuary 30, which fails.
Lets fix this before the 31st, by setting the calendar
to a good date.
2020-03-29 09:04:19 -04:00
Piotr Drąg
23b29341ba
Update Polish translation
2020-03-29 14:08:56 +02:00
Matthias Clasen
6e52820fd2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1582
2020-03-28 21:17:29 +00:00
Matthias Clasen
173b1333ca
printing: Avoid a crash
...
When no printer has been selected (e.g. because we don't
find any printers), the 'print at' radio group should be
insensitive, except for the 'now' choice. Selecting another
option in this situation will lead to a crash.
2020-03-28 15:36:15 -04:00
Matthias Clasen
784d6f8d0c
printing: Fix initial page range radio group
...
Only set one radio button as active in the ui file.
Otherwise we end up with multiple options appearing
as selected initially.
2020-03-28 15:36:15 -04:00
Matthias Clasen
3437f85aaf
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1580
2020-03-28 19:35:36 +00:00
Matthias Clasen
7916b95bc5
gesture: Fix gtk_gesture_get_bounding_box
...
When we stopped translating event coordinates in-place,
this function inadvertently started returning surface-relative
bounding boxes instead of widget-relative ones, as expected.
Fix this by using the widget-relative coordinates that we
already store.
2020-03-28 15:03:33 -04:00
Matthias Clasen
7b135c96e4
cellarea: Fix cell editing
...
We need to translate the event coordinates to
widget-relative coordinates. This broke when
we stopped translating event coordinates in-place.
2020-03-28 14:56:26 -04:00
Matthias Clasen
e662438675
button: Fix an event handling gotcha
...
We no longer translate event coordinates in-place,
so gdk_event_get_position() returns surface-relative
coordinates, not widget-relative ones. Just use the
coordinates we are given.
2020-03-28 14:33:01 -04:00
Matthias Clasen
aa2ca80817
imcontextsimple: Don't use g_object_unref on events
...
Events are not objects anymore.
2020-03-28 14:29:08 -04:00
Matthias Clasen
9ccd514682
x11: Don't use g_object_unref on events
...
Events are not object anymore.
2020-03-28 14:28:36 -04:00
Matthias Clasen
2c7afc0556
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1579
2020-03-28 16:09:01 +00:00
Piotr Drąg
182cb81bdb
Update POTFILES.in and POTFILES.skip
2020-03-28 16:04:52 +01:00
Matthias Clasen
ceef86895f
appchooserdialog: Drop the Private struct
2020-03-28 10:59:12 -04:00
Matthias Clasen
001d076e61
image: Drop the Private struct
2020-03-28 10:49:54 -04:00
Matthias Clasen
408dd37944
infobar: Drop the Private struct
2020-03-28 10:48:15 -04:00
Matthias Clasen
9287e0e7fb
texthandle: Drop the Private struct
2020-03-28 10:36:09 -04:00
Matthias Clasen
28eb1fce04
searchentry: Drop the Private struct
2020-03-28 10:28:22 -04:00
Matthias Clasen
49427119ab
statusbar: Drop the Private struct
2020-03-28 10:28:01 -04:00
Matthias Clasen
05891b1238
settings: Drop the Private struct
...
Also drop class padding - pointless for final types.
2020-03-28 10:22:44 -04:00
Matthias Clasen
b14d99ad7a
accellabel: Drop unused class fields
...
We are not using these anymore.
2020-03-28 10:15:50 -04:00
Matthias Clasen
329638280c
accellabel: Drop the Private struct
2020-03-28 10:06:26 -04:00
Matthias Clasen
06365cdc38
actionbar: Drop the Private struct
2020-03-28 09:59:49 -04:00
Matthias Clasen
1f808c479a
aboutdialog: Drop the Private struct
2020-03-28 09:59:07 -04:00
Matthias Clasen
7e8d61b92c
menubutton: Drop the Private struct
2020-03-28 09:49:29 -04:00
Timm Bäder
d01e664c79
applicationaccels: Fix shortcut memory leaks
...
g_list_model_get_item() is transfer-full.
2020-03-28 08:34:35 +01:00
Matthias Clasen
858997d172
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2489
See merge request GNOME/gtk!1578
2020-03-28 04:40:52 +00:00
Matthias Clasen
f3d061e879
gtk-demo: Fix the stack demo
...
The GtkSpinner:active property was renamed to :spinning.
2020-03-28 00:08:12 -04:00
Matthias Clasen
e2c327e025
gtk-demo: Fix the sliding puzzle
...
Update for a change in gtk_shortcut_controller_add_shortcut
behavior.
2020-03-28 00:08:12 -04:00
Matthias Clasen
48910a6d8e
gtk-demo: Fix the shortcuts demo
...
We don't have margins anymore.
2020-03-28 00:08:12 -04:00
Matthias Clasen
fbed55dff9
gtk-demo: Fix the rotated text demo
...
Off-by-one on the heart!
2020-03-28 00:08:12 -04:00
Matthias Clasen
059917b83c
gtk-demo: Fix the overlay demo
...
We must use two separate boxes for the label and
the entry, otherwise we can't keep their can-target
properties apart.
2020-03-28 00:08:12 -04:00
Matthias Clasen
163aa82d45
gtk-demo: Use mnemonics in menu buttons
...
Use GtkMenuButton:use-underline in the modelbutton demo.
2020-03-28 00:08:12 -04:00
Matthias Clasen
ba25e08e7b
menubutton: Add a use-underline property
...
This is necessary since apps no longer have direct
access to the label.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2489
2020-03-28 00:08:12 -04:00
Matthias Clasen
bc2c341d60
gtk-demo: Visual fixes to the model button demo
2020-03-28 00:08:12 -04:00
Matthias Clasen
7e0266004e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1577
2020-03-27 21:10:19 +00:00
Matthias Clasen
93d54ba10b
gtk-demo: Fix the search entry demo
...
Avoid critical warnings when setting up the context
menu actions.
2020-03-27 16:24:20 -04:00
Matthias Clasen
5d07a66d1d
widget-factory: Fix the radio button example
...
We only want one of the sensitive buttons to be active,
so don't tell them all to be active.
2020-03-27 16:06:03 -04:00
Matthias Clasen
8997dc6f31
Merge branch 'rename-theme-resources' into 'master'
...
Rename GResources for standard GTK themes
See merge request GNOME/gtk!1576
2020-03-27 16:37:31 +00:00
Matthias Clasen
9f72f4225d
Merge branch 'trigger-parser' into 'master'
...
Improve GtkShortcutTrigger parser
See merge request GNOME/gtk!1572
2020-03-27 15:45:08 +00:00
Emmanuele Bassi
f1003d6ae8
Rename GResources for standard GTK themes
...
After commit 2ab9be54fb
we had to rename
the generated CSS files to be included into the GResource bundle; we
kept the URI stable to avoid too much churn, and allow backporting the
change to the 3.24 stable branch. This had the adverse effect of making
it harder to debug issues, as the on-disk file name does not match the
location in the GResource that will be used to print out warnings,
errors, and debugging messages.
2020-03-27 15:20:59 +00:00
Emmanuele Bassi
b1327167e2
Improve GtkShortcutTrigger parsing tests
...
Split off all possible cases into sub-tests, and add more thorough
checks on the invalid strings unit.
2020-03-27 14:56:05 +00:00
Emmanuele Bassi
6719d3044d
Add parsing for GtkAlternativeTrigger
...
Alternative triggers are separate by a pipe character.
2020-03-27 14:35:00 +00:00
Emmanuele Bassi
c75fdda8dd
tests: Add more cases for the trigger parser
2020-03-27 13:57:19 +00:00
Emmanuele Bassi
170e8bd605
Parse keyval name directly for mnemonic triggers
...
We don't need to parse the full accelerator format for mnemonic
triggers.
2020-03-27 13:57:19 +00:00
Emmanuele Bassi
96ccb25f97
Return a full reference when parsing triggers
...
We're not returning a full reference for GtkNeverTrigger, but we are
returning full references for mnemonic and keyval triggers; this means
we're either going to leak mnemonic and keyval triggers if we consider
this function a "transfer none" one, or we are going to trigger an
assertion failure when finalizing a never trigger, if we consider this
function a "transfer full" one.
Let's be consistent, and always return a full reference to the caller.
2020-03-27 13:57:19 +00:00
Timm Bäder
c3c06e60dc
calendar: Only highlight one day as today
...
Fixes #2490
2020-03-27 09:50:30 +01:00
Timm Bäder
ecb8dda309
shortcutscontroller: Make add_shortcut transfer-full
...
Like all the other shortcut api
2020-03-27 08:36:32 +01:00
Timm Bäder
f7975828bc
filechooserwidget: Plug a memory leak
2020-03-27 08:36:32 +01:00
Matthias Clasen
5fdb897f06
Merge branch 'widget-factory-theme' into 'master'
...
widget-factory: Add theme switch
See merge request GNOME/gtk!1573
2020-03-26 18:23:11 +00:00
Matthias Clasen
8ab2e31b58
widget-factory: Add theme switch
...
Add a submenu to test the builtin themes. This is mainly
for the benefit of the artists working on those themes.
2020-03-26 13:51:59 -04:00
Matthias Clasen
0d710b0353
Merge branch 'wip/jimmac/HC-redesign' into 'master'
...
HC: derive from Adwaita
Closes #1450
See merge request GNOME/gtk!1571
2020-03-26 17:24:42 +00:00
Jakub Steiner
06fe4f0205
Adwaita: make insensitive slightly less sensitive
...
- will expose itself even more in HC
2020-03-26 17:22:47 +01:00
Jakub Steiner
910dd7a20a
HC: derive from Adwaita
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1450
2020-03-26 17:21:47 +01:00
Jakub Steiner
8d8990ccd7
Revert "Adwaita: make insensitive slightly less sensitive"
...
This reverts commit bf3ccaa1bf
.
2020-03-26 17:19:19 +01:00
Jakub Steiner
bf3ccaa1bf
Adwaita: make insensitive slightly less sensitive
...
- will expose itself even more in HC
2020-03-26 15:55:42 +01:00
Matthias Clasen
eaa20f5cdf
Merge branch 'wip/matthiasc/shortcut-4' into 'master'
...
Shortcuts
See merge request GNOME/gtk!1569
2020-03-26 03:40:22 +00:00
Matthias Clasen
d07e22dc03
Some documentation fixes
2020-03-25 23:14:45 -04:00
Matthias Clasen
1ec2d1d9f1
shortcutmanager: Add some more docs
2020-03-25 23:14:45 -04:00
Matthias Clasen
f59cd392ba
shortcuttrigger: Some documentation fixups
2020-03-25 23:14:45 -04:00
Matthias Clasen
6bacb0b0ae
shortcutaction: Some documentation fixups
2020-03-25 23:14:45 -04:00
Matthias Clasen
530b571d89
shortcutcontroller: Expand the docs
2020-03-25 23:14:45 -04:00
Matthias Clasen
ce22ef18f9
docs: Update the overview input chapter
...
Update the wording around events to reflect current
usage, and add information about shortcuts and the
shortcut controller.
2020-03-25 23:14:45 -04:00
Matthias Clasen
591f6bd7a9
popovermenu: Show mnemonics on keynav
...
This is the expected behavior for menus.
2020-03-25 23:14:45 -04:00
Matthias Clasen
642503afb4
popover: Implement auto mnemonics
...
Unfortunately, this involves copying a bunch of
code from gtkwindow.c. The only difference here
is that we add a private method to turn this off,
which will be used by GtkPopoverMenu to implement
its own auto mnemonics.
2020-03-25 23:14:45 -04:00
Matthias Clasen
fc0b0b14a8
label: Respect GtkPopover::mnemonics-visible
...
When inside a popover, look to the popover for
whether to show mnemonics or not.
2020-03-25 23:14:45 -04:00
Matthias Clasen
2de4fc3ec0
popover: Add a mnemonics-visible property
...
This will be handled separately for popovers, so we
need our own property for it.
2020-03-25 23:14:45 -04:00
Matthias Clasen
b2ac42e576
label: Disconnect visible mnemonics in popovers
...
The controller handling mnemonics is limited to same-native,
so showing mnemonics in other natives.
2020-03-25 23:14:45 -04:00
Matthias Clasen
b19d4b9006
modelbutton: Install accels when inside a popover
...
When a model button in a popover displays a shortcut,
it is probably from the global shortcut controllers,
and will not work inside the popover, since that is
a different native. Install a shortcut using the same
trigger that just activates the model button. This
shortcut will end up in the managed shortcut controller
of the popover.
2020-03-25 23:14:45 -04:00
Matthias Clasen
2c28a0713d
popovermenu: Make mnemonics work without Alt
...
This is expected menu behavior.
2020-03-25 23:14:45 -04:00
Matthias Clasen
b423f974db
shortcutcontroller: Inject accels into the action muxer
...
This is the way model button pic up accels for their actions.
2020-03-25 23:14:45 -04:00
Matthias Clasen
4a430820bd
popover: Implement GtkShortcutManager
...
This makes mnemonics work in popovers.
2020-03-25 23:14:45 -04:00
Matthias Clasen
5153cdc01d
modelbutton: Make activatable
...
This is expected of button-like widgets, and is necessary
to make keynav in popover menus work as expected.
2020-03-25 23:14:45 -04:00
Matthias Clasen
1db5382c6d
modelbutton: Remove accel poking
...
Stop manually poking GtkApplication for accels.
GtkApplication already feeds them into the action
muxer machinery, so that is where will get them.
2020-03-25 23:14:45 -04:00
Emmanuele Bassi
6e8c78714d
Turn GtkShortcutAction into a GObject
...
Just like we did for GtkShortcutTrigger.
This allows language bindings to properly deal with all the actions.
2020-03-25 23:14:45 -04:00
Emmanuele Bassi
457b6657bb
Turn GtkShortcutTrigger into an object
...
The lightweight inheritance mechanism used for GtkShortcutTrigger is not
going to be usable by bindings, because boxed types cannot have derived
types.
We could use GTypeInstance and derive everything from that, like
GParamSpec, but in the end shortcuts are not really a performance
critical paths, unlike CSS values or render nodes.
2020-03-25 23:14:45 -04:00
Emmanuele Bassi
1ddd8586dd
Add definition macro for internal types
...
GTK defines various types that are meant to be derivable only within GTK
itself, and "final" from the perspective of consumers of the GTK API.
The existing macros defined by GObject, such as G_DECLARE_FINAL_TYPE and
G_DECLARE_DERIVABLE_TYPE, lack this functionality.
While we wait for GObject to get this kind of macro, we should define
our own.
2020-03-25 23:14:45 -04:00
Matthias Clasen
5ea45bf57d
widget: Remove some leftover accel group plumbing
...
The ::can-activate-accel and ::accel-closures-changed signals
are not used anymore, remove them.
2020-03-25 23:14:45 -04:00
Matthias Clasen
4e978d6b7a
shortcutcontroller: Only activate shortcuts of visible widgets
...
Our shortcuts are like mnemonics in this respect - they only
activate when the widget is viewable.
2020-03-25 23:14:45 -04:00
Matthias Clasen
b4722b43a1
Drop GtkKeyHash
2020-03-25 23:14:45 -04:00
Matthias Clasen
fd95cc56b1
window: Remove GtkKeyHash remnants
...
It is not used anymore.
2020-03-25 23:14:45 -04:00
Matthias Clasen
d66121c61e
Drop the keyhash test
...
GtkKeyHash is going away.
2020-03-25 23:14:45 -04:00
Matthias Clasen
35332eb3b0
shortcutcontroller: Implement mnemonic cycling
...
Make GtkShortcutController collect matching shortcuts
in the same way GtkKeyHash did (accept fuzzy matches
if we don't have any exact matches), and cycle among
the matches if we have multiple.
2020-03-25 23:14:45 -04:00
Matthias Clasen
586e7749d5
shortcuttrigger: Do elaborate matching for key events
...
Copy the logic from GtkKeyHash for matching key events
to shortcuts.
Adapt shortcuts test to work with the better matching,
by creating more complete key events.
2020-03-25 23:14:45 -04:00
Matthias Clasen
904835d4b1
shortcuttrigger: Introduce partial matches
...
Allow GtkShortcutTrigger to return partial matches.
Currently, no triggers produce such results, and
GtkShortcutController treats partial matches like
exact ones.
2020-03-25 23:14:45 -04:00
Matthias Clasen
cb821d5df3
Add tests for shortcut actions
2020-03-25 23:14:45 -04:00
Matthias Clasen
ff056af249
Add a test for shortcut triggers
2020-03-25 23:14:45 -04:00
Matthias Clasen
9cce474106
widget: Drop the ::popup-menu signal
...
This is now done in widgets which have context
menus.
2020-03-25 23:14:45 -04:00
Matthias Clasen
9d84996fea
placesview: Stop using ::popup-menu
...
This signal is going away.
2020-03-25 23:14:45 -04:00
Matthias Clasen
c2d77a1f37
filechooser: Stop using ::popup-menu
...
This signal is going away.
2020-03-25 23:14:45 -04:00
Matthias Clasen
54a0037c45
mountoperation: Stop using ::popup-menu
...
We can just use a shortcut controller directly.
2020-03-25 23:14:45 -04:00
Matthias Clasen
80b988ef6c
gtk-demo: Stop emitting ::popup-menu
...
The signal was not used anyway, in the font explorer demo.
2020-03-25 23:14:45 -04:00
Matthias Clasen
844801580f
colorchooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-25 23:14:44 -04:00
Matthias Clasen
28b05eea67
range: Remove ::popup-menu emission
...
This signal is going away, and having context menus
on sliders is not really a thing anyway.
2020-03-25 23:14:44 -04:00
Matthias Clasen
ca1d4322a2
scrollbar: Remove :popup-menu forwarding
...
This signal is going away.
2020-03-25 23:14:44 -04:00
Matthias Clasen
c94ec4a204
emojichooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-25 23:14:44 -04:00
Matthias Clasen
778d884f70
Use an action for the context menu keybinding
...
The ::popup-menu signal is going away.
2020-03-25 23:14:44 -04:00
Matthias Clasen
e8be45fabc
Print mnemonic triggers clearly
2020-03-25 23:14:44 -04:00
Matthias Clasen
c90b0581dd
inspector: Show shortcuts
...
At a tab that lists the shortcuts contained in a
GtkShortcutController.
2020-03-25 23:14:44 -04:00
Benjamin Otte
43c0ea676d
filechooser: Trigger the location popup via bindings
...
Simplifies code quite a bit.
2020-03-25 23:14:44 -04:00
Benjamin Otte
bb4fbe3d8f
accels: Remove GtkAccelGroup
2020-03-25 23:14:44 -04:00
Benjamin Otte
7c4d8d49b6
testmenubutton: Don't create a GtkAccelGroup
...
It's unused.
2020-03-25 23:14:28 -04:00
Benjamin Otte
cac39526a9
testsuite: Remove GtkAccelGroup usage
2020-03-25 23:14:28 -04:00
Benjamin Otte
4c45410d43
widget: Remove gtk_widget_add_accelerator()
...
People should use shortcut controllers instead (global, capture).
A side effect of this is that GtkAccelLabel now lost its method to
magically look up accelerators to display. Somebody needs to add that
back later.
2020-03-25 23:14:28 -04:00
Benjamin Otte
8e9218df03
doc tools: Create AccelLabel image without using GtkAccelGroup
2020-03-25 23:14:28 -04:00
Emmanuele Bassi
541c478eeb
testgtk: Port keyval example to shortcut controllers
2020-03-25 23:14:28 -04:00
Benjamin Otte
78e3e42042
shortcutcontroller: Implement GtkBuildable
...
Use it to allow adding shortcuts to the controller via the usual <child>
method.
2020-03-25 23:14:28 -04:00
Benjamin Otte
33045c3e0b
shortcutaction: Integrate with GtkBuilder property parsing
...
<property name="action">action(win.quit)</property> style action
specifications now work for GtkShortcutAction properties.
2020-03-25 23:14:28 -04:00
Benjamin Otte
7974751e24
shortcuttrigger: Add gtk_shortcut_triger_new_parse_string()
...
And hook it up into the GtkBuilder infrastructure.
2020-03-25 23:14:28 -04:00
Benjamin Otte
daa7d9072d
application: Replace accelerator handling with shortcuts
...
API remains the same, but activation is now done via a
shortcutcontroller.
The code uses a controller with global scope so that the
shortcuts are managed with all the other global shortcuts.
2020-03-25 23:14:28 -04:00
Benjamin Otte
90a34312d4
accel: Add display arg to gtk_accelerator_parse_with_keycode()
...
It was using the default display unconditionally.
2020-03-25 23:14:28 -04:00
Benjamin Otte
580863b112
accelerators: Make gtk_accelerator_parse() return TRUE/FALSE
...
A parse function should return success or not. So do that.
2020-03-25 23:14:28 -04:00
Benjamin Otte
fb6a8f5fc1
shortcuttrigger: Add hash(), equal(), and compare() functions
...
Those are useful for putting triggers in hash tables or getting sorted
output.
2020-03-25 23:14:28 -04:00
Matthias Clasen
c2e2e2993b
shortcutmanager: Use list models
2020-03-25 23:14:28 -04:00
Matthias Clasen
5763514ab8
shortcutcontroller: Use a list model for shortcuts
2020-03-25 23:14:28 -04:00
Benjamin Otte
4c5d8547be
shortcutaction: Add gtk_shortcut_action_to_string()
...
For all but the callback action, we can print something useful.
2020-03-25 23:14:27 -04:00
Matthias Clasen
34987c0b5c
widget: Only create a controller if we have shortcuts
...
No point in creating objects that just hold empty lists.
2020-03-25 23:14:27 -04:00
Benjamin Otte
3cd4eb0310
widget: Keep keybindings as a GListStore
...
This way, we can use shortcut_controller_new_for_model() and avoid all
the special casing about run_class.
2020-03-25 23:14:27 -04:00
Benjamin Otte
a1e9ae5259
shortcutcontroller: Add gtk_shortcut_controller_new_for_model()
...
This is mainly for internal use, but I can't see a reason to not have it
public for people who want to maintain their own lists.
I'm sure gnome-builder will never ever find a way to misuse it.
2020-03-25 23:14:27 -04:00
Benjamin Otte
e738a4d129
shortcutcontroller: Implement GListModel
...
After all, this controller is a list of shortcuts.
2020-03-25 23:14:27 -04:00
Benjamin Otte
1ec950d14a
gtk-demo: Port the sliding puzzle demo to shortcuts
2020-03-25 23:14:27 -04:00
Benjamin Otte
92e20deca1
shortcut: Change the API for creating shortcuts
...
When creating shortcuts, there almost always are a trigger and an action
available for use. So make gtk_shortcut_new() take those as arguments.
Also add gtk_shortcut_new_with_arguments() so people can easily pass
those in, too.
2020-03-25 23:14:27 -04:00
Benjamin Otte
cd0332aad5
shortcut: Add GtkShortcutAction
...
Similar to GtkShortcutTrigger, GtkShortCutAction provides all the
different ways to activate a shortcut.
So far, these different ways are supported:
- do nothing
- Call a user-provided callback
- Call gtk_widget_activate()
- Call gtk_widget_mnemonic_activate()
- Emit an action signal
- Activate an action from the widget's action muxer
2020-03-25 23:14:27 -04:00
Benjamin Otte
cdd33bbee6
accelgroup: Remove unneeded APIs
...
After the removal of GtkAccelMap, these things are no longer necessary.
2020-03-25 23:14:27 -04:00
Emmanuele Bassi
bca1f6b64f
gtk: Remove GtkAccelMap
...
Now that accel paths are gone, the object managing them isn't needed
anymore either.
2020-03-25 23:14:27 -04:00
Benjamin Otte
9b99b89807
gtk: Remove accel paths
...
It's an outdated technology now that everybody is using GActionGroups.
If somebody wanted to support changeable shortcuts, they'd need to
reintroduce it in another way.
2020-03-25 23:14:27 -04:00
Benjamin Otte
62f96bfda6
Remove GtkMnemonicHash
...
It's not used anymore.
2020-03-25 23:14:27 -04:00
Emmanuele Bassi
2c62cde780
window: Remove all old mnemonic handling API
2020-03-25 23:14:27 -04:00
Emmanuele Bassi
aab10ea43b
Add GtkShortcutManager
...
This adds an interface for taking care of shortcut controllers with
managed scope.
Only GtkWindow currently implements this interface, so we need to ensure
that we check if any top-level widget we reach is a shortcuts manager
before we call into it.
2020-03-25 23:14:27 -04:00
Benjamin Otte
9428807c57
label: Implement mnemonics using shortcuts
2020-03-25 23:14:27 -04:00
Benjamin Otte
21e6e4c026
shortcut: Add gtk_shortcut_set_mnemonic_activate()
...
Makes the shortcut call gtk_widget_mnemonic_activate() upon activation.
2020-03-25 23:14:27 -04:00
Benjamin Otte
bde4cbe377
shortcuttrigger: Add support for mnemonics
...
Mnemonics need to be triggered with help from the controllers (who
determine the modifiers). Support for that has been added, too.
Mnemonics do not use this yet though.
2020-03-25 23:14:27 -04:00
Benjamin Otte
0b7e74318b
window: Put F10 accelerator into its own shortcut controller
...
So instead of relying on gtk_window_activate_key(), it's now using
proper infrastructure.
2020-03-25 23:14:27 -04:00
Benjamin Otte
e398f63bf6
window: Get rid of public APIs that shouldn't be
...
Event controllers should have replaced all of them.
And if they haven't, apps need to fix their code (I'm
looking at you Gimp).
2020-03-25 23:14:27 -04:00
Benjamin Otte
2244eeb727
gdk: Remove GDK_RELEASE_MASK
...
It was only ever supported by keybindings and those are gone now.
2020-03-25 23:14:27 -04:00
Benjamin Otte
c3af47f5d9
gtk-demo: Add a dumb demo for shortcut triggers
2020-03-25 23:14:27 -04:00
Benjamin Otte
730154df7d
shortcutcontroller: Add GtkShortcutScope
...
Allow setting the scope for a controller. The scope determines at what
point in event propagation the shortcuts will be activated.
Local scope is the usual activation, global scope means that the root
widget activates the shortcuts - ie they are activated at the very
start of event propagation (for global capture events) or the very end
(for global bubble events).
Managed scope so far is unimplemented.
This is supposed to be used to replace accelerators and mnemonics.
2020-03-25 23:14:27 -04:00
Benjamin Otte
2309e1dd38
shortcuttrigger: Add gtk_shortcut_trigger_to_label()
...
Provide a user-presentable string.
2020-03-25 23:14:27 -04:00
Benjamin Otte
90c7f4608a
accelgroup: Add gtk_accel_group_print_label()
2020-03-25 23:14:27 -04:00
Benjamin Otte
66102dacf1
accellabel: Move gtk_accelerator_get_label() code
...
The function lives in gtkaccelgroup.c, so there's no need to have that
call a private function in another source file. Instead, make that
other source file call gtk_accelerator_get_label() instead.
2020-03-25 23:14:27 -04:00
Benjamin Otte
d84b60e5f9
accellabel: Get rid of class variables
...
We can just look them up as-needed, no need to cache them.
2020-03-25 23:14:27 -04:00
Benjamin Otte
9a03c8b4d8
gtk: Remove bindings
...
The whole binding functionality is now handled by shortcuts.
2020-03-25 23:14:27 -04:00
Emmanuele Bassi
f02521c502
Remove bindings activation from GtkEventControllerKey
...
We're going to use shortcuts soon.
2020-03-25 22:36:03 -04:00
Matthias Clasen
c1247a7993
popover: Add keynav keybindings
...
The shortcut controllers are limited to same-native,
so we need to duplicate the Tab and arrow key bindings
for focus handling, as well as the Enter bindings for
activation.
2020-03-25 22:36:03 -04:00
Emmanuele Bassi
b2a747b4d4
popovermenu: Port to shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
c1ee2fd54a
accelgroup: Actually have a default mod mask
...
Don't just use a value without initializing it.
2020-03-25 22:36:03 -04:00
Benjamin Otte
4c7b00fd20
treeview: Redo event forwarding hack
...
Reorder the event controllers so that key forwarding to the search
entries really happens after shortcut triggering.
2020-03-25 22:36:03 -04:00
Benjamin Otte
3fba7f9dce
combobox: Redo key event forwarding hack
...
Instead of manualling invoking bindings, we now reorder event
controllers inside the treemenu, so that shortcuts run before the event
forwarding.
2020-03-25 22:36:03 -04:00
Emmanuele Bassi
7ca4a94768
widget: Add private accessor to event controllers
2020-03-25 22:36:03 -04:00
Benjamin Otte
1df0a5eab5
iconview: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
6a005c815e
infobar: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
cb09211ace
label: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
e430e0e2ff
listbox: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
6ad1078595
notebook: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
cd7e9dcc27
scale: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
8752f613d7
scalebutton: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
f54d3a3aca
scrolledwindow: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
db525ef213
searchentry: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
3f00e42ec9
shortcutssection: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
d5fa5b9594
shortcutswindow: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
2e5fc35e51
flowbox: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
6ff94f3637
paned: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
80888d7111
spinbutton: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
48b46c8d08
textview: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
df457cadfc
filechooserwidget: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
58e8f2332d
shortcutcontroller: Add gtk_shortcut_controller_add_shortcut()
...
... and gtk_shortcut_controller_remove_shortcut().
2020-03-25 22:36:03 -04:00
Benjamin Otte
376dc4d169
shortcutcontroller: Add private API for running class shortcuts
...
We don't want regular users to be able to run class shortcuts in their
controllers, so we have to special case that.
2020-03-25 22:36:03 -04:00
Benjamin Otte
dfd81f9c64
treeview: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
6d418134ee
widget: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
02646d74f4
dialog: Port binding to use shortcuts
2020-03-25 22:36:03 -04:00
Emmanuele Bassi
d62be573ad
text: Port to widget shortcuts
2020-03-25 22:36:03 -04:00
Emmanuele Bassi
17eef48835
Allow installing bindings bound to actions
...
This is just convenience code around GtkShortcut, just like bindings for
signal emission and callback invocation.
2020-03-25 22:36:03 -04:00
Emmanuele Bassi
7ffea02eb4
shortcut: Add action activation
2020-03-25 22:36:03 -04:00
Emmanuele Bassi
0b75edc0e1
bindings: Export action activation internally
...
We're going to use it, just like we use the signal emission code.
2020-03-25 22:36:03 -04:00
Benjamin Otte
d4bba7de88
shortcut: Add gtk_shortcut_set_callback()
...
... and gtk_widget_class_add_binding() to go with it.
This allows shortcuts to invoke manually added callbacks.
2020-03-25 22:36:03 -04:00
Benjamin Otte
a8902da4bc
assistant: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
8ff18b3d39
combobox: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
81fa63260e
trigger: Add an alternative trigger
...
And use it.
I just added it to GtkWidget just to show that I can.
The real reason I want it is for gamepad/joystick triggers
in games, so that it becomes possible to select 2 different
triggers (gamepad and keyboard) for the same shortcut.
2020-03-25 22:36:03 -04:00
Matthias Clasen
6d452f1eb8
shortcut: Add GtkShortcutTrigger
...
Triggers are meant to describe how to trigger a shortcut.
So far only a keyval + modifiers trigger exists.
2020-03-25 22:36:03 -04:00
Benjamin Otte
d51b8ff058
window: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Benjamin Otte
b11263ae91
bindings: Add more variant types
...
Also marshal types that the code in gtkbindings.c doesn't use. These
will be used by gtk_widget_class_add_binding_signal().
2020-03-25 22:36:03 -04:00
Benjamin Otte
0eb1228902
widget: Add gtk_widget_class_add_shortcut()
...
This allows adding shortcuts as a replacement for keybindings.
2020-03-25 22:36:03 -04:00
Benjamin Otte
d8603864a9
gtk: Add GtkShortcut
...
This is the base class for what is about to take over all sorts of
keyboard shortcuts. The initial version barely deals with keybindings.
2020-03-25 22:36:03 -04:00
Benjamin Otte
f9ee703af4
bindings: Split out function to invoke an action signal
...
We want to use that in shortcuts later.
2020-03-25 22:36:03 -04:00
Benjamin Otte
a232107122
shortcutcontroller: Introduce
...
This is a very barebones controller that currently does nothing but
activate the binding signals. Yay.
And because we have bindings on every widget (Yes, a GtkGrid has a
keybinding - 2 in fact), we need that controller everywhere.
2020-03-25 22:36:03 -04:00
Benjamin Otte
27834b04ae
bindings: Make gtk_binding_parse_signal() use GVariantBuilder
...
And because it's the last user of GtkBindingArg and
gtk_binding_entry_add_signall(), also remove those two.
2020-03-25 22:36:03 -04:00
Benjamin Otte
cbe207a8de
bindings: Parse into GVariantBuilder directly
...
Avoids the indirection via GtkBindingArg
2020-03-25 22:36:03 -04:00
Benjamin Otte
1cab5e03ca
bindings: Add gtk_binding_entry_add_signal_variant()
...
This function is the replacement for
gtk_binding_entry_add_signall().
The GVariant will be demarshalled and passed to the action signal upon
binding activation. The same rules apply as used to apply for
GtkBindingArg, in that long, double and string args are now replaced by
"x", "d" and "s" variant types.
2020-03-25 22:36:03 -04:00
Benjamin Otte
f8c523fa72
bindings: Replace GtkBindingArg arguments with GVariant
...
So far, this only replaces invocation, not yet parsing.
2020-03-25 22:36:03 -04:00
Matthias Clasen
e17db0abde
Merge branch 'matthiasc/for-master2' into 'master'
...
Matthiasc/for master2
See merge request GNOME/gtk!1568
2020-03-26 02:30:54 +00:00
Matthias Clasen
cc9c45a47a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1567
2020-03-26 01:54:30 +00:00
Emmanuele Bassi
a9c3a33620
passwordentry: Remove unused include
2020-03-25 21:53:12 -04:00
Emmanuele Bassi
f61d520ab1
entry: Remove unused include
2020-03-25 21:53:06 -04:00
Matthias Clasen
7672e6c833
text view: Fix touch selection
...
We forgot to allocated that popover.
2020-03-25 18:48:01 -04:00
Matthias Clasen
faf61cd112
event controller focus: drop include
...
This header is not needed here, and it is going away.
2020-03-25 18:47:54 -04:00
Matthias Clasen
1308ecb0ae
flattenlistmodel: Give access to child models
...
Add an api to retrieve the model containing a given
item in a flatten listmodel. This is useful when the
individual items in the list don't have backpointers.
2020-03-25 18:47:46 -04:00
Matthias Clasen
4f6096947e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1565
2020-03-25 21:48:38 +00:00
Matthias Clasen
dc18572a59
Merge branch 'wip/chergert/muxer-robustness-fix' into 'master'
...
muxer: force muxer dispoal as part of widget dispose
See merge request GNOME/gtk!1564
2020-03-25 21:34:56 +00:00
Matthias Clasen
8493ebfe98
filechoosererrorstack: Fix object life-cycle
...
Unparent children in dispose, not in finalize.
2020-03-25 17:04:29 -04:00
Matthias Clasen
5870d9d72a
testsuite: Set NO_AT_BRIDGE for gtk tests
...
The a11y stack insists on spewing hard to control warnings
that make our tests fail. So, no accessibility for gtk tests :(
2020-03-25 17:03:58 -04:00
Christian Hergert
b5b836668a
muxer: force muxer dispoal as part of widget dispose
...
We need to cleanup state here immediately so that we do not potentially
access the g_class private data after it been finalized. This ensures that
the borrowed reference is dropped by the muxer.
2020-03-25 14:02:59 -07:00
Timm Bäder
c155ac98c8
Merge branch 'wip/sadiq/fix-leak' into 'master'
...
singleselection: Fix a memory leak
See merge request GNOME/gtk!1554
2020-03-25 09:13:50 +00:00
Timm Bäder
600952e295
magnifier: Don't try to use a null widget paintable
...
We destroy the paintable in dispose, which can be called multiple times.
2020-03-24 10:44:06 +01:00
Timm Bäder
3b2adf5d1f
inspector: Fix child widget life cycle
...
unparent them in dispose
2020-03-24 10:44:06 +01:00
Timm Bäder
56d99ab5cd
Merge branch 'patch-2' into 'master'
...
gtkfilechoosernative: Remove duplicate "the" in the documentation
See merge request GNOME/gtk!1557
2020-03-24 06:08:26 +00:00
LingMan
29c9776daa
gtkfilechoosernative: Remove duplicate "the" in the documentation
2020-03-24 04:58:13 +00:00
Marc-Antoine Perennou
eb8e0910c3
testsuite/gtk/flattenlistmodel.c: fix build
...
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com >
2020-03-22 10:53:59 +01:00
Mohammed Sadiq
cfc44e09a0
singleselection: Fix a memory leak
2020-03-22 14:05:56 +05:30
Matthias Clasen
92b50c5e2a
3.98.1
2020-03-21 21:44:23 -04:00
Matthias Clasen
dabd09bc42
a11y: Don't re turn uninitialized memory
...
For some reason, this was now showing up in the
a11y tests as random image sizes in the about
dialog test.
2020-03-21 21:44:23 -04:00
Matthias Clasen
d7e5f5b368
Merge branch 'filechooser-popover-fixes' into 'master'
...
Filechooser popover fixes
See merge request GNOME/gtk!1553
2020-03-22 00:40:15 +00:00
Matthias Clasen
95209290c4
file chooser: Fix the rename file popover
...
Make this popover work again by attaching it
to the file chooser itself.
2020-03-21 20:14:23 -04:00
Matthias Clasen
90197240d3
filechooser: Fix the file list popover
...
Make this popover work again.
2020-03-21 20:00:15 -04:00
Matthias Clasen
6555a2f661
filechooser: Fix the new folder popover
...
We were listening for change notification on a
no-longer-existing property.
2020-03-21 19:32:08 -04:00
Matthias Clasen
a197b202b8
places sidebar: Fix the popovers
...
We need to check-resize the popovers.
2020-03-21 18:28:57 -04:00
Matthias Clasen
84e58aa393
Merge branch 'portal-dir-chooser' into 'master'
...
filechoosernativeportal: Allowing selecting folder(s)
See merge request GNOME/gtk!1552
2020-03-21 20:29:11 +00:00
Bastien Nocera
e99d1605dc
filechoosernativeportal: Allowing selecting folder(s)
...
Use the "directory" portal option when asked to select folders.
2020-03-21 15:46:05 -04:00
Matthias Clasen
bf988f8d07
Merge branch 'portal-chooser-fail' into 'master'
...
portal file chooser: Handle errors
Closes #2527
See merge request GNOME/gtk!1551
2020-03-21 18:34:07 +00:00
Matthias Clasen
245851a6bb
portal file chooser: Handle errors
...
Fall back to showing a local file chooser
if we get DBus errors from the portal.
Closes : #2527
2020-03-21 13:16:43 -04:00
Matthias Clasen
bb3dc16680
Merge branch 'fix-inspector-picking' into 'master'
...
inspector: Make picking work again
Closes #2528
See merge request GNOME/gtk!1549
2020-03-21 16:21:51 +00:00
Matthias Clasen
fceac594ae
Merge branch 'fix-inspector-key' into 'master'
...
x11: Fix key event state translation
See merge request GNOME/gtk!1550
2020-03-21 14:47:29 +00:00
Matthias Clasen
abeabc39e8
x11: Fix key event state translation
...
In the event refactoring, a bit was lost.
This makes Ctrl-Shift-i work again to open
the inspector.
2020-03-21 10:26:11 -04:00
Matthias Clasen
fd58b116cf
inspector: Make picking work again
...
We used to either make the inspector see- and click-thru
or lower it, but sadly translucency broke after we
removed surface opacity, and lowering doesn't work
on Wayland. So just hide the inspector window while
we are picking.
Fixes : #2528
2020-03-21 09:42:58 -04:00
Matthias Clasen
a67893fe5a
Merge branch 'new-text-attributes' into 'master'
...
New text attributes
See merge request GNOME/gtk!1547
2020-03-21 05:56:22 +00:00
Matthias Clasen
9259efb5d7
Make overline support conditional
...
The ci image does not have Pango 1.45, so for the
time being, make the overline support conditional
on Pango being new enough.
2020-03-21 01:18:54 -04:00
Matthias Clasen
72f06abd13
Require pango 1.44.4
...
This lets use use the insert-hyphen attribute
unconditionally.
2020-03-21 00:39:17 -04:00
Matthias Clasen
923a245a80
gtk-demo: Add hyphenation control to the markup demo
2020-03-20 23:58:33 -04:00
Matthias Clasen
38f1dbaba3
gtk-demo: Allow word breaking in the markup demo
...
We want to show hyphenation control here.
2020-03-20 23:58:33 -04:00
Matthias Clasen
795ef5b4e3
textbuffer: Parse overline and hyphenation attributes
...
When inserting Pango markup into a text buffer, translate
Pango attributes for overlines and hyphenation control
into the corresponding text tag properties.
2020-03-20 23:58:23 -04:00
Matthias Clasen
fd9c911c3a
textlayout: Handle new text tag properties
...
Translate tag properties for overlines and
hyphenation control into Pango attributes.
2020-03-20 23:58:23 -04:00
Matthias Clasen
a8c6ae6085
texttag: Support overline and hyphenation control
...
Add support for recently added Pango attributes
for overlines and hyphenation control. The new
properties of GtkTextTag are
overline, overline-rgba, allow-breaks, show-spaces
and insert-hyphens.
2020-03-20 23:58:23 -04:00
Carlos Garnacho
28e7a0a565
Merge branch 'master_MR1290' into 'master'
...
Copy of !1290 for master
Closes #2365
See merge request GNOME/gtk!1546
2020-03-20 20:20:41 +00:00
Matthias Clasen
7088bd18e6
Merge branch 'wip/chergert/fix-class-private-data-usage' into 'master'
...
Fix GtkWidgetClassPrivate data usage
See merge request GNOME/gtk!1545
2020-03-20 18:49:58 +00:00
Christian Hergert
ccac404f28
widget: fix class private data usage to be _init() safe
...
Before this commit, adding GtkWidgetAction to class private data would
require copying the actions to each subclass as they were built or
modified. This was convenient in that it is a sort of "copy on write"
semantic.
However, due to the way that GTypeInstance works with base _init()
functions, the "g_class" pointer in GTypeInstance is updated as each
_init() function is called. That means you cannot access the subclasses
class private data, but only the parent class private data.
If instead we use a singly linked list of GtkWidgetAction, each subclass
has their own "head" yet all subclasses share the tail of the
GtkWidgetAction chain.
This creates one bit of complexity though. You need a stable way to know
which "bit" is the "enabled" bit of the action so we can track enabled
GAction state. That is easily solved by calculating the distance to the
end of the chain for a given action so that base classes sort ahead of
subclasses. Since the parent class always knows its parent's actions, the
position is stable.
A new dynamic bitarray helper also helps us avoid allocations in all the
current cases (up to 64 actions per widget) and dynamically switches to
malloc if that is to ever be exceeded.
2020-03-20 11:17:56 -07:00
Christian Hergert
6822dce8fb
widget: move class private data to gtkwidgetprivate.h
...
We want access to the private data from the action muxer so we can just
move the structures to the gtkwidgetprivate.h header. Alternatively we
could create accessors, but given that we'll probably need to use this
in other areas, seems reasonable to just put it there.
2020-03-20 11:17:56 -07:00
Matthias Clasen
5b2cdad19e
Merge branch 'test-protocol' into 'master'
...
Test protocol: TAP
See merge request GNOME/gtk!1543
2020-03-20 18:12:09 +00:00
Matthias Clasen
c7caa53917
testsuite: disable performance tests
...
For some reason, these tests are flaky in ci,
they always work locally for me. So, until
we use the data these tests produce for something,
lets just turn them off.
2020-03-20 13:47:58 -04:00
Matthias Clasen
fa4be719d8
Merge branch 'wip/carlosg/text-handle-natives' into 'master'
...
Make text handles use native surfaces
See merge request GNOME/gtk!1487
2020-03-20 17:29:17 +00:00
Alexandr Miloslavskiy
32f088e335
gkimmulticontext: Fix crash due to leaked signal handler
...
The problem is caused by gtk_im_multicontext_set_slave(), which forgets
to disconnect these signal handlers:
* gtk_im_multicontext_retrieve_surrounding_cb
* gtk_im_multicontext_delete_surrounding_cb
If slave GtkImContext emits signal after GtkIMMulticontext context is
destroyed, this leads to reading freed memory, sometimes causing a crash.
Fixes : #2365
2020-03-20 18:02:22 +01:00
Emmanuele Bassi
cb81e3ee47
Merge branch 'ci-dbus-launch' into 'master'
...
ci: Add dbus-launch to the Docker build
See merge request GNOME/gtk!1544
2020-03-20 16:13:07 +00:00
Matthias Clasen
9eda683060
testsuite: Fix an a11y test
...
The derive test wasn't producing TAP, so
running it as part of a tap testsuite wasn't
going well. Fix that.
2020-03-20 12:09:21 -04:00
Matthias Clasen
cbb0ca4902
testsuite: Tell meson we use TAP
...
This makes meson actually parse the individual test
results. Most of the time, it does not make a difference,
but one case where it does is when all the individual
tests of a binary are skipped, meson will mark the
test as skipped.
2020-03-20 11:55:26 -04:00
Matthias Clasen
9403f44aef
reftests: Fix an xfail to work
...
The background-image-multiple.ref.ui file uses
non-existing properties, which gives us a g_warning,
and the glib test framework insists on treating
warnings as fatal, so we end up doing exit(133),
which in turn makes the meson TAP parser ignore
its xfails.
Comment out the nonexisting properties, so we can
fail properly, and then in turn xfail properly.
2020-03-20 11:55:26 -04:00
Matthias Clasen
dc4b7131f1
testsuite: Don't exit unsuccessfully when using TAP
...
The meson TAP parser doesn't take this lightly and
forgets all about xfails when we exit(1), so don't.
2020-03-20 11:55:26 -04:00
Emmanuele Bassi
bf6087f2da
ci: Add dbus-launch to the Docker build
2020-03-20 15:36:39 +00:00
Carlos Garnacho
23f03ca1f2
gtktextview: Set magnifier popover on top
...
At the bottom, it sometimes has to fight for the same position than
text handles, besides might not be ergonomically convenient (eg.
finger/hand partly covering the popover). Move it at the top to fix
both.
2020-03-20 15:52:19 +01:00
Carlos Garnacho
54a4a18bcf
gtktext: Set magnifier popover on top
...
At the bottom, it sometimes has to fight for the same position than
text handles, besides might not be ergonomically convenient (eg.
finger/hand partly covering the popover). Move it at the top to fix
both.
2020-03-20 15:52:19 +01:00
Carlos Garnacho
9a0b70fc84
gtkpopover: Re-present surface if position/pointing-to change while visible
...
This ensures the popover will follow the new position parameters. This is
necessary for popovers like the text magnifier that can be repositioned
while visible.
2020-03-20 15:52:19 +01:00
Carlos Garnacho
6431bdcf91
gtkpopover: Ensure the pointed to rectangle has a minimum w/h
...
On wayland, protocol errors will be raised if the rectangle width/height
are 0. Avoid that situation so it's valid to all popovers.
2020-03-20 15:52:19 +01:00
Carlos Garnacho
0f73e83f44
gtkwindow: Remove internal popover API
...
This was only used by text handles, and not anymore.
2020-03-20 15:52:19 +01:00
Carlos Garnacho
0264a64f29
gtktexthandle: Refactor and use native surfaces
...
Instead of being a GObject managing two GtkWidgets, make GtkTextHandle
a GtkWidget subclass, representing a single handle.
From the perspective of users (GtkText and GtkTextView), this is not a
big leap since they have to be aware of a great deal of text handles'
state. It actually makes things more direct and simple.
With text handles being widgets, those can be actual children of the
widget, and may have their own GdkSurface that we move around at will.
This is the second major aspect of this refactor.
2020-03-20 15:52:19 +01:00
Matthias Clasen
c893f79023
reftests: Don't run tests with --verbose
...
Unexpected output tends to break TAP.
2020-03-20 10:43:25 -04:00
Matthias Clasen
68e1c8d3e9
gsk: Don't unconditionally spew to stdout
2020-03-20 10:43:25 -04:00
Matthias Clasen
cf7dc5b2bb
testsuite: Don't g_print from tests
...
This breaks the TAP output.
2020-03-20 10:03:04 -04:00
Matthias Clasen
068ec58287
testsuite: Fix the accessible test
...
This test was happily doing nothing.
2020-03-20 10:03:04 -04:00
Matthias Clasen
2747dd5c9f
Merge branch 'disable-window-test-2' into 'master'
...
Disable window test 2
See merge request GNOME/gtk!1541
2020-03-20 13:42:38 +00:00
Matthias Clasen
f6fc3073fb
temporarily disable window test
...
This test was broken by the GdkToplevel refactoring,
and needs a big gtkwindow.c configure request cleanup
before it will work again.
2020-03-19 18:08:06 -04:00
Matthias Clasen
31db615885
Revert "Merge branch 'disable-window-test' into 'master'"
...
This reverts commit 3ac4c76b18
, reversing
changes made to 6ec96d2e98
.
2020-03-19 18:03:16 -04:00
Matthias Clasen
3ac4c76b18
Merge branch 'disable-window-test' into 'master'
...
Disable window test
See merge request GNOME/gtk!1540
2020-03-19 19:35:42 +00:00
Matthias Clasen
89b537bd8a
Fix the action test
...
We have a test that enumerates the GtkText actions,
so when a new open appears, the test needs to be updated.
2020-03-19 14:29:37 -04:00
Matthias Clasen
7d5cfcf61d
Fix a compiler warning
2020-03-19 14:13:26 -04:00
Matthias Clasen
2e70b4c323
temporarily disable window test
...
This test was broken by the GdkToplevel refactoring,
and needs a big gtkwindow.c configure request cleanup
before it will work again.
2020-03-19 11:25:38 -04:00
Matthias Clasen
fcab0943bf
text view: Fix touch selection
...
We forgot to allocated that popover.
2020-03-19 09:46:53 -04:00
Matthias Clasen
c8fd6407a8
widget: Drop the ::popup-menu signal
...
This is now done in widgets which have context
menus.
2020-03-19 00:56:46 -04:00
Matthias Clasen
53f29ba427
placesview: Stop using ::popup-menu
...
This signal is going away.
2020-03-19 00:54:23 -04:00
Matthias Clasen
eb3f4b302f
filechooser: Stop using ::popup-menu
...
This signal is going away.
2020-03-19 00:24:53 -04:00
Matthias Clasen
59df45f3f7
mountoperation: Stop using ::popup-menu
...
We can just use a shortcut controller directly.
2020-03-18 23:00:51 -04:00
Matthias Clasen
98011e6273
gtk-demo: Stop emitting ::popup-menu
...
The signal was not used anyway, in the font explorer demo.
2020-03-18 23:00:51 -04:00
Matthias Clasen
f40965cc40
colorchooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-18 23:00:51 -04:00
Matthias Clasen
ab9b094f80
range: Remove ::popup-menu emission
...
This signal is going away, and having context menus
on sliders is not really a thing anyway.
2020-03-18 23:00:51 -04:00
Matthias Clasen
4bc60c6110
scrollbar: Remove :popup-menu forwarding
...
This signal is going away.
2020-03-18 23:00:51 -04:00
Matthias Clasen
48ace13635
emojichooser: Stop using ::popup-menu
...
This signal is going away. Use an action instead.
2020-03-18 23:00:51 -04:00
Matthias Clasen
908d996b4f
Use an action for the context menu keybinding
...
The ::popup-menu signal is going away.
2020-03-18 23:00:51 -04:00
Matthias Clasen
4e263b4042
Print mnemonic triggers clearly
2020-03-18 23:00:51 -04:00
Matthias Clasen
f5134a833c
inspector: Show shortcuts
...
At a tab that lists the shortcuts contained in a
GtkShortcutController.
2020-03-18 23:00:51 -04:00
Matthias Clasen
f7021e80a7
Only create a class shortcut controller if we have shortcuts
...
No point in creating objects that just hold empty lists.
2020-03-18 23:00:51 -04:00
Matthias Clasen
3e7d49a8d3
widget: Name the controllers
2020-03-18 23:00:51 -04:00
Matthias Clasen
5a6533d8fb
window: Name the the controllers
2020-03-18 23:00:51 -04:00
Matthias Clasen
5a6a9dc149
shortcutmanager: Name the controllers
...
This is helpful in the inspector.
2020-03-18 23:00:51 -04:00
Matthias Clasen
ad69899a9d
Move shortcut manager initialization code
...
It is just too ugly to use quarks across multiple
source files, so add a private helper function that
attaches the controllers.
2020-03-18 23:00:51 -04:00
Benjamin Otte
3cf56817e7
filechooser: Trigger the location popup via bindings
...
Simplifies code quite a bit.
2020-03-18 23:00:51 -04:00
Benjamin Otte
ff6df33b6a
accels: Remove GtkAccelGroup
2020-03-18 23:00:51 -04:00
Benjamin Otte
e944514664
testmenubutton: Don't create a GtkAccelGroup
...
It's unused.
2020-03-18 23:00:51 -04:00
Benjamin Otte
93bb3f7144
testsuite: Remove GtkAccelGroup usage
2020-03-18 23:00:51 -04:00
Benjamin Otte
17d9ba362c
widget: Remove gtk_widget_add_accelerator()
...
People should use shortcut controllers instead (global, capture).
A side effect of this is that GtkAccelLabel now lost its method to
magically look up accelerators to display. Somebody needs to add that
back later.
2020-03-18 23:00:51 -04:00
Benjamin Otte
b685d2c00a
doc tools: Create AccelLabel image without using GtkAccelGroup
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
1a55f59f23
testgtk: Port keyval example to shortcut controllers
2020-03-18 23:00:51 -04:00
Benjamin Otte
29ced09dc4
shortcutcontroller: Implement GtkBuildable
...
Use it to allow adding shortcuts to the controller via the usual <child>
method.
2020-03-18 23:00:51 -04:00
Benjamin Otte
458fcba457
shortcutaction: INtegrate with GtkBuilder property parsing
...
<property name="action">action(win.quit)</property> style action
specifications now work for GtkShortcutAction properties.
2020-03-18 23:00:51 -04:00
Benjamin Otte
5218dd6a34
shortcuttrigger: Add gtk_shortcut_triger_new_parse_string()
...
And hook it up into the GtkBuilder infrastructure.
2020-03-18 23:00:51 -04:00
Benjamin Otte
df792a088d
application: Replace accelerator handling with shortcuts
...
API remains the same, but activation is now done via a
shortcutcontroller.
The code uses a controller with global scope so that the
shortcuts are managed with all the other global shortcuts.
2020-03-18 23:00:51 -04:00
Benjamin Otte
94ef20ea36
accel: Add display arg to gtk_accelerator_parse_with_keycode()
...
It was using the default display unconditionally.
2020-03-18 23:00:51 -04:00
Benjamin Otte
87df17e4ce
accelerators: Make gtk_accelerator_parse() return TRUE/FALSE
...
A parse function should return success or not. So do that.
2020-03-18 23:00:51 -04:00
Benjamin Otte
673a0463e0
shortcuttrigger: Add hash(), equal(), and compare() functions
...
Those are useful for putting triggers in hash tables or getting sorted
output.
2020-03-18 23:00:51 -04:00
Benjamin Otte
0c81698911
shortcuts: Mananage managed shortcuts with a custom model
...
Reduce the amount of special casing by using a list model
for global and managed shortcuts, too.
This way, the ListModel API will work for the ShortcutController in the
GtkShortcutManager and GtkRoot.
The only special case remaining is shortcut activation, which needs to
pass the right widget to the controller in the global/managed case.
2020-03-18 23:00:51 -04:00
Benjamin Otte
a10a295515
shortcutaction: Add gtk_shortcut_action_to_string()
...
For all but the callback action, we can print something useful.
2020-03-18 23:00:51 -04:00
Benjamin Otte
3b595f5720
widget: Keep keybindings as a GListStore
...
This way, we can use shortcut_controller_new_for_model() and avoid all
the special casing about run_class.
2020-03-18 23:00:51 -04:00
Benjamin Otte
d14807b93d
shortcutcontroller: Add gtk_shortcut_controller_new_for_model()
...
This is mainly for internal use, but I can't see a reason to not have it
public for people who want to maintain their own lists.
I'm sure gnome-builder will never ever find a way to misuse it.
2020-03-18 23:00:51 -04:00
Benjamin Otte
538a1a0461
shortcutcontroller: Implement GListModel
...
After all, this controller is a list of shortcuts.
2020-03-18 23:00:51 -04:00
Benjamin Otte
067bd7019c
gtk-demo: Port the sliding puzzle demo to shortcuts
2020-03-18 23:00:51 -04:00
Benjamin Otte
4a4bfa0766
shortcut: Change the API for creating shortcuts
...
When creating shortcuts, there almost always are a trigger and an action
available for use. So make gtk_shortcut_new() take those as arguments.
Also add gtk_shortcut_new_with_arguments() so people can easily pass
those in, too.
2020-03-18 23:00:51 -04:00
Benjamin Otte
e6d0560a82
shortcut: Add GtkShortcutAction
...
Similar to GtkShortcutTrigger, GtkShortCutAction provides all the
different ways to activate a shortcut.
So far, these different ways are supported:
- do nothing
- Call a user-provided callback
- Call gtk_widget_activate()
- Call gtk_widget_mnemonic_activate()
- Emit an action signal
- Activate an action from the widget's action muxer
- Activate a GAction
2020-03-18 23:00:51 -04:00
Benjamin Otte
4d0bab0c24
accelgroup: Remove unneeded APIs
...
After the removal of GtkAccelMap, these things are no longer necessary.
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
b28da74e90
gtk: Remove GtkAccelMap
...
Now that accel paths are gone, the object managing them isn't needed
anymore either.
2020-03-18 23:00:51 -04:00
Benjamin Otte
ba3882de83
gtk: Remove accel paths
...
It's an outdated technology now that everybody is using GActionGroups.
If somebody wanted to support changeable shortcuts, they'd need to
reintroduce it in another way.
2020-03-18 23:00:51 -04:00
Benjamin Otte
20cfa2e280
Remove GtkMnemonicHash
...
It's not used anymore.
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
a977094e18
window: Remove all old mnemonic handling API
2020-03-18 23:00:51 -04:00
Emmanuele Bassi
09400b6bfe
Add GtkShortcutManager
...
This adds an interface for taking care of shortcut controllers with
managed scope.
Only GtkWindow currently implements this interface, so we need to ensure
that we check if any top-level widget we reach is a shortcuts manager
before we call into it.
2020-03-18 23:00:50 -04:00
Benjamin Otte
bbe98d9f7c
label: Implement mnemonics using shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
ab681b0e05
shortcut: Add gtk_shortcut_set_mnemonic_activate()
...
Makes the shortcut call gtk_widget_mnemonic_activate() upon activation.
2020-03-18 23:00:50 -04:00
Benjamin Otte
ef40f22632
shortcuttrigger: Add support for mnemonics
...
Mnemonics need to be triggered with help from the controllers (who
determine the modifiers). Support for that has been added, too.
Mnemonics do not use this yet though.
2020-03-18 23:00:50 -04:00
Benjamin Otte
bea2dcef8f
window: Put F10 accelerator into its own shortcut controller
...
So instead of relying on gtk_window_activate_key(), it's now using
proper infrastructure.
2020-03-18 23:00:50 -04:00
Benjamin Otte
cc13b47542
window: Get rid of public APIs that shouldn't be
...
Event controllers should have replaced all of them.
And if they haven't, apps need to fix their code (I'm
looking at you Gimp).
2020-03-18 23:00:50 -04:00
Benjamin Otte
8c23ccd86e
gdk: Remove GDK_RELEASE_MASK
...
It was only ever supported by keybindings and those are gone now.
2020-03-18 23:00:50 -04:00
Benjamin Otte
662a8a2885
gtk-demo: Add a dumb demo for shortcut triggers
2020-03-18 23:00:50 -04:00
Benjamin Otte
d4127fe0d4
shortcutcontroller: Add GtkShortcutScope
...
Allow setting the scope for a controller. The scope determines at what
point in event propagation the shortcuts will be activated.
Local scope is the usual activation, global scope means that the root
widget activates the shortcuts - ie they are activated at the very
start of event propagation (for global capture events) or the very end
(for global bubble events).
Managed scope so far is unimplemented.
This is supposed to be used to replace accelerators and mnemonics.
2020-03-18 23:00:50 -04:00
Benjamin Otte
22801f0d4d
shortcuttrigger: Add gtk_shortcut_trigger_to_label()
...
Provide a user-presentable string.
2020-03-18 23:00:50 -04:00
Benjamin Otte
e050288d07
accelgroup: Add gtk_accel_group_print_label()
2020-03-18 23:00:50 -04:00
Benjamin Otte
93af53a2fc
accellabel: Move gtk_accelerator_get_label() code
...
The function lives in gtkaccelgroup.c, so there's no need to have that
call a private function in another source file. Instead, make that
other source file call gtk_accelerator_get_label() instead.
2020-03-18 23:00:50 -04:00
Benjamin Otte
e2a0ed4fcb
accellabel: Get rid of class variables
...
We can just look them up as-needed, no need to cache them.
2020-03-18 23:00:50 -04:00
Benjamin Otte
fb99f834e6
gtk: Remove bindings
...
The whole binding functionality is now handled by shortcuts.
2020-03-18 23:00:50 -04:00
Matthias Clasen
a062b96051
event controller focus: drop include
...
This header is not needed here, and it is going away.
2020-03-18 23:00:50 -04:00
Emmanuele Bassi
5033fc62f2
Remove bindings activation from GtkEventControllerKey
...
We're going to use shortcuts soon.
2020-03-18 23:00:50 -04:00
Emmanuele Bassi
bdde072c06
popover: Remove unused include
2020-03-18 23:00:50 -04:00
Matthias Clasen
f7a4d968e9
popover: Add keynav keybindings
...
The shortcut controllers are limited to same-native,
so we need to duplicate the Tab and arrow key bindings
for focus handling, as well as the Enter bindings for
activation.
2020-03-18 23:00:50 -04:00
Emmanuele Bassi
252030ba59
popovermenu: Port to shortcuts
2020-03-18 23:00:50 -04:00
Emmanuele Bassi
f24cf29326
passwordentry: Remove unused include
2020-03-18 23:00:50 -04:00
Emmanuele Bassi
9b1d593967
entry: Remove unused include
2020-03-18 23:00:50 -04:00
Benjamin Otte
4e3ac8f52b
accelgroup: Actually have a default mod mask
...
Don't just use a value without initializing it.
2020-03-18 23:00:50 -04:00
Benjamin Otte
7f10641fd9
treeview: Redo event forwarding hack
...
Reorder the event controllers so that key forwarding to the search
entries really happens after shortcut triggering.
2020-03-18 23:00:50 -04:00
Benjamin Otte
3ef6be0d25
combobox: Redo key event forwarding hack
...
Instead of manualling invoking bindings, we now reorder event
controllers inside the treemenu, so that shortcuts run before the event
forwarding.
2020-03-18 23:00:50 -04:00
Emmanuele Bassi
56595e7529
widget: Add private accessor to event controllers
2020-03-18 23:00:50 -04:00
Benjamin Otte
4b798e238f
iconview: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
718faf68ac
infobar: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
83dc9dabed
label: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
051f7e4118
listbox: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
cbeb096bb3
notebook: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
bf7c51cc11
scale: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
3803209330
scalebutton: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
fb7d1095d1
scrolledwindow: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
45ec453b76
searchentry: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
e4d628b410
shortcutssection: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
e11d799460
shortcutswindow: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
6e38af4429
flowbox: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
a70635f760
paned: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
2c91f15f6d
spinbutton: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
bad5ee7ed9
textview: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
277aaab041
filechooserwidget: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Benjamin Otte
5ade831cd1
shortcutcontroller: Add gtk_shortcut_controller_add_shortcut()
...
... and gtk_shortcut_controller_remove_shortcut().
2020-03-18 23:00:50 -04:00
Benjamin Otte
3b8a4340da
shortcutcontroller: Add private API for running class shortcuts
...
We don't want regular users to be able to run class shortcuts in their
controllers, so we have to special case that.
2020-03-18 23:00:49 -04:00
Benjamin Otte
ae11b29ee7
treeview: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
ac31979805
widget: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
0b4d0f4d31
dialog: Port binding to use shortcuts
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
00bc9e6b85
text: Port to widget shortcuts
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
d75fd59ddf
Allow installing bindings bound to actions
...
This is just convenience code around GtkShortcut, just like bindings for
signal emission and callback invocation.
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
84a52e3bbd
shortcut: Add action activation
2020-03-18 23:00:49 -04:00
Emmanuele Bassi
9687d69b5a
bindings: Export action activation internally
...
We're going to use it, just like we use the signal emission code.
2020-03-18 23:00:49 -04:00
Benjamin Otte
b18f9da807
shortcut: Add gtk_shortcut_set_callback()
...
... and gtk_widget_class_add_binding() to go with it.
This allows shortcuts to invoke manually added callbacks.
2020-03-18 23:00:49 -04:00
Benjamin Otte
6c13bbb441
combobox: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
4f128a4a21
assistant: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
e62154c91f
trigger: Add an alternative trigger
...
And use it.
I just added it to GtkWidget just to show that I can.
The real reason I want it is for gamepad/joystick triggers
in games, so that it becomes possible to select 2 different
triggers (gamepad and keyboard) for the same shortcut.
2020-03-18 23:00:49 -04:00
Matthias Clasen
78f9940ddc
shortcut: Add GtkShortcutTrigger
...
Triggers are meant to describe how to trigger a shortcut.
So far only a keyval + modifiers trigger exists.
2020-03-18 23:00:49 -04:00
Benjamin Otte
0f6c5da28d
window: Port bindings to use shortcuts
2020-03-18 23:00:49 -04:00
Benjamin Otte
c7f10e570e
bindings: Add more variant types
...
Also marshal types that the code in gtkbindings.c doesn't use. These
will be used by gtk_widget_class_add_binding_signal().
2020-03-18 23:00:49 -04:00
Benjamin Otte
e19b49f5aa
widget: Add gtk_widget_class_add_shortcut()
...
This allows adding shortcuts as a replacement for keybindings.
2020-03-18 23:00:49 -04:00
Benjamin Otte
ff13ee4b66
gtk: Add GtkShortcut
...
This is the base class for what is about to take over all sorts of
keyboard shortcuts. The initial version barely deals with keybindings.
2020-03-18 23:00:49 -04:00
Benjamin Otte
fed7d3833f
bindings: Split out function to invoke an action signal
...
We want to use that in shortcuts later.
2020-03-18 23:00:49 -04:00
Benjamin Otte
5c6be5c0cd
shortcutcontroller: Introduce
...
This is a very barebones controller that currently does nothing but
activate the binding signals. Yay.
And because we have bindings on every widget (Yes, a GtkGrid has a
keybinding - 2 in fact), we need that controller everywhere.
2020-03-18 23:00:49 -04:00
Benjamin Otte
06660874ee
bindings: Make gtk_binding_parse_signal() use GVariantBuilder
...
And because it's the last user of GtkBindingArg and
gtk_binding_entry_add_signall(), also remove those two.
2020-03-18 23:00:49 -04:00
Benjamin Otte
4675d74e42
bindings: Parse into GVariantBuilder directly
...
Avoids the indirection via GtkBindingArg
2020-03-18 23:00:49 -04:00
Benjamin Otte
3b3a5c2d53
bindings: Add gtk_binding_entry_add_signal_variant()
...
This function is the replacement for
gtk_binding_entry_add_signall().
The GVariant will be demarshalled and passed to the action signal upon
binding activation. The same rules apply as used to apply for
GtkBindingArg, in that long, double and string args are now replaced by
"x", "d" and "s" variant types.
2020-03-18 23:00:49 -04:00
Benjamin Otte
385c5e0569
bindings: Replace GtkBindingArg arguments with GVariant
...
This only replaces invocation, not yet parsing.
2020-03-18 23:00:49 -04:00
Matthias Clasen
6ec96d2e98
Merge branch 'wip/chergert/speedup-char_is_invisible' into 'master'
...
textbtree: short-circuit visibility check when possible
See merge request GNOME/gtk!1534
2020-03-19 01:20:21 +00:00
Christian Hergert
6c8d47f585
textbtree: short-circuit visibility check when possible
...
If we have never seen a GtkTextTag in the GtkTextTagTable with the
invisible bit set, then we do not need to go through the process of
checking the accumulated tags.
Not using invisible tags is overwhelmingly the common case.
2020-03-18 11:32:46 -07:00
Matthias Clasen
1bc1b82256
Merge branch 'wip/jimmac/adwaitadark-lighten-switches' into 'master'
...
Adwaita: dark switches/check/radios
Closes #2461
See merge request GNOME/gtk!1532
2020-03-18 12:28:15 +00:00
Matthias Clasen
89c0df6cb7
Merge branch 'wip/chergert/textview-fix-gdk_event_unref' into 'master'
...
textview: use gdk_event_unref()
Closes #2520
See merge request GNOME/gtk!1531
2020-03-18 12:27:08 +00:00
Jakub Steiner
c91dd2cb45
Adwaita: dark switches/check/radios
...
- lighten up radios, switches and checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-18 13:01:17 +01:00
Matthias Clasen
3408ff1dd7
emojichooser: Fix keynav
...
Make arrow and tab keys work in the
variations popover again.
2020-03-17 21:49:29 -04:00
Matthias Clasen
7a46157edf
window: Set min size properly
...
When we are mapping the window, we need to compute
a proper min size, otherwise the 1, 1 sticks and
makes all windows shrinkable to nothing.
2020-03-17 20:46:57 -04:00
Matthias Clasen
01568dc915
Revert "Adwaita: dark switches/check/radios"
...
This reverts commit 435992600f
.
This causes warnings from the CSS parser.
2020-03-17 20:32:23 -04:00
Matthias Clasen
6eb848f0e0
popover: Add keynav keybindings
...
The shortcut controllers are limited to same-native,
so we need to duplicate the Tab and arrow key bindings
for focus handling, as well as the Enter bindings for
activation.
2020-03-17 20:15:26 -04:00
Christian Hergert
e4578b15c3
textview: use gdk_event_unref()
...
Fixes #2520
2020-03-17 13:24:03 -07:00
Matthias Clasen
8fab4ceebb
Assorted migration guide updates
...
Mention GdkEvent, GdkPopup, GdkToplevel, GtkIconTheme
changes.
2020-03-17 16:23:03 -04:00
Jakub Steiner
826f237782
Merge branch 'wip/jimmac/adwaitadark-lighten-switches'
2020-03-17 11:05:26 +01:00
Jakub Steiner
435992600f
Adwaita: dark switches/check/radios
...
- lighten up radios, switches and checkboxes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2461
2020-03-17 11:03:28 +01:00
Matthias Clasen
5d4b46b2d8
Merge branch 'emoji-chooser-fixes' into 'master'
...
Emoji chooser fixes
See merge request GNOME/gtk!1530
2020-03-17 05:12:12 +00:00
Matthias Clasen
292cea7310
Adwaita: Fix focus in emoji chooser
2020-03-17 00:28:57 -04:00
Matthias Clasen
4d7f0f330b
emojichooser: Make the variation picker work again
...
We can't attach popovers to unsuspecting widget anymore.
2020-03-17 00:07:37 -04:00
Emmanuele Bassi
5bf51adcce
Merge branch 'respect-text-len-gtk4' into 'master'
...
imcontextwayland: Honour len argument in gtk_im_context_wayland_set_surrounding
See merge request GNOME/gtk!1529
2020-03-16 17:08:53 +00:00
Robert Mader
5343ec3345
imcontextwayland: Honour len argument in gtk_im_context_wayland_set_surrounding
...
Clients may pass not `NULL`-terminated strings as the function takes a
`len` argument. Use that argument.
2020-03-16 16:53:33 +01:00
Matthias Clasen
c6cc02637e
Merge branch 'x11-props' into 'master'
...
Drop X11-specific properties
See merge request GNOME/gtk!1526
2020-03-15 00:47:03 +00:00
Matthias Clasen
1576cced0f
Drop GdkToplevel:accept-focus/:focus-on-map
...
These properties were only ever implemented in the
X11 backend. If you want to use them, just use the
X properties directly.
2020-03-14 19:28:00 -04:00
Matthias Clasen
c9ec1c6af1
Drop focus-related properties
...
We don't use these, and they are only implemented on X11.
2020-03-14 19:28:00 -04:00
Matthias Clasen
32b9dd64db
Drop GdkToplevel:keep-above/below
...
These properties were only ever implemented in the X11
backend. If you want to keep windows above or below
on X11, just use the X properties.
2020-03-14 15:46:55 -04:00
Matthias Clasen
6f156dad7f
window: Drop keep above/below
2020-03-14 15:16:56 -04:00
Matthias Clasen
103ef3c195
tests: Stop using keep above/below
2020-03-14 15:16:56 -04:00
Matthias Clasen
60ea97187a
Drop GdkToplevel:sticky
...
This was only ever implemented on X11. If you
want to use it there, just use the X properties
yourself.
2020-03-14 15:16:18 -04:00
Matthias Clasen
fb7ef8f62c
window: Drop sticky
...
This is an X11-only concept that we don't have
on Wayland.
2020-03-14 14:34:39 -04:00
Matthias Clasen
d4f49a8cb9
tests: Stop sticking windows
2020-03-14 14:34:39 -04:00
Matthias Clasen
951f821d6a
Merge branch 'window-attach' into 'master'
...
window: Drop gtk_window_set_attached_to
See merge request GNOME/gtk!1527
2020-03-14 13:19:35 +00:00
Matthias Clasen
dfda88038e
window: Drop gtk_window_set_attached_to
...
We are no longer attaching windows to widgets.
2020-03-14 02:00:10 -04:00
Matthias Clasen
50c2b80c74
gdk: Documentation fixes
2020-03-14 01:23:56 -04:00
Matthias Clasen
0d3df4fb1d
Document gdk_toplevel_set_modal
2020-03-14 01:23:09 -04:00
Matthias Clasen
4be675b0c9
Small documentation fixes
2020-03-14 01:22:31 -04:00
Matthias Clasen
0c25b4cfa8
Update gtk docs
...
Updates for recent api renames and removals.
2020-03-14 01:15:07 -04:00
Matthias Clasen
c2e5aed874
NEWS: Updates
2020-03-14 00:59:16 -04:00
Matthias Clasen
60a9e9d342
Merge branch 'x11-resize' into 'master'
...
x11: Update surface size for popups too
See merge request GNOME/gtk!1525
2020-03-14 03:35:31 +00:00
Matthias Clasen
8010bc4596
x11: Update surface size for popups too
...
Without this, the back buffers of the wrong size
keep being used, causing flickery misdraws, as
seen when expanding the expander in the popover
in widget-factory.
2020-03-13 21:33:23 -04:00
Matthias Clasen
33db28c288
Merge branch 'fix-tools-tests' into 'master'
...
Fix tools tests
See merge request GNOME/gtk!1524
2020-03-13 20:36:54 +00:00
Matthias Clasen
7db490ef2a
testsuite: Specify the test protocol
...
If we don't specify protocol: 'tap', meson things
all is good even though my test yells "not ok".
2020-03-13 15:53:19 -04:00
Matthias Clasen
8b1301cecd
Update the ui file conversion output
...
This changed because the popover property got renamed.
2020-03-13 15:53:19 -04:00
Matthias Clasen
bc6953a081
testsuite: Update the settings test output
2020-03-13 15:53:19 -04:00
Matthias Clasen
4b71ed3f5e
testsuite: Update tools tests
...
These tests need to test GTK4 ui file syntax.
2020-03-13 15:34:54 -04:00
Matthias Clasen
8fd51d761b
testsuite: Actually run tools tests
...
The script was looking in the wrong place for the tests.
2020-03-13 15:11:07 -04:00
Matthias Clasen
66a0a8d53e
Merge branch 'wip/baedert/test-cflags' into 'master'
...
Pass (almost) all our cflags to tests, testsuite, examples, demos, ...
See merge request GNOME/gtk!1516
2020-03-13 18:40:46 +00:00
Piotr Drąg
265d9c8703
Update POTFILES.in
2020-03-13 17:32:39 +01:00
Matthias Clasen
eaf9f7e225
Merge branch 'wayland-max-cursor-scale' into 'master'
...
wayland: Stop capping cursor scales
See merge request GNOME/gtk!1522
2020-03-13 15:49:02 +00:00
Matthias Clasen
331069f378
wayland: Stop capping cursor scales
...
We don't load entire themes anymore, so we can
easily accomodate larger cursor scales now.
2020-03-13 11:13:02 -04:00
Matthias Clasen
9aa270f928
Merge branch 'update-broadway' into 'master'
...
Update broadway
See merge request GNOME/gtk!1521
2020-03-13 15:09:47 +00:00
Matthias Clasen
97d189d726
Merge branch 'popover-accessible-private' into 'master'
...
a11y: Drop the private from GtkPopoverAccessible
See merge request GNOME/gtk!1520
2020-03-13 14:38:51 +00:00
Alexander Larsson
9e2829756f
broadway: Inherit frame clock from parent surface
2020-03-13 15:26:22 +01:00
Alexander Larsson
b74a26b275
broadway: Keep popups above their parent
...
We set the parent as a "transient parent" for popups, which means
they will not be stacked below the parent.
2020-03-13 15:06:02 +01:00
Alexander Larsson
03d6d272f7
broadway: Track surface position correctly
...
surface->x/y (and various x,y arguments) should be in the parent
coordinates, so treat it as such. We also keep track of the root coords
as these are needed for popup positioning.
Also, drop the isTemp property server side and the weird initial
placement at (100, 100) in the daemon. We now fully control window
placement from the client instead. If this is not we want we should do
a serious design for that but until then lets do the simplest thing.
2020-03-13 15:05:59 +01:00
Alexander Larsson
1a763c440f
broadway: Correctly track surface visibility in client
...
We forgot to unset visible when hiding surfaces
2020-03-13 15:00:32 +01:00
Alexander Larsson
43598fc5f2
broadway: Ensure images are decoded, not only loaded
...
In firefox, onload will trigger when the image is loaded, but at
that point it may not be decoded yet so showing it will sometimers
trigger flashes. We use the new decode() feature instead which ensures
both that the image is loaded *and* decoded, thus fixing the flashes.
2020-03-13 15:00:24 +01:00
Alexander Larsson
a4b718da4e
broadway: Fix image updates for firefox
...
For whatever reason we need to assign the function to a variable
to be able to call it.
2020-03-13 15:00:18 +01:00
Alexander Larsson
086a577fd1
broadway: Handle browser hidpi scale factor
2020-03-13 14:59:37 +01:00
Matthias Clasen
c5076675aa
a11y: Drop the private from GtkPopoverAccessible
...
It is not used, and empty structs upset msvc.
2020-03-13 09:51:04 -04:00
Matthias Clasen
9d98707f66
Merge branch 'present-toplevel-2' into 'master'
...
surface api splitup
See merge request GNOME/gtk!1511
2020-03-13 13:34:57 +00:00
Bastien Nocera
179b39eb86
Merge branch 'wip/hadess/fix-remote-filechooser-main' into 'master'
...
Fix crasher/warnings when browsing remote filesystems
Closes #2482
See merge request GNOME/gtk!1490
2020-03-13 12:36:10 +00:00
Matthias Clasen
19e2ab76ce
win32: Build fixes
...
These fixes were done blindly, to make the ci pass,
and will need review by somebody with access to an
actual win32 system to make sure the surface subtypes
are implemented properly.
2020-03-13 07:47:48 -04:00
Timm Bäder
2fe23409fb
Merge branch 'align-docs-fixes' into 'master'
...
gtk: Tweak GTK_ALIGN_BASELINE docs
See merge request GNOME/gtk!1518
2020-03-13 06:17:46 +00:00
Matthew Leeds
1963ff2951
gtk: Tweak GTK_ALIGN_BASELINE docs
2020-03-12 12:36:09 -07:00
Matthias Clasen
2b2d6bf747
win32: implement subtypes
2020-03-12 15:30:11 -04:00
Matthias Clasen
7fd60ab570
Fix up gdk docs
2020-03-12 15:30:11 -04:00
Matthias Clasen
25b90907ad
surface: document gdk_surface_translate_coordinates
2020-03-12 15:30:11 -04:00
Matthias Clasen
f005dfa5fb
toplevel: require GdkSurface
2020-03-12 15:30:11 -04:00
Matthias Clasen
31d2b686d6
popup: require GdkSurface
2020-03-12 15:30:11 -04:00
Matthias Clasen
3e06a9b1d2
Drop root coordinates from _gdk_device_query_state
...
Callers are not using them anyway. Update all callers.
2020-03-12 15:30:11 -04:00
Matthias Clasen
641c8f3252
Drop mwm hints from api
...
The GdkWMDecoration and GdkWMFunction enums
are no longer used in the api, so move them
to the x11 backend where they are used.
2020-03-12 15:30:11 -04:00
Matthias Clasen
f020d77a23
Move fullscreen-mode to GdkToplevel
2020-03-12 15:30:11 -04:00
Matthias Clasen
81be6ff46b
Move edge-constraints to GdkToplevel
2020-03-12 15:30:11 -04:00
Matthias Clasen
b7f51a362e
surface: Drop unused vfuncs
...
These are now entirely unused.
2020-03-12 15:30:11 -04:00
Matthias Clasen
b05408f854
quartz: Drop unused vfuncs
2020-03-12 15:30:11 -04:00
Matthias Clasen
fe19ad7919
win32: Drop some unused vfuncs
...
toplevel_resize is unused in the frontend.
2020-03-12 15:30:10 -04:00
Matthias Clasen
651b746747
wayland: Drop some unused vfuncs
...
show, withdraw, raise, lower, toplevel_resize,
present_popup,
are all unused in the frontend.
2020-03-12 15:30:10 -04:00
Matthias Clasen
3654c05cb3
x11: Drop some unused vfuncs
...
show, withdraw, raise, lower are all unused in the frontend.
2020-03-12 15:30:10 -04:00
Matthias Clasen
b6c8cf72cd
broadway: Drop some unused vuncs
...
show, withdraw, raise, lower, present_popup
are all unused by the frontend.
2020-03-12 15:30:10 -04:00
Matthias Clasen
8b57092958
surface: Drop gdk_surface_show
...
No longer used.
2020-03-12 15:30:10 -04:00
Matthias Clasen
4dc27ee4a6
win32: Stop using gdk_surface_show
2020-03-12 15:30:10 -04:00
Matthias Clasen
90ff8ca797
broadway: Stop using gdk_surface_show
2020-03-12 15:30:10 -04:00
Matthias Clasen
7e15a13f48
wayland: Drop dead code
2020-03-12 15:30:10 -04:00
Matthias Clasen
b2c5d77883
x11: Stop using gdk_surface_show
2020-03-12 15:30:10 -04:00
Matthias Clasen
90dfca290c
gdk: Drop surface-type
...
We have interfaces for surface subtypes now.
2020-03-12 15:30:10 -04:00
Matthias Clasen
a2dbc729f6
wayland: Stop using surface-type
2020-03-12 15:30:10 -04:00
Matthias Clasen
763321e274
x11: Stop using surface-type
2020-03-12 15:30:10 -04:00
Matthias Clasen
df223ae27b
broadway: Stop using surface type
2020-03-12 15:30:10 -04:00
Matthias Clasen
0616fe033d
x11: Stop using gdk_surface_get_surface_type
2020-03-12 15:30:10 -04:00
Matthias Clasen
5a516f2a22
wayland: Stop using surface types
2020-03-12 15:30:10 -04:00
Matthias Clasen
70e45aa229
surface: Stop using surface types
2020-03-12 15:30:10 -04:00
Matthias Clasen
c00ec402c1
surface: Don't implement subtypes in the frontend
...
These are now provided by the backend.
2020-03-12 15:30:10 -04:00
Matthias Clasen
84095febed
x11: Only use state of toplevels
...
Other surface subtypes don't have that property.
2020-03-12 15:30:10 -04:00
Matthias Clasen
4c06c3bb19
broadway: Implement GdkPopup, GdkToplevel and GdkDragSurface
...
Make subclasses of GdkX11Surface that implement these
interfaces.
2020-03-12 15:30:10 -04:00
Emmanuele Bassi
34ff8f3afb
Merge branch 'migration-can-target-docs' into 'master'
...
Docs: Refer to GtkWidget::can_target in migration guide
See merge request GNOME/gtk!1517
2020-03-12 19:25:58 +00:00
Matthias Clasen
bf08bf667c
x11: Implement GdkPopup, GdkToplevel and GdkDragSurface
...
Make subclasses of GdkX11Surface that implement these
interfaces.
2020-03-12 14:56:21 -04:00
Matthias Clasen
cd773e7cb3
wayland: Implement GdkPopup, GdkToplevel and GdkDragSurface
...
Make subclasses of GdkWaylandSurface that implement these
interfaces.
2020-03-12 14:56:21 -04:00
Matthias Clasen
b3cabe638f
Drop gdk_surface_set_opacity
2020-03-12 14:56:21 -04:00
Matthias Clasen
fafddde4bc
x11: Stop using gdk_surface_set_opacity
...
We can just use the backend api directly.
2020-03-12 14:56:21 -04:00
Matthias Clasen
412a593618
widget: Stop using gdk_surface_set_opacity
2020-03-12 14:56:21 -04:00
Matthias Clasen
d6be419050
Drop gdk_surface_show and gdk_surface_resize
...
We can now use GdkDragIcon api for the last cases
where this was used.
2020-03-12 14:56:21 -04:00
Matthias Clasen
ceefe34027
gtkdragicon: Use drag surface api
2020-03-12 14:56:21 -04:00
Matthias Clasen
b25be8a42f
Add a GdkDragSurface interface
...
This will provide functionality specific to drag icons.
2020-03-12 14:56:21 -04:00
Matthias Clasen
3a4e647b2d
surface: Drop redundant toplevel api
...
The toplevel functionality to keep is moving to
GdkToplevel, and unused functions can go.
2020-03-12 14:56:21 -04:00
Matthias Clasen
c67d426dc4
docs: Stop using gdk_surface_get_decorations
2020-03-12 14:56:20 -04:00
Matthias Clasen
a79b6fbf35
testgtk: Stop setting decorations and functions
2020-03-12 14:56:20 -04:00
Matthias Clasen
496bd5783c
tests: Stop using gdk_surface_fullscreen
2020-03-12 14:56:20 -04:00
Matthias Clasen
8ea80801b4
testgtk: Stop using gdk_surface_set_icon_name
...
Its not useful api, and will disappear.
2020-03-12 14:56:20 -04:00
Matthias Clasen
f7aec64e6f
wayland: Stop using gdk_surface_set_title
...
Directly call the backend function for this, and for
gdk_surface_set_transient_for.
2020-03-12 14:56:20 -04:00
Matthias Clasen
8e0ad72875
testgtk: Stop using gdk_surface_get_state
2020-03-12 14:56:20 -04:00
Matthias Clasen
703d69692f
demo: stop using gdk_surface_get_state
2020-03-12 14:56:20 -04:00
Matthias Clasen
f90c0ccaf0
a11y: Stop using gdk_surface_get_state
2020-03-12 14:56:20 -04:00
Matthias Clasen
f78f8655a6
x11: Stop using gdk_surface_get_state
...
All the surfaces we are dealing with here are toplevels.
2020-03-12 14:56:20 -04:00
Matthias Clasen
6edff8cd67
gtk: use toplevel state getter
2020-03-12 14:56:20 -04:00
Matthias Clasen
9266881691
window: Use GdkToplevel
2020-03-12 14:56:20 -04:00
Matthias Clasen
dfbde3da4f
Introduce GdkToplevel
...
This is a new interface for toplevel surfaces.
2020-03-12 14:56:20 -04:00
Matthias Clasen
c0c387020b
Introduce GdkToplevelLayout
...
This will be used in a new GdkTopleve interface in
the near future.
2020-03-12 14:44:03 -04:00
Jason Francis
3830e764d7
Docs: Refer to GtkWidget::can_target in migration guide
...
This makes the docs consistent with the renaming changes in commit
ef982b7d46
.
2020-03-12 14:10:38 -04:00
Timm Bäder
73d8f6a090
build: Add -Wno-typedef-redefinition to build
...
Clang otherwise complains about this
2020-03-12 08:32:34 +01:00
Timm Bäder
822d67295a
Replace a few more fallthrough comments
2020-03-12 08:32:03 +01:00
Matthias Clasen
e7ef4a57ca
testsuite: Stop using type-hints
2020-03-11 19:36:04 -04:00
Matthias Clasen
11c91065cf
window: Drop type hints
2020-03-11 19:36:04 -04:00
Matthias Clasen
eefedccaee
x11: Set type hints based on surface type
...
Set the ewmh type hints based on the surface type and
transient parent, instead of taking it from the type hint.
2020-03-11 19:36:04 -04:00
Matthias Clasen
2ae3b46ee9
Stop setting type hints for dialogs
2020-03-11 19:36:04 -04:00
Matthias Clasen
ef9d7612f6
shortcutswindow: Stop setting type hints
2020-03-11 19:36:04 -04:00
Matthias Clasen
66669e0573
headerbar: Stop looking at type hints
2020-03-11 19:36:04 -04:00
Matthias Clasen
aec3705717
testsuite: Stop using type-hint
2020-03-11 19:35:56 -04:00
Matthias Clasen
ec0fb44958
a11y: Stop using type hints
2020-03-11 19:35:56 -04:00
Matthias Clasen
6c44f7bf07
wayland: Stop tracking orphan dialogs
...
Wayland has no concept of transient-for-group. If we want to
support that, add proper proper protocol for it, don't hack it
in this like.
2020-03-11 19:35:56 -04:00
Matthias Clasen
b2ae6ce8ff
surface: Rename gdk_surface_input_shape_combine_region
...
There is no shape combining going on anymore, so
call this just gdk_surface_set_input_region, and
remove the offset arguments too. All callers pass
0 anyway.
Update all callers and implementations.
2020-03-11 19:35:56 -04:00
Matthias Clasen
72fdf54e07
x11: Stop using gdk_surface_maximize
...
Just use the backend function directly.
2020-03-11 19:35:56 -04:00
Matthias Clasen
78ed520a5b
x11: Stop using gdk_surface_set_geometry_hints
...
Just use the backend function directly.
2020-03-11 19:35:56 -04:00
Matthias Clasen
29606af03e
wayland: Stop using gdk_surface_set_geometry_hints
...
Just use the backend function directly.
2020-03-11 19:35:56 -04:00
Matthias Clasen
513eb11c7c
inspector: Stop raising and lowering windows
...
We should always be composited, so this should not
matter in practice.
2020-03-11 19:35:56 -04:00
Matthias Clasen
2a6c08571f
x11: Stop using gdk_surface_raise
...
Avoid a vfunc roundtrip and just use the backend
implementation directly.
2020-03-11 19:35:56 -04:00
Matthias Clasen
3276021a5b
broadway: Stop using gdk_surface_raise
...
We don't implement this anyway. Add a shortcut
to the backend function in case we ever do.
2020-03-11 19:35:56 -04:00
Matthias Clasen
b1fb049277
x11: Stop abusing type hints for dnd
...
Nothing in GDK depends on this being set, so just
don't do it.
2020-03-11 19:35:55 -04:00
Matthias Clasen
5acbfce264
wayland: Stop abusing type hints
...
Instead of misusing window type hints, introduce
a private flag for drag surfaces.
2020-03-11 19:35:55 -04:00
Matthias Clasen
dc4f7515bd
surface: Drop popup api
...
We have the GdkPopup interface now.
2020-03-11 19:35:55 -04:00
Matthias Clasen
4e8dfdff2e
tooltip: Use GdkPopup
2020-03-11 19:35:55 -04:00
Matthias Clasen
b670bf54f7
popover: Use GdkPopup
2020-03-11 19:35:55 -04:00
Matthias Clasen
530dd5a940
surface: Implement GdkPopup
...
This is not quite right, and only temporary, since
it makes GDK_IS_POPUP (surface) true for every surface.
Eventually, the implementation will be moved to the
backends.
2020-03-11 19:35:55 -04:00
Matthias Clasen
aee8a02fc8
Introduce GdkPopup
...
This is a new interface for popup surfaces.
2020-03-11 19:35:55 -04:00
Matthias Clasen
0791363943
popuplayout: Add docs
2020-03-11 19:35:55 -04:00
Matthias Clasen
fe35831112
Move GdkSurface autocleanup declaration
...
We need this available after including gdksurface.h.
2020-03-11 19:35:55 -04:00
Matthias Clasen
c2f25c0c2f
wayland: Stop calling frontend surface api
...
This is an unnecessary vfunc roundtrip, and the
frontend api is going away shortly.
2020-03-11 19:35:55 -04:00
Matthias Clasen
78d71eb439
Simplify surface move/drag api
...
Drop the with_device variants, and always pass a device.
2020-03-11 19:35:55 -04:00
Matthias Clasen
c488e86caa
testsuite: Update a11y test output
2020-03-11 19:35:55 -04:00
Matthias Clasen
ad322c154c
testsuite: Stop using GtkSpinner::active
...
This property was renamed to ::spinning.
2020-03-11 19:35:55 -04:00
Matthias Clasen
6f36d9865e
Drop gtk_window_begin_move/resize_drag
...
These are just simple wrappers around GdkSurface
api, and we don't need them.
2020-03-11 19:35:55 -04:00
Matthias Clasen
d70c9453ba
disable popover test
...
This is failing atm
2020-03-11 19:35:55 -04:00
Matthias Clasen
ff0909f366
Merge branch 'vfl-error' into 'master'
...
Fix message for VFL parser errors
See merge request GNOME/gtk!1514
2020-03-11 15:56:46 +00:00
Emmanuele Bassi
7de62118a0
Fix message for VFL parser errors
...
The loop is iterating over the wrong variable, and it's reimplementing
g_strfill() in a less efficient way.
2020-03-11 15:14:17 +00:00
Benjamin Otte
8742d42f32
Merge branch 'wip/ricotz/annotations' into 'master'
...
Really fix annotation for GtkDropTarget.get_gtypes()
See merge request GNOME/gtk!1510
2020-03-09 20:47:29 +00:00
Rico Tzschichholz
4af0531e8c
Fix annotation for GdkContentFormats.get_gtypes()
2020-03-09 17:36:08 +01:00
Rico Tzschichholz
4232cbe33f
Really fix annotation for GtkDropTarget.get_gtypes()
2020-03-09 17:03:58 +01:00
sicklylife
2da445f918
Update Japanese translation
2020-03-09 12:49:58 +00:00
sicklylife
5858b56acc
Update Japanese translation
2020-03-09 12:36:08 +00:00
Timm Bäder
7553649c47
testsuite/gtk: Add common_cflags to build
...
With a few exceptions.
2020-03-07 16:28:04 +01:00
Timm Bäder
7789d0e23f
builder: Make object names a const array
...
We don't take ownership.
2020-03-07 15:30:38 +01:00
Timm Bäder
dc36c21835
demos/gtk-demo: Add common_cflags to build
...
With a few exceptions.
2020-03-07 15:30:35 +01:00
Timm Bäder
049f841900
padcontroller: Copy action entries
...
The label and action_name entries of GtkPadActionEntry are supposed to
be const, so copy them into a private ActionEntryData struct that we
later free.
2020-03-07 14:52:45 +01:00
Matthias Clasen
948ab2767b
Merge branch 'master' into 'master'
...
builder-tool: rename show-close-button to show-title-buttons
See merge request GNOME/gtk!1497
2020-03-06 18:02:06 +00:00
Timm Bäder
3c28f6d891
demos/widget-factory: Add common_cflags to build
...
And fix the generated warnings
2020-03-06 18:56:40 +01:00
Timm Bäder
6f6ed1e4af
demos/node-editor: Add common_cflags to build
...
And fix the generated warnings
2020-03-06 18:54:37 +01:00
Timm Bäder
e444d7315c
demos/icon-browser: Add common_cflags to build
...
And fix the generated warnings
2020-03-06 18:53:05 +01:00
Timm Bäder
5d1e006a95
demos/constraint-editor: Add common_cflags to build
...
And fix all the warnings and errors generated.
2020-03-06 18:51:10 +01:00
Timm Bäder
6fcd5d5ab5
testsuite/reftests: Add common_cflags to build
2020-03-06 18:24:58 +01:00
Timm Bäder
e759358402
testsuite/a11y: Add common_cflags to build
2020-03-06 18:22:01 +01:00
Timm Bäder
01bd7910ce
testsuite/css: Add common_cflags to build
...
And fix all the errors coming from that.
2020-03-06 18:22:01 +01:00
Timm Bäder
79c60bb7fd
testsuite/gdk: Add common_cflags to build
2020-03-06 18:22:01 +01:00
Timm Bäder
b3c332ad9c
testsuite/performance: Add common_cflags to build
2020-03-06 18:22:01 +01:00
Timm Bäder
83982a28e7
testuite/gsk: Add common_cflags to build
...
And fix all the warnings and errors.
2020-03-06 18:22:01 +01:00
Timm Bäder
d1cd6aacba
tests: Add common_cflags to build
...
And fix all the errors and warnings resulting from that
See #2491
2020-03-06 18:21:58 +01:00
Timm Bäder
0e8850bf84
examples: Add common_cflags to build
...
And fix all the warnings and errors generated by doing so.
See #2491
2020-03-06 16:36:42 +01:00
Timm Bäder
d7fb33caf7
filechooserwidget: Avoid criticals when in recent mode
...
Don't try to use the browse_files_model just because we have a location
entry. The model might still be NULL at this point.
2020-03-06 16:29:32 +01:00
Matt Guerrette
46ba019522
builder-tool: rename show-close-button to show-title-buttons
...
For GtkHeaderBar show-close-button has been renamed to
show-title-buttons for GTK4. This commit adds this fixup to the builder
tool
2020-03-02 22:24:46 -05:00
Bastien Nocera
8cb45cdeae
filechooser: Fallback if content-type unavailable
...
Fallback to fast-content-type if the content-type attribute isn't
available, as is the case for most remote filesystems.
Closes : #2482
2020-02-28 17:33:08 +01:00
Bastien Nocera
823714cf66
filechooser: Fix crash when file has no content-type
...
This might happen for slow filesystems where a fast-content-type might
be provided instead. Don't try to manipulate that content_type if it's
NULL, otherwise we'll either throw warnings (at best) or crash (at
worse).
Conflicts:
gtk/gtkfilechooserwidget.c
2020-02-28 17:32:48 +01:00