Matthias Clasen
7cd7e781e2
text: Ignore synthetic motion events
...
We want to re-show the obscured mouse cursor when the
user interacts with the mouse, not when the pointer position
relative to the widget changed. So, ignore synthetic
motion events.
Fixes : #3792
2021-03-25 15:25:35 -04:00
Matthias Clasen
7aed044cb6
surface: Mark synthetic motion events as such
...
This will let us discriminate them from actual
device movement when necessary.
2021-03-25 15:24:47 -04:00
Matthias Clasen
e1fde3e2cd
Add private api for synthetic events
...
Add a function to create motion events and mark them
as synthetic.
2021-03-25 15:24:18 -04:00
Matthias Clasen
bef9b9ccc6
Typo fix
2021-03-25 13:53:56 -04:00
Matthias Clasen
a05efd7270
treelistmodel: Add some docs
2021-03-25 13:53:44 -04:00
Matthias Clasen
ec235fa353
ngl: Reword a warning
2021-03-25 08:02:05 -04:00
Matthias Clasen
eb18e4d9b0
Updates
2021-03-25 07:44:58 -04:00
Matthias Clasen
fa57f20b87
Merge branch 'wip/fix-stack-get-item' into 'master'
...
stack: Fix some list model issues
See merge request GNOME/gtk!3345
2021-03-24 20:34:47 +00:00
Mohammed Sadiq
e211740da6
stack: Fix check if page is selected
...
When there is no visible child, gtk_selection_model_is_selected()
was returning TRUE for any invalid position.
So check if the page is non-NULL and match
2021-03-24 20:23:09 +05:30
Mohammed Sadiq
0351bc766c
stack: Increase reference only if page is non-NULL
...
g_list_nth_data() may return NULL if position is off the end
2021-03-24 20:21:13 +05:30
Matthias Clasen
5531906973
Merge branch 'gles-fallback' into 'master'
...
gdkglcontext-wayland: Fallback to GLES 2.0 after legacy failed
See merge request GNOME/gtk!3327
2021-03-24 11:21:21 +00:00
Matthias Clasen
9d6190bc3c
Merge branch 'gdkmacosglcontext-fix' into 'master'
...
gdkmacosglcontext: fix compilation error
See merge request GNOME/gtk!3342
2021-03-24 11:09:51 +00:00
Tom Schoonjans
d5de73fb9d
gdkmacosglcontext: fix compilation error
...
See https://developer.apple.com/documentation/appkit/nsopenglpixelformat/1436219-initwithattributes?language=occ
2021-03-24 10:08:11 +00:00
Matthias Clasen
b539c92312
Merge branch 'builder-tool-placeholder-crash' into 'master'
...
gtk-builder-tool: Avoid a crash with <placeholder/>
Closes #3781
See merge request GNOME/gtk!3339
2021-03-23 21:02:39 +00:00
Matthias Clasen
272d8a6800
Merge branch 'wip/chergert/ngl-fix-windows-intel-driver' into 'master'
...
ngl: move uniform key mapping into uniform state
Closes #3780
See merge request GNOME/gtk!3340
2021-03-23 21:02:11 +00:00
Christian Hergert
f8a6a09896
ngl: move uniform key mapping into uniform state
...
Previously, we translated the uniform key (an enum) into a location within
the shader program in GskNglProgram. A number of performance improvements
were focused around having low nubers for the uniform locations. Generally
this is the case, but some drivers such as old Intel drivers on Windows
may use rather large numbers for those.
To combat this, we can push the translation of uniform keys into locations
at the GskNglUniformState level so that we work with unranslated keys
through the process until applying them.
Fixes #3780
2021-03-23 13:44:26 -07:00
Matthias Clasen
6a66ccd3e6
gtk-builder-tool: Avoid a crash with <placeholder/>
...
Not sure we can do much with a ui file that has
<placeholder/> elements littered throughout. But
at least we can avoid crashing while trying to
convert it.
Fixes : #3781
2021-03-23 15:25:53 -04:00
Emmanuele Bassi
1f6b556972
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!3338
2021-03-23 15:39:47 +00:00
Emmanuele Bassi
3668541eaa
docs: Add a side bar to the docs.gtk.org landing page
...
Make it look like the API references hosted on docs.gtk.org.
2021-03-23 14:58:03 +00:00
Emmanuele Bassi
a6727326e3
docs: Update the Cairo reference link
2021-03-23 14:49:20 +00:00
Emmanuele Bassi
1507099dc7
Merge branch 'ebassi/for-master' into 'master'
...
Publish docs for Pango and GdkPixbuf
See merge request GNOME/gtk!3337
2021-03-23 13:39:18 +00:00
Emmanuele Bassi
2bc7abceae
docs: Drop the external class for links to docs.gtk.org
2021-03-23 13:13:53 +00:00
Emmanuele Bassi
a9a5622214
docs: Link Pango and GdkPixbuf on docs.gtk.org
2021-03-23 13:13:53 +00:00
Emmanuele Bassi
0560397aa8
ci: Build Pango and GdkPixbuf's docs
...
We want to publish them alongside GTK's own API reference.
2021-03-23 13:13:53 +00:00
Matthias Clasen
4e06787a1b
Merge branch 'bilelmoussaoui/expressions-annotations' into 'master'
...
Add missing nullable annotations to BoolFilter/StringFilter
See merge request GNOME/gtk!3334
2021-03-23 00:49:54 +00:00
Matthias Clasen
610ba0e764
Merge branch 'issue3715-gtk4' into 'master'
...
[gtk4] x11/dnd: Ignore XErrors from the COW
Closes #3715
See merge request GNOME/gtk!3336
2021-03-22 15:09:42 +00:00
Olivier Fourdan
80ba38a0b3
x11/dnd: Ignore XErrors from the COW
...
The DnD code for X11 adds the composite overlay window (aka COW) to the
cache.
Yet the X11 requests to get and release the COW may trigger XErrors that
we ought to ignore otherwise the client will abort.
Fixes : #3715
2021-03-22 15:38:58 +01:00
Chun-wei Fan
5d3af346dd
Merge branch 'really-fix-3581' into 'master'
...
GDK-Win32: Remove extraneous call to _gdk_win32_append_event() (really fix issue #3581 )
Closes #3581
See merge request GNOME/gtk!3306
2021-03-22 14:18:44 +00:00
Matthias Clasen
d882def373
Merge branch 'meson-install-script' into 'master'
...
Meson: Use gnome.install_script()
See merge request GNOME/gtk!3135
2021-03-22 12:45:45 +00:00
Bilal Elmoussaoui
3761dbba8b
gtk: add missing nullable annotations to StringFilter
2021-03-22 12:42:19 +01:00
Bilal Elmoussaoui
ae7b19c760
gtk: add missing nullable annotations to BoolFilter
2021-03-22 12:42:13 +01:00
Matthias Clasen
157218c507
Merge branch 'wip/baedert/for-master' into 'master'
...
ngl: Remove unused function
See merge request GNOME/gtk!3332
2021-03-22 11:17:58 +00:00
Matthias Clasen
60325df7db
Merge branch 'better-dead-keys' into 'master'
...
Better dead keys
See merge request GNOME/gtk!3329
2021-03-22 02:37:14 +00:00
Matthias Clasen
64a62ebcfb
Regenerate compose sequence file
...
Update our compose sequences based on the current
update xorg Compose.pre file. Beyond that, remove
some deadkey sequences that we are now handling
(better) in code.
2021-03-21 21:48:03 -04:00
Matthias Clasen
a42a133a18
Move compose related tooling to a subdir
...
This reduces the clutter in gtk/.
2021-03-21 21:48:03 -04:00
Matthias Clasen
a41cd9b1fa
compose-parse: Add a negative lookaside
...
Make this script parse gtk-compose-remove.txt for
sequences to remove from the xorg Compose file.
This will be used for removing some deadkey combinations
that we can handle better in code.
Also, make this script explicitly python2. I tried
porting it to python3, but gave up in the end.
2021-03-21 21:48:03 -04:00
Matthias Clasen
8bfc6afe33
imcontext: Improve dead key handling more
...
For sequences like ``, we want to commit the first
deadkey and then continue preedit with the second.
The alternative is to do chained deadkeys, where
entering ~~a yields ̃̀̃̃a. But we don't do that, and
I think that would be more controversial.
2021-03-21 21:48:03 -04:00
Matthias Clasen
5b67e6817c
imcontext: Improve dead key handling
...
For sequences like `x, where we don't have a compose
sequence, we still want to commit "`x", and not silently
eat the keys.
2021-03-21 21:48:01 -04:00
Matthias Clasen
48f87c1eea
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3328
2021-03-21 20:48:04 +00:00
Emmanuel Gil Peyrot
aced6030ee
gdkglcontext-wayland: Fallback to GLES 2.0 after legacy failed
...
This lets the NGL backend be selected instead of the Cairo backend on
devices which expose both GL and GLES, but have better support of GLES.
Tested on a PinePhone.
2021-03-21 20:37:04 +00:00
Matthias Clasen
c5aa35f8ef
inspector: Allow inspecting Unicode
...
Add a way to show text as a Unicode sequence.
This can be helpful in understanding what is
happening with text.
2021-03-21 16:05:10 -04:00
Matthias Clasen
7a56aa910e
ngl: Fix a rounding error in subpixel positioning
...
1024 / 4 is 256, not 250.
2021-03-21 16:05:10 -04:00
Matthias Clasen
bd0df03248
gl: Fix a rounding error in subpixel positioning
...
1024 / 4 is 256, not 250.
2021-03-21 16:05:10 -04:00
Matthias Clasen
df4b564d69
build: Disable g_assert in release builds
...
The ngl renderer is heavily using g_assert, and it
is written with the assumption that these assertions
will be compiled out in release builds.
2021-03-21 16:05:10 -04:00
Matthias Clasen
9640bfb3fe
calendar: Typo fix
2021-03-21 16:05:10 -04:00
Matthias Clasen
2e69273922
ngl: Remove an unused field
...
We are ignoring the debug nodes, so the
debug_groups string chunk is unused.
2021-03-21 16:05:10 -04:00
Matthias Clasen
1e014f4291
ngl: Always populate the glyph front cache
...
There is no reason not to do this also in the
case when we upload the glyph.
2021-03-21 16:05:10 -04:00
Matthias Clasen
fbe47106e7
ngl: Use floorf consistently
2021-03-21 16:05:10 -04:00
Timm Bäder
ea93c40644
ngl: Remove unused function
2021-03-21 18:00:10 +01:00
Piotr Drąg
1a3f2acb95
Update Polish translation
2021-03-20 15:41:34 +01:00
Emmanuele Bassi
fb8592952d
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!3324
2021-03-20 12:31:10 +00:00
Emmanuele Bassi
216a262651
docs: Put core deps below UI links
...
We assume people will be more interested in GTK if they get to
docs.gtk.org.
2021-03-20 12:18:42 +00:00
Emmanuele Bassi
0178cdbdf2
docs: Fix typo in the docs landing page
2021-03-20 12:18:26 +00:00
Yuri Chornoivan
b84d959d31
Update Ukrainian translation
2021-03-20 08:54:01 +00:00
Yuri Chornoivan
3eca28e4b5
Update Ukrainian translation
2021-03-20 08:51:46 +00:00
Emmanuele Bassi
98a91a3290
Merge branch 'a11y-strdup' into 'master'
...
a11y: Don't copy attribute names in attribute sets
See merge request GNOME/gtk!3323
2021-03-19 22:31:37 +00:00
Matthias Clasen
3cfe69d711
a11y: Don't copy attribute names in attribute sets
...
We only need these names when serializing a11y information
for tests. And copying these strings is entirely unnecessary.
So, just pass a callback instead.
2021-03-19 17:01:28 -04:00
Matthias Clasen
b9da74590b
Merge branch 'ngl-glyph-cache' into 'master'
...
Ngl glyph cache
See merge request GNOME/gtk!3322
2021-03-19 18:59:33 +00:00
Matthias Clasen
b253aca883
ngl: Improve the glyph front cache
...
The effectiveness of the front cache is limited by
subpixel positioning making it very likely that we
will meet the same glyph in different x phases inside
a single line of text.
Factoring the xphase into the front cache key makes things
better. For the string eeeeeeeeeeeeeeeeeee
before: 0% front cache hits
after: >90% front cache hits
2021-03-19 14:32:03 -04:00
Matthias Clasen
5ac7f7c2f6
ngl: Drop an unused struct member
...
GskNglGlyphLibrary.hash_table wasn't used.
2021-03-19 14:05:15 -04:00
Matthias Clasen
9981f19409
texttag: A few typo fixes
2021-03-19 14:04:27 -04:00
Emmanuele Bassi
dae59112d7
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!3321
2021-03-19 17:57:42 +00:00
Emmanuele Bassi
f25beff7a6
docs: Restructure the list of UI libraries
...
Put GTK at the top.
2021-03-19 17:23:46 +00:00
Emmanuele Bassi
130ed3d5e5
docs: Fix typo in the docs landing page
2021-03-19 17:23:29 +00:00
Matthias Clasen
830efa6ce2
Revert "ngl: Remove duplicate check"
...
This reverts commit 1fd534ef1e .
This change revealed that we are not treating damage regions
correctly, and we regularly end up with
2021-03-19 13:17:02 -04:00
Emmanuele Bassi
a33e32ef60
Merge branch 'ebassi/for-master' into 'master'
...
Fix the landing page structure
See merge request GNOME/gtk!3320
2021-03-19 14:55:12 +00:00
Emmanuele Bassi
aaffd902fd
Fix the landing page structure
2021-03-19 14:36:34 +00:00
Emmanuele Bassi
972a06c038
Merge branch 'pages-index' into 'master'
...
Add a landing page for the GitLab pages root
See merge request GNOME/gtk!3319
2021-03-19 14:14:46 +00:00
Emmanuele Bassi
1763ede9ce
Add a landing page for the GitLab pages root
...
Right now, we land inside a 404 if we go to:
https://gnome.pages.gitlab.gnome.org/gtk/
as we have all our API references in a sub-level. We should have a
landing page for the root, similar to developer.gnome.org/references/.
2021-03-19 13:54:32 +00:00
Matthias Clasen
f5fb8a95f4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3317
2021-03-19 05:44:39 +00:00
Matthias Clasen
948e032072
text tag: Typo fix
2021-03-18 22:53:37 -04:00
Matthias Clasen
21aa8ae29f
Cosmetics
...
Remove a stale comment.
2021-03-18 22:53:37 -04:00
Matthias Clasen
4fce3ceffc
Cosmetics
...
Pack the GtkTextAttributes struct better.
2021-03-18 22:53:37 -04:00
Matthias Clasen
95a5e7b438
release script: Include gi-docgen
...
This lets us say 'you don't need to package this'
about gi-docgen.
2021-03-18 22:53:27 -04:00
Matthias Clasen
8fdedbd73b
Merge branch 'ngl-by-default' into 'master'
...
gsk: Make ngl the default OpenGL renderer
See merge request GNOME/gtk!3313
2021-03-19 02:01:34 +00:00
Matthias Clasen
b962a0f166
Merge branch 'wip/chergert/fix-ngl-cache-eviction' into 'master'
...
fix ngl cache eviction
Closes #3771
See merge request GNOME/gtk!3316
2021-03-19 01:59:29 +00:00
Christian Hergert
0f0ee97e1e
ngl: clear Glyph front cache at the beginning of a frame
...
We don't want to be responsible for duplicating the effort of the hash
table, we just want to speed up subsequent lookups. Otherwise, we risk
not marking glyph usage when tracking usage for compaction.
2021-03-18 18:00:04 -07:00
Christian Hergert
af80f3a976
ngl: implement atlas compaction
...
This required finishing up the begin_frame/end_frame semantics for
GskNglTextureLibraryw which was apparently overlooked.
The driver was changed to provide more information to the library when
beginning frames. We do not need to use end_frame so that was removed.
The frame age is the same as GL (60) but I do wonder if that is based
on seconds if we should be using something longer for situations where
we have higher frame rates.
Fixes #3771
2021-03-18 17:59:56 -07:00
Matthias Clasen
1536f6a59c
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Respect GDK_DEBUG=vulkan-disable
Closes #3748
See merge request GNOME/gtk!3312
2021-03-18 21:43:14 +00:00
Matthias Clasen
574b0bf48a
Merge branch 'bilelmoussaoui/4.2-annotations' into 'master'
...
IMContext: add since annotations to the new APIs
See merge request GNOME/gtk!3315
2021-03-18 21:42:35 +00:00
Bilal Elmoussaoui
0b100229e3
IMContext: add since annotations to the new APIs
2021-03-18 22:25:38 +01:00
Matthias Clasen
19d9c78514
gsk: Make ngl the default OpenGL renderer
...
We will keep the original GL renderer around for
a while, to have an alternative. But we want to
get wider testing of the new renderer.
2021-03-18 15:00:39 -04:00
Matthias Clasen
140b7f0a61
Merge branch 'wip/chergert/fix-3770' into 'master'
...
ngl: ensure vertices buffer allocates enough vertices
Closes #3770
See merge request GNOME/gtk!3314
2021-03-18 17:55:26 +00:00
Christian Hergert
56daad9c35
ngl: ensure vertices buffer allocates enough vertices
...
It's not guaranteed that a single power of two growth will be enough.
Fixes #3770
2021-03-18 10:43:24 -07:00
Matthias Clasen
eaf09a4625
Cosmetics
...
Pango lets us pass NULL for the font desc and language
in pango_context_get_font_metrics() to use the context
values.
2021-03-18 07:52:03 -04:00
Matthias Clasen
a576bd190b
inspector: Respect GDK_DEBUG=vulkan-disable
...
Respect the debug settings for disabling Vulkan or GL,
and do not try to initialize those contexts. This can
be necessary to work around crashes.
Fixes : #3748
2021-03-17 23:19:08 -04:00
Matthias Clasen
2ce92085e1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3765
See merge request GNOME/gtk!3311
2021-03-18 00:31:10 +00:00
Matthias Clasen
e6b1443fbb
label: Fix tooltips on links
...
Fix pointed out by Timm Baeder.
Fixes : #3765
2021-03-17 19:46:02 -04:00
Matthias Clasen
60ccae000b
media: Always use GL with gstreamer
...
As long as we can create a GL context, pass one to
gstreamer. This at least gets us GL textures with
the ngl renderer, the previous code was arbitrarily
refusing that.
2021-03-17 16:28:12 -04:00
Timm Bäder
7ecd004d50
Merge branch 'gsk-border-node-diff-fix-typo' into 'master'
...
Fix a typo in gsk_border_node_diff
See merge request GNOME/gtk!3310
2021-03-17 16:04:57 +00:00
Andrey Kozlovskiy
6b48fb767d
Fix a typo in gsk_border_node_diff
...
Typo was introduced in !3278 and results in an incorrect handling of different uniformity.
2021-03-17 15:38:01 +00:00
Emmanuele Bassi
6d4f93bb7f
Merge branch 'select-list-model-null' into 'master'
...
gtk: Allow selection models to take null list model during construction
See merge request GNOME/gtk!3309
2021-03-17 14:09:37 +00:00
Matthias Clasen
cfe8c0e187
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3763
See merge request GNOME/gtk!3308
2021-03-17 12:32:45 +00:00
Matthias Clasen
6d5657eee7
lpr: Fix various compiler warnings
...
gcc 11 is warning about some const mixups here.
Fix them.
2021-03-17 07:56:07 -04:00
Matthias Clasen
600cbdb7ba
treestore: Initialize some local variables
...
gcc 11 is warning that these might be used uninitialized
otherwise.
2021-03-17 07:51:27 -04:00
Matthias Clasen
8b82993dde
sizerequest: Avoid a corner case
...
gcc 11 warns that the code isn't safe when
n_requested_sizes is 0. Add a precondition check
to make it clear that that never happens.
2021-03-17 07:50:24 -04:00
Matthias Clasen
ea185cbdda
cssshadowvalue: Handle error condition propertly
...
We were parsing off the end of our array before noticing
that we've gone too far. gcc 11 warns about this.
2021-03-17 07:49:06 -04:00
Matthias Clasen
ee837dfc12
checkbutton: Add a warning about cyclic groups
...
Setting up check or toggle button group relationships
in a cycle will lead to lockups. Add a warning about
this, and catch the simplest case with a precondition
check.
Fixes : #3763
2021-03-17 07:38:57 -04:00
Matthias Clasen
1d888bff43
Drop the gtk-doc subproject
...
No longer used.
2021-03-17 07:28:31 -04:00
Chun-wei Fan
38ad068d9b
GDK-Win32: Remove extraneous call to _gdk_win32_append_event()
...
Apparently, by comparing with the other backends, we should not call
_gdk_win32_append_event() after calling gdk_scroll_event_new() but we should
call it after calling gdk_scroll_event_new_discrete(), which was why we didn't
restore the cursor after we scroll using the mouse wheel and didn't manage to
remove the shade that appears after we scrolled to the very top or very bottom.
Also, as suggested by the reporter, use IDC_SIZEALL for the system cursor that
we fall back to if no cursor theme is installed, as with other Windows
programs.
This should really fix issue #3581 .
2021-03-17 11:22:23 +08:00
Balázs Úr
45c8c6c77f
Update Hungarian translation
2021-03-16 23:49:27 +00:00
Matthias Clasen
ceed7d1ba4
Merge branch 'matthiasc/for-master' into 'master'
...
dnd: Add some warnings to the docs
See merge request GNOME/gtk!3305
2021-03-16 19:12:05 +00:00
Matthias Clasen
74e2bb4cf1
dnd: Add some warnings to the docs
...
Add some warnings about pitfalls of the async dnd api.
2021-03-16 14:48:44 -04:00
Matthias Clasen
cc6bb13242
Merge branch 'kjellahl/cairo-subproject' into 'master'
...
Fix build when cairo is a subproject
See merge request GNOME/gtk!3304
2021-03-16 11:43:06 +00:00
Kjell Ahlstedt
50beae7541
meson: Find libcairo-script-interpreter when cairo is a subproject
...
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the build tree, libcairo-script-interpreter is not stored
in the same directory as other cairo libraries.
2021-03-16 11:47:28 +01:00
Kjell Ahlstedt
0f6b91109e
gdkglcontext-x11: Don't assume that cairo-xlib.h is in cairo directory
...
If cairo is a subproject, it's not necessarily installed when gtk
is built. In the source tree, cairo's headers are not stored in
a directory called 'cairo'.
2021-03-16 11:47:16 +01:00
Matthias Clasen
f279c7b1c2
Merge branch 'fix-3581' into 'master'
...
gdkcursor-win32.c: Add cursor map for all-scroll (issue #3581 )
Closes #3581
See merge request GNOME/gtk!3298
2021-03-15 22:32:23 +00:00
Matthias Clasen
08b27848e1
Merge branch 'fix-wayland-layout-changes' into 'master'
...
Fix wayland layout changes
See merge request GNOME/gtk!3303
2021-03-15 22:31:08 +00:00
Matthias Clasen
e3dcc3d369
wayland: Fix cross-layout accelerators
...
GTK traditionally lets you activate keyboard shortcuts
even if they are for a non-active layout. But it is meant
to only activate with a keysym from a non-active layout
when that symbol is not present in the current layout.
That last condition was lost when key event handling
was redone for GTK4. Bring it back.
2021-03-15 17:14:49 -04:00
Matthias Clasen
568fe2e97b
wayland: Add debug spew for active keyboard layouts
...
Print out what we think the active keyboard layout is,
when it changes, with GDK_DEBUG=input.
2021-03-15 17:14:49 -04:00
Jason Francis
cd77485193
gtk: Allow selection models to take null list model during construction
...
This brings it in line with the documentation, and with the respective
set_model() functions.
2021-03-15 15:55:47 -04:00
Matthias Clasen
ec0e76dabd
Merge branch 'issue-3757' into 'master'
...
docs: Update annotations for WidgetClass.query_action()
Closes #3757
See merge request GNOME/gtk!3301
2021-03-15 19:28:17 +00:00
Matthias Clasen
1eebf0ebd1
wayland: Emit keys-changed on layout changes
...
We were forgetting to do this in when layout changes are
communicated via handle_modifiers.
2021-03-15 12:34:23 -04:00
Emmanuele Bassi
0a7af75639
docs: Update annotations for WidgetClass.query_action()
...
The parameter_type and property_name out arguments can be set to NULL.
Fixes : #3757
2021-03-15 13:48:35 +00:00
Milo Casagrande
72012113fd
Update Italian translation
...
(cherry picked from commit affeff5472 )
2021-03-15 09:25:36 +00:00
Chun-wei Fan
54b3048584
gdkcursor-win32.c: Add cursor map for all-scroll
...
This makes sure that we don't have cursors disappearing on Windows upon
scrolling because we can't find a cursor that exists on the system during
a scroll, and unlike GTK-3.x, we do not default to the arrow pointer on GTK4.
Just mimic what we have on X11 and Wayland: the trusty standard arrow pointer.
Fixes issue #3581 .
2021-03-15 17:16:33 +08:00
Matthias Clasen
3daad8fe87
release-script: Actually compress the docs tarball
...
Somehow an x got lot and the tarball got very big. Oops...
2021-03-14 23:33:10 -04:00
Benjamin Otte
a1c1ad317b
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!3297
2021-03-15 02:31:45 +00:00
Benjamin Otte
dbd19bf27a
x11: Don't call _gdk_surface_update_size() all the time
...
We were calling _gdk_surface_update_size() every frame, even if the
window size didn't change. This would cause us to discard all cached
buffers and redraw the whole screen.
This was BAD.
2021-03-15 03:16:50 +01:00
Benjamin Otte
97fad45237
surface: Remove unused gdk_surface_get_unscaled_size()
...
Also remove unscaled_width/height members in the win32 backend.
Both of those are unused.
2021-03-15 02:56:28 +01:00
Matthias Clasen
cbda61d3fb
4.1.2
2021-03-14 21:48:48 -04:00
Matthias Clasen
afe195a862
Update release script
...
With gi-docgen based docs, we can try to go back to
including the docs in the main release tarball.
2021-03-14 21:48:46 -04:00
Matthias Clasen
e6adee2403
Merge branch 'menubar-accel' into 'master'
...
window: Add a way to disable F10 shortcut
Closes #3727
See merge request GNOME/gtk!3296
2021-03-15 01:27:45 +00:00
Benjamin Otte
1fd534ef1e
ngl: Remove duplicate check
...
We check the extents, so there's no need to check overlap before.
2021-03-15 01:30:34 +01:00
Matthias Clasen
cfc91b62b0
window: Add a way to disable F10 shortcut
...
This is needed for terminal emulators.
Fixes : #3727
2021-03-14 19:47:06 -04:00
Matthias Clasen
24ec2cc6a6
Merge branch 'ngl-less-shaders' into 'master'
...
Assorted ngl improvements
See merge request GNOME/gtk!3295
2021-03-14 21:04:37 +00:00
Matthias Clasen
28de2eecc9
ngl: Special-case css backgrounds
...
Recognize a common pattern: A rounded clip with
a color node, followed by a border node, with the
same outline. This is what CSS backgrounds frequently
produce, and we can render it more efficiently with
a combined shader.
2021-03-14 16:49:31 -04:00
Matthias Clasen
ed3f0012b1
ngl: Don't bother with uniform border nodes
...
Now that colors aren't uniforms anymore, we don't
win much by using the inset_shadow shader. The fragment
shaders of inset_shadow and border are identical. And
the regular border setup does nine-slicing.
2021-03-14 16:49:31 -04:00
Matthias Clasen
51074ca5df
ngl: Small shader improvements
...
Add a variant of gskSetOutputColor that saves a
few multiplications, and use it where possible.
2021-03-14 16:49:31 -04:00
Matthias Clasen
8aac574d63
ngl: Improve the coloring shader
...
Since we are now passing a float anyway, we can avoid
the branch in the fragment shader.
2021-03-14 16:49:31 -04:00
Matthias Clasen
c1f98d6837
ngl: Improve the gradient shaders
...
Use a define for MAX_COLOR_STOPS, and give the loop
a fixed limit.
2021-03-14 16:49:31 -04:00
Matthias Clasen
3f60c39de4
ngl: Rewrite gsk_ngl_render_job_visit_text_node
...
Make this more compact, and thus easier to read.
2021-03-14 16:49:31 -04:00
Matthias Clasen
4aa570ba88
ngl: Drop gsk_ngl_render_job_set_color
...
Colors are not state that we carry across draw ops,
so setting the color on the render job doesn't make
much sense. Instead, pass the color to the various
draw calls. Add a few new ones for that purpose.
Also, shorten the names of some by going from
'load_vertices_from_offscreen' to 'draw_offscreen'.
2021-03-14 16:49:31 -04:00
Matthias Clasen
233969e9e4
ngl: Refactor gsk_ngl_render_job_visit_border_node
...
With color sorting out of the picture, this can
be much simpler.
2021-03-14 16:49:31 -04:00
Matthias Clasen
19e3a6af5d
ngl: Consistently use gsk_scaled_premultiply
...
Its not going to make much of a difference, but we
can just as well be consistent.
2021-03-14 16:49:31 -04:00
Matthias Clasen
29501f5398
ngl: Fix up uniform enums
...
This got messed up when color was changed from
a uniform to an attribute in 06d5c8e72d .
2021-03-14 16:49:31 -04:00
Jiri Grönroos
3408240ba6
Update Finnish translation
...
(cherry picked from commit f5a34b53af )
2021-03-14 17:03:07 +00:00
Guillaume Bernard
e6725aa16f
Update French translation
...
(cherry picked from commit 21039681d6 )
2021-03-14 13:38:24 +00:00
Piotr Drąg
f34c0f4a99
Update Polish translation
2021-03-14 13:30:26 +01:00
Marek Černocký
52c7fd166b
Updated Czech translation
2021-03-14 09:28:17 +01:00
Matthias Clasen
346b29ad8f
Merge branch 'gles-coloring' into 'master'
...
ngl: Fix the coloring shader on GLES 2.0
See merge request GNOME/gtk!3294
2021-03-13 22:27:04 +00:00
Emmanuel Gil Peyrot
064947356a
ngl: Fix the coloring shader on GLES 2.0
...
Integer varyings didn’t exist in GLSL ES 1.00, neither did the flat
attribute.
2021-03-13 22:00:54 +00:00
Kjartan Maraas
d2258fb316
Update Norwegian Bokmål translation
...
(cherry picked from commit 70ee21db71 )
2021-03-13 16:05:15 +00:00
Matthias Clasen
dda66d580f
Merge branch 'ebassi/for-master' into 'master'
...
docs: Fix the dependencies links
See merge request GNOME/gtk!3284
2021-03-13 12:36:56 +00:00
Matthias Clasen
1d773df9f2
Merge branch 'ngl-textview-cursor' into 'master'
...
Ngl textview cursor
See merge request GNOME/gtk!3292
2021-03-13 12:33:15 +00:00
Matthias Clasen
9be2f130f0
textview: Fix blinking block cursors
...
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
2021-03-12 21:50:07 -05:00
Matthias Clasen
e345f9a4db
textview: Fix blinking block cursors
...
When we have a block cursor, we need to discard the
cached node of the line containing the cursor, in order
to get a blinking cursor.
2021-03-12 19:44:31 -05:00
Matthias Clasen
3a928c8980
textlayout: Render cursors at the end
...
Don't place the insertion cursor render nodes in the
middle of the text nodes for all the text. This helps
the renderer batching the text draw calls together.
2021-03-12 19:28:36 -05:00
Matthias Clasen
42dfc21b2d
ngl: Fix up some debug printouts
2021-03-12 18:26:15 -05:00
Matthias Clasen
daed57c30e
Merge branch 'wip/chergert/fewer-uniforms' into 'master'
...
ngl: apply fewer uniforms
See merge request GNOME/gtk!3289
2021-03-12 22:55:00 +00:00
Matthias Clasen
de0860c1bf
Merge branch 'pgriffis/readme-fixes' into 'master'
...
readme: Fix broken doc links
See merge request GNOME/gtk!3291
2021-03-12 22:51:16 +00:00
Patrick Griffis
4fbc63f50a
readme: Fix broken doc links
2021-03-12 22:02:55 +00:00
Matthias Clasen
3e1524fade
Merge branch 'ngl-vertex-attributes' into 'master'
...
Ngl vertex attributes
See merge request GNOME/gtk!3290
2021-03-12 21:26:52 +00:00
Matthias Clasen
ebe30d851b
ngl: Identify shaders
...
Add a comment with a name to each shader. That makes
identifying the shaders in apitrace much easier.
2021-03-12 15:35:40 -05:00
Christian Hergert
f97ce21e59
ngl: reintroduce comparison checks
...
This reduces how many changes we make when recording uniform state, which
increases the chances that the data offset will be the same when applying
uniforms.
2021-03-12 11:47:15 -08:00
Christian Hergert
0b7d8e19c3
ngl: add front cache to reduce uniform changes
...
Since we make full snapshots when recording uniform state of batches, we
need to perform some deduplication to avoid so many repeated uniform calls.
This uses a closed hashtable to determine if we are likely changing the
value to something new.
This does not currently compare values, it instead only compares that we
are going to point at a new offset into the uniform buffer. We could go
further if we compare upon updating values (we did that early on in the
prototype) so that offsets are less likely to be changed.
2021-03-12 11:22:59 -08:00
Matthias Clasen
0ee6868b7f
gtk-demo: Add a test for scrolling with Emoji
...
Make a text with lots of Emoji and text. This
is exercising the GL renderers switching between
different shaders for color and plain glyphs.
2021-03-12 13:19:37 -05:00
Matthias Clasen
6a30c6b01c
ngl: Make the coloring shader more versatile
...
When the color passed is transparent black, use
the color from the texture as source, instead of
as mask. This lets use use the coloring program
both for regular and color glyphs, avoiding
program changes in text with Emoji.
2021-03-12 13:19:37 -05:00
Matthias Clasen
06d5c8e72d
ngl: Set color as vertex attribute
...
Instead of using uniforms for color used in multiple
programs, pass it as vertex attributes. This will let
us batch more draw calls, since we don't have to change
uniforms so often. In particular, for syntax-highlighted
text.
2021-03-12 13:18:47 -05:00
Matthias Clasen
3252f1e301
gsk: Give ngl its own shader sources
...
We may want to change the interface between the
shaders and the renderer for ngl, and therefore,
sharing the shaders between gl and ngl will not
be practical, going forward.
2021-03-12 13:18:47 -05:00
Matthias Clasen
7f292d34bd
Merge branch 'fix-3704' into 'master'
...
gdksurface-win32.c: Fix window menu positioning (issue #3704 )
Closes #3704
See merge request GNOME/gtk!3286
2021-03-12 14:06:33 +00:00
Emmanuele Bassi
7c29847fbf
build: Install the API references
...
We are building them, but not installing them.
2021-03-12 11:32:09 +00:00
Emmanuele Bassi
66f0547ebf
docs: Fix the dependencies links
...
Use the GitLab pages location until we can link to a proper space on
developer.gnome.org.
2021-03-12 11:18:37 +00:00
Chun-wei Fan
e941e2be7d
gdksurface-win32.c: Fix window menu positioning
...
We ought to get the coordinates of where the window menu should be
displayed using gdk_win32_surface_get_root_coords(), instead of rounding
the position that we obtained with gdk_event_get_position().
Also rename items a bit in the same function, and call
gdk_event_get_event_type() for consistency with the other backends.
Fixes issue #3704 .
2021-03-12 18:45:43 +08:00
Changwoo Ryu
28e33bc26c
Update Korean translation
...
(cherry picked from commit 7774d5d85e )
2021-03-12 08:51:03 +00:00
Emmanuele Bassi
372513a5e2
Merge branch 'bilelmoussaoui/shortcuts-annotation' into 'master'
...
g-i: fix gtk_shortcut_label_new annotation
See merge request GNOME/gtk!3285
2021-03-11 18:40:32 +00:00
Bilal Elmoussaoui
5c505aefc4
g-i: fix gtk_shortcut_label_new annotation
2021-03-11 18:21:56 +00:00
Emmanuele Bassi
9b3ca7f6b1
Merge branch 'ebassi/gidocgen' into 'master'
...
Move API reference to gi-docgen
See merge request GNOME/gtk!3222
2021-03-11 17:11:57 +00:00
Emmanuele Bassi
c5ddf5b381
docs: Add URL maps for cross links
2021-03-11 16:46:02 +00:00
Emmanuele Bassi
61712bfb3b
docs: Enable search
2021-03-11 16:37:38 +00:00
Emmanuele Bassi
c3eb3f2943
docs: Update the "running GTK apps" section
...
Style the content a bit better, and use the appropriate links.
2021-03-11 16:37:38 +00:00
Matthias Clasen
d13e592dbf
Small updates to the coding and documentation style
...
Mention summary sentences, and a few other things.
2021-03-11 16:37:38 +00:00
Emmanuele Bassi
686f65f267
build: Add missing variable definition
2021-03-11 16:37:38 +00:00
Emmanuele Bassi
bb2ee71cd8
build: Add a GIR dependency to PangoCairo
...
This is not strictly needed from an introspection perspective, but:
- GTK strictly depends on PangoCairo internally
- we want to integrate the GDK docs with PangoCairo's
So even though we don't have an explicit dependency on PangoCairo types
in our ABI, we do assume that people will be able to use the PangoCairo
API with GTK.
2021-03-11 16:37:38 +00:00
Emmanuele Bassi
816383e9ef
Handle static inline GtkOrdering function
...
The introspection scanner does not handle `static inline` functions:
they are not in the shared library, so cannot be dlsym() out of it; and
the `static` keyword tells g-ir-scanner to skip the function declaration
entirely.
We can trick the scanner into thinking the gtk_ordering_from_cmpfunc()
symbol is a real, public one, by declaring and defining a regular
function under the `__GI_SCANNER__` guard; the symbol does not appear
when actually building GTK, or any code using GTK, so we don't risk
collisions.
2021-03-11 16:37:38 +00:00
Emmanuele Bassi
90cf6bb686
docs: Show class hierarchy in the API references
2021-03-11 16:37:38 +00:00
Matthias Clasen
e930433800
label: Fix some external links
...
I had put in a bunch of [class@Pango.Attribute ],
but it needs to be [struct@Pango.Attribute ].
Know your dependencies` type hierarchy!
2021-03-11 16:37:38 +00:00
Matthias Clasen
a6b2994f8b
text: Fix some copy-paste mishap
...
A bunch of occurrances of "the self" looked like
absurdist short fiction:
"...the self scrolled off the screen to the left"
2021-03-11 16:37:38 +00:00
Matthias Clasen
8d7103116a
widget: Fix up some links
...
Fix up some links to vfuncs and to sections, as well as class methods.
2021-03-11 16:37:38 +00:00
Matthias Clasen
9d95c5a26d
shortcuttrigger: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
9fbe61e01f
shortcutlabel: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
7c442c1736
shortcutcontroller: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
48a3b4e7cd
shortcutaction: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
90ecf58a9c
shortcut: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
0a966e59e6
sizegroup: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
acb78afc2d
testutils: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
d0ed62e747
snapshot: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
44e977ef35
tooltip: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
f93f975e42
settings: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
9fa8b446cc
recentmanager: Convert docs
2021-03-11 16:37:38 +00:00
Matthias Clasen
e065b28d1a
mountoperation: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
6108759d63
menutrackeritem: Remove SECTION
...
This is private
2021-03-11 16:37:37 +00:00
Matthias Clasen
4e315b81cc
menutracker: Remove SECTION
...
This is private.
2021-03-11 16:37:37 +00:00
Matthias Clasen
802c976d07
treesortable: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
a5018ed029
treeselection: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
1a09c361f5
treemodelsort: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
58f64c85ca
treemodelfilter: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
9a6886e5e2
treemodel: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
deef6425b3
treednd: Add summaries
2021-03-11 16:37:37 +00:00
Matthias Clasen
9e3df3fac1
treestore: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
03e21fc957
liststore: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
3ed729e1d7
treeviewcolumn: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
1cde6a2e08
treeview: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
f937fe4a87
windowgroup: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
190292a7da
listbox: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
86d2a44850
iconview: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
ef429c587b
constraintsolver: Remove SECTION
...
This is private
2021-03-11 16:37:37 +00:00
Matthias Clasen
f9cb67b32c
cellview: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
f6932b885d
cellrenderertoggle: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
b1ba7f4380
cellrenderertext: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
2eae3e8e78
cellrendererspinner: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
077fe55d81
cellrendererspin: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
e92e14c845
cellrendererprogress: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
8b7f39ead8
cellrendererpixbuf: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
48a94ccbfc
celleditable: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
a9b163cd7f
cellrenderercombo: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
3236b1d1c9
cellrendereraccel: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
d85fa8854e
cellrenderer: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
522ae8d02f
celllayout: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
7173223df5
cellareacontext: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
186d2c2964
cellareabox: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
ccb40688ec
cellarea: Add a summary
2021-03-11 16:37:37 +00:00
Matthias Clasen
8d888203f0
actionobserver: Drop SECTION
...
This is private.
2021-03-11 16:37:37 +00:00
Matthias Clasen
a63223b25b
actionobservable: Drop SECTION
...
This is private.
2021-03-11 16:37:37 +00:00
Matthias Clasen
3cccb00f51
actionmuxer: Drop SECTION
...
This is private.
2021-03-11 16:37:37 +00:00
Matthias Clasen
cc0df3c315
accessiblevalue: Drop SECTION
...
This is private.
2021-03-11 16:37:37 +00:00
Matthias Clasen
7b08e9b5d3
cssdataurl: Drop SECTION
...
This is private
2021-03-11 16:37:37 +00:00
Matthias Clasen
b019cabd0c
bloomfilter: Drop the SECTION
...
This is private, no need.
2021-03-11 16:37:37 +00:00
Matthias Clasen
260a4db854
accelgroup: Convert docs
...
Drop an unused SECTION, and convert links.
2021-03-11 16:37:37 +00:00
Matthias Clasen
8497f285c4
scrollbar: Tweak docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
6925843221
placesview: Remove SECTION
...
Its private, no need.
2021-03-11 16:37:37 +00:00
Matthias Clasen
a6a7799dc5
placessidebar: Remove SECTION
...
Its private, no need.
2021-03-11 16:37:37 +00:00
Matthias Clasen
3205cc79a7
modelbutton: Remove SECTION
...
Its private, no need.
2021-03-11 16:37:37 +00:00
Matthias Clasen
71fce93088
filechooserwidget: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
537d6e5e65
treelistmodel: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
d0b1e2f7de
treeexpander: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
eb675e3e7e
shortcuttrigger: Tweak docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
3f201aeb21
selectionmodel: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
da6b6d44c1
multiselection: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
b873b83691
listlistmodel: Remove SECTION
...
Private, no point.
2021-03-11 16:37:37 +00:00
Matthias Clasen
19f649ec1d
noselection: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
a786af0c19
selectionfiltermodel: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
42e9cf88cf
immulticontext: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
33d7aff67e
imcontextsimple: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
4e4050813a
gestureswipe: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
2d55e3343a
papersize: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
8d8fd63b93
gesturestylus: Convert docs
2021-03-11 16:37:37 +00:00
Matthias Clasen
e2cab4d406
imcontext: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
3eeaef0834
widgetpaintable: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
4921497904
singleselection: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
71ce79bfb8
slicelistmodel: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
c76bd17ddd
gesturesingle: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
ecd8d7596b
maplistmodel: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
97fd0fe889
scrollable: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
96fe1218f2
overlaylayout: Add docs for GtkOverlayLayoutChild
2021-03-11 16:37:36 +00:00
Matthias Clasen
14c45be89c
gesturerotate: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
d5d0cf61b9
padcontroller: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
7606329617
gesturezoom: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
7a1da45fff
mediafile: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
4905f5e722
mediastream: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
ca3363466f
gesturepan: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
207c4cd9e1
propertylookuplistmodel: Remove SECTION
...
This is private, no need.
2021-03-11 16:37:36 +00:00
Matthias Clasen
6221d1b407
version: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
f6ff03bf09
viewport: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
ae315c1106
stringlist: Add docs to GtkStringObject
2021-03-11 16:37:36 +00:00
Matthias Clasen
8164cbbc5f
listbase: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
2d76ce829c
gesturelongpress: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
e604c3b77c
gesturedrag: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
d4f2121bc2
infobar: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
f328e5ecc1
gestureclick: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
19df22f784
icontheme: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
3556b605c9
gesture: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
c26ac6b695
flowbox: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
9f08c50791
flattenlistmodel: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
95b2107728
filefilter: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
2915c72a26
eventcontrollerscroll: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
207a45b7e0
eventcontrollermotion: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
32b3386d23
eventcontrollerlegacy: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
094d5d5260
eventcontrollerkey: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
8b26894759
eventcontrollerfocus: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
f4ad0f32f8
expander: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
ca74f46b3e
spinner: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
d7e0af62e3
eventcontroller: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
21f2a824ad
entrycompletion: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
6bd46779fc
editable: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
b3f6e95d62
droptargetasync: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
39dac1ff22
droptarget: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
30236be2fd
dragsource: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
a9d4b6a61c
dragicon: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
c1e10473fb
builder: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
e8bba52190
border: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
1a504feab9
accessible: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
406e4a6928
csssection: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
f89e1bce90
csslocation: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
d1b472c1c8
windowcontrols: Tweak docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
cabe2f5f20
treelistrowsorter: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
970ae74cd5
texttag: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
50139ad184
textview: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
d74666de58
texttagtable: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
e0df1b3fd9
textmark: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
bf978ba5a6
textiter: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
05b13dca55
textchild: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
720f6e7a17
textbuffer: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
71649fce29
text: Convert docs
2021-03-11 16:37:36 +00:00
Matthias Clasen
42aa2edf19
styleprovider: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
b66c74767f
stylecontext: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
39394da850
stringsorter: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
da9a320a40
sortlistmodel: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
5bdcd66117
sorter: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
930912fd0d
revealer: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
5ebd0edf72
numericsorter: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
dda6458142
multisorter: Tweak docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
5568025f1d
listview: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
5189d3b485
listitem: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
901f60bc54
gridview: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
9f90100019
fixedlayout: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
8db6d6750c
fixed: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
36f6a76272
filterlistmodel: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
8696b78e59
expression: Tweak docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
493d773c18
enums: Tweak docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
9247460c2f
entrybuffer: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
ebadece27b
dropcontrollermotion: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
f4b498031a
dragsource: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
eb77ff9696
dragicon: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
c11ec03642
directorylist: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
7744be938f
customsorter: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
646a6726a8
customlayout: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
460955d578
cssprovider: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
2e1114c9fa
customfilter: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
a814c3b3c4
constraintlayout: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
5e41ea1d2f
constraintguide: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
350a775963
Constraint: Tweak docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
c0da6b935d
columnviewcolumn: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
a9162d2218
columnview: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
102884faf1
docs: Remove anchors from list overview
...
Our markdown doesn't support this.
2021-03-11 16:37:35 +00:00
Matthias Clasen
497a399372
windowcontrols: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
292643890b
window: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
c46480fe7e
textview: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
29f2e5f84e
switch: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
9ab40d2899
stringlist: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
cc03ca9df1
spinbutton: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
bcb0b36238
searchentry: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
7e7c81c5d2
searchbar: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
d7ce5c55c8
scrollbar: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
59c0bee4b8
scalebutton: Convert docs
2021-03-11 16:37:35 +00:00
Matthias Clasen
33f611a596
scale: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
495c3d9c44
progressbar: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
b4ad1fa44f
popovermenubar: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
b093900e48
popover: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
27b338a90b
passwordentry: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
ca51d6dfd9
paned: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
47c1b50eba
cursor: Use a table for cursor names
...
This gets all the names into view at the same time.
2021-03-11 16:37:35 +00:00
Matthias Clasen
5d68a23b55
menubutton: Put images in a table
2021-03-11 16:37:35 +00:00
Matthias Clasen
9f6e4e60d0
label: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
7a60c66940
headerbar: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
31245353d5
frame: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
c91e141a6c
fontbutton: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
87c0363cd5
expander: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
71bad39f5a
entry: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
40574f9ca3
emojichooser: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
752477b1ae
editablelabel: Use markdown for css tree
2021-03-11 16:37:35 +00:00
Matthias Clasen
ad9849bf26
dropdown: Small doc tweak
2021-03-11 16:37:35 +00:00
Matthias Clasen
9bfe163cf1
comboboxtext: Use markdown for css tree
2021-03-11 16:37:34 +00:00
Matthias Clasen
22f072faea
combobox: Use markdown for css tree
2021-03-11 16:37:34 +00:00
Matthias Clasen
57c7d77cdf
colorbutton: Use markdown for css tree
2021-03-11 16:37:34 +00:00
Matthias Clasen
7ac7bb9543
checkbutton: Use markdown for css tree
2021-03-11 16:37:34 +00:00
Matthias Clasen
c82b5b8d8a
centerbox: Small docs tweak
2021-03-11 16:37:34 +00:00
Matthias Clasen
15aa7de547
calendar: Use markdown for css tree
2021-03-11 16:37:34 +00:00
Matthias Clasen
ee62d19115
button: Small docs tweak
2021-03-11 16:37:34 +00:00
Matthias Clasen
cdcabb7fb7
atcontext: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
494bdad887
contentprovider: Convert some more markup
2021-03-11 16:37:34 +00:00
Matthias Clasen
ef09696ee5
stringfilter: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
8da60587e1
stackswitcher: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
3a7e9a28d3
stacksidebar: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
3535b582a1
stack: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
07573ef2a6
overlaylayout: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
92838f9972
printdialog: Add an example image
2021-03-11 16:37:34 +00:00
Matthias Clasen
ca5f66b368
multifilter: Docs tweaks.
2021-03-11 16:37:34 +00:00
Matthias Clasen
af6af482c4
pagesetupdialog: Add an example image
2021-03-11 16:37:34 +00:00
Matthias Clasen
c65239155f
notebook: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
12f0d963d9
levelbar: Docs tweaks
2021-03-11 16:37:34 +00:00
Matthias Clasen
6ab8ca4669
headerbar: Add example image
2021-03-11 16:37:34 +00:00
Matthias Clasen
d65a98f828
gridlayout: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
79417d8d40
centerlayout: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
8bdb2ea667
overlay: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
8e887fbbf4
listitemfactory: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
dc42dcf962
signallistitemfactory: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
68cd66b210
builderlistitemfactory: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
39a9bea066
builderscope: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
0776f645fd
builder: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
b408dc0706
boxlayout: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
626ee40970
boolfilter: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
f86c8f2077
bookmarklist: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
1a501e3d53
binlayout: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
c611fcc709
assistant: Small doc tweak
2021-03-11 16:37:34 +00:00
Matthias Clasen
de1101df19
aspectframe: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
aca07954af
applicationwindow: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
06a51c045c
application: Tweak docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
7f7231038d
adjustment: Small docs tweak
2021-03-11 16:37:34 +00:00
Matthias Clasen
fd6faabe16
actionable: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
26ca77d01b
aboutdialog: Small docs tweak
2021-03-11 16:37:34 +00:00
Matthias Clasen
b983133675
Include low-level printing in the gir
...
We add the sources, but not the headers. Oops.
2021-03-11 16:37:34 +00:00
Matthias Clasen
02fc352bfb
windowhandle: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
180de1041b
shortcutmanager: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
ded9903a83
root: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
921e8e02f4
printoperationpreview: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
9d536b9aef
printunixdialog: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
d11b263ac2
printsettings: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
a710e64bad
printeroperation: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
b257a58417
printjob: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
eca14b763c
printer: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
5225a0f253
printcontext: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
60b3effce3
pagesetupdialog: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
b3e7e31bb0
pagesetup: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
3ab954882d
layoutmanager: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
7dd436ab17
filter: Add sections for AnyFilter and EveryFilter
2021-03-11 16:37:34 +00:00
Matthias Clasen
085b0b7c08
adjustment: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
76fa6dcef6
shortcutmanager: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
dde3de34c9
popovermenubar: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
e88f0d4b77
popovermenu: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
172ab2f20a
native: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
0ca97cd218
emojichooser: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
645c951fb6
mediacontrols: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
4bed24a816
windowcontrols: Convert docs
2021-03-11 16:37:34 +00:00
Matthias Clasen
9104420c87
shortcutswindow: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
0d238f4c99
range: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
9b9c9ae8d4
popover: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
1f06cfd5d8
headerbar: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
ddcb76ac2d
appchooserwidget: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
e21156b30b
appchooserdialog: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
166edeed91
appchooser: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
465aca029e
Add some more widgets to the gallery
...
We already have images for menus, menubars and emoji chooser.
Use them.
2021-03-11 16:37:33 +00:00
Matthias Clasen
86604d8e01
nativedialog: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
bb393f6496
fontchooserwidget: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
7a099604c9
fontchooserdialog: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
92009413f2
fontchooser: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
7763fc55bb
filechoosernative: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
042af94048
filechooserdialog: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
d91fb26409
filechooser: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
3124a784fe
searchbar: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
936a2c2c59
colorchooserdialog: Fixup
2021-03-11 16:37:33 +00:00
Matthias Clasen
53d3b46d4a
actionbar: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
fc55478890
paned: Convert docs
...
Convert links, add example image, clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
d41c3e3c2d
colorchooser: Convert docs
...
Convert link syntax.
2021-03-11 16:37:33 +00:00
Matthias Clasen
886ba1680d
colorchooserwidget: Convert docs
...
Convert links, and clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
11c5523142
colorchooserdialog: Convert docs
...
Convert link syntax, add example image, clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
c0be9c5b97
colorbutton: Small doc tweaks
2021-03-11 16:37:33 +00:00
Matthias Clasen
ad2dad6612
assistant: Convert docs
...
Convert link syntax, an example image, clean things up.
2021-03-11 16:37:33 +00:00
Matthias Clasen
5950bcd754
frame: Convert docs
...
Convert link syntax, add an example image, add property
annotations.
2021-03-11 16:37:33 +00:00
Matthias Clasen
067b43fb5b
aboutdialog: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
b39160243f
aboutdialog: Improve example image
...
Use our logo, and update the copyright years.
2021-03-11 16:37:33 +00:00
Matthias Clasen
b460ffd120
dialog: Convert docs
...
Convert links, add an example image, generally clean up docs.
2021-03-11 16:37:33 +00:00
Matthias Clasen
a61c677a0d
docs: Add dialogs to the gallery
2021-03-11 16:37:33 +00:00
Matthias Clasen
7afc1291a8
window: Convert docs
...
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
cc2d9f0cb5
scrollable: Convert docs
...
Convert link format, add property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
73b66428a7
viewport: Convert docs
...
Convert link format, add property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
3a62b28344
scrolledwindow: Convert docs
...
Convert link format, add property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
f3b16d0e9d
messagedialog: Convert docs
...
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
e999773566
grid: Convert docs
...
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
6aaa98f669
expander: Convert docs
...
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
f800178e7f
centerbox: Convert docs
...
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
07a2b60f45
box: Convert docs
...
Convert link format, add an example image, add
property annotations. General cleanup.
2021-03-11 16:37:33 +00:00
Matthias Clasen
f5fe5c1fa6
appchooserbutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
e353cf38ec
colorbutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
947ebee7d4
dropdown: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
d4eb11142a
fontbutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
e4054d62fe
switch: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
37855e2b53
spinbutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
08371b25dc
menubutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
26100ad5d1
lockbutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
69427e98d5
editablelabel: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
d3e8607f58
combobox: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
cf6f57b41c
passwordentry: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
d5a024c7f8
linkbutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
67fdc0491a
checkbutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
5d69584a53
togglebutton: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
ef5b781e0c
entry: Minor docs fixes
2021-03-11 16:37:33 +00:00
Matthias Clasen
72505acb9e
searchentry: Minor docs tweaks
2021-03-11 16:37:33 +00:00
Matthias Clasen
d7b55cfd0c
editable: Convert docs
2021-03-11 16:37:33 +00:00
Matthias Clasen
7803a09f31
entry: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Emmanuele Bassi
4f36509e5f
Mark padding fields as private
...
And mention that they should be removed in the next version of GTK.
Padding fields in interfaces are unnecessary, as they don't contribute
to the ABI.
2021-03-11 16:37:33 +00:00
Emmanuele Bassi
198c0be5e7
flowbow: Mark private fields as private
2021-03-11 16:37:33 +00:00
Matthias Clasen
c0bd352c88
scale: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
3a62913a97
entry: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:33 +00:00
Matthias Clasen
abb951daf1
button: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:32 +00:00
Matthias Clasen
4131cb4c7b
bitset: Convert docs
2021-03-11 16:37:32 +00:00
Matthias Clasen
7450427757
gsktransform: Convert docs
2021-03-11 16:37:32 +00:00
Matthias Clasen
b836707979
gskroundedrect: Convert docs
2021-03-11 16:37:32 +00:00
Matthias Clasen
70f805cdfe
rendernode: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:32 +00:00
Matthias Clasen
458bc5500c
gskrenderer: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:32 +00:00
Matthias Clasen
22b375534e
glshader: Add property annotations
...
Connect properties, getters, and setters with annotations
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
e60afc6011
docs: Remove stray backtick
2021-03-11 16:37:32 +00:00
Matthias Clasen
30073de932
widget: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
b674bba155
video: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
50df5e0ec2
textview: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
693f3d6b41
separator: Add property annotations
...
Connect properties, getters, and setters with annotations.t
2021-03-11 16:37:32 +00:00
Matthias Clasen
e78302c4e5
scrollbar: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
0559e9e763
scale: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
8eacbc3a20
picture: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
3fd3187d8f
orientable: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
723d979be2
infobar: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
0c56522de1
image: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
8db308be4d
glarea: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
30d32a1f9d
drawingarea: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
08509acc04
claendar: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
6ff78c99fa
accessible: Annotate properties
2021-03-11 16:37:32 +00:00
Matthias Clasen
34443546a8
visual index: Reorder some widgets
...
This improves the alignment a bit.
2021-03-11 16:37:32 +00:00
Matthias Clasen
d5e9e10d0a
toplevel: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
d262f740b2
texture: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
d886ab9229
surface: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
6be66205cc
seat: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
abb6fe326f
popup: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
d6c763f2ae
monitor: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
34533b544a
glcontext: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
d92647a92b
drop: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
553a959102
drawcontext: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
9a33a1852a
drag: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
ce83a0e5bb
displaymanager: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
d724ea294d
display: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
038006d582
devicetool: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
4a4301be38
device: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
50fe533246
cursor: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
11022fc485
contentprovider: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
c51585bab1
clipboard: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
701ebd55c7
applaunchcontext: Add property annotations
...
Connect properties and getters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
4c50c312c1
statusbar: Remove SECTION
2021-03-11 16:37:32 +00:00
Matthias Clasen
55f1ed171a
infobar: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
97c4e46e39
progressbar: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
3ed2e94f29
levelbar: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
e98ea46d87
spinner: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Matthias Clasen
a8a15d48ad
label: Add property annotations
...
Connect properties, getters, and setters with annotations.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
6bc69a12cc
docs: Update the documentation style guide
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
c6b23f8f89
constraint: Port to the new docs format
...
- Drop the "SECTION".
- Add attributes annotations for properties and getter methods.
- Remove excessive linking and redundant types
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
be93dd98f7
Hide GtkSettingsValue
...
This is a private type that has no public API, and no business being in
a public header.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
a8f36b8381
Hide GtkTextBTree's typedef
...
It's a private type, and has no business in a public header.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
1fb5824e1e
treemodel: Update the description format
...
Also add a description for GtkTreePath.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
35e438a62e
treeview: Update the description format
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
cf707cbfaa
expression: Update docs format
...
And add documentation stanzas for GtkExpression sub-types.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
1eb9d699b5
Box GtkExpressionWatch
...
Otherwise bindings won't know how to deal with memory management.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
da94b461e0
csssection: Update docs syntax
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
ec32ff04b8
application: Convert docs
...
Drop mentions of command line arguments parsed by gtk_init(), and of the
GDK lock.
2021-03-11 16:37:32 +00:00
Emmanuele Bassi
8d12dce174
docs: Fix property annotation
2021-03-11 16:37:32 +00:00
Matthias Clasen
63dc97fb29
spinbutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
6c315b1b8a
searchentry: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
231a19abb9
passwordentry: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
99a3dbef00
editablelabel: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
9934f9c43b
constrainttarget: Convert docs
2021-03-11 16:37:31 +00:00
Matthias Clasen
c4e43c1cd5
buildable: Convert docs
...
Change link syntax.
2021-03-11 16:37:31 +00:00
Matthias Clasen
3549914d0f
accessible: Convert docs
...
Change link syntax.
2021-03-11 16:37:31 +00:00
Matthias Clasen
e034046724
widget: Convert docs
...
Some work toward converting the docs to markdown.
More work needed, in particular around vfuncs and
class functions.
2021-03-11 16:37:31 +00:00
Matthias Clasen
c975216f47
entry: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
18e5192a58
switch: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
dc8ee5a992
volumebutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
e75c3d0380
fontbutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
47cb0771f5
colorbutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
6884a1a5c6
dropdown: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
d028f7ed9a
appchooserbutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
fc6f16cb61
lockbutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
1692b41b30
comboboxtext: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
8e6b6ae26e
combobox: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
9a16b1b971
docs: Remove duplicate documentation stanzas
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
895aa1d3ab
docs: Fix typos
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
da6861188b
docs: Fix value annotation
...
Drop the `:`.
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
1dd240974b
docs: Fix copy-paste error in GdkDevice
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
b6b30c9bcf
docs: Fix the MenuButton direction property links
2021-03-11 16:37:31 +00:00
Matthias Clasen
47b9a554ac
menubutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
3d8c810ab7
checkbutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
dfb68fb13d
docs: Split images for check and radio buttons
...
Its the same widget, but two images fit better in the gallery,
and will be easier to use as example images in the docs.
2021-03-11 16:37:31 +00:00
Matthias Clasen
f854136676
linkbutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
18f525f7b4
docs: Improve the togglebutton image
...
Make it actually show toggles.
2021-03-11 16:37:31 +00:00
Matthias Clasen
4ee4c88e43
wayland: Fix a link
...
gi-docgen currently can't handle links without namespace
in the Wayland docs.
2021-03-11 16:37:31 +00:00
Matthias Clasen
ec78bf3309
togglebutton: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Matthias Clasen
4bf7bfb41a
button: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
538f935d44
docs: Fix the annotation for GtkTextView:justification
2021-03-11 16:37:31 +00:00
Emmanuele Bassi
952fc31dbc
docs: Fix up the 3-to-4 migration guide
2021-03-11 16:37:31 +00:00
Matthias Clasen
93326164e2
docs: Add backend links to the gdk docs
...
These are placeholders for when we know how to
link across namespaces.
2021-03-11 16:37:31 +00:00
Matthias Clasen
b78895e449
docs: Add separate toml files for gdk backends
...
Reusing the same one duplicates the standalone
docs, which doesn't quite seem right.
2021-03-11 16:37:31 +00:00
Matthias Clasen
205a13eaa0
docs: Brush up the Wayland backend docs
...
Add some content here.
2021-03-11 16:37:31 +00:00
Matthias Clasen
a9dd352986
gdk: Some more tweaks of the docs
2021-03-11 16:37:31 +00:00
Matthias Clasen
e82d090bf5
docs: Add some links to the pango chapter
2021-03-11 16:37:31 +00:00
Matthias Clasen
9132f1831c
docs: Rework the gdk docs
...
Convert links, make things more concise.
2021-03-11 16:37:31 +00:00
Matthias Clasen
3d04c0f4be
docs: Move GdkEvent docs inline
...
This is not really worth a chapter of its own.
2021-03-11 16:37:31 +00:00
Matthias Clasen
ca3120919f
docs: Improve gsk docs
...
Convert link formats, add summaries, and make
a few missing things show up in the docs.
2021-03-11 16:37:31 +00:00
Matthias Clasen
e5bed812f5
docs: Tweak X11 section
...
Remove unsupported heading anchors.
2021-03-11 16:37:31 +00:00
Matthias Clasen
d88a4629f9
docs: Tweaks Windows section
...
Remove unsupported heading anchors.
2021-03-11 16:37:31 +00:00
Matthias Clasen
24c04b5bb9
docs: Tweak Wayland section
...
Remove unsupported heading anchors.
2021-03-11 16:37:31 +00:00
Matthias Clasen
4c3ea25745
docs: Tweak a11y section
...
Convert link syntax.
2021-03-11 16:37:31 +00:00
Matthias Clasen
231814a595
docs: Tweak running chapter
...
Remove unsupported heading anchors, fix definition
list use.
2021-03-11 16:37:31 +00:00
Matthias Clasen
820f37be0b
docs: Tweak input overview
...
Remove unsupported heading anchors.
2021-03-11 16:37:31 +00:00
Matthias Clasen
02ec00dc5a
docs: Tweak drawing model overview
...
Fix link syntax, remove gtk-doc markup.
2021-03-11 16:37:30 +00:00
Matthias Clasen
4d2e4309f0
docs: Tweak css properties section
...
Fix the use of definition lists.
2021-03-11 16:37:30 +00:00
Matthias Clasen
d2ba09ec98
docs: Tweak the actions overview
...
Fix use of definition lists, and remove some gtk-doc
markup.
2021-03-11 16:37:30 +00:00
Matthias Clasen
41ddce152a
building: Minor tweaks
...
Remove unsupported anchors from headings.
2021-03-11 16:37:30 +00:00
Matthias Clasen
df9c469acd
video: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
8cf04b3345
glarea: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
1072b56970
drawingarea: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
f94fc28eb5
textview: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
3b42440805
picture: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
dcf53bced2
scale: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
76e9a7bbb4
image: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
12ccc68c99
separator: Convert docs
...
Change link syntax and add an example image.
2021-03-11 16:37:30 +00:00
Matthias Clasen
834295dde0
calendar: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
b7f4f5d234
scrollbar: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
61d85f32a2
infobar: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
6d489a9e81
docs: Generate the DevHelp file for our namespaces
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
85774d2bcd
docs: Update the "Getting Started" page
...
Drop the Pandoc stuff, add the gi-docgen links, and remove a stray
docbook element.
2021-03-11 16:37:30 +00:00
Matthias Clasen
03c5b680ec
statusbar: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
8de0a2c7c6
infobar: Convert docs
...
Change link syntax, add an example image, generally clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
d58655b4ae
progressbar: Convert docs
...
Change link syntax, add an example image, generally clean
things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
f2b482ef65
levelbar: Convert docs
...
Change link syntax, add an example image, generally
clean things up.
2021-03-11 16:37:30 +00:00
Matthias Clasen
a2e8bd24ca
spinner: Convert docs
...
Change link syntax and add an example image.
2021-03-11 16:37:30 +00:00
Matthias Clasen
584e978840
aboutdialog: tweak the docs
...
Add a short summary.
2021-03-11 16:37:30 +00:00
Matthias Clasen
f00f900224
label: Convert docs
...
Change link syntax, add singl-line summaries,
add missing property docs.
2021-03-11 16:37:30 +00:00
Matthias Clasen
b9a02b0c24
docs: Bring the widget gallery back
...
We have all the images, lets put them to use.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
af8d8113eb
docs: Remove the last few remaining '+' from GTK
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
e8b6e6cad0
docs: Clean up the first paragraph for various symbols
...
The documentation engine will use the first paragraph as the summary for
a type or constant.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
701f1b837b
docs: Show summary in the namespace index
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
6781de96a5
docs: Start porting GtkImage to the new style
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
4fef62c38d
docs: Port GtkAboutDialog to the new syntax
...
We should also clean up the annotations, while we're at it.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
3ef95b4065
build: Quiet down gi-docgen
...
We are only interested in the warnings and errors.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
d621a37a60
docs: Fix up the style of the X11 content file
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
6f93e63d21
docs: Move detached sections into their own content file
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
04fb95ce9f
docs: Split GdkDrag and GdkDrop sections
...
This way we have a section for each class.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
548280da9f
docs: Rename GdkTexture section
...
The name needs to match the class.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
b9f0cf1c8b
docs: Move gdkcairo section to an external file
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
abb33bd65f
docs: Move the gtkmain section to its own document
...
The introspection data does not handle unattached sections like gtk-doc
does, so we need to move what was gtkmain into its own Markdown
document.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
542b959933
docs: Use new link syntax
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
b2a99642a9
docs: Begin porting GtkWidget to the new format
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
6f7e933713
doc: Port GtkConstraint to the new format
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
3c0f047597
docs: De-indent GtkRecentInfo.get_applications() return value
...
Otherwise the four spaces will be treated as a pre-formatted block by
Markdown.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
a6da2db4ea
docs: Start porting GtkConstraintLayout to the new doc format
...
Drop the old gtk-doc'isms, and use the gi-docgen links instead.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
f85b847410
docs: Add metadata preamble to GTK's content files
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
a6ee0dd8aa
docs: Drop gtk-doc files
...
We don't use gtk-doc to generate our API reference, so we don't need its
files lying around any more.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
0ba2a3a191
Generate GTK API reference(s) with gi-docgen
...
Stop using gtk-doc, and switch to gi-docgen.
The gi-docgen tool generates API references through the introspection
data, which has various benefits:
- it does not parse C code
- it does not generate and run C code to introspect types at build time
- it does not present a different API from the one we're exporting
Additionally, gi-docgen:
- does not generate DocBook XML in order to generate HTML
- does not go through xsltproc
- parses proper Markdown
Which makes it markedly faster than gtk-doc has ever been.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
761c327ac5
Add gi-docgen as a subproject
...
While we're developing gi-docgen it's better to have it as part of our
build.
2021-03-11 16:37:30 +00:00
Emmanuele Bassi
3760051169
ci: Update the fedora-docs Docker image
...
Use the latest base image.
2021-03-11 16:37:29 +00:00
Emmanuele Bassi
787830d360
ci: Update the CI image for docs building
...
We don't use Pandoc any more, but we need a bunch of Python modules for
gi-docgen.
2021-03-11 16:37:29 +00:00
Emmanuele Bassi
4018417ceb
ci: Update the reference job
2021-03-11 16:37:29 +00:00
Emmanuele Bassi
386256a424
Rename base version argument in run-docker.sh
...
The `--base-version` argument trips up everyone. Might as well rename it
to `--version`.
2021-03-11 16:37:29 +00:00
Matthias Clasen
f3701ff961
Merge branch 'fix-menubutton-tooltips' into 'master'
...
Limit tooltip queries to the same native
Closes #3719
See merge request GNOME/gtk!3283
2021-03-11 14:25:53 +00:00
Matthias Clasen
27295bc555
Limit tooltip queries to the same native
...
Without this, the menubuttons tooltip pops up
when hovering the popover, which is suprising
and unintended.
Fixes : #3719
2021-03-11 08:56:56 -05:00
Matthias Clasen
e62f9e33a1
Merge branch 'gdk-win32-use-window-from-point-for-master' into 'master'
...
GdkWin32: Fix mouse events in presence of transparent windows on the desktop
Closes #370 , #417 , and gimp#1082
See merge request GNOME/gtk!2800
2021-03-11 01:09:39 +00:00
Matthias Clasen
fe45f283af
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Fix surface transform regression
See merge request GNOME/gtk!3280
2021-03-09 23:59:05 +00:00
Matthias Clasen
5556907194
inspector: Fix surface transform regression
...
Ever since we added surface-to-widget transforms,
the autofading of the fps overlay did not work anymore,
since it was given the transient transform node, most
of the time.
Fix this by passing both the root of the node tree and
the node for the toplevel widget to prepare_render, and
hande the widget node to the overlays. Update the
affected overlays that need to have their positioning
adjusted.
2021-03-09 18:27:04 -05:00
Мирослав Николић
9d51821e84
Update Serbian translation
...
(cherry picked from commit f33a2febc7 )
2021-03-09 21:23:22 +00:00
Benjamin Otte
c696385130
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!3279
2021-03-09 19:11:09 +00:00
Benjamin Otte
0a9d075b47
wayland: Fix memleaks when rendering with Cairo
...
We were leaking buffers. This wasn't caught by valgrind and friends
because it was shared memory (with the compositor), but top(1) would
instantly see memory consumption of the app and the shell go through the
roof.
2021-03-09 19:52:59 +01:00
Benjamin Otte
b63c4d6722
wayland: Don't call _gdk_surface_update_size() all the time
...
We were calling _gdk_surface_update_size() every frame, even if the
window size didn't change. This would cause us to discard all cached
buffers and redraw the whole screen.
This was BAD.
2021-03-09 19:50:56 +01:00
Matthias Clasen
221825394f
Merge branch 'ngl-rect-borders' into 'master'
...
Speed up border rendering
See merge request GNOME/gtk!3278
2021-03-09 17:56:57 +00:00
Matthias Clasen
124f60593b
nodeparser: Print debug message before child
...
This puts the message up top, where it can be seen,
and not at the other end of an endless tree of children.
Update tests to match.
2021-03-09 12:15:25 -05:00
Matthias Clasen
09af40faeb
ngl: Render simple borders simply
...
Use 4 color commands for uniform, rectilinear
borders. Most of our borders are rounded with
Adwaita, but there are still some of these.
2021-03-09 12:15:25 -05:00
Matthias Clasen
bf59ddd01d
gsk: Add gsk_border_node_get_uniform_color
...
Maintain this bit of information separately,
it will be useful in the next commit.
2021-03-09 12:15:25 -05:00
Benjamin Otte
fea67dea6a
vulkan: Improve rounded rect clipping
...
Handle the case where the inner rounded rect is fully contained
within the outer rounded rect.
2021-03-09 17:43:28 +01:00
Benjamin Otte
9f18c138d1
vulkan: Fix invalid read
...
Look at the right rect to compute circularness
2021-03-09 17:43:28 +01:00
Matthias Clasen
bfa68223e1
Merge branch 'meson-override-dep' into 'master'
...
meson: override gtk4 dependency
See merge request GNOME/gtk!3277
2021-03-09 03:00:18 +00:00
Xavier Claessens
629e70f89d
Meson: Use gnome.post_install()
...
See https://github.com/mesonbuild/meson/pull/8272 and
https://github.com/mesonbuild/meson/issues/8268 .
2021-03-08 21:19:09 -05:00
Xavier Claessens
405dc7f557
meson: override gtk4 dependency
...
This allows applications that depends on gtk4 to build it as subproject
without hardcoding 'gtk_dep' variable name in their build definition.
2021-03-08 21:06:33 -05:00
Matthias Clasen
cba8c40aa0
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3276
2021-03-09 00:12:11 +00:00
Matthias Clasen
98b13933d9
Merge branch 'bilelmoussaoui/size-request-annotations' into 'master'
...
g-i: update distribute_natural_allocation annotation
See merge request GNOME/gtk!3271
2021-03-08 23:07:18 +00:00
Matthias Clasen
062383bfd3
node-format: Small docs fixes
2021-03-08 17:49:21 -05:00
Matthias Clasen
91e94556ad
spinbutton: Interpret localized digits
...
Interpret input where the characters have numeric values.
See #3387
2021-03-08 17:49:21 -05:00
Matthias Clasen
07ca46e92c
Merge branch 'ngl-clip-classification' into 'master'
...
Ngl clip classification
See merge request GNOME/gtk!3274
2021-03-08 20:20:50 +00:00
Matthias Clasen
57e354c297
glsl: Make rounded rect clipping cheaper
...
Add early acceptance checks for non-corner cases.
2021-03-08 14:41:48 -05:00
Matthias Clasen
fb0814602e
Merge branch 'matthiasc/for-master' into 'master'
...
Revert "ngl: Remove a few redundant checks"
See merge request GNOME/gtk!3273
2021-03-08 13:38:12 +00:00
Matthias Clasen
5f664dbbbb
Revert "ngl: Remove a few redundant checks"
...
This reverts commit 4375f8e382 .
These were not redundant after all, as pointed out by Timm.
2021-03-08 08:10:35 -05:00
Matthias Clasen
5d30569575
Add some more rounded rect tests
2021-03-07 21:28:19 -05:00
Matthias Clasen
46d1fc1c24
gsk: Use clip defines in shaders
...
Use the NO_CLIP and RECT_CLIP defines to make
simpler shaders for these cases.
Note: This does not work yet.
2021-03-07 20:30:45 -05:00
Matthias Clasen
2c05b758c7
ngl: Add infrastructure for clip-variants of shaders
...
Make ngl compile each shader three times.
Once with #define NO_CLIP 1
once with #define RECT_CLIP 1
and once as before.
2021-03-07 20:30:45 -05:00
Matthias Clasen
5788338a14
ngl: Classify clips
...
Maintain the 'fully contained' information in the clip
stack. This will let us pick simpler shaders in the future.
2021-03-07 20:30:45 -05:00
Matthias Clasen
d786e1d614
Merge branch 'ebassi/iface-macros' into 'master'
...
Remove invalid class macros
See merge request GNOME/gtk!3270
2021-03-07 20:22:14 +00:00
Matthias Clasen
c60a316e22
Move gtk_rounded_rect_scale_affine to the right place
...
This function should live with the rest of the
GskRoundedRect code in gskroundedrect.c.
2021-03-07 15:17:32 -05:00
Matthias Clasen
b73c9e992f
imcontext: Fix a docs mishap
2021-03-07 15:16:59 -05:00
Bilal Elmoussaoui
4980f620f9
g-i: update distribute_natural_allocation annotation
2021-03-07 20:59:01 +01:00
Matthias Clasen
87b800c11d
Merge branch 'bilelmoussaoui/gi-annotations' into 'master'
...
g-i: add missing since annotations for 4.2
See merge request GNOME/gtk!3268
2021-03-07 19:46:59 +00:00
Bilal Elmoussaoui
6e903e13a5
g-i: add missing since annotations for 4.2
2021-03-07 19:50:32 +01:00
Matthias Clasen
83c466dcd1
Merge branch 'scalable-svg' into 'master'
...
icons: Rename two icons which had the wrong extension
See merge request GNOME/gtk!3269
2021-03-07 18:43:50 +00:00
Emmanuele Bassi
676ea489cc
docs: Remove invalid macros
2021-03-07 18:34:53 +00:00
Emmanuele Bassi
70fbfd8ede
treesortable: Remove class check macro
2021-03-07 18:26:31 +00:00
Emmanuele Bassi
6234ccc974
orientable: Remove class macros
2021-03-07 18:25:55 +00:00
Emmanuele Bassi
0cfe3d45f5
celleditable: Remove class cast check macro
2021-03-07 18:25:07 +00:00
Emmanuele Bassi
41371ccae6
buildable: Remove "class" macro
2021-03-07 18:23:23 +00:00
Emmanuel Gil Peyrot
5807fee893
icons: Rename two icons which had the wrong extension
...
Fixes two warnings when opening the inspector on my PinePhone, these two
files were attempted to be loaded as PNG (as per the extension) instead
of SVG.
Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr >
2021-03-07 18:59:04 +01:00
Christian Hergert
b2c1d6bc9b
Merge branch 'ngl-misc-fixes' into 'master'
...
Ngl misc fixes
See merge request GNOME/gtk!3267
2021-03-07 15:59:59 +00:00
Rūdolfs Mazurs
5fd22e5981
Update Latvian translation
...
(cherry picked from commit 1d62020a19 )
2021-03-07 15:26:30 +00:00
Matthias Clasen
d0dce4cfa1
ngl: Treat radial gradients like others
...
Handle colorstop overflow for radial gradients
the same way we do for linear and conic gradients.
2021-03-07 10:18:47 -05:00
Matthias Clasen
4375f8e382
ngl: Remove a few redundant checks
...
We bail early on invisible nodes. No need to
repeat that check in individual visit functions.
2021-03-07 10:18:47 -05:00
Matthias Clasen
42b515a1e5
Merge branch 'matthiasc/for-master' into 'master'
...
Revert "flatpak: No need to build sassc anymore"
See merge request GNOME/gtk!3266
2021-03-07 14:59:57 +00:00
Matthias Clasen
6ab779cd06
roundedrect: Remove unclear language from the docs
...
The various intersection function for rounded rects are
precise. No need to add wordy disclaimers about the handling
of the corners.
2021-03-07 09:04:43 -05:00
Matthias Clasen
a261e9fca2
Revert "flatpak: No need to build sassc anymore"
...
This reverts commit 9a540841fd .
2021-03-06 16:03:41 -05:00
Matthias Clasen
50ccab487f
Merge branch 'matthiasc/for-master' into 'master'
...
vulkan: Add visible fallback rendering
See merge request GNOME/gtk!3264
2021-03-06 19:29:50 +00:00
Guillaume Bernard
ddd5e5717d
Update French translation
...
(cherry picked from commit 5b18df9b5e )
2021-03-06 18:49:41 +00:00
Мирослав Николић
390a278606
Update Serbian translation
...
(cherry picked from commit b9a451423f )
2021-03-06 18:43:51 +00:00
Changwoo Ryu
00423c54b5
Update Korean translation
...
(cherry picked from commit 60a714a25f )
2021-03-06 18:11:58 +00:00
Jordi Mas
f8f90d85ad
Update Catalan translation
2021-03-06 09:44:50 +01:00
Benjamin Otte
91932ada63
vulkan: Handle simple transforms in the clipping code
...
Requires pushing the GskTransform into the clipping code so that we
can actually look at its category.
2021-03-05 19:36:36 -05:00
Matthias Clasen
dbb264dfc9
vulkan: Add visible fallback rendering
...
Hook up the "Show fallback rendering" switch for Vulkan.
This brings home the sobering truth that the Vulkan renderer
is doing *all* fallback, since we switched from offset nodes
to transform nodes.
2021-03-05 18:42:04 -05:00
Matthias Clasen
3aa89efcf4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3263
2021-03-05 20:30:54 +00:00
Matthias Clasen
82f40a92c1
searchentry: Typo fix
2021-03-05 15:07:02 -05:00
Matthias Clasen
ae1a950a93
flatpak: Fix the gtk4-demo build
...
This was overlooked in 8e7e821033 .
2021-03-05 15:06:20 -05:00
Matthias Clasen
2228181b35
Merge branch 'wip/exalm/window-shadow-dark-4' into 'master'
...
Adwaita: Use transparent black for window border in dark too
See merge request GNOME/gtk!3261
2021-03-05 19:41:39 +00:00
Matthias Clasen
7357120c81
Merge branch 'wip/jimmac/fix-flatpak-build' into 'master'
...
Flatpak: Update build manifests
See merge request GNOME/gtk!3259
2021-03-05 19:11:36 +00:00
Alexander Mikhaylenko
0942e863f2
Adwaita: Use transparent black for window border in dark too
...
Avoid smear when the background behind the window is dark. Adjust opacity
to make it appear roughly the same as before on white background.
2021-03-05 22:59:25 +05:00
Matthias Clasen
08f3618a47
Merge branch 'wip/jimmac/sidebar-focus' into 'master'
...
Adwaita: Regular focus ring for sidebar rows
Closes #3708
See merge request GNOME/gtk!3258
2021-03-05 17:17:04 +00:00
Jakub Steiner
8e7e821033
Flatpak: Update build manifests
...
- point to the upstream repo for wayland
- disable disabling of sassc
- switch wayland from autotools to meson
2021-03-05 18:00:17 +01:00
Jakub Steiner
11d6f2ddd0
Adwaita: Regular focus ring for sidebar rows
...
- style sidebar rows as regular items like buttons wrt focus
- define transition as part of the focus-ring(),
only animate outline related properties rather than `all`
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3708
2021-03-05 17:45:58 +01:00
Kukuh Syafaat
490384c69f
Update Indonesian translation
...
(cherry picked from commit e54dc87a15 )
2021-03-05 11:53:01 +00:00
Matthias Clasen
468242b13b
Merge branch 'iconbrowser-fix' into 'master'
...
iconbrowser: fix search<>category interaction
Closes #3717
See merge request GNOME/gtk!3257
2021-03-05 01:11:11 +00:00
Matthias Clasen
d3d49ce7f1
iconbrowser: fix search<>category interaction
...
Make search act like a separate, filtered view of
all icons. This is how it worked in gtk3, and how
it should be.
Fixes : #3717
2021-03-04 19:30:02 -05:00
Matthias Clasen
c303ec1553
Merge branch 'preedit-selection-fix' into 'master'
...
Preedit selection fix
Closes #1123
See merge request GNOME/gtk!3255
2021-03-04 22:48:25 +00:00
Matthias Clasen
d28df0b87e
textview: Delete selection when preedit starts
...
This prevents confusing misrendering when the preedit text
pushes the selection text out of the rendered selection.
Fixes : #1123
2021-03-04 15:18:30 -05:00
Matthias Clasen
d1fbfb9c4e
textview: Send anchor with surrounding
...
We have the api to do it now.
2021-03-04 15:18:30 -05:00
Matthias Clasen
ccae0e1732
text: Optimize away 0-change insertions and deletions
...
We can short-circuit insert and delete calls that are
not causing any change.
2021-03-04 15:18:30 -05:00
Matthias Clasen
447203ce52
text: Delete selection when preedit starts
...
This prevents confusing misrendering when the preedit text
pushes the selection text out of the rendered selection.
Fixes : #1123
2021-03-04 15:18:30 -05:00
Matthias Clasen
feccdad9d2
text: Send anchor with surrounding
...
We have the api to do it now.
2021-03-04 15:18:30 -05:00
Matthias Clasen
35fceca157
imwayland: Pass anchor with surrounding
...
This was missing in the initial implementation since
GtkIMContext did not have it in its api, but it was
added now, so we can send the information.
2021-03-04 15:18:30 -05:00
Matthias Clasen
97db959305
immulticontext: Implement [gs]et_surrounding_with_selection
...
This is the recommended api, going forward.
2021-03-04 15:18:30 -05:00
Matthias Clasen
4b9aeaf9e3
imcontext: Add [gs]et_surrounding_with_selection
...
The Wayland text protocol expects to get both ends
of the selection with its surrounding call, so make
that available via GtkIMContext. We add this as new
api and vfuncs, and fall back, so that existing
implementations keep working.
2021-03-04 15:18:30 -05:00
Matthias Clasen
053d7cfe9f
Merge branch 'wip/chergert/remove-zero-suffix-array' into 'master'
...
ngl: remove unnecessary suffix array
See merge request GNOME/gtk!3254
2021-03-03 21:53:27 +00:00
Jordi Mas
2959f219e4
Update Catalan translation
2021-03-03 22:31:04 +01:00
Christian Hergert
b368d3abde
ngl: remove unnecessary suffix array
...
We didn't end up using this in the final version, so we can just delete
it and avoid MSVC issues.
2021-03-03 13:03:24 -08:00
Matthias Clasen
b533bba3f3
Merge branch 'bilelmoussaoui/annotations-fix' into 'master'
...
update annotation of gtk_single_selection_get_selected_item
See merge request GNOME/gtk!3253
2021-03-03 15:11:00 +00:00
Bilal Elmoussaoui
aae67b8fbd
gtk: update annotation of gtk_single_selection_get_selected_item
2021-03-03 14:19:45 +01:00
Matthias Clasen
d79354dbf5
Merge branch 'wip/exalm/headerbar-css' into 'master'
...
Header bar CSS tweaks
See merge request GNOME/gtk!3252
2021-03-03 13:11:22 +00:00
Alexander Mikhaylenko
aa693159dc
adwaita: Remove the nested headerbars hack
...
We clip the window now, it's not necessary anymore.
2021-03-03 17:35:15 +05:00
Alexander Mikhaylenko
5fef637e84
adwaita: Remove headerbar sheen on backdrop
...
It's gone from active windows since c9807f5afe ,
but was still there in backdrop.
2021-03-03 17:34:22 +05:00
Matthias Clasen
208a53fa39
Merge branch 'label-mnemonic-fix' into 'master'
...
label: Fix markup parsing interactions
See merge request GNOME/gtk!3250
2021-03-03 12:00:37 +00:00
Matthias Clasen
875a92b95f
label: Fix markup parsing interactions
...
We were not handling mnemonics vs markup right
in all cases. Rewrite the _-stripping code to
do it during the link parsing, instead of as
a separate function. This avoids the issue of
stripping _ from attribute names in markup.
Add tests.
Fixes: 3706
2021-03-02 23:25:01 -05:00
Matthias Clasen
c23848c03e
Merge branch 'fix-glyph-serialization' into 'master'
...
rendernode: Fix glyph serialization
Closes #3710
See merge request GNOME/gtk!3248
2021-03-02 20:31:09 +00:00
Matthias Clasen
96ac85038b
rendernode: Fix glyph serialization
...
We serializing to a string of ASCII, we need to
escape some chars, such as '\' and '"'.
Fixes : #3710
2021-03-02 11:32:29 -05:00
Baurzhan Muftakhidinov
69f051798e
Update Kazakh translation
...
(cherry picked from commit 62e9dff536 )
2021-03-02 03:35:10 +00:00
Matthias Clasen
1c6da51000
Merge branch 'wip/chergert/fix-ngl-gles' into 'master'
...
ngl: fix typo from NGL rename
See merge request GNOME/gtk!3246
2021-03-02 00:37:00 +00:00
Christian Hergert
d6694a4408
ngl: fix typo from NGL rename
2021-03-01 10:28:26 -08:00
Matthias Clasen
0ccca910df
Merge branch 'submodules' into 'master'
...
Allow GTK4 to be added as a subproject
See merge request GNOME/gtk!3242
2021-03-01 16:01:25 +00:00
Matthias Clasen
fd2909abb2
Merge branch 'broadway-guint32' into 'master'
...
broadway: Restore guint32 type for memory size
Closes #3702
See merge request GNOME/gtk!3244
2021-02-27 23:16:28 +00:00
Rafał Dzięgiel
d586410416
broadway: Restore guint32 type for memory size
...
guint32 is used as part of the protocol in broadway backend.
Memory size declared with it was mistakenly replaced with size_t type
which does not guarantee being 32bit on all platforms, leading to a crash.
2021-02-27 23:43:12 +01:00
Jiri Grönroos
4721e760e7
Update Finnish translation
...
(cherry picked from commit 3cb5a831e3 )
2021-02-26 12:10:10 +00:00
BogDan Vatra
72700d1644
Allow GTK4 to be added as a subproject
2021-02-26 09:27:02 +02:00
Emin Tufan Çetin
c274c35583
Update Turkish translation
2021-02-25 14:28:49 +00:00
Emin Tufan Çetin
d2c3f8f496
Update Turkish translation
2021-02-25 14:02:50 +00:00
Matthias Clasen
bffb666914
Merge branch 'matthiasc/for-master' into 'master'
...
imcontext: Fixes to the state machine
See merge request GNOME/gtk!3238
2021-02-25 12:25:02 +00:00
Matthias Clasen
ab615104f5
Merge branch 'wip/carlosg/touchpad-gesture-devices' into 'master'
...
gdk/wayland: Assign logical pointer to touchpad gesture events
See merge request GNOME/gtk!3240
2021-02-25 12:23:26 +00:00
Jiri Grönroos
9c2674ee1e
Update Finnish translation
...
(cherry picked from commit 0fd0b00ec9 )
2021-02-25 10:46:56 +00:00
Carlos Garnacho
68ced9b553
gdk/wayland: Assign logical pointer to touchpad gesture events
...
These events don't make sense on physical devices (for starters, they
are relative to the logical pointer position). Use this device for
those events, also happens to be what the upper parts expect of them.
2021-02-25 01:08:07 +01:00
Matthias Clasen
177f6b377d
Merge branch 'bilelmoussaoui/gdk-draw-context' into 'master'
...
gdk: drop the latest mention of DrawingContext
See merge request GNOME/gtk!3232
2021-02-24 22:28:47 +00:00
Matthias Clasen
55f871c193
imcontext: Fixes to the state machine
...
It turns out that we we were sometimes emitting
preedit-end multiple times, and sometimes not at
all. Same for preedit-start. To fix this up, introduce
a in_compose_sequence flag, maintain it, and use it
in the right places.
After these changes, both
C-S-u 1 2 3 Enter
Compose a e
generate the right signals:
preedit-start, preedit-changed,..., preedit-end, commit
2021-02-24 13:31:31 -05:00
Carlos Garnacho
ce2835265b
Merge branch 'wip/carlosg/mark-settings-valid-again' into 'master'
...
gdk/wayland: Make more matched settings from the portal as valid
See merge request GNOME/gtk!3236
2021-02-24 16:12:13 +00:00
Carlos Garnacho
75ae0e04e1
gdk/wayland: Make more matched settings from the portal as valid
...
Commit 97b5fad131 was a forward port from a gtk3 patch, but the hunk
was applied on the wrong bits of code.
Ensure the initialization paths also do mark settings read from the
portal as valid, so the checks for optional/newer settings actually have
the expected result. It is also desirable to mark settings as valid
after configuration changes (as that patch did effectively do), but not
enough to fix all situations.
2021-02-24 16:41:13 +01:00
Matthias Clasen
1f284fcd70
4.1.1
2021-02-23 20:59:16 -05:00
Matthias Clasen
718a95c1d2
Merge branch 'matthiasc/for-master' into 'master'
...
composetable: Remove some redundant code
See merge request GNOME/gtk!3234
2021-02-24 01:57:47 +00:00
Matthias Clasen
cd2854a5c6
Merge branch 'wip/chergert/glproto' into 'master'
...
gsk: add OpenGL based GskNglRenderer
See merge request GNOME/gtk!3225
2021-02-24 01:14:14 +00:00
Fran Dieguez
86151622db
Updated Galician translations
2021-02-24 01:51:12 +01:00
Matthias Clasen
915e3f0e28
composetable: Remove some redundant code
...
Pointed out by Peter Bloomfield.
2021-02-23 19:14:26 -05:00
Matthias Clasen
a4e7b03185
inspector: Fix a typo
...
When selecting the "ngl" renderer, the inspector was
saying Renderer: Unknown, due to a typo. Fix that.
2021-02-23 18:37:32 -05:00
Matthias Clasen
e9ed874231
gsk: Replace a last instance of "next"
...
The output of GSK_RENDERER=help was still talking about
the "next" renderer, while actually looking for "ngl".
2021-02-23 18:36:41 -05:00
Christian Hergert
2a38cecd33
gsk: add OpenGL based GskNglRenderer
...
The primary goal here was to cleanup the current GL renderer to make
maintenance easier going forward. Furthermore, it tracks state to allow
us to implement more advanced renderer features going forward.
Reordering
This renderer will reorder batches by render target to reduce the number
of times render targets are changed.
In the future, we could also reorder by program within the render target
if we can determine that vertices do not overlap.
Uniform Snapshots
To allow for reordering of batches all uniforms need to be tracked for
the programs. This allows us to create the full uniform state when the
batch has been moved into a new position.
Some care was taken as it can be performance sensitive.
Attachment Snapshots
Similar to uniform snapshots, we need to know all of the texture
attachments so that we can rebind them when necessary.
Render Jobs
To help isolate the process of creating GL commands from the renderer
abstraction a render job abstraction was added. This could be extended
in the future if we decided to do tiling.
Command Queue
Render jobs create batches using the command queue. The command queue
will snapshot uniform and attachment state so that it can reorder
batches right before executing them.
Currently, the only reordering done is to ensure that we only visit
each render target once. We could extend this by tracking vertices,
attachments, and others.
This code currently uses an inline array helper to reduce overhead
from GArray which was showing up on profiles. It could be changed to
use GdkArray without too much work, but had roughly double the
instructions. Cycle counts have not yet been determined.
GLSL Programs
This was simplified to use XMACROS so that we can just extend one file
(gskglprograms.defs) instead of multiple places. The programs are added
as fields in the driver for easy access.
Driver
The driver manages textures, render targets, access to atlases,
programs, and more. There is one driver per display, by using the
shared GL context.
Some work could be done here to batch uploads so that we make fewer
calls to upload when sending icon theme data to the GPU. We'd need
to keep a copy of the atlas data for such purposes.
2021-02-23 14:41:52 -08:00
Ask Hjorth Larsen
9698d4aa2a
Updated Danish translation of gtk-properties
2021-02-23 01:23:03 +01:00
Ask Hjorth Larsen
dd2851a0ff
Updated Danish translation
2021-02-23 01:23:03 +01:00
Bilal Elmoussaoui
adf9377b61
gdk: drop the latest mention of DrawingContext
2021-02-22 22:15:14 +00:00
Matthias Clasen
700f39bfca
Merge branch 'compose-warning' into 'master'
...
imcontext: Take out the warnings
See merge request GNOME/gtk!3230
2021-02-22 20:31:19 +00:00
Matthias Clasen
baec7079e0
imcontext: Take out the warnings
...
Don't warn about Compose file constructs we don't
support. We haven't supported these for a long time,
and nobody has every complained. No need to wake
up sleeping dogs.
2021-02-22 15:08:58 -05:00
Timm Bäder
f83644edee
Merge branch 'SilverRainZ-master-patch-42810' into 'master'
...
gtk-demo: Fix typo GtkKabel -> GtkLabel
See merge request GNOME/gtk!3229
2021-02-22 08:20:34 +00:00
Emin Tufan Çetin
30d4417064
Update Turkish translation
2021-02-21 17:56:30 +00:00
Emin Tufan Çetin
b428fafade
Update Turkish translation
2021-02-21 17:51:14 +00:00
Emin Tufan Çetin
63d1dc307a
Update Turkish translation
2021-02-21 16:27:09 +00:00
Shengyu Zhang
55bfadadc4
gtk-demo: Fix typo GtkKabel -> GtkLabel
2021-02-21 16:20:22 +00:00
Piotr Drąg
179fae32a5
Update POTFILES.in
2021-02-21 12:50:44 +01:00
Matthias Clasen
e220b24b70
Merge branch 'wip/chergert/macos-gl-opaque-context' into 'master'
...
macos: make OpenGL context opaque when possible
See merge request GNOME/gtk!3226
2021-02-20 02:37:52 +00:00
Matthias Clasen
9061256122
Merge branch 'wip/chergert/fix-macos-resizing' into 'master'
...
macos: fix resizing of resizable windows on macOS
See merge request GNOME/gtk!3227
2021-02-20 02:32:15 +00:00
Christian Hergert
ea0d487f0b
macos: fix resizing of resizable windows on macOS
2021-02-19 15:43:49 -08:00
Christian Hergert
b2fd09625c
macos: make OpenGL context opaque when possible
...
If our opaque region is the entire surface, then we can make the OpenGL
context opaque like we do for decorated windows. This improves performance
as the compositor does not need to blend the surface with the contents
behind the window.
2021-02-19 13:23:26 -08:00
Matthias Clasen
5797c72e9c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3224
2021-02-19 14:41:36 +00:00
Zander Brown
d02cfceb3d
Update British English translation
...
(cherry picked from commit 1f18d2638f )
2021-02-19 14:26:26 +00:00
Zander Brown
451af280a2
Update British English translation
...
(cherry picked from commit 6f26331864 )
2021-02-19 14:24:32 +00:00
Matthias Clasen
516776b630
gtk-demo: Make --version match about
...
Print the same version information in --version
that we show in the about dialog.
2021-02-18 22:52:15 -05:00
Matthias Clasen
4d0a1a97cc
widget-factory: Make --version match about
...
Print the same version information in --version
that we show in the about dialog.
2021-02-18 22:51:35 -05:00
Matthias Clasen
3ee5354e0f
imwayland: Be careful about cursor positions
...
We don't want to hand out cursor positions based on
the original preedit text and then tweak the text to
be different.
2021-02-18 15:33:01 -05:00
Matthias Clasen
07295ac169
Merge branch 'unintrusive-compose-preedit' into 'master'
...
Unintrusive compose preedit
See merge request GNOME/gtk!3220
2021-02-18 17:36:08 +00:00
Matthias Clasen
447e6db847
Merge branch 'wip/carlosg/font-setting-lookups' into 'master'
...
gdk/wayland: Look for font settings recursively
Closes #3680
See merge request GNOME/gtk!3218
2021-02-18 17:18:37 +00:00
Matthias Clasen
d84a028455
imwayland: Tweak preedit text
...
Tweak the preedit text we get from IBus (via the compositor) to
match what GtkIMContextSimple produces for Compose sequences now.
This provides a unified experience.
2021-02-18 11:44:09 -05:00
Matthias Clasen
4327a866f4
imcontext: Make Compose preedit less intrusive
...
Tweak the preedit display for Compose sequences to
be not so distracting. We only show the Compose key
when it occurs in the middle of the sequence or is
the only key so far, and use · instead of ⎄ for it.
Also, make sure to display dead keys more adequately.
2021-02-18 11:44:09 -05:00
Carlos Garnacho
1fbdfe340e
gdk/wayland: Look for font settings recursively
...
Use the infrastructure already available to look up keys, instead.
This does the right thing and looks up the setting across all
sources.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3680
2021-02-18 16:50:45 +01:00
Matthias Clasen
4a47bdf596
Merge branch 'wip/exalm/root' into 'master'
...
widget: Don't assume GtkWindow root in gtk_widget_propagate_state()
See merge request GNOME/gtk!3217
2021-02-18 14:38:50 +00:00
Alexander Mikhaylenko
8e2f90e342
widget: Don't assume GtkWindow root in gtk_widget_propagate_state()
...
Avoid crashes with GtkDragIcon children.
2021-02-18 13:41:41 +05:00
Matthias Clasen
32c7ca50ea
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3679 and #3678
See merge request GNOME/gtk!3216
2021-02-18 05:52:44 +00:00
Matthias Clasen
19b9967a72
text: Fix sticky preedit attrs
...
In some cases, we were inadvertedly merging the
preedit attributes into priv->attrs, instead of
keeping them separate. This was causing the underlines
to grow beyond the preedit and never go away. One
place where this was showing up is the fontchooser
preview.
Fixes : #3679
2021-02-17 23:25:31 -05:00
Matthias Clasen
da71a37945
imwayland: Return limited preedit attributes
...
It should not matter, but it is the right thing to
do to limit the preedit attributes to the length
of the preedit text.
2021-02-17 22:57:41 -05:00
Matthias Clasen
05fe2441a7
imcontext: Enable font fallback for preedit
...
Not doing so only invites hexboxes.
Fixes : #3678
2021-02-17 22:11:57 -05:00
Matthias Clasen
35488959b4
paned: Add a paned handle class
...
Instead of bending GtkGizmo to the breaking point,
split off a GtkPanedHandle class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too. Everybody wins.
2021-02-17 21:45:33 -05:00
Matthias Clasen
af1981eda2
popovercontent: Few small fixes
...
Forgot to include config.h. Oops, and we make things
a bit shorter still.
2021-02-17 21:44:53 -05:00
Matthias Clasen
38da88908d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3676 and #3675
See merge request GNOME/gtk!3215
2021-02-17 20:49:41 +00:00
Matthias Clasen
41abda9f03
Make gtk_im_modules_init properly private
...
Putting non-exported symbols in public headers can
only lead to confusion and day drinking. Don't do it.
Fixes : #3676
2021-02-17 15:25:42 -05:00
Matthias Clasen
5a8e2a8c2d
gsk: Add a missing GDK_AVAILABLE_IN_ALL
...
gsk_text_node_has_color_glyphs was not properlty exported,
by accident.
Fixes : #3675
2021-02-17 15:20:24 -05:00
Matthias Clasen
7390e2490c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3214
2021-02-17 12:55:39 +00:00
Matthias Clasen
04daa236ad
Revert "gizmo: Add a css_changed function"
...
This reverts commit 39f72b3834 .
2021-02-16 23:51:14 -05:00
Matthias Clasen
31ceb4ddfb
Revert "gizmo: Chain up in css_changed"
...
This reverts commit bb0a1b0cfe .
2021-02-16 23:51:14 -05:00
Matthias Clasen
c2f811dd29
popover: Add a popover content class
...
Instead of bending GtkGizmo to the breaking point,
split off a GtkPopoverContent class that just does
what is needed here. Its simpler, and lets us keep
GtkGizmo simpler too.
2021-02-16 23:51:14 -05:00
Matthias Clasen
189e0c05fd
Merge branch 'wip/smcv/reftest-dedup' into 'master'
...
Reduce duplication in reftests
See merge request GNOME/gtk!3203
2021-02-17 03:55:45 +00:00
Matthias Clasen
8ee4ea4282
Merge branch 'wip/jimmac/tiled-resize-area-gtk4' into 'master'
...
Adwaita: control surface for resize tiled windows
Closes #3670
See merge request GNOME/gtk!3211
2021-02-17 03:54:27 +00:00
Jakub Steiner
edcd4c6207
Adwaita: control surface for resize tiled windows
...
- window resizing control area is implemented as where the shadows are drawn
- create a 'fake' shadow for the tiled case to allow easier resizing of
the tiled window ratio even if it's offset to the side of the border
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3670
2021-02-16 14:10:14 +01:00
Matthias Clasen
f5bd591d89
Merge branch 'wip/jimmac/scrollbars-fine-tune-fix' into 'master'
...
Adwaita: avoid fine-tune scrollbars jumping
Closes #3672
See merge request GNOME/gtk!3208
2021-02-16 12:26:02 +00:00
Jakub Steiner
67b5a34bad
Adwaita: Avoid fine-tune scrollbars jumping
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3672
2021-02-16 11:59:45 +01:00
Matthias Clasen
27071b5cfb
Merge branch 'matthiasc/for-master' into 'master'
...
wayland: Complete our buffer format listing
See merge request GNOME/gtk!3207
2021-02-16 04:33:08 +00:00
Matthias Clasen
19b9c42562
Merge branch 'fix-scrollbar-sizing' into 'master'
...
gizmo: Chain up in css_changed
See merge request GNOME/gtk!3206
2021-02-15 21:43:47 +00:00
Matthias Clasen
bf6a40f39b
wayland: Complete our buffer format listing
...
The debug spew for printing out supported buffer
formats was missing a bunch, among them the fp16
formats that are interesting for HDR support.
Add them.
Note that we still only support ARGB8888. But
at least we can print out what don't support.
2021-02-15 16:42:17 -05:00
Matthias Clasen
bb0a1b0cfe
gizmo: Chain up in css_changed
...
css_changed is a vfunc that *must* chain up.
Failure to do so broke the resizing of overlay scrollbars,
amongst other things.
This bug was introduced in 39f72b3834 .
2021-02-15 14:26:52 -05:00
Matthias Clasen
2ac5c3282f
Merge branch 'lenient-compose-parsing' into 'master'
...
imcontext: Be more lenient in parsing Compose
See merge request GNOME/gtk!3201
2021-02-15 18:08:45 +00:00
Matthias Clasen
6b3c356eb7
Merge branch 'wip/jimmac/larger-smaller-scrollbar-gtk4' into 'master'
...
Adwaita: Scrollbar transitions and size
Closes #1886
See merge request GNOME/gtk!3204
2021-02-15 18:06:00 +00:00
Jakub Steiner
5c5cd34c2f
Adwaita: Scrollbar transitions and size
...
- tone down the size of the controller again
- transition between the indicator and control fluidly
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1886
2021-02-15 12:25:09 +01:00
Simon McVittie
1c6cf7a3b6
reftests: Share reftest-compare.[ch] between GSK and GTK tests
...
The only non-whitespace difference is that the copy in GSK does not
set the symbol's visibility.
Signed-off-by: Simon McVittie <smcv@debian.org >
2021-02-15 09:22:41 +00:00
Simon McVittie
6b29eeeb1c
reftest-compare: Fix spelling of "diff"
...
This is the only non-whitespace difference between the copies in
testsuite/reftests/ and testsuite/gsk/.
Signed-off-by: Simon McVittie <smcv@debian.org >
2021-02-15 09:22:41 +00:00
Matthias Clasen
2f43b8dc49
imcontext: Improve compose table parsing
...
Avoid leaking value in error cases, and actually
emit a warning for a missing quote. Pointed out
by Peter Bloomfield.
2021-02-15 01:46:00 -05:00
Jordi Mas
7b4cfd38bc
Update Catalan translation
2021-02-14 21:52:55 +01:00
Matthias Clasen
d2e074e36b
imcontext: Be more lenient in parsing Compose
...
X11 allows keysyms to be specified in addition to strings.
We only support the strings. In the past, we ignored everything
after the string. Go back to doing that, but issue a warning
that we've ignored the keysym.
2021-02-14 12:56:00 -05:00
Matthias Clasen
2623932886
Merge branch 'fix-compose-comments' into 'master'
...
Fix compose comments
Closes #3664
See merge request GNOME/gtk!3199
2021-02-14 17:25:58 +00:00
Matthias Clasen
b0a82b1dfe
Merge branch 'popup-shadow-width' into 'master'
...
Support shadows on popovers
See merge request GNOME/gtk!3089
2021-02-14 17:22:50 +00:00
Matthias Clasen
f15aa2f3e5
imcontext: Fix a regression in Compose file parsing
...
We accidentally dropped the handing of # comments.
Bring it back. Test included.
Fixes : #3664
2021-02-14 11:56:24 -05:00
Matthias Clasen
5d6792137d
testsuite: Add a missing file
2021-02-14 11:56:24 -05:00
Matthias Clasen
52a2891933
window: Add some more details to css docs
...
Mention more of the supported style classes.
2021-02-14 11:22:44 -05:00
Matthias Clasen
7ebc3a9489
Update popover css docs
...
Mention that shadows are now possible.
2021-02-14 11:14:23 -05:00
Matthias Clasen
04fb1421dc
Merge branch 'antoniof-master-patch-32022' into 'master'
...
docs: Mark heading in migration guide
See merge request GNOME/gtk!3198
2021-02-14 15:59:29 +00:00
Matthias Clasen
a4f17eaa8b
macos: Apply popup shadow width
2021-02-14 10:52:33 -05:00
Matthias Clasen
e0c48e74bd
win32: Apply popup shadow width
2021-02-14 10:52:33 -05:00
António Fernandes
a810f600bf
docs: Mark heading in migration guide
...
This heading was missing from the index because it was not marked as one
2021-02-14 15:20:54 +00:00
Matthias Clasen
ad9c813ed1
x11: Apply popup shadow with
2021-02-14 10:12:10 -05:00
Matthias Clasen
aa1d08687d
popover: Handle shadow changes
...
When the box-shadow css property of the contents
widget changes, queue a resize on the popover.
2021-02-14 10:12:10 -05:00
Matthias Clasen
39f72b3834
gizmo: Add a css_changed function
...
In a break from the current gizmo api, add a separate
setter, since the calls with long argument lists full
of NULL are getting out of hand.
2021-02-14 10:12:10 -05:00
Matthias Clasen
7332b4f1d9
Add a test for popover positioning
...
This is useful for testing the interaction of arrows, shadows
or offsets with popover positioning.
2021-02-14 10:11:17 -05:00
Matthias Clasen
b948799778
popover: Support shadows
...
Use gdk_popup_layout_set_shadow_width to take shadows into
account when positioning popovers, and set the input region
to exclude the shadow, since we aren't doing interactive
resizing and the like.
When the popover has a beak, we make the surface size be
content size + shadow + tail, and then position the content
according to the final position inside this slightly too large
surface. The surface being too large doesn't matter, since we
set up an input region.
2021-02-14 10:11:17 -05:00
Matthias Clasen
aec738745a
wayland: Set shadow width on popup surfaces
...
Take the shadow width from the popup layout into account.
2021-02-14 10:11:17 -05:00
Matthias Clasen
ea19f7c360
popuplayout: Add shadow width
...
Add shadow width to the GdkPopupLayout struct. This
information is needed by the compositor to make correct
positioning decisions about popups.
2021-02-13 21:01:46 -05:00
Matthias Clasen
0222d389ee
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3197
2021-02-14 01:59:35 +00:00
Matthias Clasen
b3a055a9b7
popover: Queue a resize when position changes
...
At least with an arrow, changing the position
requires a resize
2021-02-13 20:27:01 -05:00
Matthias Clasen
bd877ccf06
popover: Cosmetics
2021-02-13 20:26:54 -05:00
Balázs Meskó
a8d87f80f3
Update Hungarian translation
2021-02-14 00:07:07 +00:00
Matthias Clasen
6601d79b2d
Merge branch 'revert-82ab039a' into 'master'
...
Revert "Merge branch 'disable-macos-ci' into 'master'"
See merge request GNOME/gtk!3192
2021-02-12 21:29:08 +00:00
Matthias Clasen
5ff843f97d
Stop passing introspection=false to graphene
...
This should no longer be possible (and the introspection
option is no longer a boolean.
2021-02-12 16:04:15 -05:00
Matthias Clasen
b1c1e02c28
ci: Add debug spew on macos
2021-02-12 15:24:27 -05:00
Bartłomiej Piotrowski
0ce0402edf
Revert "Merge branch 'disable-macos-ci' into 'master'"
...
This reverts merge request !3183
2021-02-12 19:40:57 +00:00
Matthias Clasen
5d13bb7aa2
Merge branch 'win32.surface.resize' into 'master'
...
Some fixes for resizing of GDK/Win32 surfaces
See merge request GNOME/gtk!3144
2021-02-12 14:07:07 +00:00
Matthias Clasen
c5e69e83b5
Merge branch 'flatpak-tweaks' into 'master'
...
Flatpak tweaks
See merge request GNOME/gtk!3187
2021-02-12 14:03:54 +00:00
Matthias Clasen
bcfca52e9e
Merge branch 'ci-fedora-33' into 'master'
...
ci: Update the Fedora image to F33
See merge request GNOME/gtk!3188
2021-02-12 13:46:14 +00:00
Matthias Clasen
919e06a831
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!3189
2021-02-12 12:45:51 +00:00
Timm Bäder
0d5957b97a
nativedialog: Remove unused run state
2021-02-12 08:39:40 +01:00
Timm Bäder
6e4bba3d75
build: Check for mallinfo2 instead of mallinfo
...
Similar to e89fcbfad6
but the tests we use mallinfo() in really aren't important to not worth
the effort to differentiate between mallinfo and mallinfo2. Only check
for mallinfo2().
2021-02-12 08:39:40 +01:00
Matthias Clasen
3e426e4c5b
flatpak: Try harder to disable sassc
2021-02-12 00:26:10 -05:00
Matthias Clasen
8d4f4af8ef
Add devel styling to nightly flatpaks
...
Pass -Dprofile=devel to the gtk build for our nightly
flatpaks, so they pick up devel styling.
2021-02-12 00:10:30 -05:00
Matthias Clasen
3aa3c21d69
demos: Add devel styling
...
Add a -Dprofile=devel meson option, and add some visual
hints to the demos that you are running a nightly build.
2021-02-12 00:08:55 -05:00
Matthias Clasen
9a540841fd
flatpak: No need to build sassc anymore
...
We should be able to do a gtk build without rebuilding
css nowadays.
2021-02-11 23:00:19 -05:00
Matthias Clasen
0a3fa40923
ci: Update the Fedora image to F33
2021-02-11 22:02:39 -05:00
Matthias Clasen
9f10f9a595
Merge branch 'fix-network-places' into 'master'
...
placesview: Avoid use-after-free
See merge request GNOME/gtk!3186
2021-02-11 19:41:10 +00:00
Matthias Clasen
560e27a3f4
Merge branch 'wip/jimmac/tiled-shadow-fix-fix-gtk4' into 'master'
...
Adwaita: bring borders for tiled
Closes #3661
See merge request GNOME/gtk!3184
2021-02-11 17:04:47 +00:00
Matthias Clasen
4df7cc948c
Merge branch 'ebassi/memdup2' into 'master'
...
Use g_memdup2()
See merge request GNOME/gtk!3157
2021-02-11 17:02:00 +00:00
Emmanuele Bassi
b74a9445af
tests: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:23 +00:00
Emmanuele Bassi
a63a2b26cf
Ensure we don't overflow when using g_memdup2()
...
When we turn integers into size_t we should check we're not going to
make a mess.
2021-02-11 14:22:23 +00:00
Emmanuele Bassi
43fd9d16c5
win32: Move from g_memdup() to g_memdup2()
...
Use `size_t` and `gsize` consistently for the length argument in every
function taking a bytes array and a length.
2021-02-11 14:22:23 +00:00
Emmanuele Bassi
78e3908a00
gtk: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Emmanuele Bassi
a9c616284a
gsk: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Emmanuele Bassi
386d8326ca
gdk: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Emmanuele Bassi
cf3f742ad8
x11: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Emmanuele Bassi
3a3e029270
wayland: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Emmanuele Bassi
435d12680d
macos: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Emmanuele Bassi
504b5bbd1b
broadway: Move from g_memdup() to g_memdup2()
...
The g_memdup() function is replaced by a safer version in newer versions
of GLib.
2021-02-11 14:22:22 +00:00
Jakub Steiner
f953dfef11
Adwaita: bring borders for tiled
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3661
2021-02-11 15:16:57 +01:00
Matthias Clasen
95d48ac2e8
placesview: Avoid use-after-free
...
The places view has questionable code for handling
'destroy', which seems to trigger use-after-free in
some cases. Clean this up a bit by acknowledging the
cancellation fully, rather than relying on the
destroyed flag.
2021-02-11 09:14:34 -05:00
Emmanuele Bassi
965e74f902
Add compatibility shim for g_memdup2()
...
We don't necessarily want to depend on a newer version of GLib, given
that we're not really using g_memdup() in the wrong way.
2021-02-11 12:57:38 +00:00
Matthias Clasen
0cc43e10a5
Merge branch 'wip/chergert/inline-transform-category' into 'master'
...
gsk: move transform structure to private.h
See merge request GNOME/gtk!3182
2021-02-11 01:14:21 +00:00
Matthias Clasen
82ab039abe
Merge branch 'disable-macos-ci' into 'master'
...
ci: Temporarily disable macOS CI job as runner is offline
See merge request GNOME/gtk!3183
2021-02-11 01:14:01 +00:00
Matthias Clasen
e823fa6665
Merge branch 'fix-filter-value' into 'master'
...
css: Avoid an invalid read
See merge request GNOME/gtk!3181
2021-02-11 00:51:40 +00:00
Matthias Clasen
8cd4b338db
ci: Temporarily disable macOS CI job as runner is offline
...
See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/495
2021-02-10 19:50:17 -05:00
Matthias Clasen
9af30aca35
Merge branch 'wip/chergert/fix-unused' into 'master'
...
snapshot: fix warning when asserts are disabled
See merge request GNOME/gtk!3180
2021-02-11 00:47:08 +00:00
Christian Hergert
6fab195643
gsk: move transform structure to private.h
...
This allows using the category without having to call a function from the
hot paths of the renderer.
2021-02-10 16:14:59 -08:00
Christian Hergert
c90ffc7363
snapshot: fix warning when asserts are disabled
2021-02-10 16:13:38 -08:00
Matthias Clasen
3eb4ec89f3
css: Avoid an invalid read
...
This was broken in ea7185bdb1 .
Pointed out by Christian Hergert.
2021-02-10 19:13:36 -05:00
Matthias Clasen
6c85a4b2f5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3177
2021-02-10 13:55:50 +00:00
Matthias Clasen
befc2c3ed6
iconbrowser: Use the right icon
...
We have an app icon, lets use it.
2021-02-10 08:04:11 -05:00
Matthias Clasen
62788d5b0d
print-editor: Use the non-devel icon
...
We are no longer a nightly print editor.
2021-02-10 07:52:29 -05:00
Matthias Clasen
3c91a2b0a8
node-editor: Use the non-devel icon
...
We're now a respectable, stable node editor.
2021-02-10 07:44:59 -05:00
Matthias Clasen
d3096f079f
Merge branch 'fix-clipped-texture' into 'master'
...
gl: Fixed clipped offscreen rendering
Closes #3651
See merge request GNOME/gtk!3175
2021-02-10 05:15:14 +00:00
Matthias Clasen
dff2aa20ff
gl: Fixed clipped offscreen rendering
...
When we are rendering a texture node to an offscreen,
and we have a clip, we must force the offscreen rendering.
Otherwise, the code will notice: Hey, it already is a texture
node, so no need to render it to a texture again. But when
clipping is involved, that is exactly what we want to do.
Testcase included.
Fixes : #3651
2021-02-09 22:43:15 -05:00
Matthias Clasen
dae42c8f55
Merge branch 'wip/chergert/fix-maximized-shadows' into 'master'
...
adwaita: disable shadows when window is maximized or fullscreen
See merge request GNOME/gtk!3173
2021-02-09 23:16:49 +00:00
Jakub Steiner
da64856f37
Adwaita: don't cast shadows for halt-tiled windows
...
- while the case of a single half tiled window casting shadow is valid,
the main use case for half tiled windows is when they have a neighbor.
The :backdrop should be enough of a focus indicator and we avoid shadow
casting on neighbors that are on the same Z level.
2021-02-09 18:57:31 +01:00
Christian Hergert
461fe36707
adwaita: disable shadows when window is maximized or fullscreen
...
These shadows cause a significant draw performance drop for maximized
windows. Disabling them increases the chances we can have faster scroll
performance of text.
There is some risk here for systems where they have a dock and you expect
the shadow to draw beneath that dock for transparency reasons.
2021-02-09 09:27:22 -08:00
Matthias Clasen
4ce071721f
Merge branch 'win32-drop-formats-leak' into 'master'
...
win32: Fix some leaks
See merge request GNOME/gtk!3167
2021-02-09 12:27:35 +00:00
Matthias Clasen
3cdfb779c7
Merge branch 'wip/chergert/fix-bgr8-uploads' into 'master'
...
gl: handle B8G8R8 texture data when uploading
See merge request GNOME/gtk!3171
2021-02-09 12:11:49 +00:00
Christian Hergert
3a43663630
gl: handle B8G8R8 texture data when uploading
...
We do not need to translate this on the CPU when we can instead push it
to the GPU in the same format and allow it to swizzle.
This fixes a huge number of memory allocations found while uploading the
GTK animation in widget-factory.
2021-02-08 15:32:12 -08:00
Matthias Clasen
360a66e945
Merge branch 'wip/chergert/macos-perf-fixes' into 'master'
...
macos: various OpenGL performance fixes
See merge request GNOME/gtk!3170
2021-02-08 20:30:27 +00:00
Christian Hergert
13e162c404
macos: improve use of swap rectangles with OpenGL
2021-02-08 11:30:11 -08:00
Christian Hergert
65296228d7
macos: only flush when not attached
...
This makes it so we only flush the context for the NSView, not the context
that is the center of our center of the GL context spokes.
2021-02-08 11:30:05 -08:00
Christian Hergert
443d199868
macos: mark region as unlikely
2021-02-08 11:29:56 -08:00
Christian Hergert
86c5f2df6e
gsk: make gsk_render_node_get_node_type() use const
...
There isn't any state to modify in the type so we can use const here.
Doing so allows some of the renderer code to use const across a
number of functions so that repeated calls are elided if inlined.
2021-02-08 11:29:43 -08:00
Christian Hergert
09b447a9e1
gsk: make render node getters pure
...
These do not do modify anything so they can be marked as pure to
potentially ellide calls. Since they do dereference, I do not believe
we can make them const although that is unclear since we could technically
just return a pointer + offset. Therefore it *might* be possible to also
make these G_GNUC_CONST.
2021-02-08 11:29:39 -08:00
Christian Hergert
161ddcfa92
gsk: make render node getters const
...
This also removes the return if fail macros from these as a good portion
of them didn't have them anyway. I think it's fair to say that access to
these incorrectly is a programmer error.
It significantly reduces the amount of code generated into generally a
movss,ret.
2021-02-08 11:29:36 -08:00
Christian Hergert
226dc49602
profiler: allow using gdk profiler functions without braces
...
Just compiling these out means you have to write code slightly differently
so that you don't end up with "if ();" afterwards.
This adds a "do {} while (0)" so that we're still semantically a statement
but will also compile out.
2021-02-08 11:29:32 -08:00
Matthias Clasen
207569c4ed
Merge branch 'wip/exalm/headerbar' into 'master'
...
headerbar: Don't use gtk_widget_unparent() with GtkBox
See merge request GNOME/gtk!3169
2021-02-08 15:38:48 +00:00
Alexander Mikhaylenko
cf61d96188
headerbar: Null-check boxes when removing window controls
...
Prevent a crash when show-title-buttons value changes to FALSE during
destruction.
2021-02-08 18:46:35 +05:00
Alexander Mikhaylenko
319755662f
headerbar: Don't use gtk_widget_unparent() with GtkBox
...
gtk_widget_unparent() is for widget implementations, it's not supposed to
be used from outside.
2021-02-08 18:46:27 +05:00
Matthias Clasen
055cd9aaad
Merge branch 'printing-temporary-queues-gtk4' into 'master'
...
printing: Create temporary queues for Avahi printers
See merge request GNOME/gtk!3160
2021-02-07 16:13:46 +00:00
Matthias Clasen
15697d5c0c
Merge branch 'focus' into 'master'
...
listbox: Fix handling of non-focusable rows
Closes #3633
See merge request GNOME/gtk!3152
2021-02-07 15:57:11 +00:00
Matthias Clasen
0cd2d01f3f
Merge branch 'fix-x11-drop' into 'master'
...
x11: More dnd fixes
Closes #3654
See merge request GNOME/gtk!3166
2021-02-07 14:52:24 +00:00
Matthias Clasen
67877e403f
win32: Fix some leaks
...
My reading of the code is that gdk_drop_new() is not
consuming the content formats it is given, so the caller
must not pass a new reference.
Needs testing on Windows.
2021-02-07 09:41:34 -05:00
Matthias Clasen
0bce63e3ab
x11: More dnd fixes
...
Whenever we communicate targets, we need to the union, otherwise
we don't tell the other side about our serialization. This makes
drops of images from gtk4-icon-browser to gimp and libreoffice
succeed in transferring data.
Fixes : #3654
2021-02-07 09:03:22 -05:00
Matthias Clasen
6396bf6d89
Merge branch 'fix-x11-drop' into 'master'
...
Fix x11 drop
Closes #3652
See merge request GNOME/gtk!3165
2021-02-07 06:52:45 +00:00
Matthias Clasen
5b45f267d6
x11: Pass mimetypes when creating output stream
...
When creating the output stream for a drop, we must
pass the mimetypes we support, otherwise the picking
of the right handler does not work.
Fixes : #3652
2021-02-07 01:32:39 -05:00
Matthias Clasen
f26f15fced
x11: Fix a memory leak
...
We ref the content formats here, so we better unref it
when done.
2021-02-07 01:31:40 -05:00
Matthias Clasen
a37044f36c
x11: Some code cleanups
...
Fix some glaring misindentation.
2021-02-07 01:30:50 -05:00
Matthias Clasen
e8c8be8e37
Merge branch 'matthiasc/for-master' into 'master'
...
Implement drop-shadow css filter
See merge request GNOME/gtk!3163
2021-02-06 22:35:23 +00:00
Matthias Clasen
bfc80c32ea
Add tests for the css filter property
...
Test that we can parse filters and that we
don't accept invalid filters.
2021-02-06 16:16:44 -05:00
Matthias Clasen
5f48764ac8
cssfiltervalue: Reject invalid filters
...
The Filter Effects Spec doesn't allow negative values
for most of the filter parameters.
2021-02-06 16:16:44 -05:00
Matthias Clasen
cc6fcbfc09
cssfiltervalue: Fix blur filter interpretation
...
According to https://www.w3.org/TR/filter-effects-1/ ,
the length passed to blur() is the standard deviation,
and according to https://www.w3.org/TR/css-backgrounds-3/#shadow-blur
the blur radius is twice the standard deviation.
2021-02-06 16:16:44 -05:00
Matthias Clasen
ea7185bdb1
cssfiltervalue: Implement drop-shadows
...
We have all the pieces, so this is surprisingly easy.
2021-02-06 16:16:43 -05:00
Matthias Clasen
429dfcf483
cssshadowvalue: Add a 'filter mode'
...
Shadow values created by gtk_css_shadow_value_new_filter or
gtk_css_shadow_value_parse_filter interpret their radius value
as standard deviation. Add a flag for this mode, and use it
where necessary.
2021-02-06 16:10:34 -05:00
Matthias Clasen
be3f352b59
cssshadowvalue: Add a parsing function
...
Add a variant of the parse function that parses
just a single (non-box) shadow, as required for
the drop-shadow filter.
2021-02-06 16:10:32 -05:00
Matthias Clasen
5b8896f1db
cssshadowvalue: Add gtk_css_shadow_value_pop_snapshot
...
This is the counterpart ot gtk_css_shadow_value_push_snapshot.
To make this easy, move the determination whether we need a
shadow out of the push function and save it.
2021-02-06 16:09:21 -05:00
Matthias Clasen
4e27de7df9
cssshadowvalue: Drop the underscore
...
Rename _gtk_css_shadow_value_parse to drop the underscore.
It was the only underscore-prefixed function in this file.
2021-02-06 16:08:19 -05:00
Marek Černocký
2712f536c2
Updated Czech translation
2021-02-06 09:44:09 +01:00
Matthias Clasen
a1f7073ff5
Add tests for the css filter property
...
Test that we can parse filters.
2021-02-05 21:37:47 -05:00
Matthias Clasen
9770872d12
css: Implement the drop-shadow filter
...
We have all the pieces, so this is surprisingly easy.
2021-02-05 21:37:14 -05:00
Matthias Clasen
de24b4f91b
cssshadowvalue: Add a parsing function
...
Add a variant of the parse function that parses
just a single (non-box) shadow, as required for
the drop-shadow filter.
2021-02-05 21:36:22 -05:00
Matthias Clasen
650fd9c291
Merge branch 'module-ext' into 'master'
...
meson: use correct module file extension on macOS
Closes #3645
See merge request GNOME/gtk!3162
2021-02-06 01:15:09 +00:00
David Lechner
b509809f34
meson: use correct module file extension on macOS
...
GModule requires the .so file extension on macOS for historic reasons.
However Meson defaults to .dylib for modules, so we need to override
it to get the correct extension.
Fixes #3645 .
2021-02-05 16:54:28 -06:00
Marek Kasik
a93ab37ea9
printing: Show all Avahi advertised printers
...
This commit unsubscribes CUPS backend from a DBus
signal in idle when listening for new items on Avahi.
Since GDBus emits gathered signals in idle while
checking whether the signal has been unsubscribed
it could happen that a signal was not processed
because it was removed from hash table of
subscribed signals.
This caused the situation where printers advertised
on Avahi were not listed in CUPS backend sometimes.
We need those signals since this happens when switching
from a general subscription which listens to signals
for all Avahi services to a specific one which listens
to just _ipp._tcp and _ipps._tcp (chicken and egg problem).
2021-02-05 18:35:56 +01:00
Marek Kasik
5d7364960a
printing: Create temporary queues for Avahi printers
...
This change extends set of Avahi advertised printers which
works with Gtk's CUPS print backend.
It creates a temporary queue (local printer) for each
Avahi printer in CUPS instead of accessing them directly
(via CUPS library).
This makes some printers work which did not work before and
also gives users more options to change in the print dialog.
This also changes naming of printers to be in accordance with CUPS.
It uses '_' instead of '-' and has hostname appended for CUPS remote
printers.
2021-02-05 18:35:56 +01:00
Matthias Clasen
60ff231fac
Merge branch 'matthiasc/for-master' into 'master'
...
iconbrowser: Make image dnd work again
Closes #3648
See merge request GNOME/gtk!3159
2021-02-05 12:48:10 +00:00
Emmanuele Bassi
958005317b
Merge branch 'master' into 'master'
...
Improve the docs of GtkWidget and GtkGrid
See merge request GNOME/gtk!2946
2021-02-05 12:14:26 +00:00
Matthias Clasen
15c36aaa1e
iconbrowser: Make image dnd work again
...
We need to drag a texture, not a paintable.
Fixes : #3648
2021-02-04 20:47:19 -05:00
Matthias Clasen
482b73c376
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Rewrite the long description for GtkDialog
Closes #3646
See merge request GNOME/gtk!3156
2021-02-05 00:10:47 +00:00
Matthias Clasen
4a8bf6e13d
Merge branch 'doc-typo' into 'master'
...
gtkshow: Fix doc typo
See merge request GNOME/gtk!3158
2021-02-05 00:07:18 +00:00
Maximiliano Sandoval R
3e2e6633b0
gtkshow: Fix doc typo
2021-02-04 21:02:22 +01:00
Matthias Clasen
4724f9907c
docs: Rewrite the long description for GtkDialog
...
As was pointed out in #3646 , some of the content here
was a bit outdated.
Fixes : #3646
2021-02-04 13:05:28 -05:00
Matthias Clasen
26e84a7b8c
Merge branch 'matthiasc/for-master' into 'master'
...
More work on css transition tests
See merge request GNOME/gtk!3154
2021-02-04 13:28:59 +00:00
Matthias Clasen
d5838f14f9
Drop the installed test for now
...
It fails in ci, and I have no idea why.
2021-02-04 07:26:10 -05:00
Matthias Clasen
5c532104e4
Merge branch 'pvs-fixes' into 'master'
...
Pvs fixes
See merge request GNOME/gtk!3155
2021-02-04 12:20:24 +00:00
Matthias Clasen
2f42e1fb89
treemodelfilter: Drop unreachable code
...
We never get here. The compiler says so.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:40:14 -05:00
Matthias Clasen
b5200bd076
css: Drop a bit of unreachable code
...
We never get here. The compiler says so.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:39:34 -05:00
Matthias Clasen
aa5bd38137
a11y: Avoid out-of-bounds access
...
Don't use the index before we've checked its good.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:34:05 -05:00
Matthias Clasen
0eba833595
gdk: Remove a redundant check
...
We already know desktop_notification_id is not NULL.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:29:51 -05:00
Matthias Clasen
1e0ea21297
messagedialog: Don't initialize twice
...
We don't need to set these fields more than once.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:25:36 -05:00
Matthias Clasen
e91e75173d
composetable: Remove a redundant check
...
We already know seq_index is not NULL here.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:22:52 -05:00
Matthias Clasen
927fdb9a83
x11: A case of argument order confusion
...
translate_keysym was expecting its arguments the
other way around.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:20:26 -05:00
Matthias Clasen
041f410838
textbtree: Avoid line vs char count confusion
...
The post_insert_fixup helper function was confused about
its argument order.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:17:55 -05:00
Matthias Clasen
c71c8919fe
listbase: Don't specify the same thing twice
...
We only need to set EXPLICIT_NOTIFY once.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:13:53 -05:00
Matthias Clasen
3f28399f7d
css: Fix border value parsing
...
This function was not resetting computed as it meant
to because the last loop was never executed.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:12:51 -05:00
Matthias Clasen
3c15fa96bc
vulkan: Fix image uploading by regions
...
This code did not make sense; it was incrementing
the wrong variable.
Pointed out in https://www.viva64.com/en/b/0793/
2021-02-04 00:12:44 -05:00
Matthias Clasen
0a0a059397
docs: Mention css drop-shadow filter
...
We don't support this filter, currently.
2021-02-03 22:10:13 -05:00
Matthias Clasen
18e83fe16d
Add more css transition tests
2021-02-03 22:10:13 -05:00
Matthias Clasen
90d7ed5dd1
Rename test to transition
...
Thats what it is about, so name it clearly.
Add missing installed tests too.
2021-02-03 22:10:13 -05:00
Matthias Clasen
3c6e7569ff
Add more css transition tests
...
Test font size transitions.
2021-02-03 22:10:13 -05:00
Matthias Clasen
4e2ec2d68d
testsuite: Pass GDK_DEBUG=default-settings to css tests
...
Otherwise, settings might creep in and change css defaults.
2021-02-03 22:10:13 -05:00
Matthias Clasen
1af72eac21
cssvalue: Cosmetic change
...
Don't return FALSE from pointer-returning functions.
2021-02-03 22:10:13 -05:00
Matthias Clasen
640273a0e2
Improve the css value tests
...
The test code had some bugs. Fix those, and
print out useful information when tests fail.
2021-02-03 22:10:13 -05:00
Matthias Clasen
a14a0c6315
css: Fix shadow value equal
...
This function was not doing the right thing.
Once we are doing the right thing and not compare
shadows as unequal, some reftests that inhibit
snapshots for a few frames now hang forever, since
we are no more redrawing unnecessarily. Fix that
with an explicit queue_draw.
2021-02-03 22:10:13 -05:00
Matthias Clasen
38481680e1
Merge branch 'wip/jimmac/colored-list-image-buttons' into 'master'
...
Adwaita: allow suggested and destructive action buttons in lists
Closes #3643
See merge request GNOME/gtk!3153
2021-02-04 01:38:47 +00:00
Matthias Clasen
12a540c284
Merge branch 'ebassi/for-master' into 'master'
...
Graphene is a dependency of Gsk, not Gdk
See merge request GNOME/gtk!3149
2021-02-04 01:38:09 +00:00
Jakub Steiner
289bf078bf
Adwaita: allow suggested and destructive action buttons in lists
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3643
2021-02-03 23:15:30 +01:00
Elias Projahn
a7ae94c06e
listbox: Fix handling of non-focusable rows
...
This commit modifies the gtk_list_box_row_grab_focus() implementation to
correctly return FALSE in case the row couldn't be focused. This behavior will
also be honored by gtk_list_box_row_focus() to properly handle focus in that
case. To achieve that, the method has been restructured slightly.
Closes #3633
2021-02-03 21:22:55 +01:00
Matthias Clasen
58ab9ddc40
Merge branch 'x11-dnd-fix' into 'master'
...
x11: Handle X-specific targets in drops
Closes #3642
See merge request GNOME/gtk!3151
2021-02-03 20:11:33 +00:00
Matthias Clasen
c78036fc51
x11: Handle X-specific targets in drops
...
This code is very similar to the handling for these
targets in the clipboard case.
Fixes : #3642
2021-02-03 14:17:04 -05:00
Matthias Clasen
120f2768e6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3150
2021-02-03 15:17:34 +00:00
Emmanuele Bassi
592b33cb48
Graphene is a dependency of Gsk, not Gdk
...
So let's put it in the right place when building the introspection data.
2021-02-03 14:05:27 +00:00
Matthias Clasen
7a9bc1f1d8
Link the data url tests statically
...
Thats the cleaner way to test internal apis.
2021-02-03 09:02:06 -05:00
Matthias Clasen
9cc6f3ee29
Add tests for css value transitions
...
Just a few cases for now, enough to test a recently
fixed regression with shadow transitions.
2021-02-03 08:56:57 -05:00
Chun-wei Fan
9efaa0b51d
Merge branch 'uac.meson.master' into 'master'
...
gtk4-update-icon-cache: Avoid UAC on 32-bit Windows
Closes #3632
See merge request GNOME/gtk!3141
2021-02-03 02:16:58 +00:00
Chun-wei Fan
f0967fa5e4
gtk4-update-icon-cache: Avoid UAC on 32-bit Windows
...
As the program executable name has 'update' in its filename,
gtk4-update-icon-cache.exe is considered to be an installer program on 32-bit
Windows [1], which will cause the program to fail to run unless it is running
with elevated privileges (i.e. UAC).
Avoid this situation by embedding a manifest file into the final executable
that tells Windows that this is not a program that requires elevation.
Fixes issue #3632 .
[1]: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc709628(v=ws.10)?redirectedfrom=MSDN ,
under section "Installer Detection Technology"
2021-02-03 02:16:58 +00:00
Matthias Clasen
f8529983f9
Merge branch 'matthiasc/for-master' into 'master'
...
css: Allow transitioning different-size shadows
See merge request GNOME/gtk!3145
2021-02-03 00:43:44 +00:00
Matthias Clasen
919c08d4fd
css: Allow transitioning different-size shadows
...
The code handles it just fine. The length check was
an erronous addition.
2021-02-02 15:27:42 -05:00
Matthias Clasen
e9b06b6346
Merge branch 'im-context-work' into 'master'
...
Some im context work
Closes #1004 , #186 , and #3521
See merge request GNOME/gtk!3143
2021-02-02 17:29:14 +00:00
Matthias Clasen
949c783187
composetable: Parse hex escapes too
...
This was a small omission from the Compose file
syntax that doesn't cost us much to support.
Add a test for this syntax too.
Fixes : #1004
2021-02-02 12:05:19 -05:00
Matthias Clasen
814a4a781a
Add tests for string values
...
Add a test that checks we parse values with
multiple characters correctly.
2021-02-02 11:55:00 -05:00
Matthias Clasen
676f875bf6
composetable: Support string values in the cache
...
Change the cache format to include the character
data that we need to hold string values in the table.
2021-02-02 11:55:00 -05:00
Matthias Clasen
140c5c5333
composetable: Don't use GSlice for big blobs
...
This just doesn't make sense. This will use malloc
anyway, so just call malloc directly.
2021-02-02 11:55:00 -05:00
Matthias Clasen
cebf2b2009
composetable: Keep multi-char values
...
Keep string values in the table, and return them
from the check function. This commit temporarily
disables the table caching, since the cache format
does not handle string values yet.
Fixes : #186
2021-02-02 11:54:53 -05:00
Matthias Clasen
86b437a1b6
Merge branch 'wip/silence-bounds-warnings' into 'master'
...
gdk/toplevelsize: Remove warnings about exceeding bounds
Closes #3035
See merge request GNOME/gtk!3142
2021-02-02 16:38:20 +00:00
Matthias Clasen
773ae0cd0f
composetable: Parse multi-char values
...
Rewrite the value parsing function to accept strings
that hold more than a single Unicode character.
2021-02-02 09:03:53 -05:00
Matthias Clasen
564793d5b5
composetable: Another step towards multi-char values
...
Change the parser data structures to hold a string, rather
than a gunichar. We still only put a single Unicode character
into it, currently.
2021-02-02 09:02:46 -05:00
Matthias Clasen
9142aa0f51
composetable: Prepare for multi character values
...
Make it possible for gtk_compose_table_check to return
a string instead of just a single Unicode character.
Currently, we only ever return strings holding a single
character, still.
2021-02-02 09:02:00 -05:00
Chun-wei Fan
39e136e9b7
Gdk/Win32: Fix resizing surfaces
...
This attempts to fix the counter-intuitive resizing of surfaces in GTK4 where
the surface grows or shrinks at the right and/or bottom edge when the window
resized from the top and/or left edge(s).
This is not yet perfect as the window stutters upon resizing from the top
and/or left edges, but at least makes resizing more intuitive.
2021-02-02 17:36:32 +08:00
Chun-wei Fan
652b892fc1
gdkwin32surface.[c|h]: Clean up code a bit
...
Remove the 'resized' member from the GdkWin32Surface structure, as we already
have a structure with a member that keeps track of whether a surface is being
resized, so we can just use that and avoid some confusion in the process
2021-02-02 17:36:32 +08:00
Matthias Clasen
af9a578d68
imcontext: Prepare for multi-char values
...
Reshuffle things so we can easily handle values
that are strings instead of just single Unicode
characters.
2021-02-01 23:43:59 -05:00
Matthias Clasen
ecb072fdd0
composetable: Check algorithmic matching
...
Just some spot checks, enough to verify the
fix in the previous commit.
2021-02-01 21:59:21 -05:00
Matthias Clasen
ef053ebb4a
composetable: Fix algorithmic matching
...
The code wasn't paying attention to (lack of) nul-termination
in one place, causing it to not match when it should.
2021-02-01 21:51:51 -05:00
Matthias Clasen
8d18d93742
composetable: Add tests for compact table matching
...
Not very exhaustive, just some spot checks.
2021-02-01 21:10:44 -05:00
Matthias Clasen
10fcdd88e3
imcontext: Code cleanup
...
Get rid of auxiliary check_table function.
2021-02-01 20:41:45 -05:00
Matthias Clasen
5d9509c51b
imcontext: Move code around
...
Move all the checking code to gtkcomposetable.c, and
add api that we can use in tests.
2021-02-01 20:27:38 -05:00
Matthias Clasen
c9cac5fbc3
composetable: Add tests for matching
...
This tests the api we use to match key sequences
against compose tables.
2021-02-01 19:55:56 -05:00
Matthias Clasen
aa9054a5f1
imcontext: Use gtk_compose_table_check
...
Use the just-introduced api.
2021-02-01 19:41:07 -05:00
Matthias Clasen
9ebf3fac73
composetable: Add api to check tables
...
This copies the check_table code from gtkimcontextsimple.c,
in order to have an api for tests.
2021-02-01 19:40:22 -05:00
Matthias Clasen
569294070b
Add tests for GtkComposeTable
...
Add some tests for the code that parses Compose files.
This tests the fix in the previous commit.
2021-02-01 19:02:31 -05:00
Matthias Clasen
be35c46ce9
composetable: Drop table debug code
...
This is better off in the tests that we are going to add.
2021-02-01 19:02:21 -05:00
Matthias Clasen
dbbcb13721
composetable: Parser fixes
...
We were not handling octal escapes right.
2021-02-01 16:05:05 -05:00
Matthias Clasen
edeaf9c040
imcontext: Drop GTK_MAX_COMPOSE_LEN
...
Drop GTK_MAX_COMPOSE_LEN from docs. It is no longer
used by GTK at all. We leave the define in place
for now, to avoid breaking 3rd party code that might
use it.
2021-02-01 12:31:23 -05:00
Matthias Clasen
61f709811c
composetable: Warn when ignoring things
...
We should at least give a hint that we've seen the line,
otherwise people will wonder why nothing happened.
2021-02-01 12:27:41 -05:00
Matthias Clasen
f7c4375509
composetable: parse long sequences
...
Allow compose sequences of up to 20 code points.
Fixes : #3521
2021-02-01 12:27:35 -05:00
Matthias Clasen
52fb900ced
composetable: Fix an off-by-one
...
Fix an off-by-one in the code parsing octal escapes
in compose files.
2021-02-01 12:10:05 -05:00
Matthias Clasen
031944ad30
imcontext: Stop using GTK_MAX_COMPOSE_LEN
...
Allocate the compose_buffer, and resize it when needed
to match the tables we use.
2021-02-01 12:10:05 -05:00
Matthias Clasen
bf8b974f68
imcontext: Code cleanup
...
Use g_clear_pointer instead of opencoding it in
multiple places.
2021-02-01 12:10:05 -05:00
Jonas Ådahl
6ad2a049e7
gdk/toplevelsize: Remove warnings about exceeding bounds
...
Sometimes the size will exceed the minimum bounds. For example crazy
applications like the widget factory that contains the world, or when a
user interactively resizes a window to be larger than the monitor the
window is on is.
The former is questionable, but the latter is not, and from here we
can't really see the difference, so just stop complaining.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3035
2021-02-01 11:31:11 +01:00
Matthias Clasen
3d85d53e5d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2319
See merge request GNOME/gtk!3140
2021-02-01 06:20:40 +00:00
Matthias Clasen
094a346539
imcontext: Allow sequences of length GTK_MAX_COMPOSE_LEN
...
There was an off-by-one error, making us reject sequences
of this length. But the rest of the code handles them
just fine.
Fixes : #2319
2021-02-01 00:55:25 -05:00
Matthias Clasen
162814f969
imcontext: Improve an error message
...
This error message was misleading, as pointed out
by Ralf Jung.
2021-02-01 00:44:41 -05:00
Matthias Clasen
e39b5c99f1
imcontext: Add a precondition check
2021-02-01 00:43:44 -05:00
Matthias Clasen
8883243aaa
imcontext: Show preedit for compose sequences
...
Show the sequences as they are entered, using ⎄ for
the compose key, to match what IBus does nowadays.
Also handle backspace to allow corrections.
2021-02-01 00:37:43 -05:00
Matthias Clasen
89511eecf1
imcontext: Update our check for dead keys
...
A bunch of keysyms for dead keys have been added since this
code was last touched. Update the check to cover the full
range from dead_grave to dead_greek.
2021-01-31 23:56:24 -05:00
Matthias Clasen
2c304ca80d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3139
2021-02-01 01:48:47 +00:00
Matthias Clasen
bf4102e664
Merge branch 'wip/exalm/consumes-motion' into 'master'
...
Drag fixes and cleanups
Closes #3513
See merge request GNOME/gtk!3001
2021-02-01 01:34:45 +00:00
Matthias Clasen
b86153cee3
Remove a forgotten file
...
The example series only has 9 steps now. Remove remnants
of step 10.
2021-01-31 20:26:02 -05:00
Matthias Clasen
7985d277b3
nativedialog: Add more docs
...
Emphasize that native dialogs aren't widgets, and are not
kept alive by GTK.
2021-01-31 20:25:44 -05:00
Matthias Clasen
752da5c2a5
Merge branch 'tool-static' into 'master'
...
tools: Don't static and dynamic link on libgtk4
See merge request GNOME/gtk!3138
2021-02-01 00:44:08 +00:00
Matthias Clasen
de4b8d547b
Merge branch 'wip/exalm/activate' into 'master'
...
listitemwidget: Activate on release instead of press
Closes #3345
See merge request GNOME/gtk!3008
2021-02-01 00:32:05 +00:00
Xavier Claessens
1048ad1a01
tools: Don't static and dynamic link on libgtk4
2021-01-31 11:09:20 -05:00
Ungedummt
4d11158d97
GtkGrid: Add xml example for GtkBuildable to docs
...
Added an example and a short discription for the properties
2021-01-31 10:19:14 +01:00
Ungedummt
293b81cad2
Fix small typo in the docs of GtkWidget
...
In a XML example was MyGrid as a class defined; replaced with GtkGrid
2021-01-31 10:19:08 +01:00
Matthias Clasen
65c38111f9
4.1.0
2021-01-30 19:57:24 -05:00
Matthias Clasen
ec8db379a6
tests: Disable the textview-margins reftest
...
It is too flaky to be useful.
2021-01-30 19:57:24 -05:00
Matthias Clasen
1484b4ae9f
node editor: Add a dark mode toggle
...
This is useful to see light rendering clearly.
2021-01-30 19:57:24 -05:00
Rafael Fontenelle
4cecbf1654
Update Brazilian Portuguese translation
...
(cherry picked from commit 056c3e11a1 )
2021-01-30 19:16:02 +00:00
Timm Bäder
234ba90e2b
Merge branch 'mcclurgm-master-patch-63249' into 'master'
...
Document nullability of gtk_list_box_get_selected_row
See merge request GNOME/gtk!3137
2021-01-30 17:58:33 +00:00
Rafael Fontenelle
bdd2244f75
Update Brazilian Portuguese translation
...
(cherry picked from commit f224c8fab9 )
2021-01-30 16:00:45 +00:00
Michael McClurg
cd7ec8ac92
Document nullability of gtk_list_box_get_selected_row
2021-01-30 15:23:41 +00:00
Piotr Drąg
cc5edbbbb2
Update POTFILES.in
2021-01-30 14:21:32 +01:00
Matthias Clasen
94d9e34dd3
Merge branch 'fix-unfocus-on-unmap' into 'master'
...
Fix unsetting focus
Closes #3623
See merge request GNOME/gtk!3136
2021-01-30 03:25:19 +00:00
Matthias Clasen
3dbf5038fa
Fix unsetting focus
...
Make _gtk_window_unset_focus_and_default queue the changes
for after the next draw. This achieves two things: first,
it avoids invalidating css at the wrong time (e.g. when
setting child-visible during size-allocation), and second,
it defers the focus change until after the widget is
hidden, so that moving the focus has the desired effect
of picking a different, visible widget.
Fixes : #3623
2021-01-29 21:41:16 -05:00
Matthias Clasen
456a2f3bcf
Merge branch 'msvc.nounistd' into 'master'
...
testsuite/testutils.c: Fix build on Visual Studio
See merge request GNOME/gtk!3131
2021-01-29 20:16:13 +00:00
Matthias Clasen
8e1fa52d14
Merge branch 'gst-vaapi-fix' into 'master'
...
gtkgstsink: Sync texture before handing it to GDK
See merge request GNOME/gtk!3114
2021-01-29 19:06:03 +00:00
Matthias Clasen
cbf2feb633
Merge branch 'ci-gstreamer-deps' into 'master'
...
Ci gstreamer deps
See merge request GNOME/gtk!3133
2021-01-29 19:05:47 +00:00
Matthias Clasen
afe8ee501c
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!3134
2021-01-29 18:47:31 +00:00
Jan Alexander Steffens (heftig)
4644dab081
gtkgstsink: Sync texture before handing it to GDK
...
We need to synchronize when moving the texture between contexts, or we
get glitches with VA-API decoding.
2021-01-29 18:58:17 +01:00
Matthias Clasen
b37a69d76c
ci: Add mesa-libGLES-devel
...
Try again, since libglvnd-devel is not the right choice.
2021-01-29 12:55:46 -05:00
Emmanuele Bassi
51bc6ce2e4
build: Disable subproject Cairo tests
...
There's really no point in running them.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
988ebc2248
docs: Annotate XML fragments as such
...
This way we can get syntax highlighting.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
9f31e95420
docs: Escape bare tags
...
Otherwise tools processing the description of GtkWidget will be *very*
confused.
2021-01-29 16:31:10 +00:00
Emmanuele Bassi
3a076e26f7
docs: Use the appropriate syntax for code block language
2021-01-29 16:31:09 +00:00
Emmanuele Bassi
e3e85fc6f3
docs: Remove stray code block end marker
2021-01-29 16:31:09 +00:00
Jonas Ådahl
ad3a35b4c5
Merge branch 'gtk-surface-release-4' into 'master'
...
wayland: Signal gtk-shell surface destruction to the server
See merge request GNOME/gtk!3129
2021-01-29 16:21:05 +00:00
Matthias Clasen
454caa3eec
ci: Use v26 of the Fedora image
...
This includes libglvnd-devel and should fix using the
gstreamer gl support.
2021-01-29 11:14:54 -05:00
Matthias Clasen
0ffe67ffed
ci: Add libglvnd-devel to images
...
gstreamers gl support included headers from this
package without depending on it. Work around this
packaging error by explicitly adding the needed
dependencies.
2021-01-29 11:07:11 -05:00
Matthias Clasen
8eb46bbfb2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3615
See merge request GNOME/gtk!3132
2021-01-29 15:15:43 +00:00
Chun-wei Fan
d8e8b3c235
testsuite/testutils.c: Fix build on Visual Studio
...
Visual Studio does not come with unistd.h, but Windows do have write() and
close() in io.h, so include io.h instead of unistd.h on Windows.
For MinGW, unistd.h in turn includes io.h.
2021-01-29 17:59:10 +08:00
Timm Bäder
79f273348d
gl renderer: Fix viewport computation when rendering offscreen
...
Fixes #3615
2021-01-29 10:37:48 +01:00
Timm Bäder
fc99081658
showrendernode: Monitor input file
2021-01-29 09:45:25 +01:00
Timm Bäder
aba14e6a43
node editor: Show some default node data
...
Show case the icon and the render node format this way.
2021-01-29 09:45:25 +01:00
Timm Bäder
8ebcef97ff
shader builder: Improve error output
2021-01-29 09:45:25 +01:00
Timm Bäder
00956a3770
node editor: Make help textview monospace
...
Otherwise the nice markdown tables don't line up.
2021-01-29 08:07:39 +01:00
Alexander Mikhaylenko
11f3b7730c
windowhandle: Use drag threshold instead of double click threshold
...
Now that we have gtk_drag_check_threshold_double(), be consistent with
other draggable widgets and make sure we don't take over a drag before a
child does.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3513
2021-01-29 12:01:34 +05:00
Alexander Mikhaylenko
f63e6394ac
dragsource: Use double coordinates for checking drag threshold
...
If multiple nested widgets have drag sources on them, both using bubble
phase, we need to reliably pick the inner one. Both of them will try to
start dragging, and we need to make sure there are no situations where the
outer widget starts drag earlier and cancels the inner one.
Currently, this can easily happen via integer rounding: start and current
coordinates passed into gtk_drag_check_threshold() are initially doubles
(other than in GtkNotebook and GtkIconView), and are casted to ints. Then
those rounded values are used to calculate deltas to compare to the drag
threshold, losing quite a lot of precision along the way, and often
resulting in the outer widget getting larger deltas.
To avoid it, just don't round it. Introduce a variant of the function that
operates on doubles: gtk_drag_check_threshold_double() and use it instead
of the original everywhere.
2021-01-29 12:01:34 +05:00
Alexander Mikhaylenko
bbca4c38df
entry: Fix drag threshold check
...
It was passing offsets as current oordinates.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
28f5d26719
windowhandle: Don't drag on capture phase
...
This was needed to work around widgets claiming event sequences on press,
by ignoring them and starting the drag anyway unless they have certain
event controllers on them.
The most visible offender was GtkButton, but since the last commit it
doesn't claim the sequence anymore and we can remove the hack.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
bf2620f041
checkbutton: Claim sequence on release instead of press
...
Make it possible to drag windows from check buttons in future.
2021-01-29 12:00:10 +05:00
Alexander Mikhaylenko
870b82b541
button: Stop claiming event sequence on press
...
Currently GtkButton claims the sequence both on press and on release. Stop
claiming it on press and only do it on release, allowing drags to start
from it.
This will allow to remove a hack from GtkWindowHandle.
2021-01-29 12:00:10 +05:00
Matthias Clasen
1635d9fb78
Merge branch 'pango-glyph-positions' into 'master'
...
Tell pango not to round glyph positions
See merge request GNOME/gtk!2058
2021-01-29 01:41:56 +00:00
Matthias Clasen
20fb155e8c
gsk: Fix render node serialization
...
When looking for ascii glyphs, we must match
the pango shape flags that GTK is using.
2021-01-28 18:19:42 -05:00
Matthias Clasen
da59c77ae2
widget: Use subpixel positioning
...
Before turning off pangos rounding of glyph positions,
we must check if the cairo we are using is new enough
to have working subpixel positioning (the relevant
cairo commit is 52a7c79fd4ff96bb5fac175f0199819b0f8c18fc).
2021-01-28 18:17:22 -05:00
Matthias Clasen
0d0bdaa02e
gsk: Fix a thinko
...
With subpixel positioning, we need to offset the
cached glyphs by their phase.
2021-01-28 18:16:16 -05:00
Sebastian Keller
04cf5044da
wayland: Signal gtk-shell surface destruction to the server
...
This adds a "release" destructor for the gtk_surface1 interface which
signals to the server that a surface has been destroyed on the client
side, which the current "destroy" does not do.
Ideally the protocol would have specified a destroy request marked as
destructor to handle this automatically, however this is no longer
possible due to the destroy method being implicitly generated in the
absence of an explicit request in the protocol. Adding a destroy request
marked as destructor now would generate a new destroy method that
unconditionally would send the request to the server, which would break
clients running on servers not supporting that request.
2021-01-28 22:31:03 +01:00
Anders Jonsson
b005cd0bbd
Update Swedish translation
...
(cherry picked from commit 5a5bb9099e )
2021-01-28 20:39:25 +00:00
Matthias Clasen
f5379d2047
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3127
2021-01-28 19:12:18 +00:00
Matthias Clasen
98c247ec29
label: Drop some unused includes
2021-01-28 12:27:07 -05:00
Matthias Clasen
38e2f9138d
Remove vestigial glade support
...
These files have not been kept up to date, and
glade doesn't work with GTK4 currently.
2021-01-28 12:27:07 -05:00
Matthias Clasen
3cc7d9b8c0
Move the gesture icons in the right place
...
Put these images into gtk/icons, where they belong.
2021-01-28 12:27:07 -05:00
Matthias Clasen
1ac9400712
Drop unused logo resource
...
The inspector no longer sets a window icon.
2021-01-28 12:27:07 -05:00
Matthias Clasen
10d5705b70
Reduce use of GtkStyleContext
...
Remove some unnecessary uses of GtkStyleContext where
we can directly go to the GtkCssStyle, and and drop
unnnecessary includes.
2021-01-28 12:27:07 -05:00
Matthias Clasen
2d0d579735
Unify border-spacing handling
...
Avoid using GtkStyleContext unnecessarily, just go
to the css node directly.
2021-01-28 12:27:07 -05:00
Matthias Clasen
ac0f524722
build: Redo the tools build
...
Move the tools directory to be toplevel, and instead of
recompiling sources twice, link them with the our new
static libgtk.a.
2021-01-28 12:27:07 -05:00
Matthias Clasen
2cd0e5f60b
Merge branch 'wip/fl/gl-renderer-fixes' into 'master'
...
gskglshaderbuilder: bind correct uv location
See merge request GNOME/gtk!3128
2021-01-28 17:15:43 +00:00
Fabio Lagalla
d83502d054
gskglshaderbuilder: bind correct uv location
2021-01-28 17:08:46 +01:00
Matthias Clasen
9e539a7f59
Merge branch 'matthiasc/for-master' into 'master'
...
builder-tool: Translate GtkImage:pixbuf
See merge request GNOME/gtk!3126
2021-01-28 02:04:48 +00:00
Matthias Clasen
c60247f51f
Merge branch 'wip/fl/gl-gradients' into 'master'
...
OpenGL gradient rendering improvements and additions
See merge request GNOME/gtk!3105
2021-01-28 01:43:57 +00:00
Matthias Clasen
06321511ad
builder-tool: Translate GtkImage:pixbuf
...
The pixbuf property doesn't exist anymore. It is
commonly set to a path in ui files, so translate it
to the file property.
2021-01-27 17:01:51 -05:00
Matthias Clasen
2e7923cad0
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add gtk_widget_grab_default to migration guide
See merge request GNOME/gtk!3125
2021-01-27 21:53:02 +00:00
Matthias Clasen
3c66c27caa
docs: Add gtk_widget_grab_default to migration guide
...
Point out the replacement for this api.
2021-01-27 13:50:05 -05:00
Timm Bäder
7f4bd6917e
Merge branch 'sophie-h-master-patch-47269' into 'master'
...
widget: get_name() is not nullable
See merge request GNOME/gtk!3124
2021-01-27 18:34:10 +00:00
Sophie Herold
b89376da55
widget: get_name() is not nullable
...
Partial revert of !2905
2021-01-27 17:49:17 +00:00
Fabio Lagalla
a1dd6521e8
gskglrenderer: Remove switch fallthrough comments
2021-01-27 12:52:11 +01:00
Fabio Lagalla
0088f840fe
gskrendernode: Cache angle in conic gradients
2021-01-27 12:44:10 +01:00
Fabio Lagalla
1b698c896e
gskglrenderer: Use gboolean instead of bool
2021-01-27 12:44:10 +01:00
Fabio Lagalla
04000f28e7
gskglrenderer: First class support of repeating-radial-gradient
2021-01-27 12:44:10 +01:00
Fabio Lagalla
976a05f6eb
gskglrenderer: First class support of repeating-linear-gradient
2021-01-27 12:44:10 +01:00
Fabio Lagalla
b15902bf44
gskglrenderer: Optimize conic-gradient shader
2021-01-27 12:44:10 +01:00
Fabio Lagalla
5ac7529771
gskglrenderer: Optimize radial-gradient shader
2021-01-27 12:44:10 +01:00
Fabio Lagalla
bbf68c0d9d
gskglrenderer: Optimize linear-gradient shader
2021-01-27 12:44:10 +01:00
Matthias Clasen
eeb3dd3511
Merge branch 'fix-can-focus' into 'master'
...
widget: Fix can-focus
Closes #3610
See merge request GNOME/gtk!3123
2021-01-27 05:34:21 +00:00
Matthias Clasen
7b0ce11e46
Merge branch 'search-entry-capture' into 'master'
...
Search entry capture
Closes #3098
See merge request GNOME/gtk!3115
2021-01-27 05:14:30 +00:00
Matthias Clasen
8ef1d6a49c
widget: Fix can-focus
...
Setting can-focus to FALSE on a widget is supposed
to prevent focus from entering the entire subtree.
So when we grab focus directly to a widget, we need
to check the can-focus flag not just of the widget
itself, but all its ancestors.
Fixes : #3610
2021-01-26 23:45:06 -05:00
Matthias Clasen
7db60f958d
searchentry: Capture events in the bubble phase
...
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.
Fixes : #3098
2021-01-26 22:17:57 -05:00
Matthias Clasen
30043e072e
Merge branch 'css-crossfade-color' into 'master'
...
Css crossfade color
See merge request GNOME/gtk!3122
2021-01-27 03:11:17 +00:00
Matthias Clasen
5ee7606779
css: Support colors in cross fades
...
The CSS Image Spec (Level 4) allows colors in
cross-fade expressions to specify solid-color images.
Support this.
2021-01-26 21:14:09 -05:00
Matthias Clasen
25409c5a5a
css: Add a constructor for GtkCssImageFallback
...
Add a way to create a solid color image.
2021-01-26 21:10:11 -05:00
Matthias Clasen
51122dd287
docs: Cosmetics
...
Tweak the css docs slightly.
2021-01-26 20:33:16 -05:00
Matthias Clasen
ec9159f983
Merge branch 'gst-vaapi-fix-pre' into 'master'
...
Minor fixes to gtkgstsink
See merge request GNOME/gtk!3120
2021-01-27 01:11:54 +00:00
Matthias Clasen
f3d77d1c21
Merge branch 'css-text-decoration' into 'master'
...
css: Fix text-decoration-line support
Closes #3621
See merge request GNOME/gtk!3121
2021-01-27 00:42:40 +00:00
Matthias Clasen
1258fcaaf4
css: Fix text-decoration-line support
...
This property needs to be treated as flags, not as
enum, since it should be possible to specify more
than one value, e.g.
text-decoration-line: underline overline;
Tests included.
Fixes : #3621
2021-01-26 17:53:14 -05:00
Jan Alexander Steffens (heftig)
00fd60aaa8
gtkgstsink: Use video_frame_free also for the GL path
...
The video frame needs to stay mapped while the texture is in use.
Avoid using g_memdup because the structure is not supposed to be moved.
2021-01-26 20:30:47 +01:00
Jan Alexander Steffens (heftig)
c7a7d0582a
gtkgstsink: Report allocation size even if no pool requested
...
We can do that so we should.
2021-01-26 20:30:47 +01:00
Matthias Clasen
b6e7acfb90
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Update border-size docs
See merge request GNOME/gtk!3119
2021-01-26 16:25:24 +00:00
Matthias Clasen
40eae298d5
docs: Update border-size docs
...
GtkCenterLayout respected border-size as well.
2021-01-26 10:40:22 -05:00
Marek Černocký
09a9131a10
Updated Czech translation
2021-01-26 16:21:18 +01:00
Marek Černocký
c93c9f5c2a
Updated Czech translation
2021-01-26 16:12:36 +01:00
Matthias Clasen
7f08adc23e
Merge branch 'ebassi/for-master' into 'master'
...
Fixes for gdk_surface_translate_coordinates()
See merge request GNOME/gtk!3118
2021-01-26 13:57:50 +00:00
Emmanuele Bassi
f41012080f
Validate arguments
...
We're just assuming everything is not NULL or with a valid type.
2021-01-26 12:56:32 +00:00
Emmanuele Bassi
786e9d351c
Make the inout argument logic clearer
...
It's easy to misread a `+=`.
2021-01-26 12:54:53 +00:00
Emmanuele Bassi
3d2cf97fbf
Fix annotations
...
The arguments are really (inout), not (out).
2021-01-26 12:54:00 +00:00
Matthias Clasen
1fe6fb6739
Merge branch 'circular-menubutton' into 'master'
...
Allow circular menubuttons
Closes #3423 and #3523
See merge request GNOME/gtk!3117
2021-01-26 12:47:38 +00:00
Emmanuele Bassi
6710eb5eb3
Merge branch 'ricotz/for-master' into 'master'
...
gdk: Add missing g-i annotations for gdk_surface_translate_coordinates
See merge request GNOME/gtk!3112
2021-01-26 12:28:55 +00:00
Matthias Clasen
80b1d55683
Merge branch 'css-overline' into 'master'
...
css: Support overline
See merge request GNOME/gtk!3116
2021-01-26 05:44:14 +00:00
Matthias Clasen
1cebc4316b
Allow circular menubuttons
...
Fixes #3523
2021-01-26 00:20:23 -05:00
Matthias Clasen
20895d6f3f
Merge branch 'adaptive-emojichooser' into 'master'
...
Adaptive emojichooser
Closes #3307
See merge request GNOME/gtk!2989
2021-01-26 05:07:46 +00:00
Matthias Clasen
65a4118d50
css: Support overline
...
We can support text-decoration-line: overline,
since pango supports it now.
2021-01-26 00:04:04 -05:00
Matthias Clasen
4857829aaa
popover: Try to not exceed monitor bounds
...
When the natural size of the popover exceeds
the monitor width, clamp it to fit on screen.
This gives the Emoji chooser a chance to
work on phone screens.
Fixes : #3307
2021-01-25 23:33:04 -05:00
Matthias Clasen
2ea4574caf
emojichooser: Allow the section buttons to wrap
...
Use a flowbox instead of a horizontal box for
the section buttons at the bottom, so they can
wrap and allow for narrow layout.
We also need to stop giving the scrolledwindow
a content height, so it can shrink to make room
for more rows of section buttons.
2021-01-25 23:32:15 -05:00
Matthias Clasen
102b74f9eb
emojichooser: Make keynav work with != 7 columns
...
The number of 7 columns was hardcoded in a few places
related to keynav across sections. The flowbox does
not have an api for it, but we can find out anyway
how many columns there are.
2021-01-25 23:32:08 -05:00
Matthias Clasen
8a0d4dfa94
searchbar: Capture events in the bubble phase
...
This is an unfortunate naming clash, but it avoids
an event handling clash between the capture widget
and its children.
Fixes : #3098
2021-01-25 22:16:29 -05:00
Matthias Clasen
b4e645862a
searchbar: Fix documentation mishap
...
The css section was inserted between the example
and the sentence referring to it.
2021-01-25 22:15:56 -05:00
Matthias Clasen
ea48506a32
Merge branch 'simplify-get-module-path' into 'master'
...
modules: Simplify _gtk_get_module_path
See merge request GNOME/gtk!3113
2021-01-26 02:53:38 +00:00
Jan Alexander Steffens (heftig)
23f0a29260
modules: Simplify _gtk_get_module_path
...
Remove the bizarre loops.
2021-01-25 22:47:16 +01:00
Rico Tzschichholz
9249717cf4
gdk: Add missing g-i annotations for gdk_surface_translate_coordinates
2021-01-25 20:18:33 +01:00
Matthias Clasen
4196dfc374
Merge branch 'wip/jimmac/larger-scrollbars-gtk4' into 'master'
...
Adwaita: make scrollbars larger
Closes #1886
See merge request GNOME/gtk!3109
2021-01-25 13:35:47 +00:00
Jakub Steiner
23af707b41
Adwaita: make scrollbars larger
...
When using scrollbars as active controls, rather than their primary role as indicators,
increase their size as click targets.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1886
2021-01-25 14:15:22 +01:00
Matthias Clasen
421088c3a0
Merge branch 'transform-origin' into 'master'
...
Transform origin
See merge request GNOME/gtk!3108
2021-01-25 12:58:36 +00:00
Matthias Clasen
749f1a7c00
Add a reftest for transform-origin
2021-01-24 23:47:10 -05:00
Matthias Clasen
344f9fcf05
css: Implement transform-origin
...
Implement most of transform-origin. We only
handle the xy components currently, which lets
us reuse the position value implementation that
is used for background-position.
2021-01-24 22:49:08 -05:00
Matthias Clasen
4c971cd4da
docs: Fix reference for css transform
...
Refer to the canonical location for the css
transform spec.
2021-01-24 22:48:00 -05:00
A S Alam
43d553dcfb
Update Punjabi translation
...
(cherry picked from commit 64519d73bb )
2021-01-24 22:52:47 +00:00
A S Alam
66264f9a3d
Update Punjabi translation
...
(cherry picked from commit 518331812e )
2021-01-24 22:42:39 +00:00
Efstathios Iosifidis
269f369541
Update Greek translation
...
(cherry picked from commit 281c17c400 )
2021-01-24 10:17:36 +00:00
Matthias Clasen
1973019962
Merge branch 'static-lib-for-tests' into 'master'
...
Static lib for tests
See merge request GNOME/gtk!3107
2021-01-23 16:15:23 +00:00
Matthias Clasen
fe515c4c1c
testsuite: Link some tests statically
...
Link tests for private apis statically.
2021-01-23 10:34:57 -05:00
Matthias Clasen
14f0a0addb
Create a static library
...
Rearrange our build to create a libgtk.a for the the contents of gtk/,
and build libgtk-4.so from our per-subdirectory static libraries.
This will let us link tests statically for testing internal apis.
2021-01-23 10:31:23 -05:00
Matthias Clasen
64a2d0221c
Merge branch 'lsan-leaks-2' into 'master'
...
Lsan leaks 2
See merge request GNOME/gtk!3106
2021-01-22 20:08:54 +00:00
Matthias Clasen
0ef91c3ba8
Avoid a buffer overrun
...
We were putting the '\0' behind the end. Oops.
2021-01-22 13:56:04 -05:00
Matthias Clasen
2adcb7be71
Tweak lsan suppressions
...
We don't use atk-bridge anymore, and we don't want
to see gio leaks.
2021-01-22 13:32:41 -05:00
Matthias Clasen
a332f2402a
ci: Don't print lsan suppressions
...
Printing these out breaks TAP output, and we really
aren't interested in them.
2021-01-22 13:01:09 -05:00
Matthias Clasen
131a61c51b
testsuite: Fix a leak
...
asan pointed out that the array tests leak.
2021-01-22 11:50:04 -05:00
Matthias Clasen
39d5dd89c5
Avoid a heap-use-after-free
...
_gtk_gesture_cancel_sequence frees the struct pointed to by data,
so don't write to it afterwards. Found by asan.
2021-01-22 11:39:04 -05:00
Danial Behzadi
341efe9a40
Update Persian translation
2021-01-22 14:57:52 +00:00
Matthias Clasen
5ed6f89b4a
Merge branch 'lsan-leaks' into 'master'
...
Lsan leaks
See merge request GNOME/gtk!3104
2021-01-22 12:30:22 +00:00
Matthias Clasen
4d609149d2
Merge branch 'tests-without-diff' into 'master'
...
testsuite: Stop requiring diff
See merge request GNOME/gtk!3103
2021-01-22 05:16:08 +00:00
Matthias Clasen
0d790505aa
Force malloc of g_slices in asan build
...
Otherwise leaks could be missed.
2021-01-22 00:13:13 -05:00
Matthias Clasen
a486536925
Remove libc from leak suppression list
...
Every program starts in __libc_start_main, so this would suppress
everything. This doesn't happen in practice because asan by default
is unable to unwind the stack. Setting
ASAN_OPTIONS=fast_unwind_on_malloc=0,malloc_context_size=15 can unwind
the stack, and if malloc_context_size is large enough it will indeed
suppress everything.
2021-01-22 00:12:46 -05:00
Matthias Clasen
e808fb424a
testsuite: Stop requiring diff
...
Unify the many copies of diff_with_file in one source
file, and patch it to detect diff at runtime and fall
back to a simple strcmp if we don't have it. Make all
tests use this new testutils.c, and stop requiring
diff for building the tests.
This should let us allow to build on Windows with the
default value for -Dbuild-tests.
2021-01-21 23:57:24 -05:00
Matthias Clasen
6c54abeca7
wayland: Explicitly announce ssd for kwin
...
Without this, kwin correctly assumes that we are
using client-side decorations. This is a port
of 32ae97f1 from GTK 3.24.
Fixes : #3609
2021-01-21 22:45:47 -05:00
Daniel Șerbănescu
d24b8a094c
Update Romanian translation
2021-01-21 19:27:47 +00:00
Emmanuele Bassi
c46391420f
Merge branch 'ebassi/lazier-a11y' into 'master'
...
Lazier accessibility
See merge request GNOME/gtk!3102
2021-01-21 18:57:34 +00:00
Yuri Chornoivan
68df7527f7
Update Ukrainian translation
2021-01-21 18:23:25 +00:00
Matthias Clasen
5a3c3d8210
Merge branch 'inspector-controllers' into 'master'
...
Inspector controllers
See merge request GNOME/gtk!3101
2021-01-21 18:15:57 +00:00
Emmanuele Bassi
95ceb49770
a11y: Make GtkATContext realization lazier
...
We only realize the ATContext on the top level, which will create an
GtkAtSpiRoot object and the corresponding GtkAtSpiCache object. Whenever
an AT connects to the accessibility bus, and asks for the various
objects, all the ATContext will be realized on demand.
2021-01-21 16:40:57 +00:00
Emmanuele Bassi
0bde58ffd7
a11y: Avoid signal emission during cache population
...
If we're responding to a request to get all the cached items, there's no
need to emit signals when adding an ATContext to the cache.
2021-01-21 16:40:57 +00:00
Matthias Clasen
ccd9827b63
inspector: Redo the actions page
...
Don't create widgets in bind, instead just set
the new action on the action-editor, and let it
recreate the parts that need to be recreated.
2021-01-21 10:25:13 -05:00
Matthias Clasen
db189cfb9f
inspector: Reshuffle action editor
...
Prepare the action editor for being able to change its
actions after creation.
2021-01-21 10:24:31 -05:00
Matthias Clasen
7527f181d5
inspector: Simplify action editor
...
We are not using the size group anymore, so drop it.
2021-01-21 10:20:21 -05:00
Matthias Clasen
c05b418512
inspector: Split out variant editor
2021-01-21 10:19:18 -05:00
Matthias Clasen
e97d996fe4
inspector: Redo the shortcuts page
...
Use a column view here.
2021-01-21 10:19:18 -05:00
Matthias Clasen
0537b167ca
inspector: Redo the controllers page
...
Use a column view, and only show the widgets own
controllers.
2021-01-21 10:19:18 -05:00
Matthias Clasen
40446201ff
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3607
See merge request GNOME/gtk!3100
2021-01-21 04:22:13 +00:00
Matthias Clasen
fff6b35821
inspector: Redo the controllers page
...
Use a column view, and only show the widgets own
controllers.
2021-01-20 18:51:01 -05:00
Emmanuele Bassi
75f2d7583f
Abort if the shared memory pool cannot be created
...
If we cannot allocate memory, we cannot create any windowing system
surface. There's no coming back from that.
Fixes : #3607
2021-01-20 19:10:54 +00:00
Matthias Clasen
1fd8d3b487
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Update getting started section
Closes #3601
See merge request GNOME/gtk!3099
2021-01-20 15:54:37 +00:00
Emmanuele Bassi
a1216599ff
Add rename-to annotation for GtkListStore.insert_valuesv()
...
The vector-based variant should shadow the variadic arguments function
in bindings.
2021-01-20 14:10:17 +00:00
Emmanuele Bassi
8fff0e0fdf
docs: Reformat GtkListStore.insert_values()
2021-01-20 14:10:17 +00:00
Emmanuele Bassi
439727a84a
Add more directions to the issue templates
...
Let's hope people read them.
2021-01-20 14:10:17 +00:00
Matthias Clasen
3a18a6dddf
docs: Update getting started section
...
We were still talking about draw signals here,
which don't exist anymore.
Fixes : #3601
2021-01-20 08:01:54 -05:00
Matthias Clasen
d7050c63ae
Merge branch 'treeview-sort-arrows' into 'master'
...
Redo arrow icons in various widgets
Closes #3577
See merge request GNOME/gtk!3097
2021-01-19 21:24:04 +00:00
Balázs Meskó
b7c88ec87d
Update Hungarian translation
2021-01-19 20:47:20 +00:00
Matthias Clasen
5985b62f60
columnview: Redo indicator arrows
...
Use the same approach as GtkTreeViewColumn for sort
indicators. Luckily, the same css works for both.
2021-01-19 14:24:19 -05:00
Matthias Clasen
e7c29b989c
menbutton: Redo indicator arrows
...
Instead of hardcoding icon names in the widget, use
arrow.none, arrow.up, arrow.down, arrow.left, arrow.right
styles and set the icon to use with -gtk-icon-source. This
lets themes change the icons that are used here, without
forcing all uses of pan-up/down/start/end-symbolic to be
treated the same.
Document this in the menubutton CSS docs.
2021-01-19 14:02:23 -05:00
Matthias Clasen
2100e427d9
treeviewcolumn: Redo sort arrows
...
Instead of hardcoding icon names in the widget, use
sort-indicator.ascending and sort-indicator.descending styles
and set the icon to use with -gtk-icon-source. This lets themes
change the icon that is used here, without forcing all uses of
pan-up/down-symbolic to be treated the same.
Document this in the treeview CSS docs.
Fixes : #3577
2021-01-19 14:02:16 -05:00
Matthias Clasen
2550d6dc63
Merge branch 'wip/kalev/dist-HighContrast-dark' into 'master'
...
dist: Fix css theme disting after HighContrast-dark changes
See merge request GNOME/gtk!3095
2021-01-19 12:08:21 +00:00
Matthias Clasen
ca72fae884
Merge branch 'issue-2436-gtk4' into 'master'
...
macOS: fix #2436 raise transient window on focus
Closes #2436
See merge request GNOME/gtk!3094
2021-01-19 11:56:54 +00:00
Matthias Clasen
4fc1af14a7
Merge branch 'wip/kalev/NEWS.pre-4.0' into 'master'
...
Split NEWS for pre-4.0 changes
See merge request GNOME/gtk!3096
2021-01-19 11:43:58 +00:00
Kalev Lember
1a30ec6da6
dist: Fix css theme disting after HighContrast-dark changes
...
Commit f60d245e32 renamed it from
HighContrast-inverse.css to HighContrast-dark.css.
2021-01-19 10:50:30 +01:00
Kalev Lember
e77d519482
Split NEWS for pre-4.0 changes
...
Similar to commit 87e9f0895b that did the
same for older releases, this commit splits out pre-4.0 changes to
separate NEWS.pre-4.0 file.
2021-01-19 10:40:09 +01:00
Thomas Holder
59806eee38
macOS: fix #2436 raise transient window on focus
...
Ported from gtk-3-24 e278f38905
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2436
2021-01-19 09:31:00 +01:00
Alexander Mikhaylenko
5968b10b0b
listitemwidget: Activate on release instead of press
...
Single click activation should only be done on release and not on press,
otherwise it breaks touch scrolling. Double-click activation still can be
done on press.
This matches the GtkListBox behavior as well.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3345
2021-01-19 12:36:32 +05:00
Matthias Clasen
e6f0103940
Merge branch 'version-bump' into 'master'
...
Version bump
See merge request GNOME/gtk!3093
2021-01-19 04:48:26 +00:00
Matthias Clasen
cbaad3dbd9
Add version macros for 4.2
...
These will be needed for adding new API.
2021-01-18 23:10:18 -05:00
Matthias Clasen
ee43a6a603
Bump version to 4.1
...
master is now open for 4.2 API additions.
Includes an update for the one test we have that
has the version number in its expected output.
2021-01-18 23:09:44 -05:00
Matthias Clasen
1ac1147ecb
Merge branch 'check_button_activate' into 'master'
...
Add activate signal to GtkCheckButton
Closes #3525 and #3550
See merge request GNOME/gtk!3012
2021-01-19 04:06:01 +00:00
Matthias Clasen
1edbc1f1f9
Merge branch 'wip/jtojnar/fix-pc-vulcan' into 'master'
...
build: Use Meson’s module for building .pc files
Closes #3517
See merge request GNOME/gtk!3005
2021-01-19 04:04:34 +00:00
Matthias Clasen
146b4c93ba
4.0.2
2021-01-18 22:23:57 -05:00
Matthias Clasen
94f90f457a
Merge branch 'fix-cell-renderer-toggle' into 'master'
...
cellrenderertoggle: Fix css node handling
Closes #3599
See merge request GNOME/gtk!3092
2021-01-19 02:09:10 +00:00
Matthias Clasen
6b7d56ac49
cellrenderertoggle: Fix css node handling
...
Commit cbbbf44dd4 tried to replace
gtk_style_context_save_named with an explicit
css node to save to, but it failed, and the failure
was showing up as crashes in the inspector.
Fix by Benjamin Otte.
Fixes : #3599
2021-01-18 20:52:59 -05:00
Emmanuele Bassi
1635d7be8c
Merge branch 'cherry-pick-gtk_file_chooser_set_current_name-fix-type' into 'master'
...
gtk_file_chooser_set_current_name: fix type of name argument
See merge request GNOME/gtk!3091
2021-01-18 23:19:00 +00:00
Thomas Holder
992cd088cf
gtk_file_chooser_set_current_name: fix type of name argument
...
The description says UTF-8 string, but the annotation said filename.
Cherry-picked from gtk-3-24 1573ff6803
2021-01-18 22:14:03 +01:00
Matthias Clasen
f6010b2a59
Merge branch 'doap-update' into 'master'
...
Update the gtk.doap file
See merge request GNOME/gtk!3088
2021-01-18 14:40:02 +00:00
Matthias Clasen
9222a5fd6d
Update the gtk.doap file
...
Add relevant people as maintainers.
2021-01-18 09:14:50 -05:00
Florentina Mușat
6f7fb6ba5a
Update Romanian translation
2021-01-18 13:06:18 +00:00
Chun-wei Fan
a57a144f8e
Merge branch 'win32-remove-layered-windows' into 'master'
...
GDK/Win32: Remove layered windows usage
See merge request GNOME/gtk!2782
2021-01-18 10:42:37 +00:00
Chun-wei Fan
7b47e3225b
GDK/Win32: Remove layered windows usage
...
In GTK4, we are now defaulting to the OpenGL renderer with the Cairo renderer
only used as a fallback, so there is no point keeping the code paths that use
layered windows as layered windows do not work well with OpenGL nor Vulkan.
2021-01-18 12:48:16 +08:00
Matthias Clasen
6aa893e091
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3437
See merge request GNOME/gtk!3087
2021-01-17 17:51:15 +00:00
Matthias Clasen
5aa03bcb0d
aboutdialog: Fix initial focus
...
When GtkAboutDialog was changed to derive from
GtkWindow, it lost the initial focus handling that
GtkDialog has. Reinstate some of it.
Fixes : #3437
2021-01-17 11:53:53 -05:00
Matthias Clasen
d7060025e0
inspector: Avoid a critical
...
Avoid a critical when closing the inspector with the
recorder page open.
2021-01-17 10:55:53 -05:00
Matthias Clasen
00883016af
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3593
See merge request GNOME/gtk!3086
2021-01-17 14:20:13 +00:00
Fabio Tomat
f0d8b614d0
Update Friulian translation
2021-01-17 13:11:25 +00:00
Piotr Drąg
ddbd574643
Update Polish translation
2021-01-17 12:38:17 +01:00
Timm Bäder
5ea3777599
widget: Fix gtk_widget_class_add_binding() argument name
2021-01-17 08:12:14 +01:00
Timm Bäder
a3949763f2
Add nullable annotations to GtkShortcutFunc
...
Fixes #3593
2021-01-17 08:11:42 +01:00
Matthias Clasen
1b961a9ae2
Merge branch 'surface-scale' into 'master'
...
Surface scale
Closes #3578
See merge request GNOME/gtk!3085
2021-01-17 05:23:22 +00:00
Timm Bäder
d9f6b268d3
gl renderer: Use rect_contains_rect() copy
...
And this way the contains_rect() inside
rounded_inner_rect_contains_rect() goes from 3.3% to 0.79% in the
fishbowl when rendering the levelbars.
2021-01-17 04:39:26 +01:00
Timm Bäder
934b91f65f
label: Remove unneeded NULL guards
...
The pointers passed to GtkWidgetClass::measure cannot be NULL
2021-01-17 04:39:26 +01:00
Timm Bäder
c3050231d1
label: Refactor get_layout_location
...
Make this function shorter, the parameters non-nullable and the simple
cases more explicit.
2021-01-17 04:39:26 +01:00
Timm Bäder
4d7a01562e
gl renderer: Don't reset offset when drawing offscreen
2021-01-17 04:39:26 +01:00
Timm Bäder
650eed7f72
gl renderer: Properly y-flip non-offscreen children of rounded clips
2021-01-17 04:39:26 +01:00
Timm Bäder
ec8614e8e4
label: Fix a potential memory leak
...
This only happens in error cases so not very interesting. Anyway, try to
make scan-build happy.
2021-01-17 04:39:26 +01:00
Timm Bäder
cb41b96a9e
builderparser: Save finalizers in a GPtrArray
...
We get up to 370 of these when starting the widget-factory.
2021-01-17 04:39:26 +01:00
Timm Bäder
872b46a527
widget: Shorten get_halign() a bit
2021-01-17 04:39:26 +01:00
Timm Bäder
b1c8613dbe
accessible: Fix memory leak if context is unset
...
Unref the acessible values
2021-01-17 04:39:26 +01:00
Timm Bäder
de6cd4f0d2
builder: Use a GPtrArray when parsing signals
2021-01-17 04:39:26 +01:00
Timm Bäder
aec2fb939f
builderparser: Keep properties in a GPtrArray
2021-01-17 04:39:26 +01:00
Timm Bäder
69293db804
builderparser: Only allocate subparser stack when needed
...
Out of the 3.3k possibly_finish_subparser calls when opening the
widget-factory, only 300 need one.
2021-01-17 04:39:26 +01:00
Matthias Clasen
61a7ebf980
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add details
See merge request GNOME/gtk!3084
2021-01-16 20:36:44 +00:00
Matthias Clasen
f14762b026
x11: Notify on surface scale changes
...
Emit property notification when the surface scale
changes.
2021-01-16 15:22:46 -05:00
Matthias Clasen
187d261400
wayland: Notify on surface changes
...
When the width, height or scale of a surface changes,
emit property change notification.
2021-01-16 15:22:46 -05:00
Matthias Clasen
e905f7ff7c
native: Listen for scale changes
...
Connect to change notification for the surface
scale-factor property, and update the widgets
when it changes.
Fixes : #3578
2021-01-16 15:22:46 -05:00
Matthias Clasen
aefc630d29
surface: Add a scale-factor property
...
This will allow us to notify when the scale changes.
2021-01-16 15:22:46 -05:00
Matthias Clasen
a5e929ce36
docs: Add details
...
Explain the difference between GtkPicture and GtkImage,
and when you might want to use which.
2021-01-16 14:45:20 -05:00
Yuri Chornoivan
1641d365f5
Update Ukrainian translation
2021-01-16 18:44:30 +00:00
Matthias Clasen
07d9cd8efe
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Add a legend for the layout overlay
See merge request GNOME/gtk!3083
2021-01-16 18:37:58 +00:00
Matthias Clasen
29868b2a05
docs: Remove a reference to configure events
...
Those don't exist anymore.
2021-01-16 12:52:06 -05:00
Matthias Clasen
691b6b88ea
inspector: Add a legend for the layout overlay
...
Colors are more useful if you know what they represent.
2021-01-16 12:38:24 -05:00
Matthias Clasen
2ee1a00177
Merge branch 'matthiasc/for-master' into 'master'
...
overlaylayout: Set the child type in the class
See merge request GNOME/gtk!3082
2021-01-16 03:55:22 +00:00
Matthias Clasen
144cf2d040
overlaylayout: Set the child type in the class
...
We don't need to override create_layout_child here,
and setting the child type has the advantage that
the layout properties are showing up in the inspector.
2021-01-15 22:35:11 -05:00
Matthias Clasen
e1a308d151
Merge branch 'rtl-margins' into 'master'
...
Flip margin-start and -end in RTL
Closes #3583
See merge request GNOME/gtk!3081
2021-01-16 00:19:41 +00:00
Matthias Clasen
bbfaacb598
Add a reftest for box flipping
...
Test that a horizontal box changes the order of its
children in RTL, and that widget margins flip start
and end.
This tests the fix in d89ff71819 .
2021-01-15 18:43:31 -05:00
Matthias Clasen
d89ff71819
Flip margin-start and -end in RTL
...
We lost this at some point, but the widget margins
are still meant to be relative to the text direction.
Fixes : #3583
2021-01-15 14:58:21 -05:00
Matthias Clasen
141c725489
Merge branch 'macos-ci-cairo' into 'master'
...
Revert "Fix the cairo build on OS X"
See merge request GNOME/gtk!3080
2021-01-15 15:56:37 +00:00
Matthias Clasen
bbc3aa4ff9
Revert "Fix the cairo build on OS X"
...
This reverts commit 710ef00dfe .
The cairo change has been merged.
2021-01-15 09:07:02 -05:00
Marek Černocký
f7856f29fd
Updated Czech translation
2021-01-15 14:10:17 +01:00
Matthias Clasen
7b69c58deb
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3078
2021-01-15 05:48:00 +00:00
Matthias Clasen
f60d245e32
Make HighContrastInverse a dark variant
...
Make HighContrastInverse available as the dark variant of HighContrast,
in addition to being a standalone theme. This regularizes our theme
variants, and doesn't hurt.
2021-01-14 22:55:52 -05:00
Matthias Clasen
f04e5bd590
Make Adwaita-dark available as a theme
...
This makes Adwaita-dark available as a standalone
theme.
2021-01-14 22:42:50 -05:00
Matthias Clasen
90c428b4a7
Merge branch 'wip/carlosg/mark-valid-portal-settings' into 'master'
...
gdk/wayland: Mark matched settings from the portal as valid
See merge request GNOME/gtk!3076
2021-01-14 18:33:45 +00:00
Carlos Garnacho
97b5fad131
gdk/wayland: Mark matched settings from the portal as valid
...
Commit e6209de962 added some checks on TranslationEntry.valid in
order to figure out whether using the new font settings or the
old g-s-d ones. However that's only set in the non-sandboxed case.
This makes sandboxed applications fallback to the old (and also
non-existing with modern g-s-d) settings, possibly resulting in
ugly defaults being picked.
Fix this by also marking TranslationEntry elements as valid when
using the settings portal, precisely those entries that we are able
to read and match with our own table.
2021-01-14 15:57:29 +01:00
Matthias Clasen
285a91715d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3075
2021-01-14 13:38:18 +00:00
Matthias Clasen
880468f5a3
docs: Fix a heading gotcha
...
One of the many migration guide sections was too
prominent.
2021-01-14 08:13:34 -05:00
Matthias Clasen
6ddbb2a402
doc: Clarify some migration hints
...
Don't mention GdkSurface::layout as replacement for
GtkWindow::configure-event. Instead, explain how to
save window state.
2021-01-14 07:52:36 -05:00
Daniel Mustieles
7eab565225
Updated Spanish translation
2021-01-14 10:35:43 +01:00
Daniel Mustieles
b34101d45d
Updated Spanish translation
2021-01-14 10:35:35 +01:00
Christian Hergert
6c21a7be0b
Merge branch 'nacho/macos-stylus' into 'master'
...
Support stylus devices on macos
See merge request GNOME/gtk!3058
2021-01-13 16:13:14 +00:00
Anders Jonsson
a6f2bcb220
Update Swedish translation
2021-01-12 21:55:52 +00:00
Anders Jonsson
ef0db01d5c
Update Swedish translation
2021-01-12 21:51:53 +00:00
Emmanuele Bassi
ef33ec639c
Merge branch 'ebassi/aspect-frame-doc' into 'master'
...
Ebassi/aspect frame doc
See merge request GNOME/gtk!3073
2021-01-12 16:50:31 +00:00
Matthias Clasen
27ca4434e2
Remove a misleading comment
2021-01-12 10:50:41 -05:00
Matthias Clasen
9861c7d25c
Merge branch 'dist-css' into 'master'
...
dist: Add a dist script to generate css
See merge request GNOME/gtk!3074
2021-01-12 14:04:51 +00:00
Matthias Clasen
13ef82fc4d
dist: Add a dist script to generate css
...
When I added the sassc option, I failed to ensure that
the theme css is included in the tarballs. This is required
to make tarball builds with -Dsassc=disabled work.
2021-01-12 08:42:18 -05:00
Emmanuele Bassi
b33ca43e14
Merge branch 'ebassi/atspi-path-sanitize' into 'master'
...
a11y: Fix leak
See merge request GNOME/gtk!3072
2021-01-12 12:37:31 +00:00
Emmanuele Bassi
39e07a8d56
Document limits of gtk_aspect_frame_get_ratio()
...
The GtkAspectFrame:ratio getter will return the value set, not the
actual ratio computed in case GtkAspectFrame:obey-child is TRUE.
2021-01-12 12:28:18 +00:00
Emmanuele Bassi
5286743cbe
Document GtkAspectFrame properties
2021-01-12 12:28:00 +00:00
Emmanuele Bassi
58bb998ef0
docs: GtkAspectFrame is not a GtkFrame any more
2021-01-12 12:23:14 +00:00
Emmanuele Bassi
a56b2900dd
a11y: Fix leak
...
Introduced by me in commit 03b60a2d5e .
2021-01-12 12:01:29 +00:00
Emmanuele Bassi
ff34124394
Merge branch 'ebassi/atspi-path-sanitize' into 'master'
...
a11y: Sanitize the AT-SPI object path further
See merge request GNOME/gtk!3071
2021-01-12 11:36:52 +00:00
Emmanuele Bassi
03b60a2d5e
a11y: Sanitize the AT-SPI object path further
...
When falling back to g_get_prgname(), we need to take into account that
the program name may be the full argv[0] path, which will end up messing
the DBus object path.
2021-01-12 11:15:28 +00:00
Benjamin Otte
d939d04885
Merge branch 'about-dialog-icon-size' into 'master'
...
About dialog icon size
See merge request GNOME/gtk!3070
2021-01-11 23:13:21 +00:00
Matthias Clasen
73fb28a058
iconhelper: Recreate the texture when needed
...
When the icon size changes, we want to reload themed
icons.
This was showing up as the GtkImage in about dialogs
getting a big size with the same small icon upon
changing -gtk-icon-size in the inspector.
2021-01-11 17:50:05 -05:00
Matthias Clasen
65eaf8e8c4
Adwaita: Make about dialog icons big
...
Use 128 as the icon size for the image widget
in about dialogs.
2021-01-11 17:50:05 -05:00
Matthias Clasen
beeedb5141
aboutdialog: Set icon-size for the logo
...
Make it explicit that we want large icons here.
2021-01-11 17:50:05 -05:00
Matthias Clasen
1d40750a60
aboutdialog: Set a style class
...
Add the .aboutdialog style class to toplevel
widget of about dialogs, similar to what we
do for e.g. GtkAssistant.
2021-01-11 17:46:55 -05:00
Matthias Clasen
96baf9769a
about dialog: Remove manual icon sizing
...
We have icon theme code to do that for us.
2021-01-11 17:46:55 -05:00
Matthias Clasen
5044031b53
Merge branch 'wip/kalev/gcc-11' into 'master'
...
Avoid diagnostics for gcc-11 false positive out of bounds accesses
See merge request GNOME/gtk!3064
2021-01-11 22:04:52 +00:00
Emmanuele Bassi
9f7119ee58
Merge branch 'wip/fl/glrenderer-fixes' into 'master'
...
gl renderer: print fragment shader info
See merge request GNOME/gtk!3069
2021-01-11 16:44:00 +00:00
Kalev Lember
c514c41d0e
Avoid diagnostics for gcc-11 false positive out of bounds accesses
...
This is a patch by Jeff Law <law@redhat.com > done in downstream Fedora
to fix the build with gcc 11.
2021-01-11 17:19:36 +01:00
Jakub Steiner
45848c5298
Merge branch 'wip/jimmac/adjust-for-contemporary-trends' into 'master'
...
Wip/jimmac/adjust for contemporary trends
Closes #3568 and #3560
See merge request GNOME/gtk!3060
2021-01-11 16:09:08 +00:00
Fabio Lagalla
8c61038b9f
gl renderer: print fragment shader info
...
It was logged twice the vertex shader info, instead
2021-01-11 17:06:03 +01:00
Jakub Steiner
b5cb2f7e41
Adwaita: update image assets
...
- reflect button styling
- ignore backdrop for non buttons
2021-01-11 16:24:22 +01:00
Matthias Clasen
8af0d4b51f
Merge branch 'otte/for-master2' into 'master'
...
Remove guarantees we do not intend to hold
See merge request GNOME/gtk!3066
2021-01-11 15:07:40 +00:00
Jakub Steiner
378ad75d48
Adwaita: scales border
...
- remove -alt specialcasing for a straight forward border like
everything else and avoid broken :dark and HC
2021-01-11 16:00:32 +01:00
Matthias Clasen
01d19e2aa4
Merge branch 'fix-tablet-4' into 'master'
...
Wayland: ignore touch/tablet events on destroyed surfaces [GTK4]
See merge request GNOME/gtk!3065
2021-01-11 14:44:27 +00:00
Jakub Steiner
64e16ecaf1
Merge branch 'wip/jimmac/undercorated-active' into 'master'
...
Adwaita: less dramatic :active for undecorated buttons
Closes #3575
See merge request GNOME/gtk!3068
2021-01-11 14:37:58 +00:00
Jakub Steiner
6a047e53a8
Adwaita: less dramatic :active for undecorated buttons
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3575
2021-01-11 15:00:38 +01:00
Jakub Steiner
31a7bc70c9
Adwaita: fix button border logic
...
- tint borders dark on non default / blue / red buttons
- just use plain $borders_color otherwise
- fixes HC/HCi
- ditch -alt buttons
2021-01-11 14:08:57 +01:00
Jakub Steiner
874cae1dab
Adwaita: flatter, lighter buttons
...
- lighten up for contrast, less of an oldschool gradient
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3568
2021-01-11 13:50:32 +01:00
Jakub Steiner
7a3dd41dba
Adwaita: round progress and levelbars
2021-01-11 13:50:32 +01:00
Jakub Steiner
149962670a
Adwaita: :checked:active and checked:hover states
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3560
2021-01-11 13:50:32 +01:00
Jakub Steiner
849e3c8b4b
Adwaita: flat scales, progressbars and level bars
2021-01-11 13:50:32 +01:00
Jakub Steiner
c9807f5afe
Adwaita: remove edge highlights
...
- flat is the name of the game
- kids scream make it flat
- simplify mixins
2021-01-11 13:50:32 +01:00
Carlos Garnacho
9a9899597c
Merge branch 'avoid-pointer-reset-gtk4' into 'master'
...
wayland: avoid set_cursor() when unchanged or invisible
Closes #3350
See merge request GNOME/gtk!3062
2021-01-11 12:07:01 +00:00
Matthias Clasen
fecb7af66e
Merge branch 'surface.compute.win32' into 'master'
...
Fix surface and geometry computation for Windows (Win32)
Closes #3480
See merge request GNOME/gtk!3067
2021-01-11 11:56:42 +00:00
Ignacio Casal Quinteiro
f5efb15cba
Support stylus devices on macos
2021-01-11 11:41:00 +01:00
Chun-wei Fan
d7d4fed0f3
gdk/win32: Fix window display and resizing
...
Have an implementation of ->request_layout() and ->compute_size() for the Win32
surface backend so that we can properly display and move and resize the
windows, as we request from the Win32 APIs.
Hxndling Aerosnap properly is mostly done except for snap_up(), which needs to
to be looked at later.
2021-01-11 17:55:25 +08:00
Chun-wei Fan
c2c2635763
gdk/win32: Rename 'margins' to 'shadow'
...
This improves consistency for the code.
2021-01-11 17:53:56 +08:00
Chun-wei Fan
fb33e83c96
gdkwin32-surface.c: Fix return type
...
gdk_win32_toplevel_present() should now be returning nothing, not a gboolean.
2021-01-11 17:53:47 +08:00
Chun-wei Fan
291ad17a22
gdksurface-win32.c: Decouple mapped state from surface creation
...
In line with what is done with the Wayland backend, enable the mapped state
independently as needed from the toplevel surface presentation, and also enable
the mapped state if necessary when presenting the popup surface.
2021-01-11 17:53:38 +08:00
Benjamin Otte
0f052d46b2
Remove guarantees we do not intend to hold
...
The fact that we are using gdk-pixbuf for loading files currrently does not mean we will use it going forward.
Also, "anything gdk-pixbuf can load" does not mean anything, because what gdk-pixbuf can load is a compile-time option.
As new_from_resource() will assert() if it cannot load a resource, we must be very sure that people do not use anything but PNG and JPEG for resources and the docs were not clear on that.
2021-01-10 21:37:03 +00:00
Asier Sarasua Garmendia
506423cf23
Update Basque translation
2021-01-10 18:00:26 +00:00
Asier Sarasua Garmendia
946a496a2e
Update Basque translation
2021-01-10 17:59:56 +00:00
Piotr Drąg
d20526570b
Update Polish translation
2021-01-10 18:27:55 +01:00
wisp3rwind
8312b9d9ca
Wayland: ignore touch/tablet events on destroyed surfaces
...
When destroying a wl_surface (e.g. when a window or menu is closed), the
surface may continue to exist in the compositor slightly longer than on
the client side. In that case, the surface can still receive input
events, which need to be ignored gracefully.
In particular, this prevents segfaulting on wl_surface_get_user_data()
in that situation.
Reported in
https://gitlab.gnome.org/GNOME/gtk/-/issues/3296
The same issue for pointers/keyboards was reported in
https://bugzilla.gnome.org/show_bug.cgi?id=693338
and fixed with in
bfd7137ffb
3625f17857
a8fc099a72
2021-01-10 12:31:37 +01:00
wisp3rwind
992f092968
wayland: avoid set_cursor() when unchanged or invisible
...
In pointer_surface_update_scale(), only rescale the cursor surface when
the scale has actually changed and the cursor is on at least one output.
fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3350
Right now, this issue is not completely understood, so it might also
involve some questionable handling of cursor surface by sway/wlroots.
However, irrespective of that issue, this patch avoids unnecessary calls to the
compositor, and there should be no drawback: Whenever the pointer enters
a new output, pointer_surface_update_scale() will be called again, such
that correct scaling of the cursor is still ensured.
There is a slight difference: When the cursor leaves the last output,
previously the image was reset to scale factor 1. Now, it keeps whatever
was last. That might be more sensible than the previous behaviour,
assuming that it's likely that when the cursor enter an output again, it
has the same scaling. Alternatively, if one cares about resource usage
at this level, it might make more sense to destroy the surface than
rescaling to 1.
2021-01-09 11:42:59 +01:00
Matthias Clasen
60835227a1
4.0.1
2021-01-09 01:30:13 -05:00
Matthias Clasen
2b6b35d91f
build: Add a sassc feature
...
Add an option to disable css rebuilds. This allows
to build GTK from release tarballs (Which are including
the css) without a sassc dependency.
2021-01-09 01:30:13 -05:00
Matthias Clasen
897164c66c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3565
See merge request GNOME/gtk!3061
2021-01-09 03:56:59 +00:00
Matthias Clasen
441d944c08
droptarget: Some docs cleanups
...
Fixes #3565 , among other things.
2021-01-08 22:24:42 -05:00
Chun-wei Fan
2b8ad6c4b5
gtkffmediafile.c: Use g_snprintf()
...
Visual Studio 2013 is just shy of being sufficiently C99-compliant to
build GTK master, as it did not support snprintf() in its CRT
implementation.
Use g_snprintf() to cover for this.
2021-01-08 22:24:42 -05:00
Chun-wei Fan
99b2da4c47
gtk/gtksecurememoryprivate.h: Include glib.h
...
Some compilers somehow do not have `inline` defined, so include glib.h
to ensure that keyword is defined.`
2021-01-08 22:24:42 -05:00
Matthias Clasen
8243b5493b
a11y: Avoid __ prefixes for variable names
...
Seems that msvc does not like that.
2021-01-08 22:24:42 -05:00
Matthias Clasen
d5ef906cff
Merge branch 'nacho/seatdefault' into 'master'
...
Clean ups in seat default
See merge request GNOME/gtk!3057
2021-01-09 01:04:22 +00:00
Ignacio Casal Quinteiro
a720d8bc79
seatdefault: use g_clear_pointer to unref the tools
2021-01-08 13:11:56 +01:00
Ignacio Casal Quinteiro
57691eacc5
seatdefault: rename dispose method
2021-01-08 13:10:56 +01:00
Matthias Clasen
526e24f5b1
Merge branch 'wip/nacho/associated-device' into 'master'
...
gdkdevice: use g_set_object to set the associated device
See merge request GNOME/gtk!3049
2021-01-07 21:08:46 +00:00
Matthias Clasen
2a79152762
Merge branch 'mcatanzaro/company-unparent-warning' into 'master'
...
Add critical if widget has a parent during dispose
See merge request GNOME/gtk!3053
2021-01-07 18:37:28 +00:00
Matthias Clasen
f03acaf7ab
Merge branch 'mcatanzaro/unparent' into 'master'
...
Remove incorrect unparenting guidance from migration guide
See merge request GNOME/gtk!3050
2021-01-07 18:35:37 +00:00
Matthias Clasen
4e7ce9edcf
Merge branch 'mcatanzaro/gtkbuilder-docs' into 'master'
...
Improve GtkBuilder documentation
See merge request GNOME/gtk!3055
2021-01-07 18:00:19 +00:00
Matthias Clasen
ff72619333
Merge branch 'mcatanzaro/event-controller-porting-guide' into 'master'
...
Expand event controller API changes section of GTK 4 porting guide
See merge request GNOME/gtk!3054
2021-01-07 17:55:38 +00:00
Michael Catanzaro
59692599ea
Remove incorrect unparenting guidance from migration guide
...
This rule is almost always wrong, and we're having some trouble agreeing
on replacement text. Let's remove the whole paragraph for now, to avoid
confusion.
2021-01-07 11:39:53 -06:00
Benjamin Otte
4761641098
Add critical if widget has a parent during dispose
...
This is a refcounting bug. Be very verbose about it instead of trying to
call a function that releases a reference to the widget without
references.
2021-01-07 11:39:32 -06:00
Michael Catanzaro
afaa275dc8
gtkbuilder: fix recommendations that no longer make sense in GTK 4
...
In GTK 3, it was pretty much always better to use
gtk_builder_new_from_whatever() rather than
gtk_builder_add_from_whatever(). But in GTK 4, this is no longer
generally true. Let's add some context on when you want to use one or
the other.
2021-01-07 11:34:42 -06:00
Michael Catanzaro
c736deb83b
Add section on GtkBuilder API changes to GTK 4 migration guide
...
Thanks to Benjamin for helping with the language.
2021-01-07 11:34:42 -06:00
Emmanuele Bassi
e930a20522
Merge branch 'ebassi/ci-only' into 'master'
...
ci: Specify `only` for other jobs
See merge request GNOME/gtk!3052
2021-01-07 17:17:44 +00:00
Michael Catanzaro
137f32f9ef
Expand event controller API changes section of GTK 4 porting guide
...
There is more to say about changes to GtkEventController.
2021-01-07 10:53:09 -06:00
Emmanuele Bassi
195b98f19a
ci: Only run macOS job on upstream branches
...
Don't run CI on macOS for forks.
2021-01-07 16:14:04 +00:00
Emmanuele Bassi
87e0a28482
ci: Specify only for other jobs
...
Otherwise MRs will only run macOS jobs.
2021-01-07 16:13:59 +00:00
Ignacio Casal Quinteiro
3ca3d7efef
gdkdevice: use g_set_object to set the associated device
2021-01-07 16:13:39 +01:00
Matthias Clasen
d8d8322912
Merge branch 'wip/jimmac/flat-buttons' into 'master'
...
Adwaita: fine tune flat button styling
Closes #3481
See merge request GNOME/gtk!3046
2021-01-07 13:42:42 +00:00
Matthias Clasen
1ea1a70fd2
Merge branch 'wip/jimmac/hc-switch-border' into 'master'
...
HC: switch border color
Closes #3460
See merge request GNOME/gtk!3048
2021-01-07 13:41:40 +00:00
Matthias Clasen
1d5bc2838b
Merge branch 'wip/nacho/tool-api' into 'master'
...
seat: improve api to take into account the tool type
See merge request GNOME/gtk!3047
2021-01-07 13:25:11 +00:00
Ignacio Casal Quinteiro
45ec3fc389
seat: improve api to take into account the tool type
...
Otherwise if we have several tools with the same serial
and hardware id we might match the wrong tool.
2021-01-07 12:50:48 +01:00
Jakub Steiner
3a5eee7dbe
HC: switch border color
...
- lighten inverted HC borders while darkening the regular/light variant
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3460
2021-01-07 12:44:53 +01:00
Jakub Steiner
0cda6f42b8
Adwaita: fine tune flat button styling
...
- enough contrast for hover and active, while noticably different in
normal nad headerbar context (and both light and dark variants).
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3481
2021-01-07 12:12:55 +01:00
Matthias Clasen
0d99ef7cee
Merge branch 'X11-surface' into 'master'
...
x11: fix crash on idle compute size without layout
See merge request GNOME/gtk!3031
2021-01-06 22:13:02 +00:00
Matthias Clasen
7583810c90
Merge branch 'wip/exalm/headerbar' into 'master'
...
headerbar: Prepend start window controls instead of appending
See merge request GNOME/gtk!3044
2021-01-06 22:10:25 +00:00
Jordi Mas
1341bc0b19
Update Catalan translation
2021-01-06 22:42:44 +01:00
Alexander Mikhaylenko
fd073deea9
headerbar: Prepend start window controls instead of appending
...
Make sure they are always in the correct position.
2021-01-06 22:04:55 +05:00
Matthias Clasen
5652ab0a61
Merge branch 'macos-ci' into 'master'
...
Macos ci
See merge request GNOME/gtk!3032
2021-01-06 14:52:11 +00:00
Matthias Clasen
2ff23b08be
Merge branch 'wip/jimmac/headerbar-specialcasing' into 'master'
...
Adwaita: specialcase switches and scales for headerbars
Closes #3504
See merge request GNOME/gtk!3043
2021-01-06 14:40:36 +00:00
Matthias Clasen
0336af06f1
ci: Limit macos runs
...
We are building the full stack here, which is pretty expensive,
so only do it for merge requests and master.
2021-01-06 09:36:54 -05:00
Matthias Clasen
2af9f1ad62
Merge branch 'wip/jimmac/hc-dim-label' into 'master'
...
HC: special case .dim-label
Closes #3507
See merge request GNOME/gtk!3042
2021-01-06 13:04:24 +00:00
Jakub Steiner
e657da6658
Adwaita: specialcase switches and scales for headerbars
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3504
2021-01-06 13:02:21 +01:00
Jakub Steiner
fd00aa98ea
HC: special case .dim-label
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3507
2021-01-06 12:46:35 +01:00
Timm Bäder
de8a8d7bde
Merge branch 'dlech-master-patch-65287' into 'master'
...
doc: fix annotation for GtkCssLocation
See merge request GNOME/gtk!3041
2021-01-06 08:55:57 +00:00
David Lechner
eb6fbf907f
doc: fix annotation for GtkCssLocation
...
GtkCssLocation is a type so it should be prefixed with # rather than @.
2021-01-06 04:32:09 +00:00
Christian Hergert
4035f86b6d
macos: use deprecated NSOnState for older systems
2021-01-05 16:37:30 -08:00
Christian Hergert
855b44f2ed
macos: keep array of pasteboard types
...
To support Sierra, we need to have access to pasteboard types as a
NSString. Constants are provided in later versions of macOS, but we
can emulate that with an array which is initialized on first access.
2021-01-05 16:21:05 -08:00
Christian Hergert
f2e0097cac
gtk: fix brace initialization for bloom filter
...
This was breaking CI for macOS and it is a simple enough change to ensure
that just works for the internal buckets.
2021-01-05 16:21:05 -08:00
Christian Hergert
7c9bc7a204
macos: supply NSPasteboardType when necessary
...
On older macOS systems, we might need to provide our own typedef
for the NSPasteboardType. It is just a NSString pointer anyway.
2021-01-05 13:54:07 -08:00
Christian Hergert
f4f104c9f9
macos: fix typedef on older macOS
...
On older systems, we don't have a typedef for gravity. They are a NSString
pointer and we can provide that manually just fine.
2021-01-05 13:53:22 -08:00
Christian Hergert
28a6f0df05
macos: handle point conversion on older macOS
...
On older systems, the availability of some methods seem to be incorrect
based on Apple documentation. This works around the issue by using
the rect conversion on older systems.
2021-01-05 13:52:11 -08:00
Matthias Clasen
0eab4deab0
Merge branch 'media-caps' into 'master'
...
media: Be more specific in our caps
See merge request GNOME/gtk!3037
2021-01-05 21:34:27 +00:00
Matthias Clasen
6e8e467cc9
Merge branch 'simplify-toolbar' into 'master'
...
3to4: Remove GtkToolbar::toolbar_style
See merge request GNOME/gtk!3040
2021-01-05 19:35:46 +00:00
Matthias Clasen
ca9801f5fb
3to4: Remove GtkToolbar::toolbar_style
...
The property was removed (with the rest of the widget),
so keeping it around in the ui file makes no sense.
Testcase included.
2021-01-05 13:58:58 -05:00
Matthias Clasen
6b6fc1e5d8
Merge branch 'ebassi/migrating-clipboard' into 'master'
...
Ebassi/migrating clipboard
See merge request GNOME/gtk!3039
2021-01-05 18:41:27 +00:00
Emmanuele Bassi
e3641d0568
Merge branch 'dlech-master-patch-06007' into 'master'
...
docs: fix parameter reference in gtk_bitset_contains()
See merge request GNOME/gtk!3035
2021-01-05 18:10:59 +00:00
David Lechner
a5b88a53c2
docs: fix parameter reference in gtk_bitset_contains()
...
This fixes an error in the doc comments where the first parameter was
referred to as @bitset instead of @self.
2021-01-05 11:39:43 -06:00
Emmanuele Bassi
e4d0114e0d
docs: Add migration section for GtkClipboard
...
A simple copy/paste text example, plus directing people towards the
appropriate GType to replace the old convenience API.
2021-01-05 16:51:14 +00:00
Matthias Clasen
f974c5343e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3038
2021-01-05 16:49:53 +00:00
Daniel Șerbănescu
bc39da0619
Updated the Romanian Translation
2021-01-05 17:38:02 +01:00
Emmanuele Bassi
1995b7f34b
docs: Preformat some symbols
2021-01-05 16:19:21 +00:00
Matthias Clasen
36eb7c40d0
gtk-demo: Small a11y fix
...
Label the entry in the assistant demo.
2021-01-05 11:16:10 -05:00
Matthias Clasen
56af472cfc
a11y: Only spew help once
...
Make GTK_A11Y=help only spew once, and avoid a warning
when we do.
2021-01-05 11:15:33 -05:00
Matthias Clasen
d1fcfa58b9
popup: Mention the popover arrow in the docs
...
Suggested by Jonas.
2021-01-05 10:59:59 -05:00
Matthias Clasen
cf23324749
Merge branch 'no-gl-context' into 'master'
...
Disable GL support in gstreamer media backend on Windows
See merge request GNOME/gtk!3034
2021-01-05 15:22:09 +00:00
Matthias Clasen
b79c26b39e
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!3029
2021-01-05 15:20:25 +00:00
Matthias Clasen
532b8c71a8
media: Be more specific in our caps
...
We can only handle 2D textures, so tell gstreamer
about that.
2021-01-05 09:28:04 -05:00
Matthias Clasen
7c5b8911d8
Merge branch 'matthiasc/for-master' into 'master'
...
some docs tweaks
See merge request GNOME/gtk!3036
2021-01-05 14:26:38 +00:00
Matthias Clasen
e141d61593
docs: Cosmetics
2021-01-05 08:37:23 -05:00
Matthias Clasen
9595d440cf
docs: Flesh out Popup layout docs
...
We have nice illustrations for this, lets use them.
2021-01-05 08:37:23 -05:00
Yuri Chornoivan
1063924bd0
Update Ukrainian translation
2021-01-05 08:08:44 +00:00
Timm Bäder
42fedfc870
csstokenizer: Keep a GString for name parsing around
...
We only every parse one of those at a time, so keep a GString around for
it. This way we don't have to create a new GString every time we parse
an identifier. Doesn't spare us the strdup though.
2021-01-05 08:53:13 +01:00
Timm Bäder
24836c0351
csstokenizer: Add separate init functions for token types
...
Using a variadic function is just awkward there. Use different init
functions and use them as appropriate; we already know which one to call
everywhere.
2021-01-05 08:53:13 +01:00
Timm Bäder
21b6c8b5d8
builder: Remove unused typedef
2021-01-05 08:53:13 +01:00
Timm Bäder
41fb6f6a8e
builder: Remove unused function prototype
2021-01-05 08:53:13 +01:00
Timm Bäder
071ea6b559
builderparser: Use GPtrArray for stack
2021-01-05 08:53:11 +01:00
Chun-wei Fan
397a71ca8b
gstreamer media backend: Disable OpenGL on Windows
...
...for at least WGL, since we are not allowed to use wglMakeCurrent(),
which is eventually called by gdk_gl_context_make_current() to share WGL
contexts across different threads, which will cause a crash.
This means, we cannot enable WGL in the gstreamer media backend on
Windows.
2021-01-05 14:34:06 +08:00
Matthias Clasen
40c10f83e2
Merge branch 'matthiasc/gl-media-stream' into 'master'
...
Use GL in the gstreamer media backend
See merge request GNOME/gtk!3027
2021-01-05 00:54:37 +00:00
Matthias Clasen
fb31581bb4
gtk-demo: Use GtkVideo in the fishbowl
...
The demo is called 'Video', so we should actually
use a GtkVideo widget. Doing things this way has
the advantage that we get GL support, which wasn't
working with GtkPicture.
2021-01-04 18:26:29 -05:00
Matthias Clasen
536a67ec96
media: Only force GL if we're using a GL renderer
...
When we are not using a GL renderer, getting GL textures
is no advantage to us, so don't make gstreamer send its
frames as GL memory in this case.
2021-01-04 15:01:19 -05:00
Matthias Clasen
53fe751371
media: Convince gstreamer to deliver GL memory
...
Use a glsinkbin to make gstreamer deliver GL memory.
2021-01-04 15:00:36 -05:00
Benjamin Otte
7901ab857b
media: Add support for OpenGL to GtkGstMediaFile
2021-01-04 15:00:36 -05:00
Matthias Clasen
8f585f7a53
video: Realize the media stream before setting a file
...
This makes it so that we obtain a GL context before
creating the GstSink, so we at least advertise our
ability to handle GL buffer.
Gstreamer still won't send us any.
2021-01-04 15:00:36 -05:00
Matthias Clasen
874b19b27e
Merge branch 'wip/jimmac/popover-separators' into 'master'
...
Adwaita: increase cotrast of popover separators
Closes #3535
See merge request GNOME/gtk!3033
2021-01-04 18:14:00 +00:00
Jakub Steiner
fe7b11b4e9
Adwaita: increase contrast of popover separators
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3535
2021-01-04 17:55:44 +01:00
Yetizone
601dfeeff9
checkbutton: Add activate signal to work with gtk_widget_activate()
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3525
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3550
2021-01-04 17:25:53 +02:00
Matthias Clasen
cf623ce774
Merge branch 'window-geometry-info' into 'master'
...
gtk/window: remove GtkWindowGeometryInfo from public header file
See merge request GNOME/gtk!3028
2021-01-04 13:55:08 +00:00
Aurimas Černius
36b49950e8
Updated Lithuanian translation
2021-01-04 14:10:23 +02:00
Matthias Clasen
77feb51b9c
Pass coretext=enabled to harfbuzz
...
When we use harfbuzz as a subproject on OS X,
we (or rather, pango) need coretext support.
2021-01-03 21:34:04 -05:00
Matthias Clasen
710ef00dfe
Fix the cairo build on OS X
...
Change the subproject to point to a branch that includes
an OS X build fix. Once
https://gitlab.freedesktop.org/cairo/cairo/-/issues/441
is fixed, we should switch back to master.
2021-01-03 21:34:04 -05:00
Matthias Clasen
0c8124828f
ci: Disable pixman tests on MacOS
...
The pixman tests fail to build, and I don't have
the stamina to fix all sub-sub-projects, so just
disable the tests.
2021-01-03 21:34:04 -05:00
Matthias Clasen
0605c3c167
ci: Fix the harfbuzz build on MacOS
...
We need to force c++11 at the toplevel here, since
meson can't deal with per-project compiler choice.
2021-01-03 21:34:04 -05:00
Matthias Clasen
93d795e7c0
printing: Remove cairo header checks
...
cc.has_header doesn't work with subprojects, and all this
check does is to make the build fail, so we can just...
let the build fail instead.
2021-01-03 21:34:04 -05:00
Matthias Clasen
d55f938f7c
printing: cairo-pdf is needed
...
The print backends need cairos pdf support, which is
contingent on zlib, so enable that when using cairo
as a subproject, as we do in ci for MacOS.
2021-01-03 21:34:04 -05:00
Matthias Clasen
45bb4dc80c
ci: Add a macos build
...
Most of this is cribbed from glib.
We don't use COMMON_MESON_FLAGS here, since disabling
-Werror one subproject at a time is too painful for
all the promoted sub-sub-projects. This needs a better
solution in meson.
Since this is a full rebuild of the entire stack, limit
this to master and merge requests.
2021-01-03 21:34:04 -05:00
Rafostar
53af35d256
x11: fix crash on idle compute size without layout
...
On x11 toplevel layout is not created before toplevel
is presented, but GTK tries to update it on idle
which leads to a crash due to accessing property
of undefined object. Treat soon to be created layout
as a layout with default values upon creation (resizable).
2021-01-03 18:02:31 +01:00
Philipp Kiemle
51a6b29e01
Update German translation
2021-01-03 13:41:25 +00:00
Philipp Kiemle
e3835476ba
Update German translation
2021-01-03 13:40:13 +00:00
Timm Bäder
256b094b13
messagedialog: Modernize source file
...
Move vfunc implementations above class_init, remove unneeded prototypes,
properly indent everything and remove trailing whitespace
2021-01-03 11:01:29 +01:00
Timm Bäder
699adb0b10
widget: Refactor gtk_widget_class_set_template()
...
Don't call gbytes_get_data/get_size so often and exit early if the given
bytes is already precompiled.
2021-01-03 11:01:29 +01:00
Timm Bäder
c91b5eaa41
widget: Inline setup_template_child() into only caller
...
This is a pretty short and self-contained function.
2021-01-03 11:01:29 +01:00
Timm Bäder
7e1f20bf4c
icontheme: Make a parameter const
2021-01-03 11:01:29 +01:00
Timm Bäder
f9fe640905
settings: Overallocate property_values
...
Instead of walking the pspecs twice and checking for the owner_type,
just allocate n_pspecs entries. They are the same value right now
anyway, but even if they aren't it doesn't hurt to have a few extra ones
allocated.
2021-01-03 11:01:29 +01:00
Timm Bäder
34ea99006f
settings: Load keyfiles ourselves
...
This does not change anything in the case where the .init file does not
exist. We still hit the disk once. Otherwise, we now only hit it once
instead of twice and avoid a potential race-condition.
2021-01-03 11:01:29 +01:00
Timm Bäder
06cce81a97
widget: Use gtk_widget_get_native() in get_surface_allocation()
2021-01-03 11:01:29 +01:00
Timm Bäder
4a1a7940d5
gtksettings: Remove unused defines
2021-01-03 11:01:29 +01:00
Timm Bäder
1108d00014
render: Inline function into only caller
2021-01-03 11:01:29 +01:00
Timm Bäder
034672e84e
frame: Remove unnecessary function
...
Just call the vfunc directly in the only place we used to call the old
wrapper
2021-01-03 11:01:29 +01:00
Timm Bäder
00c885c93c
gesture: Replace tabs
2021-01-03 11:01:29 +01:00
Timm Bäder
114f0bd8d6
box: Replace tabs with spaces
2021-01-03 11:01:29 +01:00
Timm Bäder
24c67efdfd
scrolledwindow: Use g_clear_handle_id
2021-01-03 11:01:29 +01:00
Timm Bäder
6a3748146d
viewport: Small cleanup
...
No need to check for visibility before calling gtk_widget_measure().
2021-01-03 11:01:29 +01:00
Timm Bäder
92ec754737
widget: Move quark_builder_set_id declaration to other GQuarks
2021-01-03 11:01:29 +01:00
Timm Bäder
d11fbbc478
widget: Re-arrange some more functions
2021-01-03 11:01:29 +01:00
Timm Bäder
f11f0da11c
wiget: Fix whitespace issues
...
Switch from tabs to spaces everywhere consistently and remove all
trailing whitespace.
2021-01-03 11:01:29 +01:00
Timm Bäder
ebdf2989f8
widget: Move a few vfunc implementations above class_init
...
And save us the prototypes at the top of the file this way.
2021-01-03 11:01:29 +01:00
Timm Bäder
bc35c5d494
nevertrigger: Remove unused instance members
2021-01-03 11:01:29 +01:00
Timm Bäder
70a3e5e8ce
shortcutmanager: Use g_list_store_find()
...
We require glib 2.66 these days, so we can unconditionally use
g_list_store_find().
2021-01-03 11:01:29 +01:00
Timm Bäder
74ff61a937
gesturelongpress: Remove a useless cast
...
We already get a GtkGestureLongPress here.
2021-01-03 11:01:29 +01:00
Timm Bäder
280d7e57bd
gesturelongpress: Keep the pspec around
...
So we can use it to notify(), like we do everywhere else.
2021-01-03 11:01:29 +01:00
Timm Bäder
03f5a368ec
label: Remove unused private functions
2021-01-03 11:01:29 +01:00
Timm Bäder
0b15aba82a
label: Remove mnemonics_visible_apply_recursively from private header
...
This is only used in gtklabel.c
2021-01-03 11:01:28 +01:00
Timm Bäder
d8fa9de93a
label: Modernize source file
...
Try to sort toplevel functions to minimize unnecessary function
prototypes at the beginning of the file, get rid of all tabs and
trailing whitespace.
2021-01-03 11:01:28 +01:00
Timm Bäder
afabbc4957
gtk4-demo: Remove unused size group
2021-01-03 11:01:28 +01:00
Timm Bäder
d978ba31d6
glcontext-wayland: Whitespace
2021-01-03 11:01:28 +01:00
Timm Bäder
71efa96ef2
gesturestylus: Only add histroy element if translation succeeded
...
Instead of always doing it and then undoing it if the translation does
not succeed.
2021-01-03 11:01:28 +01:00
Timm Bäder
e336fe2bf8
gesturestylus: Retrieve event and controller widget only once
...
Make it clear that these are not gonna chance while iterating the loop.
2021-01-03 11:01:28 +01:00
Timm Bäder
d7f15c15e9
glcontext-wayland: Avoid heap-alloacting small arrays...
...
every frame.
2021-01-03 11:01:28 +01:00
Timm Bäder
fff570538c
glcontext-wayland: Only allocate configs we use
...
We only use the first one, so don't allocate space for more than that.
2021-01-03 11:01:28 +01:00
Matthias Clasen
38166a67c7
NEWS: Updates
2021-01-02 20:17:19 -05:00
Matthias Clasen
01b94db73d
Merge branch 'matthiasc/for-master' into 'master'
...
video: Tweak the docs
See merge request GNOME/gtk!3026
2021-01-02 19:04:26 +00:00
Matthias Clasen
c804645382
video: Tweak the docs
...
Point out the limitations and use cases of GtkVideo
and mention that GtkPicture can display video just fine.
2021-01-02 12:21:03 -05:00
Matthias Clasen
384081ce0a
Merge branch 'matthiasc/for-master' into 'master'
...
video: Pause on unset too
See merge request GNOME/gtk!3025
2021-01-02 15:49:46 +00:00
Florentina Mușat
afccb86f7e
Update Romanian translation
2021-01-02 11:21:43 +00:00
Matthias Clasen
0ba5631100
video: Pause on unset too
...
When new media stream is set on the GtkVideo
widget and we're autoplaying, pause the old one.
Otherwise, the music keeps playing unexpectedly.
2021-01-02 01:33:48 -05:00
Matthias Clasen
c72589f0ee
Merge branch 'wip/chergert/fix-macos-compute-size' into 'master'
...
macos: fix compute_size and request_layout
Closes #3532
See merge request GNOME/gtk!3023
2021-01-01 23:33:01 +00:00
Matthias Clasen
f2e5775380
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3506 and #3530
See merge request GNOME/gtk!3024
2021-01-01 22:48:11 +00:00
Benjamin Otte
a7164208d3
Merge branch 'video-stop' into 'master'
...
video: Stop playing when appropriate
See merge request GNOME/gtk!3022
2021-01-01 21:54:22 +00:00
Matthias Clasen
20f3d1608d
video: Be consistent about play/pause
...
Always check that the stream is prepared, and the
widget is mapped, before calling gtk_media_stream_play().
2021-01-01 16:25:54 -05:00
Christian Hergert
9320148d71
macos: implement compute_size and request_layout
...
These functions were not implemented when the sizing changes
landed before GTK 4 was released. This fixes an issue with non-
resizeable windows not reacting to layout changes.
Fixes #3532
2021-01-01 13:17:47 -08:00
Christian Hergert
ad617a0e06
macos: avoid setHasShadow unless shadow changes
2021-01-01 13:17:47 -08:00
Christian Hergert
62af8365f6
macos: fix toplevel present function prototype
...
No need to return anything here.
2021-01-01 13:17:47 -08:00
Matthias Clasen
29afe5a688
video: Stop playing when appropriate
...
When the widget gets unrealized or hidden, pause
the mediastream. Otherwise, audio might keep playing
unexpectedly.
2021-01-01 15:17:59 -05:00
Matthias Clasen
2d3885a44a
center layout: Fix handling of expanding center child
...
We were not taking spacing into account when adjusting
the size of an expanding center child, causing it to slip
under the end child at times.
Fixes : #3506
2021-01-01 11:02:57 -05:00
Matthias Clasen
75a297632e
Merge branch 'wip/chergert/fix-macos-window-check' into 'master'
...
macos: ensure GdkMacosWindow in surface discovery
Closes #3533
See merge request GNOME/gtk!3021
2021-01-01 15:39:08 +00:00
Matthias Clasen
572649740e
docs: Flesh out the gtk4-builder-tool man page
...
Add some details about the --3to4 conversion, and
set expectations.
2021-01-01 10:14:01 -05:00
Yuri Chornoivan
b5938faa06
Update Ukrainian translation
2021-01-01 14:50:35 +00:00
Matthias Clasen
a4baac7193
docs: Complete a sentence
...
Fixes : #3530
2021-01-01 09:40:40 -05:00
Matthias Clasen
bdde41e290
Merge branch 'encode-symbolic-debug' into 'master'
...
gtk4-encode-symbolic: Add debug output
See merge request GNOME/gtk!3017
2021-01-01 14:23:08 +00:00
Christian Hergert
d888402bf9
macos: ensure GdkMacosWindow in surface discovery
...
We want to ignore windows that are not related to those controlled
by the GDK backend.
Fixes #3533
2020-12-31 10:55:50 -08:00
Christian Hergert
378bd9fab2
Merge branch 'macos-mojave' into 'master'
...
macos: do not crash in mojave
See merge request GNOME/gtk!3020
2020-12-31 18:13:46 +00:00
Ignacio Casal Quinteiro
4ad5e77907
macos: do not crash in mojave
...
The localizedName property is not available in Mojave
so just ifdef in that case the code out.
2020-12-31 11:35:04 +01:00
David Lechner
4fb70c5e4d
gtk/window: remove GtkWindowGeometryInfo from public header file
...
GtkWindowGeometryInfo is only used by static methods in gtkwindow.c
so it doesn't need to be in the public header file.
2020-12-30 01:32:27 -06:00
Matthias Clasen
d5963ad109
Merge branch 'revert-224c2674' into 'master'
...
Revert "Merge branch 'gtk_egl_wayland' into 'master'"
See merge request GNOME/gtk!3018
2020-12-30 03:34:51 +00:00
Matthias Clasen
b5fe434fea
Revert "Merge branch 'gtk_egl_wayland' into 'master'"
...
This reverts merge request !3011
2020-12-30 03:32:18 +00:00
Matthias Clasen
224c2674ab
Merge branch 'gtk_egl_wayland' into 'master'
...
Expose gdk_wayland_surface_get_wl_egl_window()
See merge request GNOME/gtk!3011
2020-12-30 03:32:05 +00:00
Matthias Clasen
878b34fae3
gtk4-encode-symbolic: Add debug output
...
Add a --debug option that makes this tool produce
some debug output that can be helpful in tracking
down why symbolic svgs are broken.
2020-12-29 21:30:52 -05:00
Matthias Clasen
5fe433418d
Merge branch 'mcatanzaro/#3509' into 'master'
...
message dialog: use title style only if there is secondary text
Closes #3509
See merge request GNOME/gtk!3015
2020-12-29 17:47:01 +00:00
Matthias Clasen
02ba9bc1da
Merge branch 'fix-menu-alignment' into 'master'
...
Fix menu item alignment with submenus
See merge request GNOME/gtk!3016
2020-12-29 17:41:49 +00:00
Michael Catanzaro
2336120010
message dialog: use title style only if there is secondary text
...
If there is no secondary text, then the primary text is just a message,
not a title, and should not use title style.
This partially reverts 1e3ec7c1f9 . The
message dialog nown looks like it used to in GTK 3. However, it's still
styled only using a style class rather than using pango markup, as in
GTK 3.
Fixes #3509
2020-12-29 11:15:14 -06:00
Matthias Clasen
0d54d73a51
Fix menu item alignment with submenus
...
We were not aligning model button labels with nesting
submenus with indicators in their containing menu.
This was visible in the application demo of gtk4-demo.
2020-12-29 12:10:35 -05:00
Timm Bäder
6c09832b9b
Merge branch 'xndcn/fix-shader' into 'master'
...
gl: Fix implicit leaking of shader object
See merge request GNOME/gtk!3013
2020-12-29 16:58:55 +00:00
Matthias Clasen
1758f88492
Merge branch 'ebassi/issue-3522' into 'master'
...
Fix the Vulkan header check for VK_RESULT_RANGE_SIZE
Closes #3522
See merge request GNOME/gtk!3009
2020-12-29 16:36:09 +00:00
xndcn
34ffdc6e3f
gl: Fix implicit leaking of shader object
...
According to OpenGL spec, a shader object will only be flagged
for deletion unless it has been detached; when a program object
is deleted, those shader objects attached to it will be detached
but not deleted unless they have already been flagged for deletion.
So we shall detach a shader object before it is deleted, and delete
it before the program object is deleted best.
2020-12-29 23:50:45 +08:00
Timm Bäder
108933b655
Merge branch 'wip/chergert/volatile-fixes' into 'master'
...
types: fix various use of volatile in type registration
See merge request GNOME/gtk!2865
2020-12-29 07:49:12 +00:00
Vivek Kasireddy
3344bcaf92
gdk/wayland/surface: Expose gdk_wayland_surface_get_wl_egl_window()
...
Some GTK based applications such as Qemu UI create and manage
EGLSurfaces associated with the relevant GdkSurfaces. In order to create
an EGLSurface, there needs to be a way to pass the native window
object to eglCreateWindowSurface(). While running in an X environment,
the native window object can be obtained by calling
gdk_x11_surface_get_xid(). Likewise, the native window object can be
obtained by calling gdk_wayland_surface_get_wl_egl_window() while
running in a Wayland environment. Therefore, this API needs to be
exposed to apps.
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com >
2020-12-28 18:20:04 -08:00
Emmanuele Bassi
f22ec063a1
Fix the Vulkan header check for VK_RESULT_RANGE_SIZE
...
The VK_RESULT_RANGE_SIZE enumeration value was removed in 1.2.140, not
1.2.142.
Fixes : #3522
2020-12-28 18:41:18 +00:00
Benjamin Otte
0fcf01ddd5
Merge branch 'gtkmediafile-pixel-aspect-ratio' into 'master'
...
gtkmediafile: Consider pixel-aspect-ratio for rendering video with the correct aspect ratio
Closes #3516
See merge request GNOME/gtk!3007
2020-12-28 14:54:30 +00:00
Asier Sarasua Garmendia
1119a74ff0
Update Basque translation
2020-12-27 17:56:02 +00:00
Sebastian Dröge
18ea60e235
gtkmediafile: Consider pixel-aspect-ratio for rendering video with the correct aspect ratio
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3516
2020-12-27 19:33:55 +02:00
Matthias Clasen
d752828977
Merge branch 'wip/jtojnar/trivial-fix-pc-vulcan' into 'master'
...
build: Fix vulkan reference in pc file
Closes #3517
See merge request GNOME/gtk!3006
2020-12-27 17:06:52 +00:00
Fran Dieguez
1034271d9a
Update Galician translation
2020-12-27 16:56:56 +00:00
Fran Dieguez
f013d3b5d6
Update Galician translation
2020-12-27 16:51:38 +00:00
Benjamin Otte
5f41d26abc
Merge branch 'gtkgstsink-unmap-only-when-done' into 'master'
...
gtkmediafile: Only unmap the GstVideoFrame in the GBytes destroy notify
See merge request GNOME/gtk!3003
2020-12-27 06:17:36 +00:00
Jan Tojnar
7d5826ccf7
build: Fix vulkan reference in pc file
...
A mistake in string concatenation caused the vulcan dependency to be omitted.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:42:29 +01:00
Jan Tojnar
2c9f2325e2
build: Use Meson’s module for building .pc files
...
Using the module will prevent trivial bugs caused by incorrect string concatenation.
This is just a literal translation. In the future we might rely on Meson auto-detecting fields from library declaration.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:27:59 +01:00
Matthias Clasen
daded2bc86
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!3004
2020-12-27 05:21:26 +00:00
Matthias Clasen
bc7619abaf
Merge branch 'gtkclip' into 'master'
...
gtk: remove GtkClipboard leftovers
See merge request GNOME/gtk!2991
2020-12-27 04:32:26 +00:00
Matthias Clasen
459d6e1349
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/gesturestylus: Convert motion history from surface coordinates
Closes #3491
See merge request GNOME/gtk!2999
2020-12-27 04:30:38 +00:00
Sebastian Dröge
6e108d310a
gtkmediafile: Only unmap the GstVideoFrame in the GBytes destroy notify
...
The memory pointed to by GstVideoFrame::plane_data becomes invalid after
unmapping causing the GBytes to point at some random memory if the
unmapping is not deferred until its destroy notify.
When the GStreamer buffer is backed by normal system memory this is not
a problem but if it is backed by e.g. an OpenGL texture, dmabuf or some
other hardware-specific memory this will otherwise cause interesting
problems.
2020-12-26 14:26:23 +02:00
Benjamin Otte
9c84fa127a
Merge branch 'unused-static-inline' into 'master'
...
Remove unused static inline function
See merge request GNOME/gtk!3002
2020-12-25 18:05:11 +00:00
Emmanuel Gil Peyrot
84c6708366
Remove unused static inline function
...
This was causing a warning on AArch64 since __LITTLE_ENDIAN__ and
__BIG_ENDIAN__ weren’t set, but the functions were actually completely
unused.
2020-12-25 16:16:43 +01:00
Benjamin Otte
f7e3016949
Merge branch 'gles-gears' into 'master'
...
Fix gtk4-demo’s gears demo on OpenGL ES
See merge request GNOME/gtk!3000
2020-12-25 01:36:34 +00:00
Emmanuel Gil Peyrot
dd1110ca5c
Fix some of gtk4-demo’s transitions example on OpenGL ES
...
Same issue as the previous commit, int+float is error, and pow() only
works on floats.
2020-12-25 01:36:21 +01:00
Emmanuel Gil Peyrot
28c4adac24
Fix gtk4-demo’s gears demo on OpenGL ES
...
Here is a command to reproduce this testcase:
GDK_DEBUG=gl-gles gtk4-demo --run gears
Without this patch, Mesa throws this compile error:
0:130(13): error: no matching function for call to `mod(error, float)'; candidates are:
This is caused by `u_rotation - 90` being of type error since
`u_rotation` is a float and it’s illegal to subtract it with an integer.
2020-12-25 01:21:08 +01:00
Carlos Garnacho
cf20cfd31e
gtk/gesturestylus: Convert motion history from surface coordinates
...
Motion history coordinates are based on GdkSurface coordinates. Transform
the coordinates from the GtkNative they are received on, accounting for the
possible transforms (e.g. due to window borders and shadows).
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3491
2020-12-24 19:59:51 +01:00
Matthias Clasen
7e579bb59a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2997
2020-12-24 07:13:22 +00:00
Benjamin Otte
96e1b85c2c
gdkarray: Add a "stolen" boolean to splice()
...
If set to TRUE, does not call the free func for the removed items.
This can be used to move items between arrays without having to do the
refcounting dance.
2020-12-24 06:38:45 +01:00
Benjamin Otte
71e616d17e
listview: Use the correct scroll policy
...
Use the horizontal policy for horizontal decisions, not the vertical
one.
This broke in 0011ce949c .
2020-12-24 06:38:45 +01:00
Benjamin Otte
f85d939e5e
docs: Put render nodes in their own sections
2020-12-24 06:38:45 +01:00
Benjamin Otte
8d014d6cb0
roundedbox: Remove unused API
2020-12-24 06:38:45 +01:00
Benjamin Otte
f7f8990f7a
picture: Fix copy/paste error in docs
2020-12-24 06:38:45 +01:00
Benjamin Otte
d6f288427a
video: When autoplaying, start playing once the video is prepared
...
This fixe video sources with longer loading times not automatically
playing.
2020-12-24 06:38:45 +01:00
Benjamin Otte
2a8f371643
gtk-demo: Don't put the search bar in the scroll area
...
1. That's a bad idea UI wise as you can't see the search after you
scrolled.
2. That's a bad idea code-wise because Listviews need to be put into
a ScrolledWindow or they won't scroll.
2020-12-24 06:38:45 +01:00
Benjamin Otte
dee863dbb2
rendernode: Bail if matrix is invalid
...
Invalid matrices are okay in GSK (and GL), but not in Cairo.
Testcase included.
2020-12-24 06:38:45 +01:00
A S Alam
7d6877ec80
Update Punjabi translation
2020-12-23 19:48:28 +00:00
Danial Behzadi
f426d23690
Update Persian translation
2020-12-23 15:53:07 +00:00
Matthias Clasen
6bd0dc3e78
colorbutton: Correct the css docs
...
Mention the wrapper colorbutton node.
2020-12-23 09:03:07 -05:00
Matthias Clasen
4f0c920a8e
fontbutton: Correct the css docs
...
Mention the wrapper fontbutton node.
2020-12-23 08:59:58 -05:00
Matthias Clasen
b0b793dd94
menubutton: Correct the css docs
...
We are using menubutton instead of button.popup now.
2020-12-23 08:56:18 -05:00
Matthias Clasen
efbb649eee
modelbutton: Center titles
...
The centering of titles was broken in b5b81dea7f .
Make it mostly work again by adding an empty end indicator.
Related: #3405
2020-12-23 00:51:51 -05:00
Matthias Clasen
e128a77eed
Merge branch 'matthiasc/for-master' into 'master'
...
window: Release application in destroy
See merge request GNOME/gtk!2994
2020-12-23 03:01:55 +00:00
Matthias Clasen
5cd2ee927a
window: Release application in destroy
...
We used to do this; it was lost in some life-cycle
reshuffling.
2020-12-22 20:34:13 -05:00
Marc-André Lureau
90dfb5e138
gtk: remove GtkClipboard leftovers
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com >
2020-12-22 16:39:54 +04:00
Matthias Clasen
e854b90293
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2990
2020-12-22 04:53:31 +00:00
Matthias Clasen
6d042d9e61
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2988
2020-12-22 02:29:03 +00:00
Matthias Clasen
4310f24a4e
Fix warnings with Vulkan < 162
...
Tiring to watch the Vulkan people stumble through
ABI and API compat, but what can you do.
2020-12-21 20:00:16 -05:00
Matthias Clasen
aebf8e3c29
Merge branch 'mcatanzaro/fix-gtk-builder-tool' into 'master'
...
Fix buffer overruns in 'gtk-builder-tool simplify'
See merge request GNOME/gtk!2987
2020-12-21 22:49:42 +00:00
Matthias Clasen
fcd449f0d4
modelbutton: Remove an unused field
...
We're not using the centered field anymore.
2020-12-21 17:45:01 -05:00
Michael Catanzaro
ab1b117d91
Fix buffer overruns in 'gtk-builder-tool simplify'
...
Oops, here we allocate only one byte for each pointer we want to store.
We need to multiply by the size of a pointer.
2020-12-21 15:39:34 -06:00
Emmanuele Bassi
1253296387
Merge branch 'fix-printbackends' into 'master'
...
Fix the value for the print-backends setting
Closes #3486
See merge request GNOME/gtk!2986
2020-12-21 20:04:26 +00:00
Matthias Clasen
466484176f
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2983
2020-12-21 19:22:38 +00:00
Matthias Clasen
20289ad8e1
Fix the value for the print-backends setting
...
This was broken in the meson conversion, causing
us to default to "" instead of the built print
backends.
Fixes : #3486
2020-12-21 14:10:03 -05:00
Matthias Clasen
0abb8c6862
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2984
2020-12-21 19:00:10 +00:00
Matthias Clasen
147386189f
inspector: Show glyphs as in node files
...
Reuse the glyph serialization code from gsk to
show glyphs in the same way here.
2020-12-21 13:11:46 -05:00
Matthias Clasen
9cec9e4ce2
gsk: Export the glyph serialization privately
...
We want to use the same serialization in the inspector,
so export this function.
2020-12-21 13:11:08 -05:00
Matthias Clasen
26119af7a6
gsk: Improve glyph serialization
...
The special case for ASCII glyphs is unfortunately not
working very well, because of an oversight in pango:
When I added subpixel positioning, I made pango_shape()
default to not rounding, and make PangoLayout call
pango_shape_with_flags() and pass the rounding information
down. The upshot is that we need to use the _with_flags
variant here and tell it to round position, so it matches
what the text node contains.
2020-12-21 13:08:34 -05:00
Timm Bäder
478d1f71e3
Merge branch 'fix-node-glyphs' into 'master'
...
gsk: Fix serialization of glyphs
Closes #3496
See merge request GNOME/gtk!2982
2020-12-21 17:16:38 +00:00
Emmanuele Bassi
b1d952b8a2
docs: Add examples for GtkDropTarget
...
Like we did for GtkDragSource.
2020-12-21 17:11:42 +00:00
Emmanuele Bassi
b9bcdbbfdc
docs: Add examples of GtkDragSource use
...
The description is a bit terse; we should help out application
developers some more.
2020-12-21 17:03:59 +00:00
Emmanuele Bassi
6c31ed53f4
docs: Fix typo and whitespace
2020-12-21 17:03:42 +00:00
Matthias Clasen
aa95ae774f
gsk: Fix serialization of glyphs
...
We were forgetting to put a space between two numbers
in some cases, confusing the parser.
Test included.
Fixes : #3496
2020-12-21 10:49:56 -05:00
Emmanuele Bassi
65adfd9243
Merge branch 'box_docs' into 'master'
...
box: improve documentation
Closes #3499
See merge request GNOME/gtk!2981
2020-12-21 15:40:07 +00:00
Yetizone
c4a8c0893b
box: improve documentation
...
Rephrase a function parameter description and remove "." from all function parameters descriptions
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3499
2020-12-21 17:26:23 +02:00
Timm Bäder
e90f5e8a20
gskpango: Don't copy fg color
...
No need to do that here, we copy it in to the individual render nodes
anyway.
2020-12-21 15:23:25 +01:00
Timm Bäder
526c76181e
gl renderer: Check for pointer equality in rounded_rect_equal
2020-12-21 15:22:08 +01:00
Timm Bäder
cf352374ae
gskpango: Correct a comment
...
Not all other draw calls will use cairo.
2020-12-21 13:23:28 +01:00
Timm Bäder
98b99201b0
gskpango: Remove bounds rect
...
We only need this to render shapes and trapezoids, i.e. only when
falling back to cairo. Remove code to measure the layout and convert the
ink_rect to a graphene_rect_t from gtk_snapshot_append_layout() and do
it when drawing shapes and trapezoids instead.
2020-12-21 12:56:38 +01:00
Timm Bäder
bce4d669ee
gskpango: Fix a potential cairo_t leak
...
The previous early return did not cairo_destroy() it.
2020-12-21 12:49:06 +01:00
Timm Bäder
e7a326e230
label: Refactor get_layout_location()
...
Rename a few local variables to be clearer about whether they belong to
the widget or to the layout.
Remove a workaround for an old bug that is no longer valid. We don't
underallocate the layout anymore. Aways center vertically, with respect
to the yalign.
2020-12-21 12:44:01 +01:00
Timm Bäder
9eaeaa8452
label: Refactor snapshot()
...
Use two early-out style if statements to reduce indentation in this
entire function.
2020-12-21 12:32:32 +01:00
Timm Bäder
2031c5bf90
textlayout: Remove dead offset_y code
2020-12-21 10:26:03 +01:00
Timm Bäder
9fefa7b44c
rendernode: Different uniformity in border nodes
...
Means they are different and a diff is impossible.
2020-12-21 10:26:03 +01:00
Timm Bäder
a2a70c3b65
rendernode: Sort diff() requirements by complexity
2020-12-21 10:26:03 +01:00
Timm Bäder
0b4ed8d791
renderborder: Avoid 0 width outline color nodes
2020-12-21 10:26:03 +01:00
Timm Bäder
c34f98931e
layoutoverlay: Avoid adding transparent color nodes
...
We have a region for the border here, but the color is defined as
transparent black because we don't want to render anything for it.
This way, the generated .node file for the listbox demo in gtk4-demo
with enabled layout borders is 3.5MB instead of 3.8MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
2feac2772f
layoutoverlay: Avoid adding 0 sized color nodes
...
This way, the output node file of the listbox demo in gtk4-demo with
enabled layout borders is only 3.8MB instead of 12MB.
2020-12-21 10:26:03 +01:00
Timm Bäder
fdda4e4e99
GskTransform: Add nullable annotations to _equals()
...
Both can be NULL here.
2020-12-21 10:26:03 +01:00
Timm Bäder
e1cf0cff26
gl renderer: Proper state tracking for color matrix ops
2020-12-21 10:26:03 +01:00
Timm Bäder
634fa772c9
gl renderer: Add missing debug output for repeat ops
2020-12-21 10:26:03 +01:00
Timm Bäder
4b3bbe0ecd
gl renderer: Create shader-global uniform ops on draw()
...
This way we can render the first frame of tests/testoutsetshadowdrawing
in 153 ops instead of 183.
And the first frame of gtk4-demo in 260 instead of 300.
2020-12-21 10:26:03 +01:00
Timm Bäder
cde43541d0
gl renderer: Unify new clip/viewport rects in blur_texture()
2020-12-21 10:26:03 +01:00
Timm Bäder
186287ecfb
GskTransform: Fix identity transform class name
2020-12-21 10:26:02 +01:00
Timm Bäder
bd5d1615ac
GskTransform: Avoid a ref+unref pair
...
If gsk_transform_is_identity() returned FALSE for the next transform,
the previous code did a ref + unref pair, even though it was unneeded.
2020-12-21 10:26:02 +01:00
Timm Bäder
21299cc7e4
icontheme: Make some constant values const
2020-12-21 10:26:02 +01:00
Timm Bäder
e747ea7dfd
pixbufutils: Only convert icon size to string once
2020-12-21 10:26:02 +01:00
Timm Bäder
810cd7881e
icontheme: Make icon_paintable_ensure_texture() return an unowned value
...
It's private, has only one caller and that one doesn't need the extra
ref.
2020-12-21 10:26:02 +01:00
Timm Bäder
a8213d7f45
gl renderer: Avoid setting modelview to identical values
...
The previous comment here was incorrect. We can save the op itself, we
just can't save us the entry in the modelview stack.
2020-12-21 10:26:02 +01:00
Timm Bäder
e6f6d1e478
main: Add & use gdk_event_dup_axes()
...
The way this code is written trips up scan-build. Add
gdk_event_dup_axes() and use it in gtkmain.c.
2020-12-21 10:26:02 +01:00
Rafael Fontenelle
933d241bba
Update Brazilian Portuguese translation
2020-12-21 07:02:13 +00:00
Matthias Clasen
7249c3a09b
Merge branch 'ebassi/issue-3495' into 'master'
...
Use full path when calling gtk4-update-icon-cache
Closes #3495
See merge request GNOME/gtk!2979
2020-12-20 22:40:48 +00:00
Emmanuele Bassi
d13f8ac3a9
Call the newly installed gtk4-update-icon-cache
...
Otherwise we rely on whatever it's inside the PATH.
2020-12-20 16:33:41 +00:00
Emmanuele Bassi
fa35e3b874
Pass the bindir to the post-install script
2020-12-20 16:33:25 +00:00
Rafael Fontenelle
853883c6e5
Update Brazilian Portuguese translation
2020-12-20 14:06:52 +00:00
sicklylife
b467279c7d
Update Japanese translation
2020-12-20 08:03:00 +00:00
sicklylife
c6a5ac1d16
Update Japanese translation
2020-12-20 07:58:09 +00:00
A S Alam
e41288de4f
Update Punjabi translation
2020-12-20 06:14:42 +00:00
Jordi Mas i Hernandez
b886988a54
Update Catalan translation
2020-12-19 18:29:08 +00:00
Matthias Clasen
bb8a459fe2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2978
2020-12-19 17:20:39 +00:00
Matthias Clasen
d5143a1bf0
Revert "gl renderer: Render too big textures to the clipped area"
...
This reverts commit 7f6608cbed .
2020-12-19 11:43:56 -05:00
Matthias Clasen
12611fa142
Revert "gl renderer: Take a out graphene_rect in blur_node()"
...
This reverts commit 7eece7e769 .
2020-12-19 11:43:43 -05:00
Matthias Clasen
3e319b409b
Merge branch 'ebassi/issue-3492' into 'master'
...
3to4: Remove GtkCheckButton:draw-indicator
Closes #3492
See merge request GNOME/gtk!2976
2020-12-19 16:41:14 +00:00
Emmanuele Bassi
f2b16836c2
3to4: Add test for GtkCheckButton:draw-indicator removal
2020-12-19 15:52:22 +00:00
Emmanuele Bassi
14bf45a0d5
3to4: Remove GtkCheckButton:draw-indicator
...
The property was removed from the widget, so we need to remove it from
UI files too.
Fixes : #3492
2020-12-18 23:14:24 +00:00
Timm Bäder
0c6a6b3370
Merge branch 'doc_backticks' into 'master'
...
docs: backtick fixes
See merge request GNOME/gtk!2975
2020-12-18 15:57:30 +00:00
wisp3rwind
9521f609d8
docs: backtick fixes
...
- in the gettext() examples, at least the _() triggers italics
- add missing closing backtick
2020-12-18 16:31:41 +01:00
Matthias Clasen
7533369695
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2973
2020-12-18 05:06:35 +00:00
Matthias Clasen
f31765d5dd
Merge branch 'ebassi/mnemonic-label-remove' into 'master'
...
a11y: Fix removing mnemonic widgets
See merge request GNOME/gtk!2970
2020-12-18 00:00:48 +00:00
Matthias Clasen
d33062795c
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2971
2020-12-17 23:59:41 +00:00
Emmanuele Bassi
2da8d9b0ac
Do not build gdk-pixbuf's man page
...
When using it as a sub-project. We don't really need them.
2020-12-17 20:50:16 +00:00
Matthias Clasen
3f56e8191f
Merge branch 'shortcuts' into 'master'
...
docs: Add separation between kinds of shortcuts in Keyboard input
See merge request GNOME/gtk!2964
2020-12-17 19:43:38 +00:00
Chris Mayo
bf4c3dc2c5
docs: Fix list of kinds of shortcuts in Keyboard input
...
Formatting in HTML was mangled.
2020-12-17 19:18:10 +00:00
Emmanuele Bassi
a5365ec8cb
docs: Add missing GTK types
...
If we don't specify the get_type() function, gtk-doc will not collect
properties and signals, and will use a different URL for the page.
2020-12-17 18:30:19 +00:00
Emmanuele Bassi
ec94ec0286
Merge branch 'ebassi/password-entry-notify' into 'master'
...
Notify properties on deletion in PasswordEntryBuffer
Closes #3484
See merge request GNOME/gtk!2969
2020-12-17 15:51:04 +00:00
Emmanuele Bassi
af0973c847
a11y: Fix removing mnemonic widgets
...
We must not use the variadic arguments version with GList, as it expects
a pointer to a GtkAccessible.
2020-12-17 15:49:00 +00:00
Emmanuele Bassi
e71f6b0bc0
docs: Note the caveat on GtkEditable signals with delegates
...
We cannot bubble up ::insert-text and ::delete-text signals from the
delegate to the wrapper editable without causing an infinite recursion,
due to how the signals are designed; ideally, we would have decoupled
signal emission from virtual functions *before* releasing GTK4, but now
that we have, we can't break the contract.
2020-12-17 15:13:43 +00:00
Emmanuele Bassi
1738724e4a
Notify properties on deletion in PasswordEntryBuffer
...
The GtkEntryBufferClass.deleted_text() behaviour changed between GTK3
and GTK4, which means any subclass of GtkEntryBuffer is now responsible
for emitting the "notify" signal for the "text" and "length" properties.
Without this, the GtkText delegate widget used by GtkPasswordEntry would
not be able to communicate changes in the contents of its buffer.
Fixes : #3484
2020-12-17 15:01:35 +00:00
Emmanuele Bassi
e9e09be37e
Merge branch 'issue-3483' into 'master'
...
Fix URLs for the download.gnome.org locations
Closes #3483
See merge request GNOME/gtk!2968
2020-12-17 13:47:01 +00:00
Matthias Clasen
8a923e02a1
Merge branch 'wip/jimmac/flat-button-tweaks' into 'master'
...
Adwaita: flat button adjustments
See merge request GNOME/gtk!2967
2020-12-17 12:52:22 +00:00
Emmanuele Bassi
4f12e2f711
Fix URLs for the download.gnome.org locations
...
Use a trailing slash, otherwise we end up on an out of date mirror.
Fixes : #3483
2020-12-17 12:46:12 +00:00
Jakub Steiner
addcf57b4d
Adwaita: flat button adjustments
...
- normally lighter (on bg_color)
- darker for headerbar
- undecorated checked buttons were never style properly (even gtk3)
see page2 volume buttons
Finetunes https://gitlab.gnome.org/GNOME/gtk/-/issues/3427
2020-12-17 12:20:29 +01:00
Matthias Clasen
db08bccb11
Merge branch 'cursor-aspect-ratio' into 'master'
...
Cursor aspect ratio fixes for gtk 4
Closes #3441
See merge request GNOME/gtk!2966
2020-12-16 23:40:26 +00:00
Sebastian Keller
02f0681344
settings: Change gtk-cursor-aspect-ratio from float to double
...
Float properties can not be read from keyfiles. This was causing changes
to this property in settings.ini to be ignored. Fix this by changing it
to a double.
Technically this change could be considered an API break, but there are
no users of this property as float yet and it is early enough to expect
there to never be any.
Also document this change in the 3 to 4 migration guide since in gtk 3
this setting will be kept a float.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3441
2020-12-16 22:35:36 +01:00
Emmanuele Bassi
62dbadd536
Merge branch 'fix-macos-compilation' into 'master'
...
macos: fix typo that breaks compilation
See merge request GNOME/gtk!2962
2020-12-16 20:18:27 +00:00
Matthias Clasen
0588db8a69
Merge branch 'wip/carlosg/for-master' into 'master'
...
gdk/x11: Transform XI_Motion based scroll into discrete
Closes #3459
See merge request GNOME/gtk!2959
2020-12-16 19:56:16 +00:00
Emmanuele Bassi
58b1a13453
Merge branch 'ricotz/for-master' into 'master'
...
gdk: Use correct parameter name to fix g-ir-scanner warning
See merge request GNOME/gtk!2963
2020-12-16 19:46:51 +00:00
Rico Tzschichholz
df70dbbae4
gdk: Use correct parameter name to fix g-ir-scanner warning
...
../gdk/gdktoplevellayout.c:217: Warning: Gdk: gdk_toplevel_layout_get_maximized:
unknown parameter 'maximized' in documentation comment, should be 'maximize'
2020-12-16 20:19:05 +01:00
Tom Schoonjans
81c55b06d2
macos: fix typo that breaks compilation
2020-12-16 19:16:19 +00:00
Matthias Clasen
591c2f0595
4.0
2020-12-16 12:12:58 -05:00
Matthias Clasen
9c5a42be0d
Update expected test results
...
We have one test that expected 3.99 to show up in an error message.
2020-12-16 12:12:58 -05:00
Matthias Clasen
45b7fa15e5
Merge branch 'ebassi/docs-for-master' into 'master'
...
Ebassi/docs for master
See merge request GNOME/gtk!2960
2020-12-16 16:41:44 +00:00
Emmanuele Bassi
e3de92f1ea
docs: Fix annotation for GtkSearchEntry::activate
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
2ffa2be64e
doc: Document missing GtkNotebook types
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
387078b40c
docs: Document GtkNativeDialogClass
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
5203bf0b83
docs: Document GtkTreeViewColumn::clicked
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
fb93baeae4
docs: Add missing description for GtkWidget::move-focus
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
9fa4c2f5b8
docs: Ignore gtkspinbuttonprivate.h
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
cc9528eaec
docs: Add missing documentation to GtkStatusbar
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
73dda96711
docs: Add missing stanzas for gtk_test_accessible API
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
d711acc954
docs: Ignore gtksorterprivate.h
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
ab59c47880
docs: Add missing documentation to GtkPopover
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
e4b7847904
docs: Fix documentation of GtkGestureStylus
...
Document all the signals, and fix the syntax for boolean values.
2020-12-16 16:29:01 +00:00
Emmanuele Bassi
308115ebae
docs: Add gtk-doc stanza for GtkExpander::activate
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
1cb72536ea
docs: Fix syntax of GtkEntry::activate signal
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
f24429e84a
docs: Remove private symbols
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
fc4402b456
docs: Ignore gtkpasswordentryprivate.h
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
077aec5d32
docs: Add missing documentation for GtkTextCharPredicate
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
548949214c
docs: Add missing documentation GtkNative
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
2aec47f56f
docs: Add missing documentation for GtkCellRenderer
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
344eb21bee
docs: Complete symbol coverage for GSK
...
100% symbol docs coverage.
241 symbols documented.
0 symbols incomplete.
0 not documented.
2020-12-16 16:29:00 +00:00
Emmanuele Bassi
4fb55b3270
docs: Complete symbol coverage for GDK
...
100% symbol docs coverage.
833 symbols documented.
0 symbols incomplete.
0 not documented.
What's left are just type system macros and windowing system opaque
structures.
2020-12-16 16:28:58 +00:00
Matthias Clasen
75764c284d
Merge branch 'wip/toplevel-layout-intent' into 'master'
...
Fix toplevel layout state communication
Closes #3466
See merge request GNOME/gtk!2958
2020-12-16 16:02:00 +00:00
Carlos Garnacho
c95a32def8
gdk/x11: Transform XI_Motion based scroll into discrete
...
Depending on the input driver, we will get XI_Motion based scroll
events for regular mouse wheels. These are intended to be handled
as discrete scroll, so detect smooth scroll events that move by
exactly 1.0 in either direction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3459
2020-12-16 14:26:44 +01:00
Jonas Ådahl
142f7862ed
gdk/toplevellayout: Change API to be about intent, not full state
...
When being fullscreen, and wanting to unfullscreen but not caring about
whether to go unmaximized or maximized (as this information is lost), if
the GdkToplevelLayout represents the full intended state, we won't be
able to do the right thing.
To avoid this issue, make the GdkToplevelLayout API intend based, where
if one e.g. doesn't call gdk_toplevel_set_maximized() with anything, the
backend will not attempt to change the maximized state.
This means we can also remove the old 'initially_maximized' and
'initially_fullscreen' fields from the private GtkWindow struct, as we
only deal with intents now.
2020-12-16 14:16:08 +01:00
Jonas Ådahl
b6412adc32
gtk/window: Check widget mappdness and not surface mappedness
...
When deciding whether to call gdk_toplevel_present(), check the
mappedness of GtkWidget instead of the mapped-ness of GdkSurface, as the
latter is mapped asynchronously, while the former is direct state of the
GtkWindow itself.
This fixes an issue where calling e.g. gtk_window_maximize() shortly
after showing it didn't take effect, as hadn't been mapped yet. While
maximizing after showing is racy, and will likely glitch from time to
time, the correct thing to do is still to maximize and handle whatever
state the compositor configured the window to be in.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3466
2020-12-16 11:56:41 +01:00
Timm Bäder
7eece7e769
gl renderer: Take a out graphene_rect in blur_node()
2020-12-16 09:13:12 +01:00
Timm Bäder
7f6608cbed
gl renderer: Render too big textures to the clipped area
2020-12-16 08:26:46 +01:00
Timm Bäder
f816a8fb82
gl renderer: Unify viewport setting in add_offscreen_ops()
...
We use the same rect here a few times.
2020-12-16 08:26:46 +01:00
Timm Bäder
3c2484142d
vulkancontext: Remove usage of VK_ERROR_INCOMPATIBLE_VERSION_KHR
...
According to
https://www.khronos.org/registry/vulkan/specs/1.0-wsi_extensions/html/chap46.html
this has been removed. It also breaks the build on my system
2020-12-16 08:26:46 +01:00
Matthias Clasen
2192bb3dde
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2957
2020-12-15 20:33:01 +00:00
Matthias Clasen
e1df9a043f
Add a doc comment for GskConicGradientNode
2020-12-15 14:18:26 -05:00
Matthias Clasen
338d3ffa13
Add a doc comment for gdk_surface_request_layout
2020-12-15 14:14:49 -05:00
Emmanuele Bassi
6039a36183
Merge branch 'ebassi/for-master' into 'master'
...
Clean up the build system
See merge request GNOME/gtk!2955
2020-12-15 16:54:59 +00:00
Matthias Clasen
c551f693c2
Merge branch 'matthiasc/for-master' into 'master'
...
Update the node format docs
See merge request GNOME/gtk!2956
2020-12-15 16:23:15 +00:00
Emmanuele Bassi
5d2278a5ca
docs: Add public symbols to the GTK reference
2020-12-15 16:21:20 +00:00
Emmanuele Bassi
ea5e186bb8
Hide GtkTextAttributes functions
...
The type is private, so making functions operating on it public is
pointless.
2020-12-15 16:20:21 +00:00
Emmanuele Bassi
69b181f263
Remove boxed type for GtkCrossingData
...
The GtkCrossingData type is completely private, so there's no point in
having a boxed type for it.
2020-12-15 15:55:15 +00:00
Emmanuele Bassi
3132b10bc0
docs: Add more private headers
2020-12-15 15:55:06 +00:00
Matthias Clasen
7335e166b7
Update the node format docs
...
Update this document to mention all the render nodes we
have, and the default values for their properties.
2020-12-15 10:30:18 -05:00
Emmanuele Bassi
91bba794a6
docs: Add missing symbols to the GTK reference
2020-12-15 14:30:32 +00:00
Emmanuele Bassi
a6bd0c7eed
Remove stray mentions of GdkConfigureEvent
...
The event was removed, but some traces of it linger.
2020-12-15 13:58:52 +00:00
Emmanuele Bassi
ff351721b2
docs: Add missing symbols to the GDK reference
2020-12-15 13:47:40 +00:00
Emmanuele Bassi
538aa6c200
Move private GdkX11 symbols out of a public header
...
This avoids private symbols showing up in the introspection data, as
well as in the undocumented symbols list when generating the GDK API
reference.
2020-12-15 13:46:50 +00:00
Emmanuele Bassi
f546e03d31
docs: Add missing symbols to the GSK reference
2020-12-15 13:35:19 +00:00
Emmanuele Bassi
bdbea0d037
docs: Add more ignored header for GSK
2020-12-15 13:31:02 +00:00
Emmanuele Bassi
474b4ac1af
build: Use Meson support for dylib versions
...
Do not hand-code it inside GTK's meson.build.
2020-12-15 12:47:05 +00:00
Emmanuele Bassi
99e0929d6c
build: Use a consistent style for Meson files
2020-12-15 12:46:59 +00:00
Emmanuele Bassi
e75e44bdcc
build: Remove duplicate definition
...
The `GTK_COMPILATION` symbol is defined in gir_args.
2020-12-15 11:47:32 +00:00
Emmanuele Bassi
7975bbfcaa
build: Remove linker flags from static libraries
...
We only need hardening linker flags on the libgtk shared library;
internal static libraries don't really need them.
2020-12-15 11:36:20 +00:00
Emmanuele Bassi
11bca98a29
build: Remove unused variable
...
We don't need a `gsk_source` variable after all.
2020-12-15 11:35:27 +00:00
Emmanuele Bassi
618186723a
build: Remove unused backend_immodules variable
...
We don't have input method modules any more.
2020-12-15 11:20:19 +00:00
Emmanuele Bassi
a5986f0dcd
build: Use get_supported_link_arguments()
...
Instead of hand-coding it ourselves, let Meson deal with linker
arguments discovery.
2020-12-15 11:19:39 +00:00
Daniel Mustieles
c162d7148f
Updated Spanish translation
2020-12-15 10:28:49 +01:00
Matthias Clasen
7e1a210ae0
Merge branch 'ebassi/for-master' into 'master'
...
docs: Add note for the removal of GtkFileChooserButton
See merge request GNOME/gtk!2954
2020-12-14 20:37:34 +00:00
Jordi Mas
bf5e3efd54
Update Catalan translation
2020-12-14 18:39:00 +01:00
Emmanuele Bassi
08d52bee14
docs: Add note for the removal of GtkFileChooserButton
...
Point developers in the direction of GtkButton and GtkFileChooserNative.
2020-12-14 16:55:15 +00:00
Emmanuele Bassi
a6e9a9b644
Merge branch 'pixbuf-from-surface-leak' into 'master'
...
gdkpixbuf-drawable: Free the pixbuf on Cairo error
See merge request GNOME/gtk!2951
2020-12-14 15:12:56 +00:00
Adrien Plazas
dc96542742
gdkpixbuf-drawable: Free the pixbuf on Cairo error
...
This avoids leaking the pixbuf.
2020-12-14 15:07:41 +01:00
Matthias Clasen
e2afb59a0b
Merge branch 'matthiasc/for-master' into 'master'
...
Avoid adding // to resource paths
Closes #3469
See merge request GNOME/gtk!2947
2020-12-14 13:14:32 +00:00
Jakub Steiner
daa5d5aead
Merge branch 'dropdown-searchbar' into 'master'
...
dropdown: Improve search bar styling
See merge request GNOME/gtk!2948
2020-12-14 09:39:38 +00:00
Jakub Steiner
fd0a03cf78
Merge branch 'emoji-searchbar' into 'master'
...
Adwaita: Improve emoji picker styling
See merge request GNOME/gtk!2949
2020-12-14 09:38:45 +00:00
nana-4
34d99ea1d0
Adwaita: Improve emoji picker styling
...
- Add borders around the main scrollable content, like most other
places.
- Set padding and spacing on .emoji-searchbar and .emoji-toolbar in a
more proper way.
- Remove unused button.emoji-section label styles.
2020-12-14 05:26:39 +09:00
nana-4
90355c0b27
emojichooser: Add .emoji-searchbar style class
...
Similar to .emoji-toolbar, it would be nice to have this for styling.
2020-12-14 05:26:13 +09:00
nana-4
538cf9e294
dropdown: Improve search bar styling
...
As per the mockup. See:
https://gitlab.gnome.org/Teams/Design/os-mockups/-/blob/master/dropdown-lists/dropdown-lists.png
2020-12-14 05:08:59 +09:00
Piotr Drąg
8e3f2b879e
Update Polish translation
2020-12-13 16:51:51 +01:00
Florentina Mușat
8fa6a25aa5
Update Romanian translation
2020-12-12 18:49:22 +00:00
Matthias Clasen
96a300b2de
Merge branch 'wip/jimmac/button-shed' into 'master'
...
headerbar window controls & clean up flat button extend
Closes #3427
See merge request GNOME/gtk!2942
2020-12-12 02:51:05 +00:00
Matthias Clasen
aeca9cb7ba
Avoid adding // to resource paths
...
The GResource machinery is not forgiving about this
sort of thing.
Fixes : #3469
2020-12-11 21:47:54 -05:00
Matthias Clasen
c2727e6e04
Merge branch 'wip/carlosg/for-master' into 'master'
...
Wip/carlosg/for master
Closes #3461 , #593 , #3083 , #3009 , #3463 , and #3426
See merge request GNOME/gtk!2945
2020-12-12 02:35:01 +00:00
Carlos Garnacho
8be0918d7e
gdk/surface: Trigger motion check for next frame after thaw
...
This is a more reliable calling point than ::resume-events, and a
good one to schedule things so they happen on a frame clock in no
special phase (Thus still fixing the original issue at 80d4a08e30 )
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3461
2020-12-12 02:14:02 +01:00
Carlos Garnacho
612d3bca7d
gtk/window: Bring back L-shaped resize corners
...
These ended up square in the various refactors. Make them again L-shaped
by extending these along the edge being checked. This means we have to
check for corner positions in all edges, though.
2020-12-12 01:42:42 +01:00
Carlos Garnacho
e9fe270e94
gtk/scrolledwindow: Handle full scroll sequences only
...
In order to do this, leverage smooth scroll handling into the capture
phase scroll controller, controlled by ::scroll-begin in the propagation
phase controller.
There's 2 cases here:
- A child widget handles scroll. The scrolled window does not get
::scroll-begin, the child widget handles the full scroll sequence.
- No child handles scroll, the scrolled window gets ::scroll-begin,
and transfers control of scrolling to the capture phase controller.
As scrolling is performed, the pointer may fall into scrollable children,
but the scrolled window will be capturing the scroll events, so these
won't be seen by the child widgets.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/593
2020-12-12 01:42:42 +01:00
Carlos Garnacho
8402665c55
gtk/eventscrollerscroll: Handle smooth events in discrete controllers
...
We let smooth scroll events that don't trigger a ::scroll signal through.
This is unintended, these are handled, even if just accumulated.
This fixes cases like GtkSpinButton inside GtkScrolledWindow, where both
would handle events, until the GtkSpinButton eventually shifts away from
underneath the pointer.
Brought up at https://gitlab.gnome.org/GNOME/gtk/-/issues/593
2020-12-12 01:42:42 +01:00
Carlos Garnacho
79090f1755
gtk/entrycompletion: Ensure to show first row when shown, not allocated
...
This code was here in gtk3 to cater for the completion window being
positioned. That was only to meant once as long as the completion window
was shown.
This doesn't work as well for gtk4, ::size-allocate gets propagated from
the toplevel, so happens much more often for the completion window, this
ends up with the completion position being reset to the first row
frequently.
Do this simply once when popping up the completion, instead.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3083
2020-12-12 01:42:42 +01:00
Carlos Garnacho
3d84a38867
gtk/treeview: Position editable widgets correctly wrt left border
...
The coordinates are already widget-local here, not transformed by the
adjustment positions. Using the adjustment value here ends up pushing
the entry far from the left border.
The correct minimum value here is 0, which matches the treeview left
border.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3009
2020-12-12 01:42:42 +01:00
Carlos Garnacho
5155fac94f
gtk/modelbutton: Handle unpaired releases
...
Let model buttons handle unpaired releases, these may happen indirectly
e.g. due to other child menus being opened at the time. Clicking would
dismiss the menu, but the menu item beneath the pointer would not get
activated.
We can handle that button release though via ::unpaired-release, so
there's no second click required.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3463
2020-12-12 01:42:42 +01:00
Carlos Garnacho
7a4d15dc67
gtk/range: Move button release handling to GtkGestureDrag
...
Tracking it through the GtkGestureClick becomes a bit cumbersome for
handling of simultaneously pressed buttons. We can track ::stopped,
but that also emits for a number of situations where we want drag to
continue.
However, the GtkGestureDrag is grouped with the click gesture, and
knows better when to finish the drag gesture (not just because of a
button release), so hook drag and zoom mode finalization there.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
2020-12-12 01:42:42 +01:00
Emmanuele Bassi
e4d8d50a8b
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2944
2020-12-12 00:01:38 +00:00
Emmanuele Bassi
3c9a13e6cf
Update CODEOWNERS
...
Add me as the reference for the accessibility bits of the code base.
2020-12-11 23:42:25 +00:00
Emmanuele Bassi
2c97d44281
docs: Fix the Widget as Buildable example
...
The layout properties use an old name.
2020-12-11 23:41:51 +00:00
Kjartan Maraas
2d3a398678
Update Norwegian Bokmål translation
2020-12-11 11:40:55 +00:00
Florentina Mușat
d380ed2b3a
Update Romanian translation
2020-12-10 15:34:51 +00:00
Matthias Clasen
644a45714a
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Update references to GtkWindow:fullscreened
See merge request GNOME/gtk!2943
2020-12-10 14:31:54 +00:00
Matthias Clasen
324683993e
docs: Update references to GtkWindow:fullscreened
...
The property got renamed from fullscreen to fullscreened.
Update all references.
2020-12-10 09:10:21 -05:00
Jakub Steiner
f6f6241627
Adwaita: special case flat headerbar buttons
...
- make sure the hovers and pushed states are legible on a tintend headerbar
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3427
2020-12-10 14:24:29 +01:00
Jakub Steiner
6a33bed353
Adwaita: flat button :hover and :active
...
- special case undecorated button hovers
2020-12-10 14:16:25 +01:00
Jakub Steiner
f83ee0be23
Adwaita: headerbar_color > headerbar_bg_color
...
- semantic correction
2020-12-10 13:58:42 +01:00
Jakub Steiner
7442bdc383
Adwaita: duplicate selector
...
- awkward duplicate selector that should have no effect
(resulting in the same css)
2020-12-10 13:51:10 +01:00
Luna Jernberg
82950528ed
Update Swedish translation
2020-12-09 21:05:25 +00:00
Matthias Clasen
97eaef8308
Merge branch 'ebassi/popcount' into 'master'
...
Share the popcount() fallback for MSVC
See merge request GNOME/gtk!2940
2020-12-09 16:32:09 +00:00
Matthias Clasen
92189cf96a
Merge branch 'matthiasc/for-master' into 'master'
...
Remove NoDisplay from demo desktop files
Closes #2932
See merge request GNOME/gtk!2939
2020-12-09 16:10:04 +00:00
Emmanuele Bassi
b8a651df47
Share the popcount() fallback for MSVC
...
We use __builtin_popcount() in a couple of places, so it makes sense to
have it in one header.
2020-12-09 16:06:52 +00:00
Matthias Clasen
c0ed89be9a
widget-factory: Autoplay the video
...
The empty video on the frontpage is a bit of a letdown, since
the big arrow can't be clicked.
2020-12-09 10:52:55 -05:00
Matthias Clasen
ade4bcb125
Remove NoDisplay from demo desktop files
...
When these are installed (in particular, as flatpaks),
we should not hide them.
Fixes : #2932
2020-12-09 10:09:06 -05:00
Matthias Clasen
c5dd34344f
Merge branch 'wip/carlosg/for-master' into 'master'
...
Wip/carlosg/for master
Closes #3426 and #3264
See merge request GNOME/gtk!2933
2020-12-09 15:04:01 +00:00
Matthias Clasen
c90cc976a5
Merge branch 'wip/jimmac/row-transitions-and-spacing' into 'master'
...
Adwaita: row transitions and spacing
Closes #3434
See merge request GNOME/gtk!2937
2020-12-09 13:35:54 +00:00
Matthias Clasen
bd9bcd5905
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3431
See merge request GNOME/gtk!2938
2020-12-09 13:34:21 +00:00
Matthias Clasen
0ddcbb52e6
Merge branch 'ebassi/4-0-abi-bump' into 'master'
...
Ebassi/4 0 abi bump
Closes #3392
See merge request GNOME/gtk!2883
2020-12-09 13:20:20 +00:00
Emmanuele Bassi
2457f3d54c
build: Bump up the SONAME for GTK4
...
We released all the 3.9x development snapshots using:
libgtk-4.0.so.0.xxxx.y
which means that the 4.0.0 release of GTK will have a lower SONAME than
the snapshots. To avoid that, bump the SONAME to 1.xxxx.y.
Fixes : #3392
2020-12-09 12:19:50 +00:00
Emmanuele Bassi
1cc207af32
build: Tie interface age to the development cycle
...
We don't want to increase the interface age manually, because we're
going to end up forgetting about it.
Instead, we should tie it to the rest of the version:
- in stable (even minor) cycles, we don't add new API; the interface
age is the same as the micro version
- in unstable (odd minor) cycles, every new release might have new API,
or updates to newly added API; keep the interface age to 0
This removes one more manual thing to change during release, and keeps
us honest with our promise not to add symbols during stable cycles.
2020-12-09 12:19:50 +00:00
Emmanuele Bassi
f4a0d57c07
Prepare version macros for 4.0
...
Remove the 3.9x version macros, and ensure that we handle 4.0 as the
backstop for the minimum required version.
2020-12-09 12:19:50 +00:00
Jakub Steiner
a76ee61e97
Adwaita: row transitions and spacing
...
- no fading out of row hovers. Many feel like it's a slow
refresh rather than intentional effect.
- give some margin to navigation lists
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3434
2020-12-09 12:16:15 +01:00
Yuri Chornoivan
fac367495b
Update Ukrainian translation
2020-12-09 07:08:51 +00:00
Matthias Clasen
76177b6065
Merge branch 'ebassi/prop-names' into 'master'
...
Ebassi/prop names
See merge request GNOME/gtk!2936
2020-12-09 05:51:00 +00:00
Matthias Clasen
433f305fa9
Merge branch 'sophie-h-master-patch-62064' into 'master'
...
gtk-demo: Remove potentially ableist metaphor
See merge request GNOME/gtk!2934
2020-12-09 00:53:10 +00:00
Matthias Clasen
fce824e78f
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3451
See merge request GNOME/gtk!2935
2020-12-09 00:52:53 +00:00
Emmanuele Bassi
c4b768a4ec
Rename GtkWindow:fullscreen to :fullscreened
...
Having a property with the same name of a method makes some languages
which put properties and method names in the same flat namespace not
really happy about our choices. To avoid collisions, let's put the the
"fullscreen" property into the past, alongside the "maximized" property.
2020-12-09 00:11:49 +00:00
Emmanuele Bassi
6d1be832d9
Fix the documentation for GtkWindow state properties
...
Drop the "don't write code that crashes" folksy bit; don't start
sentences with conjunctions; remove copy-pasted references to
"iconified" states; point to the corresponding property notification in
a consistent manner.
2020-12-08 23:49:45 +00:00
Matthias Clasen
a828d4318e
Mark flaky tests as flaky
...
We can't mark these as xfail, since it sometimes succeed.
2020-12-08 18:10:02 -05:00
Sophie Herold
a36ccd7f42
gtk-demo: Remove potentially ableist metaphor
2020-12-08 23:02:03 +00:00
Matthias Clasen
b4a7fe8d8f
Add bug reporting address to pot files
...
Fixes : #3451
2020-12-08 17:51:38 -05:00
Carlos Garnacho
43e4848872
gtk/main: Keep implicit grab until all buttons are released
...
Currently, the implicit grab is broken on the first button release,
in the case of pressing multiple buttons simultaneously. This means
that we emit crossing events early, and the next button releases
are sent to the pointer focus widget instead.
Consider the implicit grab effective until all buttons are released,
and only unset the pointer implicit grab (and emit crossing events)
after there are no further buttons pressed. We do this by checking
event modifiers, given button release events do contain the modifiers
in effect at the time the event was generated, we have to look for
exactly one active button modifier.
Fixes weird pointer states after pressing multiple buttons on a
widget.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3426
2020-12-08 23:27:03 +01:00
Carlos Garnacho
80d4a08e30
gdk/surface: Delay gdk_surface_request_motion() requests internally
...
Those requests are received while dealing with the ::layout frame
clock phase, this has the unintended side effect of making the
frame clock "rewind" to handle ::flush-events again during this
frame, which delays everything and practically halves the frame
rate.
We do intend to make the motion events dispatches on the next frame,
so do this in an idle at a slightly lower priority than layout/draw,
so the ::flush-events phase is actually requested for the next frame.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3264
2020-12-08 23:27:03 +01:00
Carlos Garnacho
47d0b5ad0c
gkt/textview: Set an iter position for event-less menu activation
...
This went missing. Use the current insertion position as a reference.
Fixes invoking the menu via keyboard.
2020-12-08 23:27:03 +01:00
Matthias Clasen
c59b433395
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix macOS build breakage
See merge request GNOME/gtk!2931
2020-12-08 20:32:51 +00:00
Yuri Chornoivan
18d06a1cd5
Update Ukrainian translation
2020-12-08 20:25:26 +00:00
Florentina Mușat
f13041360a
Update Romanian translation
2020-12-08 19:52:12 +00:00
Christian Hergert
0236fe80c1
macos: fix macOS build breakage
...
Fixes breakages due to recent refactoring around sizing changes.
2020-12-08 11:29:31 -08:00
Matthias Clasen
2caf283323
Mark the window-show-contents-on-map.ui reftest as xfail
...
We know now what the test is trying to test, just lack
the right plumbing to do it properly. So, keep the test
around, marked as expected fail.
2020-12-08 12:04:47 -05:00
Matthias Clasen
6fb66e299a
Revert "reftests: Remove window-show-contents-on-map.ui test"
...
This reverts commit 074b933ae4 .
2020-12-08 11:45:52 -05:00
Matthias Clasen
398a74d871
3.99.5
2020-12-08 10:58:40 -05:00
Matthias Clasen
08ca8a361e
docs: Remove a mention of gtk_window_get_size
...
That function has been removed.
2020-12-08 10:44:33 -05:00
Matthias Clasen
1f141c1953
Merge branch 'wip/surface-state-rework' into 'master'
...
Rework surface state and geometry computation
See merge request GNOME/gtk!2885
2020-12-08 15:38:36 +00:00
Jakub Steiner
1e14a91cb9
Merge branch 'wip/jimmac/no-inner-shadow-sidebars' into 'master'
...
Adwaita: no 3d shadow for pressed sidebar
Closes #3413
See merge request GNOME/gtk!2928
2020-12-08 14:18:44 +00:00
Jonas Ådahl
074b933ae4
reftests: Remove window-show-contents-on-map.ui test
...
It tested that a widget shown after the window was mapped deals with
window resizing appropriately when doing the follow-up allocation. Now,
doing this only allocates both at the same time, as allocation happens
during the frame dispatch.
To do the equivalent now, one would have to write code that shows the
label after the first frame was drawn, and that's not possible via a
reftest, so lets remove it.
2020-12-08 14:22:59 +01:00
Jonas Ådahl
7b7f3342d8
reftests/textview-tags: Hide text view cursor
...
Otherwise it'd sometimes show up, causing test flakyness.
2020-12-08 12:03:18 +01:00
Matthias Clasen
adc4bcbd24
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: various GL context cleanups
See merge request GNOME/gtk!2929
2020-12-08 00:06:19 +00:00
Jonas Ådahl
130ff5f841
testsuite/notify: Don't fiddle with GtkWidget::visible
...
It may map toplevel windows with arbitrary modes, which will effect
other properties, such as GtkWindow::maximized and
GtkWindow::fullscreen.
2020-12-07 22:41:36 +01:00
Jonas Ådahl
fea1b151e6
testsuite/filtermodel: Remove calls to gtk_widget_realize()
...
They don't do what they used to do.
2020-12-07 22:29:51 +01:00
Christian Hergert
6e0fffa0f8
macos: use CGLSetParameter and CGLEnable
...
We don't need to go through the NSOpenGLContext for these.
We can just use the C API directly. It's also clearer what is using
CGLEnable() vs CGLSetParameter().
2020-12-07 11:47:51 -08:00
Jonas Ådahl
d2c95a1b13
gdk: Replace 'WITHDRAWN' state with async 'is-mapped' boolean
...
It was used by all surfaces to track 'is-mapped', but still part of the
GdkToplevelState, and is now replaced with a separate boolean in the
GdkSurface structure.
It also caused issues when a widget was unmapped, and due to that
unmapped a popover which hid its corresponding surface. When this
surface was hidden, it emitted a state change event, which would then go
back into GTK and queue a resize on popover widget, which would travel
back down to the widget that was originally unmapped, causing confusino
when doing future allocations.
To summarize, one should not hide widgets during allocation, and to
avoid this, make this new is-mapped boolean asynchronous when hiding a
surface, meaning the notification event for the changed mapped state
will be emitted in an idle callback. This avoids the above described
reentry issue.
2020-12-07 20:37:30 +01:00
Jonas Ådahl
8f8c5040db
gtk/headerbar: Remove unused 'state' field
2020-12-07 20:37:30 +01:00
Matthias Clasen
3b69facf0b
Mention window sizes in the migration guide
2020-12-07 20:37:30 +01:00
Matthias Clasen
a6bc4c95b1
docs: Add gtk_window_is_fullscreen
2020-12-07 20:37:30 +01:00
Matthias Clasen
59fd171515
popup: Documentation tweaks
...
Use proper syntax for referring to signals.
2020-12-07 20:37:30 +01:00
Matthias Clasen
3db0d06901
Properly remove gtk_window_get_size
...
It was still in the headers and the docs, but did
not have an implementation anymore.
2020-12-07 20:37:30 +01:00
Jonas Ådahl
d7d738d745
tests/animated-resizing: Use gtk_window_default_size() instead
...
This will actually make it resize on-demand, as the default size is the
size used when computing the window size when the size is not fixed.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
ac17217c69
wayland/toplevel: Don't alwyas skip changing xdg_toplevel state
...
We only called xdg_toplevel.(un)set_maximize() if the toplevel layout
changed, but this misses the case when the compositor had changed the
maximized state. Change it to call the xdg_toplevel request if either
the local layout changed, or if the layout differs from the current
state.
This fixes an issue where one couldn't unmaximize a window by double
clicking the titlebar that, had previously been maximized e.g. using a
keyboard binding.
Do the same for fullscreen.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2e5eeb6b92
gtk/window: Add 'fullscreen' prop and gtk_window_is_fullscreen()
...
This makes it possible to set 'fullscreen' to 'true' in a .ui file to
start an application in fullscreen mode.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
eb0eac0f03
gtk/window: Make R/O is-maximized R/W maximized prop
...
This makes it possible to set 'maximized' to true in .ui files, and the
window will show up maximized.
gtk_window_is_maximized() will return the intended maximized state until
actually mapped, it will then show the actual maximized state. The same
applies to reading the property.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
27077d5be8
gtk/window: Make 'default-size' adapt to configured size
...
This commit changes the behavior of window size computation and the
default size properties to:
* The default-width and default-height properties are updated to the
current window size unless the size is fixed by e.g. being maxmized,
tiled etc.
* The compute-size semantics are to just pick the default size, or if
not adequate, use the measured size, and consequently update the
default size, unless unresizable.
* gtk_window_get_size() is removed, what's more likely relevant is the
gtk_window_get_default_size() which will now contain more sensible
values.
Various places that used gtk_window_get_size() were updated to use
gtk_window_get_default_size() to remember and restore previous sizes.
This also changes the default value of 'default-width' and
'default-height' from -1 to 0. The gtk builder simplify tool is taught
how to omit when the default size is set to both -1 and 0.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
fd01723470
x11/surface: Avoid resizing if computed size didn't change
...
This fixes an issue where we'd resize to the previous window size during
interactive resize.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
994aa41ccc
x11/surface: Move the scattered compute-size calls to helper
...
This simplifies things, and fixes issue where we'd resize the wrong
time, and miss resizing other times.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
c791185c20
x11/surface: Remember the toplevel layout
2020-12-07 20:37:29 +01:00
Jonas Ådahl
e7ddaf5ed1
x11/surface: Compute size after update too
...
This will sometimes mean a frame is skipped if a resize was requested
during the update phase of the frame dispatch. Not doing so can cause
trying to allocate a window smaller than the minimum size of the widget.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2217cf8ea2
x11/surface: Remember when there is a pending ConfigureNotify
...
This will be used to decide whether to try to resize windows when .
2020-12-07 20:37:29 +01:00
Jonas Ådahl
3bbeb891c4
gdk/surface: Allow inhibit layout from backend
...
If compute_size() returns TRUE, the layout will not be propagated to
GTK. This will be used by the X11 backend to queue asynchronous resizes
that shouldn't yet allocate in GTK.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
ff23a2a582
x11: Use resize counting for freezing updates too
...
It's already keep strack of when we're waiting for configure events, so
lets reuse it. This fixes an issue where reshown dialogs wouldn't
reappear.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
8396bdb759
wayland/surface: Reset last sent min/max size when hiding
...
As with the window geometry, the last sent min/max values must be reset
so they are sent again next time the surface is shown.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
351d88f7ae
wayland/surface: Clear shadow width when hiding
...
Not doing this means the next time the same surface is shown, if the
shadow size wasn't changed, it wouldn't be sent to the compositor, which
then would result in compositor deriving its own window geometry which
would include the shadow margin.
This fixes an issue where the file chooser dialog would grow each time
it opened.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
dfb7ab3352
x11/surface: Compute toplevel size outside of frame dispatch
...
We can't compute and resize a toplevel size during dispatch, as resizing
on X11 is an asynhronous operation, requiring a configuration event.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
8e3ee58e3f
tests/animated-resizing: Don't try to resize during frame dispatch
...
This will not work on X11 because it's too late to resize, due to
resizing being asynchronous i.e. it won't be complete before we need to
draw.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
40a9baa2db
gtk/native: Remove gtk_native_check_resize()
...
This is now handle by the corresponding implemenatations using per
non-gobject-type API.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
4b2aae9950
gtk/dragicon: Use private gtk_drag_icon_present() instead of GtkNative
...
It didn't even use GtkNative, just the vfunc it set to the interface
sturct.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
9d3f497a21
gtk/tooltipwindow: Use gtk_tooltip_window_present() instead of GtkNative
2020-12-07 20:37:29 +01:00
Jonas Ådahl
517bc0db84
gtk/texthandle: Use gtk_text_handle_present() instead of GtkNative
2020-12-07 20:37:29 +01:00
Jonas Ådahl
369b03a3d8
gtk/window: Don't go via GtkNative when presenting
...
It'll only call directly back into GtkWindow's toplevel present handling
code.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
2cddec7798
gtk/popover: Use gtk_popover_present() instead of going via GtkNative
...
This makes it more explicit that managers of popovers make it "present".
2020-12-07 20:37:29 +01:00
Jonas Ådahl
f7fceab40b
gtk/entry: Remove emoji chooser field
...
It wasn't ever set.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
3b66f63523
gtk/popover: Request fake motion events for popovers too
...
As with GtkWindow, we need to request fake motion events if allocation
changes, to emulate motion events given the new layout.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
96450ed9cc
gdk/surface: Emit layout event while frozen
...
The allocation of popups are part dependent of the allocation of the
root, which means the root must still be allocated when updates are
frozen, otherwise we'll try to allocate non-laid out popups.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
5eee1dfcd1
gdk/popup: Remove the popup-layout-changed signal
...
It was replaced with GdkSurface::layout.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
19d2a4ab94
gtk/window: Only fake motion events on windows with pending allocations
...
This fixes an issue where the focus of the window continuously received
fake motion events even when a popover was open, making input events end
up behind the popover.
It also adds a comment describing why motion events are requested. Note
that popovers won't work with this, and it's possible both in the past
and now that sporadic missplaced motion events will appear, e.g. when a
window changes allocation but a popover is open.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
6ee7535af0
gdk/toplevelsize: Rename 'margin' to 'shadow' and 'shadow_width'
...
This makes it more consistent with everywhere else.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
b738054344
gdk: Remove GdkSurface::size-changed
...
It's not emitted, and everyone should use the GdkSurface::layout signal
from now on.
2020-12-07 20:37:29 +01:00
Jonas Ådahl
b8fa892b70
gtk/window: Minor cleanup
2020-12-07 20:37:29 +01:00
Jonas Ådahl
ca65ee8d50
gtk/window: Remove out-dated comment
2020-12-07 20:37:29 +01:00
Jonas Ådahl
5eca548acc
gtk/window: Use default size if non-resizable if set
2020-12-07 20:37:29 +01:00
Jonas Ådahl
42679f2903
gdk: Replace all GDK_CONFIGURE usage with GdkSurface::layout
...
This removes the GDK_CONFIGURE event and all related functions and data
types; it includes untested changes to the MacOSX, Win32 and Broadway
backends.
2020-12-07 20:37:29 +01:00
Christian Hergert
b431e39d4e
macos: we only need 24-bit for color
2020-12-07 11:27:11 -08:00
Emmanuele Bassi
606cb51293
Merge branch 'ebassi/activate-signal' into 'master'
...
Add accessors for GtkWidgetClass.activate_signal
See merge request GNOME/gtk!2925
2020-12-07 15:23:55 +00:00
Jakub Steiner
62e0c0de59
Adwaita: no 3d shadow for pressed sidebar
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3413
2020-12-07 14:19:24 +01:00
Jakub Steiner
30f789650f
Revert "Adwaita: avoid clipping menu shadows"
...
While the workaround hides majority of the issue there are still two big downsides:
- shadow does eat from the widget dimensions so alignment is broken
- situations like popover going upwards on screen edge break completely
The appropriate action is to revert these theme duct tape solutions to make room
for a proper fix.
This reverts commit b3dba1dca6 .
Issue https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-12-07 10:58:12 +01:00
Jonas Ådahl
3f96d4b6da
gdk: Always get shadow width via GdkToplevelSize
...
This removes the gdk_surface_set_shadow_width() function and related
vfuncs. The point here is that the shadow width and surface size can now
be communicated to GDK atomically, meaning it's possible to avoid
intermediate stages where the surface size includes the shadow, but
without the shadow width set, or the other way around.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
0dcd4a5bdb
wayland: Stop emitting size-changed
...
It's dealt with by GdkSurface::layout now.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8a599b2582
gtk: Allocate everything from GtkNativeClass::layout
...
This changes allocation of the widget trees to happen as a side effect
to the GdkSurface::layout signal, which first passes the GtkNative
instance where it is then forwarded to the implementations of the
GtkNative interface.
The implementations of GtkNative are the ones doing the actual
gtk_widget_allocate(), and they do so in their GtkNativeClass::layout
function.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
a798edc360
gtk/window: Only deal with shadow when (ex|in)cluding csd size
...
The size should correspond what gtk_widget_measure() does, and it
measures what's within the window excluding the shadow; so make this
helper function correspond to this.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
e51c32b9c1
gdk/wayland: Always compute-size if GTK asked fer layout
2020-12-07 09:46:39 +01:00
Jonas Ådahl
048a0172a0
gdk/wayland: Always configured size when resizing
...
GTK4 doesn't support arbitrary constraints when resizing a window (e.g.
steps, or aspect ratio), so we don't need to care about the result from
compute-size when doing interactive resizing.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
64f6118af4
gdk/toplevelsize: Don't complain if only shadow extends out of bounds
2020-12-07 09:46:39 +01:00
Jonas Ådahl
14b5a5a4c7
gtk/window: Remove gtk_window_resize()
...
Use gtk_window_set_default_size() or change the size of the widget
inside the window to get the same effect.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
4083f7e47f
testsuite: Remove test for gtk_window_resize()
...
And use gtk_window_set_default_size() in the other place.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
2854d0339c
tests/testgtk: Remove 'Resize' button
...
The gtk_window_resize() API is going away, so remove this test.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
98fffe6f23
tests/animated-resizing: Resize widget instead of window
...
This means the window needs to be marked as non-resizable, otherwise it
won't shrink.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
f083849ebb
tests: Use gtk_window_set_default_size() when appropriate
...
Replace the usage of gtk_window_resize() with
gtk_window_set_default_size() where possible.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
deb58339b9
gtk/expander: Remove manual call to gtk_window_resize()
...
It happens implicitly for a non-resizeable window.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
65ad9d6d96
gdk/x11: Flush layout changes to the frame clack dispatch
...
This follows the trail of the Wayland backend in that GdkSurface changes
happen during the layout phase, and that a GDK_CONFIGURE no longer being
used to communicate the size changes of a surface; this now also uses
the layout signal on the GdkSurface.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
e0f13ecae7
gdk/surface: Try to reschedule pending phase until dispatched
...
If a surface scheduled a relayout, got frozen, and a layout phase
happened, then got unfrozen, it wouldn't see it's layout being
requested; avoid this race by remembering the pending phases until they
actually happened.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
880ceebae4
gdk/surface: Make backends aware of when layout is requested
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8c014e63af
x11: Remove handling of 'substructure' events
...
Reading the comment, it seems to be related being a window manager
decoration utility; this is not something GTK4 aims to handle, just drop
support for this.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
ecd40fa265
wayland: Layout drag icon from GdkSurface::layout
2020-12-07 09:46:39 +01:00
Jonas Ådahl
3b140a05a4
gtk/dragicon: Don't show until child is set
...
Showing before the child would result in bogus
gdk_drag_surface_present() with an "empty" (1x1) size. This can easily
be avoided by postponing showing until there is anything to show.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
d38f81999e
wayland: Communicate popup layout changes via GdkSurface::layout
...
By moving popup layout emission to the layout phase, the current
GdkPopup::poup-layout-changed signal has no value on its own as it'd be
ignored by GtkPopover.
Make the Wayland backend communicate the popup layout changes via the
common signal; but leave the rest intact until other backends catch up.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
efcfd23652
wayland/surface: Restructure fields used for the next layout
...
Put them in a anonymous struct, and separate the toplevel specific ones
into another anonymous struct inside the first one. Later popup related
fields will be added.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
70b83c9a70
gdk/surface: Remove left-over signal enum value
...
The popup-layout-change signal was moved to GdkPopup, but the enum was
never removed from GdkSurface.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
4779e4e488
gdk/frame-clock: Remove the newly added 'compute-size' phase
...
What was previously done in the layout phase is now done in response to
a GdkSurface signal, which means size computation can happen on layout.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
13931463bd
wayland/surface: Compute size on layout
...
Stop using the 'compute-size' phase of the frame clock, use the layout
phase instead, now that GTK isn't using the layout phase anymore.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
ecc861bf06
Pass the layout signal via GdkSurface to GtkRoot
...
Don't have GtkRoot listen directly to the layout signal on the frame
clock, but let it pass through GdkSurface. This will allow GdkSurface to
be more involved in the layout phase.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
475c07e935
gdk/surface: Make pending schedule a phase enum
...
Scheduling an update when frozen would reschedule when unfrozen; change
this to a generic pending phase enum, and use this for resrcheduling
paint and compute-size.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
0c8d97e3f7
gtk/root: Validate css node after update
...
It should happen before layout, but after the animation tick, thus after
the update.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8d4f8f0cfc
wayland: Concentrate size computation to 'compute-size' phase
...
This includes computing the surface size, including shadow margin,
setting the surface size, during the 'compute-size' clock phase.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
289b50785b
wayland/surface: Don't save uninitialized size
...
GdkSurface's are initialized to have the size 1x1, as otherwise we'd
receive an X11 error, would a corresponding X11 window be created.
This confuses the "saved size" mechanisms in the Wayland backend, as
treats 0 as uninitialized, and not 1.
Fix this simply not saving size that if it's smaller or equal than 1.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
68c14242b2
gdk/surface: Add API to request 'compute-size' clock phase
2020-12-07 09:46:39 +01:00
Jonas Ådahl
4af54fb410
gdk/surface: Use helper to emit 'size-changed' signal
2020-12-07 09:46:39 +01:00
Jonas Ådahl
13b4a4b24c
gdk/toplevelsize: Add way to set margin
...
Will be used to communicate the shadow margin, instead of using
gdk_surface_set_shadow_width().
Also set these values in gtkwindow.c.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
e07fde5c81
frame-clock: Add 'compute-size' phase
...
This will be handled between 'update' (which may trigger animation
ticks, CSS update, etc) and 'layout' which will allocate the widget
tree. It's meant to perform surface size computation, and is done
between these two phases in order to have an up to date state, and
letting the layout phase have an up to date size to layout in.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
8f27b3fcf6
gtk/window: Let the backend handle toplevel freezing
2020-12-07 09:46:39 +01:00
Jonas Ådahl
251bd15597
wayland: Apply new surface state at the beginning of a frame
...
Concentrate state application to the start of a frame; this is to avoid
having GTK going back and forth between different state if so would
happen between two frames.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
dd738d2787
surface: Only keep state 'withdrawn' after hiding
...
A hidden surface should start from a clean slate when showing again, so
clear any now out of date state.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
18d92c3f16
wayland: Keep pending initial state separate
...
Queue it, and then wait for it to actually take effect, i.e. be
confirmed via a configure event from the compositor, before setting the
actual GdkSurface::state value.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
f4c36fe1ce
gdk/surface: Add API to queue and apply state changes
...
This will be used to compress state changes and apply as part of a frame
clock dispatch.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
23d7392eb9
gdk/surface: Removed unused struct field
...
The 'old_state' wasn't used anywhere, lets remove it.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
996eeec16c
gtk/window: Don't gdk_toplevel_present() if not mapped
...
That would map the window too early.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
641915974b
gdk/toplevel: Make gdk_toplevel_present() async
...
The plan is to concencrate size computations as part of the frame clock
dispatch, meaning we shouldn't do it synchronously in the present()
function.
Still, in Wayland, and maybe elsewhere, it is done in the present()
function, e.g. when no state change was made, but this will eventually
be changed.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
528ec4dded
wayland: Only set mapped state when mapped
...
Mapping a surface under Wayland is an asynchronous process, where one
creates a surface and commits an initial state without having drawn
anything, then waiting for a configuration, which then is acknowledged
and content is painted and committed. Not until having received this
configuration is a surface actually mapped, so wait with setting the
mappedness until this.
2020-12-07 09:46:39 +01:00
Jonas Ådahl
366b946f5b
wayland/popup: Use maybe_notify_mapped() helper
2020-12-07 09:46:38 +01:00
Jonas Ådahl
9e6a55a086
wayland: Decouple mapped state from surface creation
2020-12-07 09:46:38 +01:00
Christian Hergert
285781724f
macos: set opengl view as opaque in opaque windows
...
We don't need the OpenGL view to be transparent if the window itself
is not transparent. This has the potential to speed up the compositing
of the GL view onto the NSWindow.
2020-12-06 20:14:52 -08:00
Emmanuele Bassi
2d103cf80c
Merge branch 'wayland-inhbit0' into 'master'
...
wayland: avoid referencing unallocated memory when uninhibiting
See merge request GNOME/gtk!2927
2020-12-07 00:26:50 +00:00
Michael Terry
c8d991e4de
wayland: avoid referencing unallocated memory when uninhibiting
2020-12-06 18:37:40 -05:00
Zander Brown
a165bb9f46
Update British English translation
2020-12-06 22:08:30 +00:00
Timm Bäder
33ed42d985
gl renderer: Remove RESET_OPACITY flag
...
We always need to do that (and always passed the flag to
add_offscreen_ops() anyway).
2020-12-06 20:03:35 +01:00
Timm Bäder
1ee4f6138b
gl renderer: Reset opacity when rendering blend node children
...
We render those on a texture, so we need to reset the opacity because
that will be applied when rendering the resulting texture.
2020-12-06 20:01:36 +01:00
Timm Bäder
7b61ef9e0f
gl renderer: Initialize rounded rect early
2020-12-06 19:57:48 +01:00
Timm Bäder
b46d077b3a
gl renderer: Fix rendering clipped blurred inset shadow nodes
2020-12-06 19:18:10 +01:00
Timm Bäder
e32331d002
gl renderer: Ignore crossfades between equal texture nodes
2020-12-06 19:18:10 +01:00
Timm Bäder
05928608ec
gl renderer: Use scale_x and scale_y everywhere
...
Try to handle two different values for scale in horizontal and vertical
direction better.
Fixes #3431
2020-12-06 19:18:05 +01:00
Emmanuele Bassi
d8c9a67d20
docs: Clarify gtk_widget_activate()
...
We need to tell people what signal will be emitted when calling
gtk_widget_activate(), and that the shortcuts API might be more
appropriate to what they are looking for.
2020-12-06 15:13:57 +00:00
Emmanuele Bassi
c352fe9ab0
Move activate_signal to the widget private class data
...
Instead of having it as a field in the class structure.
2020-12-06 15:06:18 +00:00
Emmanuele Bassi
e396874f3c
Merge branch 'ebassi/a11y-leak' into 'master'
...
a11y: Plug a leak in the AT-SPI context
Closes #3450
See merge request GNOME/gtk!2926
2020-12-05 20:52:04 +00:00
Emmanuele Bassi
f6c53ced0d
a11y: Plug a leak in the AT-SPI context
...
Fixes : #3450
2020-12-05 20:25:30 +00:00
Matthias Clasen
ee26e282cc
Update contribution guide
...
Make my feelings about bug reporting by screencast known.
2020-12-05 11:34:52 -05:00
Matthias Clasen
894f893223
Merge branch 'revert-round-windows' into 'master'
...
Revert "theme: Round all window corners"
See merge request GNOME/gtk!2921
2020-12-05 15:10:16 +00:00
Piotr Drąg
67d7e2007f
Update POTFILES.in
2020-12-05 15:05:48 +01:00
Emmanuele Bassi
3a9cca74fc
Use WidgetClass.activate_signal getter function
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
fe9c0db603
Add getter for WidgetClass.activate_signal
...
Just like we have a setter.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
fde32c5219
Use private can_activate() method
...
Instead of checking the activate_signal field directly.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
213024a560
Use function setter for WidgetClass.activate_signal
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
e5e18ddffb
Add private method to check activatability
...
We should have an actual method, instead of checking the
WidgetClass.activate_signal directly.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
b3e03fa6f0
Add wrappers for setting the WidgetClass.activate_signal field
...
Setting a field on a class structure is not always an easy task from
languages other than C. While bindings can provide access to the class
pointer, twiddling the fields in the class structure can be awkward.
Additionally, signal ids are not always readily available.
We can paper over the direct access to the class structure, as well as
the "signal name to id" mapping with a simple couple of setter
functions.
2020-12-05 01:04:18 +00:00
Emmanuele Bassi
c0586ca6e2
Merge branch 'wip/jfelder/customsorter-null' into 'master'
...
customsorter: Add missing nullable annotation
See merge request GNOME/gtk!2923
2020-12-04 23:39:48 +00:00
Jean Felder
4430314514
customsorter: Add missing nullable annotation
2020-12-05 00:04:36 +01:00
Emmanuele Bassi
4087055b18
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix GL renderer for macOS
Closes #3420
See merge request GNOME/gtk!2922
2020-12-04 22:37:00 +00:00
Christian Hergert
a47c0065fb
macos: enable GL renderer by default
...
Now that the attribute locations are fixed for the GL renderer, we can
enable it by default on macOS.
Fixes #3420
2020-12-04 13:41:31 -08:00
Christian Hergert
6883c2214b
gl: specify attribute locations for vUv and aPosition
...
These positions are not guaranteed to be in a specific order when linked
into the final GPU program. They need to be specified so that our code
in gskglrenderer.c can use known positions for them to match up with
our GskQuadVertex.
This fixes the GL renderer on macOS's OpenGL shader compiler.
Fixes #3420
2020-12-04 13:33:34 -08:00
Matthias Clasen
7f6fdd6e7b
Merge branch 'matthiasc/for-master' into 'master'
...
emoji chooser: Fix incremental loading
Closes #3438
See merge request GNOME/gtk!2920
2020-12-04 17:21:56 +00:00
Matthias Clasen
24124452d5
docs: Fix up GtkPicture docs
...
These were missing proper linking.
2020-12-04 11:47:43 -05:00
Matthias Clasen
0dff89d9fb
Revert "theme: Round all window corners"
...
This reverts commit e46522e4b5 .
2020-12-04 11:13:26 -05:00
Matthias Clasen
f0f64f42ee
emoji chooser: Fix incremental loading
...
This broke when we started using GDK_PROFILER_CURRENT_TIME for
timekeeping - that gets defined to 0 when we're building without
sysprof, so we can use it to make such determinations. Go back
to using g_get_monotonic_time().
Fixes : #3438
2020-12-04 11:09:43 -05:00
Matthias Clasen
d278afc85b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2918
2020-12-04 04:12:41 +00:00
Matthias Clasen
423b8209a1
gtk-demo: Use a native filechooser in the words demo
2020-12-03 22:31:05 -05:00
Benjamin Otte
559f74e0c1
Merge branch 'picture-docs2' into 'master'
...
Add docs about sizing pictures
See merge request GNOME/gtk!2917
2020-12-04 02:04:19 +00:00
Benjamin Otte
66c3a43e96
Add docs about sizing pictures
...
Suggested by Christopher Davis.
2020-12-04 02:04:19 +00:00
Matthias Clasen
d83554121f
gtk-demo: Use a native file chooser in the svg demo
2020-12-03 19:44:45 -05:00
Matthias Clasen
2688b94133
gtk-demo: Use a native filechooser in the video demo
2020-12-03 19:44:34 -05:00
Matthias Clasen
e035baee8a
gtk-demo: Remove empty row in the pickers demo
...
The file chooser button is gone.
2020-12-03 19:25:04 -05:00
Emmanuele Bassi
f1ff8f9aad
Merge branch 'wip/chergert/macos-decelerate' into 'master'
...
macos: fix typo when creating scroll events
Closes #3418
See merge request GNOME/gtk!2916
2020-12-03 22:54:46 +00:00
Christian Hergert
115ea624d9
macos: fix typo when creating scroll events
...
This fixes an issue where we would ignore events with Y delta
and no X delta while scrolling due to a typo when checking for
any delta.
This fixes deceleration of kinetic scrolling on the macOS backend.
Fixes #3418
2020-12-03 13:46:47 -08:00
Matthias Clasen
6ecae6c5f8
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix motion event delivery after closing transient window
Closes #3419
See merge request GNOME/gtk!2910
2020-12-03 20:07:16 +00:00
Matthias Clasen
6d76b587cf
Merge branch 'wip/chergert/shadertoy-macos-fix' into 'master'
...
demos: make alienplanet demo work on macOS OpenGL
See merge request GNOME/gtk!2915
2020-12-03 19:00:39 +00:00
Christian Hergert
8e62ff50fe
demos: make alienplanet demo work on macOS OpenGL
...
On the macOS OpenGL implementation, the use of noise2 as a
function within the glsl shader collides with the builtin noise2 of a
different signature.
This changes the name to something similar (noize2) so that we
do not risk colliding names when linking.
With this commit, the shadertoy alienplanet demo works on mac
OpenGL (albeit still with the Cairo renderer).
2020-12-03 10:23:13 -08:00
Matthias Clasen
0daa905a27
Merge branch 'wip/otte/conic' into 'master'
...
Implement a GL shader for conic gradients
See merge request GNOME/gtk!2913
2020-12-03 17:14:01 +00:00
Emmanuele Bassi
d1a4ad3db6
Merge branch 'wip/tintou/gdk-backends-header' into 'master'
...
build: Use the correct path to the header of the wayland and x11 backends
See merge request GNOME/gtk!2914
2020-12-03 12:32:24 +00:00
Benjamin Otte
2c1bd399d2
glrenderer: Implement a shader for conic gradients
2020-12-03 13:07:17 +01:00
Benjamin Otte
fac5fba0dc
rendernode: Fix some wrong constants for conic gradients
...
copy/paste from other nodes left some wrong values in there and that
screwed things up quite a bit.
2020-12-03 13:07:17 +01:00
Benjamin Otte
c907ad83b0
glrenderer: Emit more useful error messages
...
Catch the error when it happens, so that we can emit a specific and more
helpful error message.
Also verify that all branches in the code now do indeed set a proper
GError when they fail, so that the final catch-all is no longer needed.
Instead, assert that the error is set so that we catch future code
additions early that do not set the GError.
2020-12-03 13:07:17 +01:00
Corentin Noël
585ba777c2
build: Use the correct path to the header of the wayland and x11 backends
2020-12-03 10:02:03 +01:00
Matthias Clasen
f8ee4cfea5
NEWS: Updates
2020-12-02 23:10:39 -05:00
Matthias Clasen
35d2cbefe6
Merge branch 'wip/otte/conic' into 'master'
...
Add support for conic gradients
See merge request GNOME/gtk!2911
2020-12-03 03:54:24 +00:00
Christian Hergert
004f0a6596
macos: plug leak of application windows
...
This ensures that we don't leak window references inside the action muxer.
Otherwise, we risk not disposing the windows upon gtk_window_destroy()
and blocking the main loop from quitting.
Fixes #3419
2020-12-02 19:44:02 -08:00
Christian Hergert
b68e0bb3fb
muxer: add helper to get group by name
...
This is useful when you need to read a group back out of the muxer.
2020-12-02 19:44:02 -08:00
Christian Hergert
92f0216605
macos: ensure element is part of queue
...
We don't want to risk decrementing length field unless this is actually
part of the queue.
2020-12-02 19:44:02 -08:00
Christian Hergert
e317b9be00
macos: maintain GList element consistency
...
We need to keep this consistent so that we can look things up
faster in other places. Therefore, just take the hit here and clear
the entire list ensuring prev/next poniters are cleared.
2020-12-02 19:44:01 -08:00
Christian Hergert
2e52386be5
macos: send focus-out event to windowing
2020-12-02 19:44:01 -08:00
Christian Hergert
9431c70a6a
macos: freeze updates until surface is mapped
...
This more closely matches the X11 backend in terms of freezing
updates on the surface initially until we get mapped.
2020-12-02 19:44:01 -08:00
Matthias Clasen
6e67d44aa3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3429
See merge request GNOME/gtk!2912
2020-12-03 03:43:19 +00:00
Benjamin Otte
e622013f7e
css: Add support for conic-gradient()
...
This comes complete with animation support. For a good time, try:
@keyframes conic {
100% { background-image: conic-gradient(from 1turn, red, lime, blue, yellow, red); }
}
window {
background-image: conic-gradient(red, lime, blue, yellow, red);
animation: conic infinite linear 5s;
}
2020-12-03 04:13:33 +01:00
Benjamin Otte
3886f0c530
Merge branch 'wip/otte/diediedie' into 'master'
...
Remove GtkFileChooserButton
See merge request GNOME/gtk!2909
2020-12-03 01:31:39 +00:00
Benjamin Otte
eb9c204535
gtk: Remove GtkFileChooserButton
...
... as discussed in the meeting.
2020-12-03 02:02:27 +01:00
Matthias Clasen
ab9e99218f
docs: Remove mentions of <accelerator>
...
That is no longer supported, keyboard shortcuts
are done with GtkShortcut now.
Fixes : #3429
2020-12-02 19:59:44 -05:00
Matthias Clasen
714c610d6b
gtk-demo: Add a search button
...
Easter eggs are great, but search shouldn't be one.
2020-12-02 19:53:55 -05:00
Benjamin Otte
8706d69e60
snapshot: Add gsk_snapshot_append_conic_gradient()
2020-12-03 01:15:53 +01:00
Benjamin Otte
55a242bd81
gsk: Add GskConicGradientNode
2020-12-03 00:47:54 +01:00
Matthias Clasen
61b40c47f9
Merge branch 'fix/keyboard-input' into 'master'
...
Gdk4/Win32: Correct calls to gdk_key_event_new()
See merge request GNOME/gtk!2903
2020-12-02 22:14:27 +00:00
Matthew Jakeman
710d0620a4
Gdk4/Win32: Correct call to gdk_key_event_new()
...
The keycode and modifier (state) parameters are in the wrong order
for gdk_key_event_new() in the gdk win32 backend, which causes
key up/down events to be populated incorrectly.
2020-12-02 22:14:27 +00:00
Benjamin Otte
71cb7c2063
rendernodeparser: Split out a function
2020-12-02 21:48:35 +01:00
Matthias Clasen
a482d870dd
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
Revert "macos: specify a window level for surfaces"
See merge request GNOME/gtk!2908
2020-12-02 20:15:51 +00:00
Emmanuele Bassi
bc4992fef9
Merge branch 'ebassi/doc-fixes' into 'master'
...
Ebassi/doc fixes
Closes #3428
See merge request GNOME/gtk!2906
2020-12-02 20:08:05 +00:00
Christian Hergert
b38d0d7d9e
macos: resign main/key when hiding window
...
This isn't done automatically for us, so we need to synthesize it in
our hide helper.
With this commit, we properly re-focus the new main/key window after
we have closed a transient-for window.
2020-12-02 11:36:38 -08:00
Christian Hergert
853a9c7a8c
macos: disconnect frame clock when destroying surface
2020-12-02 11:35:02 -08:00
Christian Hergert
26b9254ac7
macos: track grab serial like other backends
...
This is what is done elsewhere, so copy that here too now that we actually
generate serials for events.
2020-12-02 11:34:31 -08:00
Benjamin Otte
a51f11999a
tests: Remove testsvg
...
That demo lives in gtk-demo now.
2020-12-02 20:17:28 +01:00
Christian Hergert
f11c23f407
Revert "macos: specify a window level for surfaces"
...
This reverts commit ca8b00e871 .
This isn't needed and causes issues with other applications getting
stacked beneath our windows.
2020-12-02 11:15:57 -08:00
Emmanuele Bassi
0c8de4e561
Fix transfer of GtkTreeExpander.get_item()
...
We return a full reference to the item.
Fixes : #3428
2020-12-02 19:10:13 +00:00
Emmanuele Bassi
13f9993007
docs: Add missing fields to GtkTextBufferClass
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
b2b451d762
docs: Hide private files/directories in the GTK reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
2e146a56f7
docs: Mark GtkModelButton's section as private
...
The widget is not public any more.
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
34197d4f8a
docs: Add more symbols to the GDK reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
39dbd91bb0
docs: Add yet another private header
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
901d99d7c5
docs: More ignored files
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
8f6e3848f6
docs: Remove duplicate symbol
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
3548350dfa
docs: Add missing GdkDragSurfaceInterface gtk-doc annotation
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
caae240bc7
docs: Ignore harder
...
First of all, we must list *all* ignored headers. Since we have public
headers in the x11 and wayland directories, we must explicitly declare
all headers that we consider private under those directories.
The "quartz" subdirectory was renamed "macos", with the new macOS
backend. The "mir" directory was removed, so there's no need to ignore
it.
We are also missing a bunch of ignored headers in the top-level gdk
directory.
Finally, pass the list of ignored files to gtkdoc-mkdb, so we won't get
missing declaration warnings.
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
f5f6ceece5
docs: Remove private symbols from the API reference
2020-12-02 19:05:41 +00:00
Emmanuele Bassi
4caceb5dd4
Remove gtk-doc annotation from private symbols
...
Keep the documentation, just tweak it so that gtk-doc won't try to find
the declarations of these private symbols.
2020-12-02 19:05:41 +00:00
Matthias Clasen
3da41b6021
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix window stacking
See merge request GNOME/gtk!2907
2020-12-02 18:38:14 +00:00
Christian Hergert
9b9fb4d7a3
macos: place above transient-for when presenting
...
We need to re-attach to the transient-for window whenever we present or
we risk getting placed behind the window by the display server. Apparently
that setting does not persist across a hide of the NSWindow.
2020-12-02 10:21:16 -08:00
Christian Hergert
ca8b00e871
macos: specify a window level for surfaces
2020-12-02 10:15:43 -08:00
Matthias Clasen
4434889e41
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2905
2020-12-02 15:57:39 +00:00
Bilal Elmoussaoui
475352fbc0
StringList: add missing nullability annotations
2020-12-02 10:36:29 -05:00
Bilal Elmoussaoui
ad30ac3932
Shortcut: add missing nullability annotations
2020-12-02 10:29:16 -05:00
Bilal Elmoussaoui
9d52ca1887
StringFilter: get_search fix nullable annotation
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
ec537d75e4
Text: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
b47ea9421f
TextView: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
845d2e5433
TreeModel: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Bilal Elmoussaoui
50310f7b14
TreeView: add missing nullability annotations
2020-12-02 10:28:07 -05:00
Matthias Clasen
af944aa74c
widget: Add a missing nullability annotation
2020-12-02 10:08:58 -05:00
Matthias Clasen
b5077d02ed
Clarify the docs for gtk_widget_class_set_css_name
...
Reword, and mention the default css name.
2020-12-02 10:06:01 -05:00
Bilal Elmoussaoui
6a3bd1c4d1
window: default_icon_name can be null
2020-12-02 10:00:18 -05:00
Emmanuele Bassi
2fcd0e21bd
Merge branch 'ebassi/for-master' into 'master'
...
Various documentation fixes
See merge request GNOME/gtk!2900
2020-12-02 13:40:25 +00:00
Daniel Mustieles
5127726bbc
Updated Spanish translation
2020-12-02 13:54:32 +01:00
Daniel Mustieles
db456a70ee
Updated Spanish translation
2020-12-02 09:26:08 +01:00
Emmanuele Bassi
770e848953
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: various macos improvements for GTK 4
See merge request GNOME/gtk!2902
2020-12-02 01:14:30 +00:00
Christian Hergert
9e1dd15e31
macos: use Cairo renderer by default
...
Until the GL renderer is working on macOS OpenGL, we need to default
to the Cairo renderer.
2020-12-01 16:24:15 -08:00
Christian Hergert
27b9a9e7ef
macos: glFlush() when switching GL contexts
...
The Mac OpenGL programming guide suggests that you glFlush() before changing
contexts to ensure that the commands have been submitted.
2020-12-01 16:19:04 -08:00
Christian Hergert
a020c901ba
macos: treat some toplevel NSWindow like document windows
...
This makes the window animate in by the window manager like other
application windows on macOS. Currently ignored for transient windows.
2020-12-01 16:19:04 -08:00
Emmanuele Bassi
cdad68e858
docs: Ignore generated Wayland protocol file
2020-12-01 18:03:31 +00:00
Emmanuele Bassi
ef36028526
docs: Ignore more private files
2020-12-01 18:01:33 +00:00
Emmanuele Bassi
69b1b19315
docs: Annotate missing symbols
2020-12-01 17:28:16 +00:00
Emmanuele Bassi
516f71bbdc
Use the appropriate prefix for GtkBuilderClosureFlags
...
Facilitate the job of glib-mkenums, and ensure that the enumeration
nicknames are computed reliably.
2020-12-01 17:26:34 +00:00
Emmanuele Bassi
d820fea7a4
docs: Annotate GtkBuildableParser
2020-12-01 17:21:45 +00:00
Emmanuele Bassi
3e8d157118
docs: Hide GtkBitsetIter fields
2020-12-01 17:18:38 +00:00
Emmanuele Bassi
67f45940ce
docs: Annotate GtkAssistant::escape action signal
2020-12-01 17:18:23 +00:00
Emmanuele Bassi
95400e6451
docs: Annotate GtkAppChooserButton::changed
2020-12-01 17:16:05 +00:00
Emmanuele Bassi
d46fe31f54
docs: Ignore more files
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
4f67be1c8e
docs: Add missing annotations for GtkTextTagTable
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
c13e164f25
Make GtkCenterLayout accessors more idiomatic
...
Add argument validation, and emit a layout-changed signal whenever the
start, center, and end widgets change.
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
eba8f36d4f
docs: Fix annotations in GtkCenterLayout
...
Missing ':' separator.
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
37f11ab77d
docs: Annotate GskRenderer
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
8b898818c2
docs: Annotate the GL shader objects
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
0f62ab6c42
docs: Annotate all render node types
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
c524b72d13
docs: Annotate structure types used by GskRenderNodes
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
b5313dbd4d
docs: Annotate GdkDeviceTool
2020-12-01 15:51:52 +00:00
Emmanuele Bassi
b9a1827da7
docs: Annotate GdkGLTexture
2020-12-01 13:48:07 +00:00
Emmanuele Bassi
1057189ea2
docs: Annotate GdkMemoryTexture
2020-12-01 13:47:56 +00:00
Emmanuele Bassi
879b2845ad
docs: Annotate GdkPaintable
...
The dummy typedef needs a gtk-doc stanza, and the interface
documentation needs to be slightly clarified.
2020-12-01 13:44:51 +00:00
Emmanuele Bassi
ecce3756d4
docs: Annotate GdkPopup
2020-12-01 13:42:07 +00:00
Emmanuele Bassi
6e4dd5811d
docs: Annotate GdkSnapshot
2020-12-01 13:41:28 +00:00
Emmanuele Bassi
598e1304f6
docs: Annotate the GdkToplevel interface
2020-12-01 13:39:48 +00:00
Emmanuele Bassi
e3fbc0ee9c
docs: Fix typo in the GdkTolevelLayout annotation
2020-12-01 13:38:33 +00:00
Emmanuele Bassi
4021734047
docs: Annotate the GdkContentProviderClass structure
2020-12-01 13:38:12 +00:00
Emmanuele Bassi
5a307fa7f3
docs: Ignore more private headers
2020-12-01 13:37:59 +00:00
Matthias Clasen
617d12fd77
Merge branch 'sophie-h/gtk-nullables-2'
...
Merge Sophie's nullable annotations, with some documentation
fixups on top.
2020-11-30 23:43:44 -05:00
Matthias Clasen
837f398a9b
columnviewcolumn: Improve docs
...
Mention what setting sorter to NULL means.
2020-11-30 23:40:03 -05:00
Matthias Clasen
e18211deca
centerlayout: Improve docs
...
Explain what passing NULL does.
2020-11-30 23:36:23 -05:00
Jordi Mas
32a547cc3e
Update Catalan translation
2020-11-30 22:35:47 +01:00
Matthias Clasen
365afa381a
Merge branch 'arnaudb/annotate-set-title' into 'master'
...
Add "nullable" annotation.
See merge request GNOME/gtk!2895
2020-11-30 21:14:28 +00:00
Matthias Clasen
b7d3c073f8
NEWS: Updates
2020-11-30 14:00:26 -05:00
Matthias Clasen
56b0095622
Merge branch 'master' into 'master'
...
broadway: make header name parsing case-insensitve
Closes #3406
See merge request GNOME/gtk!2894
2020-11-30 17:55:27 +00:00
Matthias Clasen
39f0c48eb2
Apply 1 suggestion(s) to 1 file(s)
2020-11-30 17:44:30 +00:00
Matthias Clasen
7d24e1405e
Apply 1 suggestion(s) to 1 file(s)
2020-11-30 17:42:39 +00:00
Matthias Clasen
3680ae220a
Merge branch 'matthiasc/for-master' into 'master'
...
build: Use link_whole for linking our convenience libs
See merge request GNOME/gtk!2899
2020-11-30 15:49:25 +00:00
Matthias Clasen
f309fa21c9
build: Use link_whole for linking our convenience libs
...
Without this, we lose exported symbols from e.g. libgsk
that are not used elsewhere in the code.
2020-11-30 09:56:55 -05:00
Matthias Clasen
61e7326f22
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3364
See merge request GNOME/gtk!2898
2020-11-30 14:44:15 +00:00
Timm Bäder
dc13ff97e2
modelbutton: Reset active menu item on pointer leave
...
We don't want to leave an active menu item behind if the pointer doesn't
enter another menu item.
This matches the old GtkMenu behavior
2020-11-30 09:23:03 -05:00
Timm Bäder
af28237569
popovermenu: Connect to right controller signal
...
leave is emitted before the new contains-pointer value is set, so the
signal handler wasn't working right.
2020-11-30 09:22:57 -05:00
Timm Bäder
ff8de0a93f
eventcontrollermotion: Notify by pspec
2020-11-30 09:22:49 -05:00
Timm Bäder
aefabcc056
popovermenu: Pull variable declaration in closest scope
2020-11-30 09:22:41 -05:00
Timm Bäder
1d6c6fc3b8
shortcutcontroller: Separate trigger/action early returns
...
We take this early return in update_accel over 36k times when starting
the widget factory and always because the action is not a named action.
2020-11-30 09:22:34 -05:00
Timm Bäder
8645773fc6
shortcutcontroller: Pass the muxer to update_accel()
...
We only needed the widget to get its action muxer. And this way we don't
have to call gtk_widget_get_action_muxer() dozens of times, just once in
set_widget().
2020-11-30 09:22:29 -05:00
Timm Bäder
d663909159
shortcutcontroller: Use priv->shortcuts directly in set_widget()
...
Instead of treating the shortcut controller itself as a GListModel,
which just passes everything along from priv->shortcuts.
2020-11-30 09:22:21 -05:00
Timm Bäder
e3ff92bc87
shortcutcontroller: Save signal handler ID
...
gtk_shortcut_controller_finalize() used to take ~13.8% when closing the
complex listbox demo in gtk4-demo. Now it takes nothing.
2020-11-30 09:21:57 -05:00
Timm Bäder
2d43ecf8ca
widget: root child before emitting child observer signals
...
Try to avoid the childen_observer signal handlers screwing up internal
state.
Fixes #3364
2020-11-30 09:21:52 -05:00
Timm Bäder
5f4beb711f
widgetprivate: Remove unused function
2020-11-30 09:21:42 -05:00
Timm Bäder
da514187f5
gl renderer: Make minimal rounded rects more minimal
2020-11-30 09:21:34 -05:00
Matthias Clasen
6bd9ce7b55
docs: Ignore more generated Wayland protocol headers
...
These inject mysterious words like Airbrush, Lense and
Mouse into the list of undocumented apis. No need for that.
2020-11-30 09:21:24 -05:00
Matthias Clasen
ec21d354b9
gsk: doc fixups
2020-11-30 09:21:24 -05:00
Matthias Clasen
8cf4ce5d9e
Merge branch 'ebassi/cell-renderer-get-size' into 'master'
...
Remove GtkCellRendererClass.get_size()
See merge request GNOME/gtk!2896
2020-11-30 14:09:03 +00:00
Emmanuele Bassi
09b6c37e1d
Merge branch 'ebassi/for-master' into 'master'
...
Blend nodes might have NULL top/bottom nodes
See merge request GNOME/gtk!2891
2020-11-30 13:10:25 +00:00
Piotr Drąg
3161dbfff2
Update Polish translation
2020-11-29 12:11:26 +01:00
Yuri Chornoivan
8412928a14
Update Ukrainian translation
2020-11-29 07:53:56 +00:00
Emmanuele Bassi
60a7830ba5
Remove GtkCellRendererClass.get_size()
...
The get_size() vfuncs is deprecated in GTK3, and only used as a
fallback path for cell renderers that do not implement preferred
size virtual functions.
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
ac473282a2
Port CellRendererGraph to preferred size vfuncs
...
Drop use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
20f9e0f144
Port GtkCellRendererProgress to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
71a9e5d8c2
Port GtkCellRendererToggle to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:24 +00:00
Emmanuele Bassi
a605fcc2bd
Port GtkCellRendererSpinner to preferred size vfuncs
...
Drop the use of GtkCellRendererClass.get_size()
2020-11-28 19:21:23 +00:00
Emmanuele Bassi
3eaebf1e0b
Port GtkCellRendererPixbuf to preferred size vfuncs
...
Drop the GtkCellRendererClass.get_size() override.
2020-11-28 19:21:23 +00:00
Аляксей
e540ccbd34
Update Belarusian translation
2020-11-28 14:30:43 +00:00
Arnaud Bonatti
55ce61d1a8
Add "nullable" annotation.
2020-11-28 12:15:38 +01:00
Jakub Steiner
8e14f43398
Merge branch 'wip/jimmac/dark-prelights' into 'master'
...
wip/jimmac/dark prelights
Closes #3380
See merge request GNOME/gtk!2892
2020-11-27 18:14:09 +00:00
Jakub Steiner
bbbcc72460
Adwaita,HC: use dark prelights
...
- increase :hover visibility by going darker rather than lighter
puppies died.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3380
2020-11-27 18:17:12 +01:00
Anders Jonsson
c2b1b00e52
Update Swedish translation
2020-11-27 13:35:03 +00:00
Anders Jonsson
05c2e35c5d
Update Swedish translation
2020-11-27 13:31:30 +00:00
Benjamin Beichler
8efde9c48c
broadway: make header name parsing case-insensitve
...
since http RFC state that the header names should be processed case in-sensitive, broadway should not rely on the actual case. E.g. the go-language libraries tend to rewrite the header, which cause problems with e.g. Caddy
Fixes #3406
2020-11-27 12:05:51 +01:00
Emmanuele Bassi
247fc2e471
Blend nodes might have NULL top/bottom nodes
...
We have code in place to handle a NULL node in the state when dealing
with blend nodes, but we don't always check for NULL, which leads to
warnings in the CSS Blend modes demo.
2020-11-26 00:21:11 +00:00
Matthias Clasen
9d2ca90b4c
popover: Fix a typo
...
s/Wether/Whether/
Fixes #3393
2020-11-25 13:59:16 -05:00
Emmanuele Bassi
3a5f8b6192
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3404 and #3403
See merge request GNOME/gtk!2890
2020-11-25 18:43:53 +00:00
Emmanuele Bassi
16b5a88097
a11y: Check before disconnecting Text signals
...
Use the same initial check for the accessible object type that we use
when connecting the signal, in case we try to disconnect signals on
different widgets. Additionally, check before accessing data that might
have already been removed.
Fixes : #3403
2020-11-25 18:15:04 +00:00
Emmanuele Bassi
fdf2e046c3
a11y: Check before disconnecting selection signals
...
If the selection data has already been cleared we should just bail out.
Fixes : #3404
2020-11-25 18:13:54 +00:00
Jakub Steiner
531d57f30c
Merge branch 'wip/jimmac/menus-darker' into 'master'
...
Adwaita: darker selected menuitem + sidebars
Closes #3390
See merge request GNOME/gtk!2881
2020-11-25 13:42:55 +00:00
Jordi Mas i Hernandez
841bf67bb9
Update Catalan translation
2020-11-25 13:42:11 +00:00
Jakub Steiner
399b457f54
Adwaita: darker selected menuitem + sidebars
...
- without sacrificing the fg/bg contrast too much, increase
selected item visibility
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3390
2020-11-25 14:28:19 +01:00
Sophie Herold
fed734edfc
Fix some nullable return annotations 2
2020-11-24 19:27:33 +01:00
Matthias Clasen
c84c014536
Merge branch 'wip/chergert/for-master' into 'master'
...
textview: fix precondition assertions
Closes #3386
See merge request GNOME/gtk!2886
2020-11-24 17:14:53 +00:00
Christian Hergert
1e994419ee
textview: fix precondition assertions
...
It is a programmer error to call this with a child widget that has not
been placed within the GtkTextView.
Fixes #3386
2020-11-24 08:29:52 -08:00
Matthias Clasen
7b22c44b39
Merge branch 'fix-integer-overflow' into 'master'
...
gdk/win32: fix integer overflow in monitor refresh rate calculation
Closes #3394
See merge request GNOME/gtk!2884
2020-11-24 16:22:49 +00:00
Anders Jonsson
2e744260e0
Update Swedish translation
2020-11-23 22:09:28 +00:00
Volker Rümelin
7190a31b5f
gdk/win32: fix integer overflow in monitor refresh rate calculation
...
In gdk/win32/gdkmonitor-win32.c in function
populate_monitor_devices_from_display_config() refresh->Numerator * 1000
overflows for refresh->Numerator > 4294976.
Cast the factor 1000 to UINT64 to prevent the overflow.
Fixes #3394
2020-11-23 21:42:58 +01:00
Matthias Clasen
729f007379
Merge branch 'no-more-devel-headers' into 'master'
...
Drop devel styling from our windows
See merge request GNOME/gtk!2882
2020-11-23 19:01:44 +00:00
Matthias Clasen
b75b359f19
Drop devel styling from our windows
...
We are about to do a stable release. Time to get used
again to plain old, boring header bars.
2020-11-23 12:10:01 -05:00
Emmanuele Bassi
d7de720275
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2876
2020-11-23 15:41:03 +00:00
Emmanuele Bassi
ef86e46238
a11y: Cache the accessibility bus address
...
Just check for it once; doing it every time we failed to create an
ATContext is just going to fill up the logs.
2020-11-23 14:34:46 +00:00
Emmanuele Bassi
0a46baeb56
a11y: Turn critical warnings into debug messages
...
The accessibility bus might not be available, and if it isn't the case,
it means something has failed at a level where the user can't do much
about it. There's no need to emit a critical warning.
2020-11-23 14:34:46 +00:00
Emmanuele Bassi
fd3a6299ce
Merge branch 'ebassi/glib-min-version' into 'master'
...
Ebassi/glib min version
See merge request GNOME/gtk!2880
2020-11-23 14:33:20 +00:00
Emmanuele Bassi
803b147483
Disable deprecation warnings from GLib
...
We don't want to test the latest changes in GLib in our own build.
2020-11-23 13:04:11 +00:00
Emmanuele Bassi
1f44319588
Drop redundant dependencies
...
PangoCairo already depends on Pango; Cairo-gobject already depends on
Cairo.
2020-11-23 13:04:11 +00:00
Emmanuele Bassi
505478bc59
Drop GLib dependency from GTK's declared dependencies
...
We depend on GObject, which already depends on GLib; on older versions
of Meson, this ends up trying to depend on the system copy of GLib,
instead of the sub-project copy, in case the version of GLib we have
installed is too old.
2020-11-23 12:29:32 +00:00
Emmanuele Bassi
de7833b6a0
Use the right GLib macros for version checking
...
There's a typo in the name, and we never noticed.
2020-11-23 12:06:22 +00:00
Emmanuele Bassi
3a1b2083d6
Do not depend on GLib API introduced after 2.66
...
To avoid bleeding edge deprecations we use GLIB_VERSION_MIN_REQUIRED and
GLIB_VERSION_MAX_ALLOWED. Since we depend on GLib 2.66, we cannot use
API introduced in 2.67, even when conditionally compiled.
2020-11-23 12:06:22 +00:00
nana-4
3e996f61ae
icon-browser: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
nana-4
56eac4f846
gtk-demo: Add .sidebar style class in the main window
...
So the sidebar can get the proper background and border colors.
2020-11-23 10:51:58 +01:00
nana-4
61dcb685b2
Adwaita: Unify sidebar background-color
...
The sidebar item style is already unified. The sidebar background-color
should be unified as well.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
nana-4
bd0d75e237
Adwaita: Make sidebar row styling better
...
- Reorder declaration blocks for code legibility.
- Don't lighten text color on :hover and :selected for better contrast.
- Add missing :focus-visible:focus-within styling to non-:selected row.
2020-11-23 10:51:58 +01:00
nana-4
179fc68355
Adwaita: Fix some sidebar sizing
...
- Don't set the sidebar padding twice.
- Add padding to the assistant sidebar directly, as it doesn't have
.navigation-sidebar internally.
- Set missing margin to the sidebar separator.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
nana-4
9828756e05
Adwaita: Move placessidebar-specific sizing from .navigation-sidebar
...
The common .navigation-sidebar styling should be more generic.
2020-11-23 10:51:58 +01:00
nana-4
40f2b49c0d
Adwaita: Make treeexpander styling generic
...
The widget can be used outside .navigation-sidebar.
This also fixes the label misalignment in the widget.
2020-11-23 10:51:58 +01:00
nana-4
8e81cbef2c
stacksidebar: Add missing .navigation-sidebar to the inner list
...
Also don't set :show-separators, which is not applied in other sidebars.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-23 10:51:58 +01:00
Timm Bäder
47d572834b
Merge branch 'scalebutton' into 'master'
...
properly set ScaleButton's parent_class
Closes #3381
See merge request GNOME/gtk!2877
2020-11-23 07:38:17 +00:00
Bilal Elmoussaoui
46601325f1
properly set ScaleButton's parent_class
...
GtkScaleButton doesn't subclass GtkButton anymore
Fixes #3381
2020-11-23 02:47:12 +01:00
Emmanuele Bassi
0abc7a3361
Merge branch 'nullables-1' into 'master'
...
Fix some nullable return annotations
See merge request GNOME/gtk!2873
2020-11-21 16:11:34 +00:00
Sophie Herold
1e01b9079d
Fix some nullable return annotations
2020-11-21 16:33:40 +01:00
Piotr Drąg
be688c46f2
Update POTFILES.skip
2020-11-21 14:39:17 +01:00
Jakub Steiner
ab163f168d
Merge branch 'wip/jimmac/clipped-menu-shadows' into 'master'
...
Adwaita: avoid clipping menu shadows
Closes #1987
See merge request GNOME/gtk!2872
2020-11-20 12:37:49 +00:00
Jakub Steiner
e937f7eac8
Revert "Adwaita: unified sidebar styles"
...
Doing the same mistake twice :( Even margin is eating from the container,
not expanding outside of it.
This reverts commit 6be575992f .
2020-11-20 13:24:23 +01:00
Jakub Steiner
b84945e43f
Merge branch 'wip/jimmac/sidebar-backdrop' into 'master'
...
Adwaita: don't backdrop labels
Closes #3377
See merge request GNOME/gtk!2868
2020-11-20 12:08:59 +00:00
Jakub Steiner
b3dba1dca6
Adwaita: avoid clipping menu shadows
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-11-20 13:04:04 +01:00
Jakub Steiner
060cfc713f
Merge branch 'wip/jimmac/unified-sidebar-styles' into 'master'
...
Adwaita: unified sidebar styles
Closes #3382
See merge request GNOME/gtk!2871
2020-11-20 11:40:30 +00:00
Jakub Steiner
6be575992f
Adwaita: unified sidebar styles
...
- stacksidebar focus, separation and color as everything else
- eliminate placessidebar double padding
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3382
2020-11-20 12:24:40 +01:00
Jakub Steiner
4bec75c66b
Adwaita: don't backdrop labels
...
- instead of overriding :backdrop for sidebars, continue pursuing
not to backdrop anything but headerbar items and buttons.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3377
2020-11-20 09:34:23 +01:00
Matthias Clasen
8e4cc59a7a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2870
2020-11-20 02:02:10 +00:00
Matthias Clasen
c17227966d
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/main: Do not unset active state on button release w/o implicit grab
See merge request GNOME/gtk!2869
2020-11-20 01:46:03 +00:00
Matthias Clasen
a2ce6268b2
gtk-demo: Make a more interesting constraints demo
...
Show various ways to influence spacing. This is more or
less modeled on the way Androids constraint layout lets
you set up 'chains'.
2020-11-19 20:35:15 -05:00
Carlos Garnacho
5ab14ff7f6
gtk/main: Do not unset active state on button release w/o implicit grab
...
If an active grab gets undone on button press (e.g. closing a menu), we
will receive a button release on the new target even though it didn't handle
the button press, and disable ::active state.
This causes warnings when handling the button release, as it tries to undo
::active state that is not really there.
In order to fix this, check that the pointer focus actually had an implicit
grab at the time of receiving the button release, before trying to unset
the ::active state.
2020-11-19 22:58:14 +01:00
Emmanuele Bassi
8482b956d6
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2867
2020-11-19 16:37:58 +00:00
Matthias Clasen
562c7b1ff3
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
GTK4: various fixes
See merge request GNOME/gtk!2864
2020-11-19 16:05:47 +00:00
Jakub Steiner
8099de22f9
Merge branch 'wip/jimmac/industrial-style-menuitems' into 'master'
...
Adwaita: revert edge-to-edge menuitems
Closes #3366
See merge request GNOME/gtk!2866
2020-11-19 15:52:25 +00:00
Emmanuele Bassi
a4c3bee4a1
a11y: Hide children of GtkFishBowl
...
The fishbowl widget is purely presentational, and its children should
not be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
5afa985e85
demo: Make GtkFishBowl a presentation widget
...
It has no accessible content, even if it displays widgets.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
e600a07237
a11y: Skip atspi.Cache signals for hidden elements
...
If the accessible object is hidden, we can skip the emission of the
AddAccessible and RemoveAccessible signals on the cache, as those
objects won't be visible in the accessibility tree.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
8fa58c2e17
a11y: Get the accessible role once
...
Simplify getting the accessible role when checking if an accessible
implementation should present itself; this avoids going through
GtkAccessible twice to get the same data.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
d436c2e839
a11y: Remove weak ref from atspi.Cache
...
The GtkAtSpiContext is responsible for removing itself from the root,
which will remove itself from the cache. Any code path that leads to the
GtkAtSpiContext instance being collected passes through the
unrealization phase, which will also unregister the context from the
accessibility bus and from the cache.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
b37634dcd5
a11y: Add a fallback for the root base path
...
In case g_get_prgname() returns NULL, which seems to be the case for the
GTK tests.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
2d636fdda0
a11y: Reuse the generated AT-SPI interface name
...
We already have the name available.
2020-11-19 15:20:56 +00:00
Emmanuele Bassi
28095641c5
a11y: Use the appropriate GVariant for cache signals
...
We need to wrap the argument for AddAccessible and RemoveAccessible into
a tuple, as that's what GDBus expects.
2020-11-19 12:14:55 +00:00
Jakub Steiner
d58b06ceeb
Adwaita: revert edge-to-edge menuitems
...
- use the old Industrial style menuitems to make the design feel purposeful
- adjust corners to have compatible border-radii of child elements
- include sidebars and navigation sidebars to look consistent
(plus the assistant sidebar)
Implements https://gitlab.gnome.org/GNOME/gtk/-/issues/3366
2020-11-19 11:16:28 +01:00
Christian Hergert
0d2ea14ac1
types: fix various use of volatile in type registration
...
The use of volatile was incorrect in GLib and has been that way for
a long time. Recently however that has changed, and this makes GTK
follow suit to avoid using volatile in the type registration.
See also: https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1719
Combined with the above merge request for GLib, this fixes a large
number of compilation warnings when using Clang.
2020-11-18 20:21:33 -08:00
Christian Hergert
82b4c34eca
gl: add some debugging information to DEBUG_OPS
2020-11-18 20:16:40 -08:00
Christian Hergert
ee47ddf5fd
lpr: fix cast warning
2020-11-18 20:16:40 -08:00
Christian Hergert
f32ae2964a
macos: fix various compiler warnings
2020-11-18 20:16:37 -08:00
Christian Hergert
eae5eaeb21
gl: use glFramebufferTexture2D to set framebuffer texture
...
When mapping a texture to the framebuffer, we can use the 2D
form instead of the cube mapping form.
2020-11-18 20:09:01 -08:00
Matthias Clasen
09fd2d61c4
gtk-demo: Rename some demos
...
This is just to make it easier for myself to
find the right sources.
2020-11-18 18:58:45 -05:00
Matthias Clasen
86d7ab7c50
docs: Update GtkSensitivityType docs
...
Don't talk about steppers here, since we are only using
this type for combobox buttons nowadays.
2020-11-18 18:18:31 -05:00
Matthias Clasen
88be92ceee
scrollbar: Don't talk about steppers
...
There steppers were lost on the way from GtkRange
to GtkScrollbar, so don't talk about them in the docs.
2020-11-18 17:27:13 -05:00
Matthias Clasen
04c4b387a0
gtk-demo: Add more keywords
...
Add GtkShortcutController as a keyword to some demos that
show its use.
2020-11-18 10:48:57 -05:00
Matthias Clasen
7551f85d4c
Merge branch 'wayland-minimize' into 'master'
...
wayland: Implement minimization
Closes #2688
See merge request GNOME/gtk!2861
2020-11-18 14:23:56 +00:00
Matthias Clasen
184886f893
Merge branch 'constraint-editor-work' into 'master'
...
Constraint editor work
See merge request GNOME/gtk!2863
2020-11-18 12:19:07 +00:00
Matthias Clasen
36ef94b002
constraint-editor: Fix creating constant constraints
...
We were not making the button sensitive in the case
of a constant constraint, and we were not properly
creating constant constraints either.
2020-11-17 23:16:57 -05:00
Matthias Clasen
831ebe3ef2
constraint-editor: Fix saving of constraints
...
g_file_replace_contents take a gsize, so passing -1
for string length does not work here.
2020-11-17 23:14:29 -05:00
Matthias Clasen
76b8676955
constraintlayout: Fix parsing of constant constraints
...
We were inadvertently turning constant constraints into
constraints against super, due to confusion between target
and source attribute.
2020-11-17 23:11:16 -05:00
Matthias Clasen
b3243132a0
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: fix rendering artifacts with hover transitions
See merge request GNOME/gtk!2862
2020-11-18 03:04:01 +00:00
Matthias Clasen
de461712a1
constraint-editor: Improve display of constraints
...
No need to go for ALGOL60 style operators when we
have Unicode.
2020-11-17 21:52:15 -05:00
Christian Hergert
dd7f52c59a
macos: fix rendering artifacts with hover transitions
...
Using an image surface seems to fix some rendering artifacts when
performing cross-fade CSS transitions.
2020-11-17 18:20:55 -08:00
Matthias Clasen
3f1bc740e4
wayland: Implement minimization
...
Use the set_minimized method of the xdg_toplevel
interface to implement minimization as well as possible.
It is not possible, since there is no corresponding
state that we could use to update our surface state,
but in practice, it works well enough.
Fixes : #2688
2020-11-17 19:57:56 -05:00
Matthias Clasen
9128ad105b
Merge branch 'wip/carlosg/for-master' into 'master'
...
gdk/wayland: Update to gtk_shell1 version 3
See merge request GNOME/gtk!2860
2020-11-18 00:13:17 +00:00
Carlos Garnacho
745cbc6c91
gdk/wayland: Update to gtk_shell1 version 3
...
Bring in line with gtk3, in terms of startup notification and
activation support.
2020-11-18 00:41:46 +01:00
Matthias Clasen
b635736ac2
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
node-editor: fix length of text during save
See merge request GNOME/gtk!2859
2020-11-17 22:49:05 +00:00
Matthias Clasen
ba081bf119
Merge branch 'fix-doc-packtype' into 'master'
...
doc: Adapt GtkPackType documentation to GTK4 changes
See merge request GNOME/gtk!2858
2020-11-17 22:46:43 +00:00
Christian Hergert
3003f37e9d
node-editor: fix length of text during save
...
The length parameter for g_file_replace_contents() is a gsize, so -1 is
unsuitable here. Just use strlen() directly.
2020-11-17 14:34:11 -08:00
Matthias Clasen
c1e05e7c52
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3278
See merge request GNOME/gtk!2856
2020-11-17 19:25:05 +00:00
Matthias Clasen
6b475aacd2
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
inspector: handle differences in DPI between backends
See merge request GNOME/gtk!2857
2020-11-17 19:24:47 +00:00
vanadiae
bc4969ec42
doc: Adapt GtkPackType documentation to GTK4 changes
...
Since GTK4, the functions that used the GtkPackType enumeration,
`gtk_box_pack_{start,end}`, were replaced by `gtk_box_{append,prepend}`,
hence this enumeration isn't used anymore by any function within the
GtkBox type, and the child packing properties were also removed for GTK4.
So this commit adapts the documentation accordingly.
2020-11-17 20:19:16 +01:00
Benjamin Otte
1c7daece7a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2855
2020-11-17 19:08:01 +00:00
Christian Hergert
37a8c138f9
inspector: handle differences in DPI between backends
...
This fixes an issue on macOS where the text gets much larger once opening
the inspector.
2020-11-17 10:45:25 -08:00
Matthias Clasen
34d547a2aa
inspector: Limit the width of readonly properties
...
For readonly properties, we show the serialized value
in a label. If we don't take precautions, this can cause
our window to grow extremely wide, and break things.
So, ellipsize things at a reasonable size.
Fixes : #3278
2020-11-17 13:36:57 -05:00
Benjamin Otte
163c04c101
snapshot: Add cleanup function to snapshot state
...
Otherwise we're leaking data in error cases.
2020-11-17 19:04:39 +01:00
Benjamin Otte
f2284ff40f
rendernode: Rename all gsk_render_node_peek_*() functions
...
Those are getters, they should be gsk_render_node_get_*() functions.
2020-11-17 19:04:39 +01:00
Benjamin Otte
eded9459df
tests: Fix for new tranfer behavior of constructors
...
We were still unreffing a listmodel where the reference wasn't ours
anymore.
2020-11-17 19:04:39 +01:00
Benjamin Otte
8fd1530848
testsuite: Make defaultvalue test always get the property
...
Make the test not skip properties completely, just skip checking the
property.
This caught the last 2 commits.
2020-11-17 19:04:39 +01:00
Benjamin Otte
77f9efa747
textbuffer: Remove unused properties
...
The getters and setters were removed in
f53848c360 but the pspecs were forgotten.
2020-11-17 19:04:39 +01:00
Benjamin Otte
109ec523cb
shortcut: Actions are objects
2020-11-17 19:04:39 +01:00
Emmanuele Bassi
5cc5022a8f
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: bring forward quartz search engine updates
See merge request GNOME/gtk!2854
2020-11-17 17:58:14 +00:00
Emmanuele Bassi
3c769bb11d
Merge branch 'ebassi/inout-args' into 'master'
...
Remove pointless inout arguments
See merge request GNOME/gtk!2853
2020-11-17 17:40:13 +00:00
Christian Hergert
33b07e4825
macos: bring forward quartz search engine updates
...
These were not cherry picked after GTK branched for 4 development.
2020-11-17 09:37:13 -08:00
Matthias Clasen
714e5c72f6
docs: Add details about plain builds
...
Mention that build type 'plain' puts the responsibility
for debug features into the hands of the builder.
Related: !2831
2020-11-17 12:21:29 -05:00
Emmanuele Bassi
153c6424d3
Remove pointless inout arguments
...
GtkTreeView.get_tooltip_context() takes an inout X and Y coordinates,
but the "out" side is a side effect: the conversion from widget-relative
to bin window-relative coordinates is not documented, and can be done
using public API, if needed.
GtkIconView.get_tooltip_context() follows the same pattern, and takes
two inout arguments for the coordinates, but it does not change them any
more, after GtkIconView's bin window was dropped in commit 8dc5e13e .
There's really no point in having these `inout` arguments, and while
GtkTreeView and GtkIconView are certainly de-emphasised in GTK4, and we
nudge developers to move to the new list views, we should take advantage
of the API break to remove warts.
2020-11-17 16:38:12 +00:00
Emmanuele Bassi
b76e514322
Merge branch 'ebassi/for-master' into 'master'
...
Introspection fixes
Closes #3281
See merge request GNOME/gtk!2852
2020-11-17 16:04:03 +00:00
Jakub Steiner
1501aa0603
Revert "Adwaita: avoid clipping menu/popover shadow"
...
There are big side effects to adding padding around all menus and popovers.
https://gitlab.gnome.org/GNOME/gtk/-/issues/1987#note_963889
This reverts commit d266bd62de .
2020-11-17 16:53:32 +01:00
Emmanuele Bassi
cf5a173a4f
Add type annotations for GtkShortcutAction types
...
The constructors and singleton getters need proper annotations for their
return type, given that we return a base type.
2020-11-17 14:17:26 +00:00
Matthias Clasen
2b8c3731c1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2851
2020-11-17 14:12:23 +00:00
Emmanuele Bassi
ade2f1030a
Annotate GdkTimeCoord's array field
...
We need to resolve the array length manually, because g-ir-scanner
cannot turn an enumeration member into a constant size.
2020-11-17 14:07:11 +00:00
Emmanuele Bassi
4f12df5f1c
Annotate the return type for GtkTreeExpander.get_item()
...
We use gpointer for C convenience, but the returned value is really a
GObject.
2020-11-17 13:54:22 +00:00
Emmanuele Bassi
9941799449
Annotate out argument for gdk_popup_layout_get_offset()
2020-11-17 13:52:15 +00:00
Emmanuele Bassi
5a938ad83d
Annotate the gsk_border_node_peek_widths() return value
...
We return a fixed sized C array of floats.
2020-11-17 13:48:07 +00:00
Matthias Clasen
835c807d7a
widget-factory: Remove an unused size group
...
This was left behind when 361407201b removed
the unused popover that this size group applied to.
2020-11-17 07:34:53 -05:00
Matthias Clasen
2ef72442ec
docs: Fix the links for keybinding signals
...
GtkBindingSignal does not exist anymore, so link to
GtkSignalAction for an explanation of keybinding signals.
2020-11-17 07:34:52 -05:00
Matthias Clasen
3bc2bf40a8
popover: Document signals
2020-11-17 07:34:52 -05:00
Matthias Clasen
cd4c0b6127
menubutton: Fix a gtk-doc complaint
2020-11-17 07:34:52 -05:00
Matthias Clasen
fa79e8651e
gtk: Fix a doc oversight
2020-11-17 07:34:52 -05:00
Matthias Clasen
9a29487e25
gsk: Fix a doc oversight
2020-11-17 07:34:52 -05:00
Matthias Clasen
fceff93994
Merge branch 'fix-gi-warning' into 'master'
...
Fix a warning caused by difference between prototype and definition
See merge request GNOME/gtk!2849
2020-11-17 12:31:36 +00:00
Matthias Clasen
acd8b08d35
Merge branch 'wip/exalm/caption' into 'master'
...
widget-factory: Fix caption style class name
See merge request GNOME/gtk!2850
2020-11-17 12:22:29 +00:00
Alexander Mikhaylenko
2abee57421
widget-factory: Fix caption style class name
...
It's lowercase.
2020-11-17 13:16:47 +05:00
Qiu Wenbo
437f902c9d
Fix a warning caused by difference between prototype and definition
...
This commit fix the warning:
../gdk/wayland/gdkdisplay-wayland.c:1079: Warning: GdkWayland: gdk_wayland_display_set_cursor_theme: unknown parameter 'name' in documentation comment, should be 'theme'
2020-11-17 14:59:14 +08:00
Matthias Clasen
a7befc647e
Merge branch 'gsk-binding-api' into 'master'
...
gsk: Avoid using gtk css types in public api
Closes #2454
See merge request GNOME/gtk!2848
2020-11-17 05:36:15 +00:00
Matthias Clasen
121e61cf01
gsk: Avoid using gtk css types in public api
...
Using GtkCssSection in public headers here may be
ok from the C perspective, since it all ends up in
the same library anyway. But it causes circular
dependency problems for our gir files that are still
split by namespace.
To avoid this problem, copy the GtkCssLocation struct
struct as GskParseLocation, and pass take two of them
instead of a GtkCssSection in the error callback.
Update all users.
Fixes : #2454
2020-11-16 23:27:44 -05:00
Matthias Clasen
f7ac13b78f
Merge branch 'matthiasc/for-master' into 'master'
...
popover: Fix submenu navigation
Closes #3301
See merge request GNOME/gtk!2847
2020-11-17 03:11:13 +00:00
Matthias Clasen
c2ae73f247
popover: Fix submenu navigation
...
In commit 024d832d94 , we introduced a
cascade-popdown property that makes closing a submenu
propagate up and close its parent menus. This is the
behavior we want when a menuitem in the submen is
activated.
What we overlooked is that we still need to be able to
close a submenu during navigation, before opening another
one. And in this case, propagating the closing is breaking
things. Fix this by adding a private close_submenu api
to GtkPopoverMenu that avoids the propagation.
Fixes : #3301
2020-11-16 21:34:33 -05:00
Benjamin Otte
4b0b6100d6
build: Include GSK types in gtk_test_register_all_type()
2020-11-17 03:13:31 +01:00
Matthias Clasen
2c9bf55eea
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2846
2020-11-17 01:07:34 +00:00
Emmanuele Bassi
1d11d42aa0
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2840
2020-11-16 23:06:55 +00:00
Matthias Clasen
361407201b
widget-factory: Remove an unused popover
...
We are no longer using the hand-rolled variant of that
popover on page 3, so drop it from the ui file.
2020-11-16 15:22:12 -05:00
Matthias Clasen
50c29398e6
Merge branch 'wip/exalm/button' into 'master'
...
Allow pressing multiple buttons at once on touch
See merge request GNOME/gtk!2813
2020-11-16 20:16:10 +00:00
Jakub Steiner
dff8a9eb46
Merge branch 'wip/jimmac/popover-menu-submenus' into 'master'
...
Adwaita: fix up submenus again
See merge request GNOME/gtk!2845
2020-11-16 19:50:08 +00:00
Matthias Clasen
1bb4e660fd
Merge branch 'wip/chergert/for-master' into 'master'
...
gsk: use glFrameBufferTexture2D and release texture
See merge request GNOME/gtk!2842
2020-11-16 19:20:19 +00:00
Jakub Steiner
ded6ec6424
Merge branch 'wip/jimmac/circular-button-focus' into 'master'
...
Adwaita: circular button focus
Closes #3368
See merge request GNOME/gtk!2844
2020-11-16 18:55:30 +00:00
Jakub Steiner
47e49acc7d
Adwaita: fix up submenus again
...
- move menubar section under more generic popover.menu
rather than resort to specificity dir(ltr) hacks
2020-11-16 19:48:11 +01:00
Jakub Steiner
0996b178dc
Adwaita: circular button focus
...
- have the same focus look like the other items
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3368
2020-11-16 19:11:52 +01:00
Matthias Clasen
4befd13744
Merge branch 'wip/jimmac/spinbutton-spacing' into 'master'
...
Adwaita: spinbutton spacing
Closes #3370
See merge request GNOME/gtk!2841
2020-11-16 17:50:56 +00:00
Emmanuele Bassi
bb1463871c
a11y: Ensure valid object paths in the fallback code
...
When falling back to using the program name to create a unique base path
for the objects on the accessibility bus we need to ensure that the name
is a valid DBus object path.
2020-11-16 17:47:15 +00:00
Christian Hergert
12a9164414
gsk: use glFrameBufferTexture2D and release texture
...
glFrameBufferTexture maps to all faces of a cube and that is not needed
here. Additionally, texture_id is not deleted after we use the additional
flipped texture, but should be.
2020-11-16 09:26:07 -08:00
Jakub Steiner
108fe033aa
Adwaita: spinbutton spacing
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3370
2020-11-16 18:22:17 +01:00
Emmanuele Bassi
9de2b4b0e1
a11y: Implement atspi.Cache
...
The AT-SPI cache interface is used to quickly populate the accessible
objects tree.
The tricky bit is ensuring that we emit change notifications on the
cache only when the cache is available, which means waiting until the
root is asynchronously registered.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
ee056fd8bd
a11y: Update the Cache interface introspection
...
The type for cached items is, unsurprisingly, wrong when compared to the
implementation inside atk-spi2-atk.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
bc4f71a107
a11y: Add getters for GtkAtSpiContext
...
We are going to use them in order to implement atspi.Cache.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
125442297f
a11y: Use the tab widget to label the notebook stack page
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
eec92b40ea
a11y: Compute the base path in the root object
...
The root path is shared by all AtSpiContext instances, so we should
compute it once, instead of every time we instantiate a new context.
This allows us to defer the path creation at realization time and ensure
that we have a registered application.
2020-11-16 16:44:56 +00:00
Emmanuele Bassi
d392f6f2a4
a11y: Resync the AT-SPI XML
...
Mostly just changes in the annotations coming from at-spi2-core, but
it's good to try and keep the XML in sync.
2020-11-16 16:44:56 +00:00
Jakub Steiner
41a9c46ec8
Merge branch 'wip/jimmac/circular-button-padding' into 'master'
...
Adwaita: circular buttons
See merge request GNOME/gtk!2838
2020-11-16 14:50:16 +00:00
Matthias Clasen
0530aeec17
docs: Mention cairo-gobject as build requires
...
Using cairo from a system dependency and cairo-gobject
as subproject is problematic and left me stuck on a
hard-to-understand build error.
2020-11-16 09:31:23 -05:00
Jakub Steiner
22741a74ff
Adwaita: circular buttons
...
- the vertical padding was thown off with the chin/forehead of menus removed
2020-11-16 15:21:46 +01:00
Jakub Steiner
23331c1919
Merge branch 'wip/jimmac/menu-clipped-shadow' into 'master'
...
Wip/jimmac/menu clipped shadow
Closes #1987
See merge request GNOME/gtk!2837
2020-11-16 14:10:21 +00:00
Jakub Steiner
d266bd62de
Adwaita: avoid clipping menu/popover shadow
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1987
2020-11-16 14:20:24 +01:00
Matthias Clasen
57c95937b1
gsk: Fix some docs oversights
...
These apis have been renamed a few times, and the docs
haven't kept up.
2020-11-16 07:44:41 -05:00
Matthias Clasen
1d86086434
gdk: Docs cosmetics
...
Add a few missing parameters in doc comments.
2020-11-16 07:44:17 -05:00
Matthias Clasen
e2f26b0d9a
docs: Fix a typo
2020-11-16 07:37:33 -05:00
Matthias Clasen
7816fc2b83
docs: Remove gtk_render_insertion_cursor
...
This function was removed in 2bcef7f030 .
2020-11-16 07:35:41 -05:00
Jakub Steiner
04d802f7f4
Adwaita: remove chin on menus
...
- clipping a rounded corner seems to be working fine for first and last item.
Addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/3366
2020-11-16 13:31:27 +01:00
Jakub Steiner
994cc32d7b
Merge branch 'wip/jimmac/subtle-sidebar' into 'master'
...
Adwaita: navigation sidebar color changes
Closes #3362
See merge request GNOME/gtk!2836
2020-11-16 09:34:36 +00:00
Jakub Steiner
f14ca28c4e
Adwaita: navigation sidebar color changes
...
- use more subtle selected state grey
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3362
2020-11-16 10:17:57 +01:00
Matthias Clasen
da9d32e472
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2835
2020-11-16 04:29:10 +00:00
Matthias Clasen
08d6db4ab6
gtk-demo: Plug a memory leak
...
The Characters demo was leaking its columns.
2020-11-15 23:03:30 -05:00
Matthias Clasen
6891f40110
modelbutton: Fix keynav for check and radio
...
The expected behavior when activating check or radio
menuitems via keynav is that Space toggles the item
but keeps the menu open, while Return toggles the
item and closes the menu.
2020-11-15 21:52:07 -05:00
Matthias Clasen
cdbf24c3af
Merge branch 'fix-tooltip-trigger' into 'master'
...
Fix tooltip triggering
See merge request GNOME/gtk!2833
2020-11-15 17:37:47 +00:00
Matthias Clasen
b30715da6a
Fix tooltip triggering
...
Ever since 5b5d2665d3 , tooltips don't work properly,
since we get more motion events now, and those keep the
tooltips from appearing. This can be seen e.g. on the icon
in the password entry in widget-factory, or on the section
switcher buttons in the Emoji chooser.
Ignore synthetic motion events for the purposes of
determining whether the user moved the mouse.
2020-11-15 10:54:36 -05:00
Emmanuele Bassi
5e9883453d
Merge branch 'widget-no-a11y-crash' into 'master'
...
gtkwidget: fix crashes with GTK_A11Y=none
Closes #3333
See merge request GNOME/gtk!2834
2020-11-15 15:23:42 +00:00
Christoph Reiter
b97b95b0c7
gtkwidget: fix crashes with GTK_A11Y=none
...
at_context can be NULL in that case, so guard against it.
Fixes #3333
2020-11-15 15:59:31 +01:00
Matthias Clasen
dd0a854bbb
Merge branch 'button-fill-var-removal' into 'master'
...
Adwaita: Stop using $button_fill
Closes #3354
See merge request GNOME/gtk!2828
2020-11-15 13:45:42 +00:00
Matthias Clasen
b8d0ad8643
Merge branch 'parse-debug-env-vars-always' into 'master'
...
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode
See merge request GNOME/gtk!2830
2020-11-15 13:37:44 +00:00
Christoph Reiter
65d57877a8
Revert "Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified."
...
This reverts commit 1340ff2bc2 .
Same as with 53cd499621
2020-11-15 13:36:42 +01:00
Christoph Reiter
afc73c38ce
Always parse GTK/GDK/GSK_DEBUG env vars and make some entries available in non-debug mode
...
Currently GTK can be built with G_ENABLE_DEBUG which enables various debug code and parsing
of those env vars, or without, which instead of parsing them prints a warning if they are set.
While building with G_ENABLE_DEBUG isn't strictly needed it's the only way to make GTK_DEBUG=interactive work,
which is a nice thing to have always.
This enables parsing of those env vars in any case and allows specific values being marked as also
available when not built with G_ENABLE_DEBUG (interactive for example). If not built with G_ENABLE_DEBUG
then all unavailable values will be marked as such in the help output and a note is added that
GTK needs to be built with G_ENABLE_DEBUG to use them, which should help discoverability.
2020-11-15 11:34:54 +01:00
Yuri Chornoivan
f4e1c271ea
Update Ukrainian translation
2020-11-15 08:01:26 +00:00
Matthias Clasen
8e42239439
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtk/main: Reset active state on grab broken only if implicit
See merge request GNOME/gtk!2832
2020-11-14 14:41:01 +00:00
Carlos Garnacho
5b4ac5456e
gtk/main: Reset active state on grab broken only if implicit
...
An implicit grab means some button is down, reset the active state
only in that case when we get a grab broken event.
Avoids active state accounting warnings when we do get active grabs
broken (e.g. after selecting a menu option).
2020-11-14 10:52:34 +01:00
nana-4
f1db73379e
Adwaita: Stop using $button_fill
...
Since the $button_fill variables are no longer used outside of the
button() mixin (and it was for an ugly hack), there is no need to keep
that anymore.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3354
2020-11-14 10:13:05 +09:00
Matthias Clasen
20918dbe8e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3359 and #3353
See merge request GNOME/gtk!2827
2020-11-14 00:15:34 +00:00
Matthias Clasen
b5ec20db88
Adwaita: Fix list separators
...
Commit bfe5b0d1b7 ran into some specificity
trouble.
Fixes : #3353
2020-11-13 17:18:05 -05:00
Matthias Clasen
d347df431d
label: Avoid short-circuiting
...
Commit 0db504edde made a mistake described here:
https://en.wikipedia.org/wiki/Short-circuit_evaluation#Possible_problems
Fixes : #3359
2020-11-13 15:35:51 -05:00
Matthias Clasen
25e6988d95
Merge branch 'alatiera/nightly-demos' into 'master'
...
ci: publish demo apps to the Nightly repository
See merge request GNOME/gtk!2825
2020-11-13 19:28:44 +00:00
Matthias Clasen
a7f05b8d91
Merge branch 'wip/jimmac/tooltips' into 'master'
...
Adwaita: tooltip styling
Closes #3352
See merge request GNOME/gtk!2826
2020-11-13 19:23:58 +00:00
Jordan Petridis
fe690265eb
ci: publish demo apps to the Nightly repository
2020-11-13 20:38:09 +02:00
Jakub Steiner
f45ea3fa90
Adwaita: tooltip styling
...
- balance padding
- increase border radius, yuck
- get rid of text shadow
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3352
2020-11-13 19:36:26 +01:00
Jakub Steiner
bdc28cd870
Merge branch 'wip/jimmac/submenus' into 'master'
...
Wip/jimmac/submenus
See merge request GNOME/gtk!2824
2020-11-13 17:05:00 +00:00
Jakub Steiner
c648c1f235
Merge branch 'wip/jimmac/declare-buttonfill-once' into 'master'
...
Adwaita: double declated $button_fill
See merge request GNOME/gtk!2823
2020-11-13 16:57:18 +00:00
Jakub Steiner
8a92ee03ea
Adwaita: rounded submenus
...
- all corners have rounded corners
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2745
2020-11-13 17:27:40 +01:00
Jakub Steiner
e3c72f8f09
Adwaita: double declared $button_fill
...
- this was already in place in _common, no need to have it in _colors
2020-11-13 17:24:13 +01:00
Jakub Steiner
1f472104ad
Adwaita: double declated $button_fill
...
- this was already in place in _common, no need to have it in _colors
2020-11-13 17:21:03 +01:00
Jakub Steiner
4b41580041
Merge branch 'wip/exalm/window' into 'master'
...
Round window corners
See merge request GNOME/gtk!1952
2020-11-13 15:33:15 +00:00
Matthias Clasen
c136f84584
Merge branch 'wip/carlosg/for-master' into 'master'
...
Improve handling of ::active with touch and multiple foci
Closes #3348
See merge request GNOME/gtk!2821
2020-11-13 04:13:34 +00:00
Carlos Garnacho
80de00a248
gtk/main: Stack ::active calls
...
We may have the situation of multiple touchpoints in the same
widget, or combinations with other devices. Stack those ::active
states are preserved on widgets on all but the last pointer/touch
going away.
2020-11-13 00:39:23 +01:00
Carlos Garnacho
50a7e59623
gtk/main: Toggle active flag with touch events
...
This went missing at some point, add the missing toggling of active
state with GDK_TOUCH_BEGIN/END/CANCEL events.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3348
2020-11-13 00:39:23 +01:00
Emmanuele Bassi
92ca3a3419
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2819
2020-11-12 22:22:20 +00:00
Emmanuele Bassi
8203d9cc40
a11y: Use GROUP role for ShortcutsShortcut
...
And hide the image from the accessible tree.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
abc9b403f8
a11y: Implement atspi.Text.ScrollSubstringTo for GtkTextView
...
We reuse the existing implementation in GTK3.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
b9ad3172a4
a11y: Document GtkRevealer's accessible state
...
Use the GROUP role, and make sure to note that the child is always
revealed. Unlike GtkExpander, GtkRevealer can only be programmatically
toggled, so we cannot turn it into a "button" object.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
0d7fcdda28
a11y: Add more accessible data to GtkTreeExpander
...
Document the role of the GtkTreeExpander, and the behaviour of the
expander button.
Additionally, improve the label of the expander button, by adding a
fixed "Expand" label, and setting the "labelled-by" relation to the
child of the GtkTreeExpander.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
75f9b83b1e
Establish a control relation between demo search and list
...
The search entry changes the content of the list view, so we should
mention that relation to assistive technologies.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
61e980bfb6
a11y: Add accessible actions to GtkSearchEntry
...
Just like GtkPasswordEntry, GtkSearchEntry should have its set of
accessible actions.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
ebda736a09
a11y: Mark SearchEntry icons as presentational
...
While the "clear the search entry" icon behaves like a button, we don't
have any actual action that can trigger it, so let's ignore it.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
d4ddfdc265
a11y: Set the role on GtkSearchBar
...
The search bar widget has a "SEARCH" landmark role, which is described
as:
A landmark region that contains a collection of items and
objects that, as a whole, combine to create a search facility.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
f8bb206034
a11y: Icons in buttons are presentational
...
Buttons are described by text, and the icon child can be safely ignored.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
87f92a93d3
a11y: Add more accessibility labels to GtkNotebook
...
Label the various components:
- the tab list
- the tab widget
- the arrow widgets
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
e49e084f4c
a11y: Use the stack page title as its accessible label
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
995daa1e29
a11y: GtkStack is a group of stack pages
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
d34936c1ea
Handle empty stack pages when creating an ATContext
...
If we don't have a widget inside GtkStackPage, we should use the default
GdkDisplay.
2020-11-12 21:46:06 +00:00
Emmanuele Bassi
a59889a274
Unrealize the ATContext in StackPage on dispose
...
Otherwise we're going to try to unrealize it during the GtkStack
destruction, which will emit warnings.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
bfb054a023
a11y: Icons in WindowControls are presentational only
...
They don't contribute anything to the accessible description.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
e940704018
a11y: Ignore more structural roles when computing labels
...
These roles should not have a fallback name when explicitly unlabelled.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
429c7fc039
a11y: Add role exception for GtkScrolledWindow
...
ARIA does not have a "scroll pane" role, but AT-SPI does.
2020-11-12 21:46:05 +00:00
Emmanuele Bassi
0d6e4f7a6e
demo: Add more accessibility labels to the UI
2020-11-12 21:46:05 +00:00
Matthias Clasen
1f9eb5c64c
Merge branch 'clear-search-entry' into 'master'
...
searchbar: Fix clearing search entry on hide
See merge request GNOME/gtk!2820
2020-11-12 19:25:57 +00:00
Florian Müllner
056a073061
searchbar: Fix clearing search entry on hide
...
Commit fa3d1940bf added separate grab handling for GtkSearchEntry, but
didn't consider whether the bar was revealed or concealed. The expected
behavior for the latter is that the entry is cleared rather than focused,
fix the condition accordingly.
2020-11-12 19:59:55 +01:00
Alexander Mikhaylenko
e46522e4b5
theme: Round all window corners
2020-11-12 22:19:00 +05:00
Alexander Mikhaylenko
7ac7919697
theme: Restructure window style
2020-11-12 22:17:52 +05:00
Matthias Clasen
5d9799d4e3
Merge branch 'ebassi/for-master' into 'master'
...
ATContext lifetime fixes
Closes #3341
See merge request GNOME/gtk!2811
2020-11-12 12:35:23 +00:00
Jakub Steiner
f95943a752
Merge branch 'wip/jimmac/sassc-global-vars' into 'master'
...
Adwaita: avoid !global
See merge request GNOME/gtk!2816
2020-11-12 12:34:10 +00:00
Jakub Steiner
ef88e9ffcc
Adwaita: avoid !global
...
- Work around having !global variables as sassc will
no longer support it
2020-11-12 13:14:37 +01:00
Alexander Mikhaylenko
49613dca8e
button: Don't make the gesture exclusive
...
With the last commit, pressing the same button with multiple fingers
doesn't cause extra emissions, so we can remove exclusive and allow
pressing multiple buttons at once on touch.
2020-11-12 15:27:16 +05:00
Alexander Mikhaylenko
a651a0ce69
gestureclick: Only emit release for the same sequence
...
Avoid spurious releases when touching the same widget with another finger.
2020-11-12 15:26:36 +05:00
Emmanuele Bassi
08d59d3f68
docs: Add "Accessibility" section to various widgets
...
There are a few widgets that gained an accessible role, which means
adding an "Accessibility" section in their description.
2020-11-12 00:36:32 +00:00
Matthias Clasen
afff39c503
Merge branch 'suggestion-entry-demo2' into 'master'
...
gtk-demo: Add suggestion entry demos
See merge request GNOME/gtk!2812
2020-11-11 21:40:07 +00:00
Matthias Clasen
a2897e1868
gtk-demo: Add suggestion entry demos
...
Add a possible replacement for GtkEntryCompletion
as a demo.
Move the Dropdowns demo to Lists/Selections, and make
it show both GtkDropDown and the suggestion entry, with
some variations.
2020-11-11 15:54:43 -05:00
Matthias Clasen
15172ebdb0
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2810
2020-11-11 20:49:51 +00:00
Emmanuele Bassi
9ac4a7d99f
a11y: Simplify GtkModelButton
...
Instead of recreating GtkATContexts in order to change their role, we
can simply unrealize and realize them back.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
8157717e03
a11y: Add missing fallback for accessible-role getter
...
If the per-instance accessible role is unset, use the class role.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
9052f6dafe
a11y: Rework ownership and lifetime of GtkATContext
...
Now that GtkATContext is explicitly realized and unrealized, we should
always create an instance at widget initialization time, and drop it
during the widget finalization. This should make it easier to set up the
initial accessible state of a widget during the instance initialization,
as well as reduce the chances of accidental creation of GtkATContext
instances during the destruction sequence.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
292576f312
a11y: Defer to the GtkAccessible's implementation
...
Since GtkATContexts are now lazily realized, we need to go through the
GtkAccessible's implementation to access the :accessible-role property,
in case there are fallbacks.
2020-11-11 19:45:43 +00:00
Emmanuele Bassi
2285382074
a11y: Create AtSpiRoot on realization
...
There's no need to do a lot of work on construction, if we're delaying
all remote work after the GtkATContext is realized.
The GtkAtSpiContext should also keep a reference on the root, and drop
it at unrealize time.
2020-11-11 18:46:44 +00:00
Emmanuele Bassi
526f1e315b
a11y: Use GROUP role for GtkNotebook
...
A notebook is a grouping of a tab list, tabs, and tab pages.
2020-11-11 18:46:11 +00:00
Emmanuele Bassi
877a7f98ca
a11y: Protect should_present() from empty contexts
...
If the GtkAccessible implementation returns a NULL context, we should
not be calling methods on it.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
73b14a3c3a
a11y: Do not leak the ATContext in GtkStackPage
...
GtkStackPage is not a widget, so it must release the reference on the
ATContext it owns.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
40c0826921
a11y: Mark more containers as structural elements
...
Widgets that just provide grouping and layout to other widgets should
not be relevant to the accessible tree.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
27b9b2e76c
a11y: Use the window title as its label
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
04c4d293a7
a11y: Skip unlabelled structural roles
...
If a structural role is left unlabelled, just leave it unnamed.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
033791b374
a11y: Translate ARIA windows to AT-SPI frames
...
For backward compatibility with GTK3.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
95ee5ff424
a11y: Add more ARIA/AT-SPI role translations
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
65d29e00c7
a11y: Realize parent ATContext for the stack page
...
Just like for popovers, the stack page is not directly connected on the
widget's DOM, so we need to realize the parent ATContext ourselves.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
3b2cd972d5
a11y: Implement missing atspi.Component getters
...
Some of them are entirely innocuous, and we can easily provide values
that match what GTK3 provides.
2020-11-11 18:33:15 +00:00
Emmanuele Bassi
428ec29598
a11y: Unrealize ATContext on dispose()
...
By unrealizing the context we avoid additional work during the dispose
phase, in case widget code updates the accessible state. We use
GtkAccessible's API, to ensure we unrealize the right ATContext, instead
of the one we store inside GtkWidgetPrivate.
We drop the ATContext instance inside GtkWidget during finalization, to
mop up eventual vivifications there.
2020-11-11 18:33:15 +00:00
Matthias Clasen
bfe5b0d1b7
Adwaita: Don't do n-th child things for list rows
...
Making the list row child css depend on the position
is very expensive, and does not acutally work correctly
(since we don't have widgets for all children, so the
position of the child widget does not reflect the actual
model item position).
To make this more palatable, use the bottom border
instead of the top border, since most lists have a natural
border at the top (with headers), and may end up with
empty space at the bottom.
2020-11-11 13:18:08 -05:00
Matthias Clasen
82b855cc4b
label: Avoid a needless strdup
...
Don't duplicate the string before we know if it
has actually changed.
2020-11-11 12:24:35 -05:00
Matthias Clasen
0db504edde
label: Optimize GtkLabel setters
...
The overarching goal here is to not queue a resize
unless something has actually changed. In columnview
scenarios, we often deal with hundreds of labels.
Labels are cattle, not pets.
2020-11-11 11:48:27 -05:00
Matthias Clasen
5ed3ad6cc8
gtk-demo: Split off SvgPaintable
...
Put the SvgPaintable implementation into its
own source files, for ease of copying.
2020-11-11 10:35:54 -05:00
Matthias Clasen
27c4c19333
Don't hide widgets in dispose()
...
This is leftover code from when widgets were hidden
by default, and was setting them back to their initial
state.
This is getting in the way now, as hiding the widget
updates the HIDDEN accessible state, which ends up
re-creating the at context that we've already disposed
of, leading to memory leaks.
2020-11-11 10:35:54 -05:00
Luca Bacci
aec87a3514
GdkWin32: Fix mouse events in presence of transparent windows on the desktop
...
In gdkdevice-win32.c we are interested in knowing which window
receives mouse input at a specific location.
Only WindowFromPoint is the right API for the task, other API's
(such as (Real)ChildWindowFromPoint(Ex)) have shortcomings because
they are really designed for other purposes. For example, only
WindowFromPoint is able to look through transparent layered windows.
So even if we want to find a direct child we have to use
WindowFromPoint and then walk up the hierarchy.
Fixes : #370 , #417
See: !2800
2020-11-11 12:46:52 +01:00
Matthias Clasen
74a7f73239
Merge branch 'matthiasc/builder-requires' into 'master'
...
Matthiasc/builder requires
See merge request GNOME/gtk!2806
2020-11-11 03:53:52 +00:00
Matthias Clasen
a047b7d6d1
Merge branch 'fix-demos-wo-pangoft2' into 'master'
...
gtk-demo: Fix building scrolling demo without PangoFT2
See merge request GNOME/gtk!2807
2020-11-11 03:50:46 +00:00
Chun-wei Fan
a76f37a501
gtk-demo: Fix building scrolling demo without PangoFT2
...
For builds that do not have PangoFT2, the demo fails to link because we weren't
building listview_ucd.c. Fix the build by building listview_ucd.c with
script-names.c and unicode-names.c for all builds, as we now require a Pango
version that already always depends on HarfBuzz and those sources do not use
anything from PangoFT2.
2020-11-11 11:15:05 +08:00
Matthias Clasen
d6a0948182
testsuite: Update buildertool tests
...
gtk-builder-tool simplify --3to4 now produces a
<requires lib="gtk" version="4.0"/>.
Adapt for that, and also add some tests that check that we
actually verify the requires, and accept 3.99 and 4.0, but
not 5.x.
2020-11-10 19:20:51 -05:00
Matthias Clasen
7215c74933
buildertool: Supplant a requires
...
When we convert a ui file to GTK 4 syntax, we *know*
that it requires GTK 4, so put that in the output.
2020-11-10 19:19:40 -05:00
Matthias Clasen
e4be785c6c
builder: Be a bit more strict about requires
...
Check that the major version matches (without this, the
requires check is really toothless), but allow 3.99 to
match 4.0.
2020-11-10 19:18:26 -05:00
Matthias Clasen
18779b9d67
testsuite: Remove <requires> from ui files
...
We don't need these here, the testsuite is shipped
with GTK.
2020-11-10 19:17:45 -05:00
Matthias Clasen
9b056f57f7
examples: Remove requires from ui files
...
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:38:54 -05:00
Matthias Clasen
d6c753bde7
gtk4-demo: Remove <requires> from ui files
...
No need to check requires for things that are shipped
with GTK.
2020-11-10 18:37:40 -05:00
Matthias Clasen
d69a943661
gtk: Remove <requires> from ui files
...
We don't need to check requirements for things
that are shipped *with* gtk.
2020-11-10 18:36:03 -05:00
Matthias Clasen
0ececc7109
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3343 and #3342
See merge request GNOME/gtk!2804
2020-11-10 18:33:36 +00:00
Matthias Clasen
3cc0870084
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2805
2020-11-10 16:59:47 +00:00
Emmanuele Bassi
2229d7f66c
docs: Add example of relations with lists of references
2020-11-10 14:38:09 +00:00
Emmanuele Bassi
ed7619ec16
a11y: Clone GtkATContext in GtkModelButton
...
The hypothetical widget that needs to clone ATContext instances
because it needs to control the accessible role post-construction is
really GtkModelButton.
Fixes : #3342
2020-11-10 14:31:57 +00:00
Emmanuele Bassi
7ed06480cf
a11y: Add private API to clone a GtkATContext
...
Some widgets might want to override GtkAccessible and create their own
context in order to control the accessible role post-construction time.
To avoid explicitly copying the existing state over from the original
ATContext to the new one, we need a way to clone the context's state
from inside the ATContext itself.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
f9db651f32
a11y: Do not copy the list of references
...
The constructor for GtkReferenceListAccessibleValue is transfer full,
which means we should not be copying the GList around.
Fixes : #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
c264254d4b
a11y: Parse reference lists using varargs
...
Using GList is a bit lame, and makes the API more complicated to use
than necessary in the common case.
The only real use case for a GList is gtk_widget_add_mnemonic_label(),
and for that we can use the GValue-based API instead.
Fixes : #3343
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
6af89e9034
a11y: Add GValue initializers for accessible attributes
...
Consumers of the GValue-based API for GtkAccessible need to have a way
to initialize the GValue with the correct type for the given attribute.
2020-11-10 14:31:56 +00:00
Emmanuele Bassi
1bdc8b9061
a11y: Proxy GtkWidget:accessible-role
...
The accessible-role property in GtkWidget has three possible targets:
- the :accessible-role of a GtkATContext, if realized
- the accessible_role field of GtkWidgetPrivate
- the accessible_role field of GtkWidgetClassPrivate
When we set the accessible role of a widget using the GObject property
mechanism, we want to either set the GtkWidgetPrivate.accessible_role
field, if there's no ATContext *or* if the ATContext is not realized.
Conversely, when we get the accessible-role property we want to have a
series of fallbacks in place:
- if GtkAccessible.get_at_context() returns an ATContext, and that
ATContext is realized, return the :accessible-role of the context
- if GtkWidgetPrivate.accessible_role is not WIDGET, return the
stored accessible role
- return GtkWidgetClassPrivate.accessible_role
This should help catch the case of getting the accessible role of
widgets that override GtkAccessible.get_at_context(), like
GtkModelButton.
See: #3342
2020-11-10 14:31:56 +00:00
Matthias Clasen
c442f9f05a
printdialog: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:54 -05:00
Matthias Clasen
6cbd7e29dd
fontchooser: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:40 -05:00
Matthias Clasen
6079033cde
columnview: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:22 -05:00
Matthias Clasen
d63afaf5ad
x11: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:07:01 -05:00
Matthias Clasen
7e089664fc
win32: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:06:37 -05:00
Matthias Clasen
06fbad0b26
wayland: Plug listmodel memory leaks
...
We were leaking references returned from g_list_model_get_item
in some places.
2020-11-10 09:05:55 -05:00
Yuri Chornoivan
2a3c3b4c6a
Update Ukrainian translation
2020-11-10 08:15:59 +00:00
Yuri Chornoivan
eb3933cffd
Update Ukrainian translation
2020-11-10 07:58:38 +00:00
Matthias Clasen
d1de9234c5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2803
2020-11-10 04:47:28 +00:00
Matthias Clasen
3e8260d528
gtk-demo: Plug a memory leak
2020-11-09 23:29:03 -05:00
Matthias Clasen
192f515682
gtk-demo: Tweak a demo title
2020-11-09 23:28:45 -05:00
Matthias Clasen
2543c9f5a3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2802
2020-11-10 01:42:30 +00:00
Matthias Clasen
a745dbfc15
gkt-demo: Add a columview to the scroll demo
...
This is an interesting case, since it has many labels,
and we are struggling to provide good scrolling performance.
2020-11-09 20:07:09 -05:00
Matthias Clasen
14be50839e
gtk-demo: Improve consistency
...
Make the shortcut triggers demo big enough
to not ellipsize the window title.
2020-11-09 19:54:17 -05:00
Matthias Clasen
a85d9cda07
gtk-demo: Improve consistency
...
Make the paintable svg demo follow the same
pattern we use for other demos.
2020-11-09 19:53:44 -05:00
Matthias Clasen
7d49f1e250
gtk-demo: Improve consistency
...
Make the paintable emblems demo follow the same
pattern we use for other demos.
2020-11-09 19:52:28 -05:00
Matthias Clasen
6fa2936956
gtk-demo: Set default size for drawingarea demo
...
Set a default size, so we don't ellipsize the window
title when the window is presented.
2020-11-09 18:50:43 -05:00
Matthias Clasen
b81463e7d3
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Matthias Clasen
b622745501
gtk-demo: Plug a memory leak
2020-11-09 18:48:10 -05:00
Matthias Clasen
5379a4bf34
a11y: Clean up properly in unregister_object
...
Things that are set up in register_object should
be cleaned up in unregister_object.
2020-11-09 18:48:10 -05:00
Matthias Clasen
b966f593a5
Merge branch 'wip/jimmac/search-entry-icon' into 'master'
...
search entry: icon
Closes #3340
See merge request GNOME/gtk!2801
2020-11-09 22:41:41 +00:00
Jakub Steiner
706a8f9784
search entry: icon
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3340
2020-11-09 22:55:21 +01:00
Matthias Clasen
2dc7e327ad
Merge branch 'ebassi/for-master' into 'master'
...
docs: Add missing a11y environment variables
See merge request GNOME/gtk!2788
2020-11-09 17:19:12 +00:00
Matthias Clasen
7b151c3ef0
Merge branch 'kinetic-scroll-velocity-accumulation' into 'master'
...
scrolledwindow: Accumulate velocity with kinetic scrolling
See merge request GNOME/gtk!2768
2020-11-09 17:14:03 +00:00
Emmanuele Bassi
0af6630521
a11y: Consolidate accessibility environment variables
...
Use a single environment variable for everything:
- select the ATContext implementation
- select the test ATContext
- disable ATContext entirely
We use the same pattern as GSK_RENDERER, GTK_DEBUG, etc.
The documentation needs to be updated to include the environment
variable.
2020-11-09 16:21:49 +00:00
Chris Lord
4b459a99be
scrolledwindow: Accumulate velocity with kinetic scrolling
...
Accumulate existing velocity when decelerating from a swipe if the swipe
velocity is above a certain fraction of that existing velocity.
2020-11-09 15:28:32 +00:00
Matthias Clasen
e093ed7d67
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3337
See merge request GNOME/gtk!2799
2020-11-09 14:21:26 +00:00
Matthias Clasen
ddbea8feda
Remove GtkPlacesOpenFlags from public headers
...
The GtkPlacesOpenFlags enum is only used in private
API, so move it to private headers. Since we still need
a GType for it, add gtkplacessidebarprivate.h to the
headers we use for generating private enum types. In turn,
this registers the other private enums in that header, so
take the opportunity to fix their naming, and use the
generated types for the corresponding sidebarrow properties.
Fixes : #3337
2020-11-09 08:45:36 -05:00
Matthias Clasen
6b5dff5667
docs: Document GTK_MEDIA
...
Add a paragraph about the GTK_MEDIA environment variable.
2020-11-08 09:58:26 -05:00
Matthias Clasen
53cd499621
Revert "Update gtktreestore.c: gtk_tree_store_remove didn't have the proper comment annotation"
...
This reverts commit 32baa0a549 .
See discussion in https://gitlab.gnome.org/GNOME/gtk/-/issues/78
for the background.
2020-11-07 21:36:34 -05:00
Matthias Clasen
30c5a6f79c
Merge branch 'patch-3' into 'master'
...
gtk/gtktextbuffer: remove GtkTextBufferTargetInfo
See merge request GNOME/gtk!2797
2020-11-08 01:11:26 +00:00
Emmanuele Bassi
4e1191550c
Merge branch 'patch-4' into 'master'
...
gtk/gtkversion: fix doc comment references
See merge request GNOME/gtk!2798
2020-11-08 00:50:40 +00:00
David Lechner
3b1363d31a
gtk/gtkversion: fix doc comment references
...
Cross-references for constants use the "%" prefix rather than the "#" prefix.
2020-11-07 23:57:13 +00:00
David Lechner
160e29ea95
gtk/gtktextbuffer: remove GtkTextBufferTargetInfo
...
GtkTextBufferTargetInfo is not used anywhere and can be removed.
2020-11-07 22:29:11 +00:00
Emmanuele Bassi
b9adad304e
Merge branch 'patch-6' into 'master'
...
gtk/enums: remove GtkPopoverConstraint
See merge request GNOME/gtk!2796
2020-11-07 22:19:33 +00:00
Emmanuele Bassi
ef17d716d7
Merge branch 'patch-4' into 'master'
...
doc: fix missing GtkNotebookTab
See merge request GNOME/gtk!2794
2020-11-07 22:01:33 +00:00
Emmanuele Bassi
8ec01772be
Merge branch 'patch-5' into 'master'
...
gtk/enums: remove GtkMenuDirectionType
Closes #3336
See merge request GNOME/gtk!2795
2020-11-07 21:59:04 +00:00
David Lechner
4084b4c6c6
gtk/enums: remove GtkPopoverConstraint
...
GtkPopoverConstraint is no longer used anywhere and can be removed.
2020-11-07 21:47:32 +00:00
David Lechner
c3cb8e0a79
gtk/enums: remove GtkMenuDirectionType
...
This was used by GtkMenu and can safely be removed.
Closes #3336
2020-11-07 21:39:34 +00:00
Emmanuele Bassi
19b5e5349e
Merge branch 'gles-no-queries' into 'master'
...
gl renderer: Generate queries only on desktop GL
See merge request GNOME/gtk!2792
2020-11-07 21:33:09 +00:00
Emmanuele Bassi
f87923e09e
Merge branch 'patch-3' into 'master'
...
docs: include GtkFilterMatch
See merge request GNOME/gtk!2793
2020-11-07 21:32:40 +00:00
David Lechner
05684f6c3c
doc: fix missing GtkNotebookTab
...
GtkNotebookTab was listed under private, but it is used by the "focus-tab" signal, so it needs to be public.
2020-11-07 21:17:09 +00:00
Emmanuel Gil Peyrot
08193ecf1c
gl renderer: Generate queries only on desktop GL
...
On desktop GL, GL 1.5 or GL_ARB_occlusion_query is required to get the
glGenQueries() etc. symbols. This isn’t the case on GLES, where they
are provided by GL_EXT_occlusion_query_boolean, and more importantly
have never been made core.
This patch allows gtk4-demo to start when GDK_DEBUG=gl-gles is set, on
my Mali 400 MP running the Lima driver from Mesa.
2020-11-07 21:49:42 +01:00
David Lechner
8c9a827516
docs: include GtkFilterMatch
...
The GtkFilterMatch enum type was missing from the documentation.
2020-11-07 20:45:41 +00:00
Timm Bäder
638987f359
Merge branch 'dlech-master-patch-13962' into 'master'
...
gtk/enums: fix doc comment references
See merge request GNOME/gtk!2791
2020-11-07 18:47:55 +00:00
David Lechner
8190f0c420
gtk/enums: fix doc comment references
...
Enum members need a "%" prefix rather than "@" or "%@" in order to
automatically create links in the documentation.
2020-11-07 17:46:26 +00:00
Arnaud Bonatti
f7de0bc9c8
Fix tests with regard to GtkBuilder <requires>.
2020-11-07 16:17:36 +01:00
Arnaud Bonatti
08f2990eac
Document the GtkBuilder <requires> tag changes.
2020-11-07 16:17:14 +01:00
Arnaud Bonatti
e6d46ec5ad
Teach gtk-builder-tool to rewrite <requires>.
2020-11-07 16:17:01 +01:00
Arnaud Bonatti
db6d7dccd8
Drop “gtk+” plus sign in GtkBuilder <requires>.
2020-11-07 16:16:55 +01:00
Piotr Drąg
4e8a5f2ec8
Update POTFILES.skip
2020-11-07 11:45:07 +01:00
Matthias Clasen
63e9414210
Merge branch 'wip/carlosg/for-master' into 'master'
...
Minor text handle fixes
See merge request GNOME/gtk!2787
2020-11-07 03:10:27 +00:00
Carlos Garnacho
4751ac1ac8
gtk/textview: Improve check for cursor-mode
...
Check the text handle role, instead of looking for the other handle
visibility. The other handle may be invisible during selection mode
(e.g. pointing to offscreen contents). This fixes both this code
switching to cursor mode out of the blue, and possible crashes later
on as this handle might be hidden in the process, while its own event
controller is handling events on the parent surface.
2020-11-06 14:30:18 +01:00
Carlos Garnacho
9d56c56117
gtk/texthandle: Point handle to the middle of the pointing_to rect
...
At least vertically, this gives again as much space up and down before
moving the selection the the prev/next line.
2020-11-06 14:28:46 +01:00
Matthias Clasen
0d82faa239
Merge branch 'wip/carlosg/for-master' into 'master'
...
Text handle fixes
Closes #3176
See merge request GNOME/gtk!2785
2020-11-06 01:23:16 +00:00
Matthias Clasen
fb27724042
Merge branch 'wip/chergert/gdk-macos-for-master' into 'master'
...
macos: tweak opacity, color/alpha size requests
See merge request GNOME/gtk!2786
2020-11-06 01:20:23 +00:00
Christian Hergert
90141ef305
macos: use NSOpenGLContext directly for current tracking
...
We don't need to interact with GdkGLContext here to keep the
current context active.
2020-11-05 13:57:41 -08:00
Christian Hergert
bc05da8dc0
macos: explicitly request color and alpha sizes
2020-11-05 13:37:25 -08:00
Christian Hergert
bf3e1e5b40
macos: use opaque GL context when possible
...
This is better for situations where the window is decorated and therefore we can
rely on window system clipping of rounded corners.
2020-11-05 13:34:29 -08:00
Carlos Garnacho
0ae93c8cdc
gtk/textview: Do not forcibly show text handles
...
The gtk_text_view_set_handle_position() function called some lines above
takes care of handle visibility already, also accounting for other
conditions (e.g. whether the handle points to contents onscreen).
Forcibly showing handles here misbehaves if the handle should stay hidden,
and somewhat expensively as it involves creating and throwing a native
surface every time.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
f9813019a7
gtk/textview: Defer touchscreen focus placing to drag end
...
With the scrolledwindow drag gesture not claiming the sequence immediately,
we end up placing the cursor (and undoing the previous selection) each time
we scroll.
There is already handling too short drags in ::drag-end, so let this code
handle touchscreens as well.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
5e907ebd58
gtk/textview: Clean up further if the drag gesture is taken over
...
If the gesture becomes captured (e.g. from a parent scrolledwindow), we
leave some things in the air. Clean these up properly. This is recurrent
with touch scroll.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
fa5fa3a881
gtk/imcontextwayland: Unset focus when unsetting widget
...
In destruction paths of a focused entry, the IM context might first
end up detached from its widget, then destroyed. This currently prevents
the IM context from detaching itself from the GtkIMContextWaylandGlobal.
Make it do so when unsetting the client widget, so the IM context gets
properly unfocused before destruction.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3176
2020-11-05 21:29:20 +01:00
Carlos Garnacho
9b9cc2f947
gtk/texthandle: Handle events on parent surface's native
...
In wayland, popup positioning and event handling are doubly async.
This makes it unreliable to figure out parent surface coordinates
out of the popup position and the events received. This results in
jumpy text handles there.
The best way to deal with parent surface coordinates is to handle
the events there. Make the handles transparent to input, and make
the drag gesture be set up on the parent widget's native.
The gesture is set up in the capture phase, setting it on the native
(as opposed to the parent widget) achieves a feeling similar to it
being a distinct surface, as it should take precedence over other
gestures in the emission chain (e.g. scrolledwindows).
As everything is in parent widget's native's coordinates, the drag
handles become smooth again.
2020-11-05 21:29:20 +01:00
Carlos Garnacho
80f5be8b13
gdk/wayland: Ensure to update input area on map
...
If a surface is hidden, then shown again, it should preserve the
input area specified. Make sure that happens.
2020-11-05 21:29:20 +01:00
Matthias Clasen
ec5b5e8aaa
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3325
See merge request GNOME/gtk!2784
2020-11-05 16:43:08 +00:00
Emmanuele Bassi
95463719ae
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2783
2020-11-05 15:37:38 +00:00
Emmanuele Bassi
041415e9b4
docs: Add a note on the "presentation" role
2020-11-05 14:50:40 +00:00
Emmanuele Bassi
abd5383d40
docs: Add a section on accessible buttons
...
Anything that behaves like a button should do so at the accessibility
level as well.
2020-11-05 13:57:50 +00:00
Emmanuele Bassi
c5dc0e2e4c
a11y: Use proper role and state for tree expander image
...
The "expander" image is a button, and it controls the expansion of the
row, so it has a state associated to it that we must update.
2020-11-05 13:46:43 +00:00
Emmanuele Bassi
88116712f6
a11y: Use "presentation" role instead of "hidden" state
...
The intended use case of the "presentation" role is
| […] when an element is used to change the look of the page but does not
| have all the functional, interactive, or structural relevance implied
| by the element type, or may be used to provide for an accessible
| fallback in older browsers that do not support WAI-ARIA.
One of the examples is, literally:
| An element whose content is completely presentational (like a spacer
| image, decorative graphic, or clearing element);
Which fits perfectly for the GtkTreeExpander's "indent" builtin icon
widget.
2020-11-05 13:25:53 +00:00
Emmanuele Bassi
7dfa41bbc4
a11y: ARIA's "presentation" role maps to ATSPI_ROLE_SECTION
...
See the mapping role table in the Core-AAM normative document:
https://w3c.github.io/core-aam/#mapping_role_table
2020-11-05 13:14:08 +00:00
Matthias Clasen
c09ff35df4
dragicon: Make a function propertly exported
...
Mark gtk_drag_icon_create_widget_for_value with
GDK_AVAILABLE_IN_ALL, since it is meant to be public.
Also, clarify the documentation a bit.
Fixes : #3325
2020-11-05 07:23:38 -05:00
Matthias Clasen
d526bcc71b
Cosmetics
...
Fix argument ordering of gdk_cursor_new_from_name.
2020-11-04 23:36:09 -05:00
Matthias Clasen
13d1e497f7
testsuite: Improve GdkCursor coverage
2020-11-04 23:36:09 -05:00
Matthias Clasen
3eaae748d3
3.99.4
2020-11-04 21:46:10 -05:00
Matthias Clasen
7f16067383
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: gl context improvements and event cleanup
See merge request GNOME/gtk!2780
2020-11-05 02:21:02 +00:00
Matthias Clasen
024e048c26
Merge branch 'wip/chergert/fix-macos-pointer-position-over-surface' into 'master'
...
macos: fix calculation of mouse position
See merge request GNOME/gtk!2781
2020-11-05 02:19:18 +00:00
Christian Hergert
c31c3848df
macos: fix calculation of mouse position
...
This fixes the calculation of the position of the pointer over the surface
which was incorrectly providing negative values.
2020-11-04 18:03:54 -08:00
Matthias Clasen
b0e0af1838
Merge branch 'patch-5' into 'master'
...
Update comment annotations of gtk_tree_model_iter_previous and...
See merge request GNOME/gtk!2775
2020-11-05 01:53:34 +00:00
Matthias Clasen
3785bf1f17
Merge branch 'fix-issue-2019-for-master' into 'master'
...
[master] GdkW32: remove klassTEMPSHADOW
Closes #2019
See merge request GNOME/gtk!2750
2020-11-05 01:53:02 +00:00
Matthias Clasen
79fb5724f9
Merge branch 'mr1063-for-master' into 'master'
...
Forward port MR !1063 (Win32 IME fixes) to GTK master
See merge request GNOME/gtk!2777
2020-11-05 01:48:37 +00:00
Christian Hergert
65b2ea1888
macos: resize extra GL window/view when surface changes
...
Once we figure out what is going on with textures, changes are we'll be
able to let this stay a zero rect. But that is still a bit up in the air right now.
2020-11-04 17:21:21 -08:00
Christian Hergert
6309bd12ac
macos: clip damage when swapping buffers
...
This ensures that we only copy the changed area.
2020-11-04 17:21:17 -08:00
Christian Hergert
7444a151b2
macos: remove synthesize_motion helper
...
We can use gdk_surface_request_motion() now instead of our extra
helper to do essentially the same thing.
2020-11-04 16:58:50 -08:00
Christian Hergert
ce9cc2db86
macos: always create dummy window/view for GL context
...
This simplifies the creation by always creating the dummy views, and then
removes it if necessary by detecting the begin_frame/end_frame pair.
2020-11-04 16:52:12 -08:00
Christian Hergert
e91b930648
Revert "Simplify gdk_surface_queue_render"
...
This reverts commit 2120e9df88 .
2020-11-04 16:28:13 -08:00
Matthias Clasen
ed78fb1366
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2779
2020-11-04 20:41:09 +00:00
Matthias Clasen
388f12b7d9
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2778
2020-11-04 20:37:39 +00:00
Matthias Clasen
8ae415acff
popovermenu: Fail gracefully if no model
...
If we don't have a model yet, return FALSE from
gtk_popover_menu_add_custom().
2020-11-04 14:59:32 -05:00
Matthias Clasen
d2cc9365fc
Cosmetics
...
Extraneous pair of parens snuck in with 2120e9df88 .
2020-11-04 14:59:27 -05:00
Matthias Clasen
dcfb6e5ef5
surface: Be smarter about autohide
...
When we close grabbing popups due to an outside
click, check at each level if the click is still
outside. This makes closing the nested popover
menu in the popover on page 3 of widget-factory
work as expected, when you click the menubutton
again.
2020-11-04 14:56:30 -05:00
Matthias Clasen
75f96b83de
surface: Be more lenient for autohide
...
When an event happens on a non-grabbing popup that hangs off
a grabbing popup, don't trigger the autohide. This makes touch
text handles work inside the popover on page 3 of widget-factory.
2020-11-04 14:56:30 -05:00
Emmanuele Bassi
66bba1493e
a11y: Remove stray g_printerr()
2020-11-04 19:39:08 +00:00
Emmanuele Bassi
1dde54b872
a11y: Hide the "indent" in GtkTreeExpander
...
It's just padding.
2020-11-04 19:38:14 +00:00
Emmanuele Bassi
c48a990778
a11y: Describe window controls
...
The window controls for client side decorations have only icons, which
means they are not accessible.
2020-11-04 18:59:11 +00:00
Matthias Clasen
23c425618e
Merge branch 'a11y/atcontext-realize' into 'master'
...
A11y/atcontext realize
See merge request GNOME/gtk!2772
2020-11-04 18:10:55 +00:00
Matthias Clasen
d2a7ecf72c
gtk-demo: Simplify the run button
...
Don't create the label manually. It is not necessary,
and letting the button do it also improves the
accessibility setup.
2020-11-04 12:54:48 -05:00
Matthias Clasen
f220a1e3c7
gtk-demo: Set some accessible properties
...
Set labels in the builder demo. The ARIA authoring practices
say that both menubars and toolbars *must* have an accessible
label.
2020-11-04 12:53:23 -05:00
Emmanuele Bassi
ba63aa76ca
a11y: Move parent context ref getter to its own function
...
Keeps the body of handle_accessible_get_property() readable.
2020-11-04 17:16:24 +00:00
Emmanuele Bassi
72415eaa49
a11y: Make the Button labelled by its child label
...
Establish the relation whenever we set the label widget.
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
d88f7c9459
a11y: Use the tooltip text as the accessible description
...
It's more common to have a tooltip as the accessible description than an
explicit description. This is also the behaviour of GTK3.
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
425d8ad02a
Set accessible label on GTK Demo's primary menu
...
Otherwise its label is going to be "GtkMenuButton".
2020-11-04 17:15:13 +00:00
Emmanuele Bassi
ae9758b964
a11y: Unrealize ATContext on dispose
2020-11-04 17:15:13 +00:00
Matthias Clasen
828a067b2b
Propagate accessible-role to backend
...
We want to allow setting the accessible role as long
as the context is unrealized, so we need to propagate
the new role.
2020-11-04 11:53:07 -05:00
Matthias Clasen
bb24b350ac
gtk-demo: Set an accessible role
...
Set an accessible role for the toolbar in the
builder demo. This tests accessibility support
in GtkBuilder.
2020-11-04 11:36:52 -05:00
Emmanuele Bassi
dafb2b0361
a11y: Allow updating role on unrealized contexts
...
We can still change the accessible role if an ATContext instance is
unrealized.
2020-11-04 15:22:31 +00:00
Emmanuele Bassi
30210c7087
a11y: Move ATContext to an explicit realization model
...
We are doing too much work during the construction phase of the
AT-SPI backend for GtkATContext. Instead of having the AtSpiContext
register itself at construction time, let's add explicit realize
and unrealize operations, and connect the ATContext realization to the
rooting operation of a GtkWidget.
2020-11-04 15:02:44 +00:00
Philip Zander
d8a795df0a
Win32 IME fixes
...
See merge request !1063
2020-11-04 17:17:52 +08:00
kai-berlin
499e4b4c50
broadway: Set modifier state of scroll events
...
Set modifier state of scroll events, so Ctrl-scroll
works.
Fixes : #2733
2020-11-03 19:21:00 -05:00
Matthias Clasen
fd52220b1b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3318 , #3319 , and #3320
See merge request GNOME/gtk!2776
2020-11-03 20:15:08 +00:00
Matthias Clasen
e9438224ab
texthandle: Queue a draw when role changes
...
This helps with role changes not taking immediate
effect.
Fixes : #3320
2020-11-03 14:39:29 -05:00
Matthias Clasen
2120e9df88
Simplify gdk_surface_queue_render
...
We can just call gdk_surface_invalidate_rect here
like we do elsewhere in gdk, and I'm a bit uncertain
about the current code that adds an empty update
region.
2020-11-03 14:37:27 -05:00
Matthias Clasen
ddd16dd312
texthandle: Fix positioning
...
Use the same approach we use for popovers, using
gtk_widget_get_surface_allocation. It works.
Fixes : #3319
2020-11-03 12:37:39 -05:00
Matthias Clasen
7624f66fec
widget-factory: Make sure we close popover on page 3
...
We don't want the popover to stay open when we open
an about dialog or shortcuts window. Since cascade-popdown
would also affect e.g. the context menu of the text widgets,
do this explicitly.
2020-11-03 12:09:43 -05:00
Matthias Clasen
dab11ea841
popover: Change default for cascade-popdown
...
We've found a number of cases where this cascading
has unexpected side-effects. So, turn it off by
default, and only set it for menus.
2020-11-03 11:00:32 -05:00
Matthias Clasen
a3f3dc0f1c
Adwaita: Set a background for magnifiers
...
The magnifier in entries is magnifying the GtkText
widget, which does not draw any background itself.
Therefore, we give the magnifier a background, to
make things look as expected.
Fixes : #3318
2020-11-03 11:00:32 -05:00
Matthias Clasen
5d59447ccb
magnifier: Set a css name
...
Predictably, we use the name "magnifier".
2020-11-03 11:00:32 -05:00
Matthias Clasen
e3c38e4143
NEWS: Updates
2020-11-03 11:00:32 -05:00
Matthias Clasen
e5ec4df702
docs: Mention g_file_get_basename
...
Mention g_file_get_basename in the migration guide section
about GtkFileChooser api changes.
2020-11-03 11:00:32 -05:00
Danny Milosavljevic
1340ff2bc2
Update comment annotations of gtk_tree_model_iter_previous and gtk_tree_model_iter_next to state that the ITER parameter is modified.
2020-11-03 15:10:11 +00:00
Matthias Clasen
dbdc909e19
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2774
2020-11-03 12:14:21 +00:00
Matthias Clasen
c6ef1943e4
gtk-demo: Remove more gtk3-demo icon uses
...
Use our own logo everywhere.
2020-11-02 22:50:03 -05:00
Matthias Clasen
a3c9f8594a
gtk-demo: Tweak images demo
...
Use our own logo instead of the gtk3-demo one, and
tweak the headings to refledct what we show.
2020-11-02 22:43:44 -05:00
Matthias Clasen
354f2b65fa
gtk-demo: Reanimate floppy buddy
...
Implement a GdkPaintable wrapper around GdkPixbufAnimation,
so floppy buddy can waive again.
2020-11-02 21:38:02 -05:00
Matthias Clasen
b3657d5f2e
widget-factory: Restore modality of the about dialog
...
Make the about dialog of widget-factory modal again.
This was lost in 87a8fda163 .
2020-11-02 21:37:55 -05:00
Timm Bäder
82ca65956f
gl renderer: Make debugging code shorter
2020-11-02 14:55:14 -05:00
Timm Bäder
c8c2106f3e
gl renderer: Refactor vertex data loading code
2020-11-02 14:55:14 -05:00
Timm Bäder
8178dfb85a
gl renderer: Use the load_vertex_data* functions more often
2020-11-02 14:55:14 -05:00
Timm Bäder
50e78198a8
gl renderer: More load_vertex_data* usage
2020-11-02 14:55:14 -05:00
Timm Bäder
ee04cbcfa8
gl renderer: Reword a comment
2020-11-02 14:55:14 -05:00
Timm Bäder
fc312f7ffe
gl renderer: Remove an outdated comment
2020-11-02 14:55:14 -05:00
Timm Bäder
e6e964c3f3
gl renderer: Refactor rendering shadow nodes
...
Also use load_vertex_data_with_region here.
2020-11-02 14:55:14 -05:00
Timm Bäder
df5e796d99
gl renderer: Refactor blurred shadow drawing code
...
We already have various load_vertex_data* code, so try to reuse that
here.
2020-11-02 14:55:14 -05:00
Timm Bäder
d3239c953d
gl renderer: Nine-slice unblurred outset shadows
...
See #3284
2020-11-02 14:55:13 -05:00
Timm Bäder
fb9a3bf32b
printoperation: Remove double assignment
2020-11-02 14:55:13 -05:00
Matthias Clasen
ace83a938d
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo polish
See merge request GNOME/gtk!2773
2020-11-02 19:36:09 +00:00
Matthias Clasen
fb028f0fe7
gtk-demo: Renovate the paned demo
...
Make this look less like testgtk from GTK 2.
2020-11-02 13:56:19 -05:00
Matthias Clasen
8a13909bab
fixup: window titles
2020-11-02 12:02:19 -05:00
Matthias Clasen
4e745f06e9
gtk-demo: Polish all entry demos
...
Make the spacing a bit more consistent, and tweak
some strings here and there.
2020-11-02 12:01:11 -05:00
Matthias Clasen
14b65a3c4f
gtk-demo: Polish the search bar demo
...
Rename this, and make it look a bit less like a
debugging tool, and more like a demo.
2020-11-02 12:00:24 -05:00
Matthias Clasen
64ad490bc1
gtk-demo: Tweak tagged entry styling
...
Move the tags closer together, and avoid resizing too much.
2020-11-02 11:59:22 -05:00
Matthias Clasen
d2d7a4bcab
gtk-demo: Tweak window titles
...
This is an attempt to improve consistency in the sidebar
and the window titles.
2020-11-02 11:11:44 -05:00
Matthias Clasen
14cbd13ef2
gtk-demo: Use typographic style classes
...
We don't need to hardcode <u> in markup anymore.
Use the heading style class instead.
2020-11-02 08:38:20 -05:00
Matthias Clasen
efc314196d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2769
2020-11-02 11:52:13 +00:00
Matthias Clasen
403a70ca89
testsuite: Add tests for gtk4-builder-tool validate
2020-11-01 23:09:26 -05:00
Matthias Clasen
44b36b6321
builder-tool: Stop rewriting GtkPopoverMenu
...
We no longer allow manual creation of GtkPopoverMenu,
translating individual properties is not going to
change that.
2020-11-01 23:09:26 -05:00
Matthias Clasen
4bd829e3e1
testsuite: Test GtkFixed rewriting
2020-11-01 23:09:26 -05:00
Matthias Clasen
38f74d8a23
builder-tool: Rewrite GtkFixed more
...
GtkFixedLayout does not have layout properties
for x and y, so turn those into a transform.
2020-11-01 23:09:26 -05:00
Matthias Clasen
2613c2ef9b
builder-tool: Avoid duplicate path prefixes
...
It is enough to print the file in which the error
occurred once; GtkBuilder already makes that part
of its error message.
2020-11-01 23:09:26 -05:00
Matthias Clasen
5751cd662d
builder-tool: Install a log writer
...
Install a log writer function that is a bit simpler than
the default GLib log writer, and does not put PIDs and
timestamps in the output, so we can compare easily in
our testsuite.
2020-11-01 23:09:26 -05:00
Matthias Clasen
4039b713c3
Set G_LOG_USE_STRUCTURED globally
...
It doesn't make much sense to set this in per-directory
meson files, since that makes use use different logging
facilities in different parts of the project. Set it
globally.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c3f8010b19
testsuite: Test GtkToolbar rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
3e8a22ae8a
builder-tool: Rewrite GtkToolbar more
...
Replace GtkToolbar with GtkBox and GtkToolButton with
GtkButton.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c01f3be6e6
testsuite: Test GtkActionBar rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
0cf372c814
testsuite: Test GtkPaned rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
ac20c9cd41
builder-tool: Fix rewriting GtkPaned
...
The properties have been renamed in bc6643f3c2 .
2020-11-01 21:23:35 -05:00
Matthias Clasen
d74c2a74e5
builder-tool: Drop unneeded code
...
We are rewriting the tree before simplifying it,
so there is no need to 'keep things for rewriting'
in the simplify phase.
2020-11-01 21:23:35 -05:00
Matthias Clasen
b79637ac41
testsuite: Test GtkOverlay rewriting
2020-11-01 21:23:35 -05:00
Matthias Clasen
e135772119
buildertool: Improve GtkOverlay rewriting
...
Translate the GtkOverlay:pass-through child property to
the GtkWidget:measure property, and drop the :index
child property.
2020-11-01 21:23:35 -05:00
Matthias Clasen
3cf26b471b
Fix the definition of GtkWidget:can-target
...
We are setting the value to TRUE initially, but
the property had a declared default of FALSE.
This is messing up the simplification of .ui files
with gtk4-builder-tool, since it thinks it can
omit can-target properties when it really can't.
2020-11-01 21:23:35 -05:00
Matthias Clasen
c630285692
Cosmetics
2020-11-01 21:23:35 -05:00
Matthias Clasen
5702b71037
Remove leftover file
...
This was never used in tests.
2020-11-01 21:23:35 -05:00
Matthias Clasen
a4e5f5ca50
testsuite: More gtk4-builder-tool tests
2020-11-01 21:23:35 -05:00
Matthias Clasen
b0b00d49d2
testsuite: Test gtk4-builder-tool simplify --replace
...
Run all gtk4-builder-tool test with and without --replace.
This improves test coverage for gtk4-builder-tool
2020-11-01 21:23:35 -05:00
Matthias Clasen
cb018ec047
builder-tool: Avoid a crash
...
Be more careful about types that have been removed.
I was getting criticals when converting ui files
containing GtkToolbars.
2020-11-01 21:23:35 -05:00
Matthias Clasen
168b21c77e
testsuite: Improve coverage for GdkTexture
2020-11-01 21:23:35 -05:00
Matthias Clasen
2dcc641d5a
testsuite: Improve coverage for GdkDisplayManager
2020-11-01 21:23:35 -05:00
Matthias Clasen
c8432ae668
testsuite: Improve coverage for seats
2020-11-01 21:23:35 -05:00
Matthias Clasen
642ad4e06f
testsuite: Improve coverage for rectangles
2020-11-01 21:23:35 -05:00
Tim Sabsch
924796b478
Update German translation
2020-11-01 14:08:13 +00:00
Piotr Drąg
319d4c7e01
Update Polish translation
2020-11-01 10:37:21 +01:00
Matthias Clasen
07c491f235
testsuite: Improve coverage for keys
2020-10-31 14:57:02 -04:00
Matthias Clasen
970f91ec24
testsuite: Add more css parser tests
...
Add tests for url parsing.
2020-10-31 09:18:40 -04:00
Matthias Clasen
48381bd4f6
testsuite: Add a forgotten test
...
I've written this test a while ago, but did not add
it to the test data list in meson.build.
2020-10-31 08:30:02 -04:00
Matthias Clasen
1a12999431
testsuite: Add a css test
...
This test verifies that CDO and CDC are ignored
as required.
2020-10-31 00:38:49 -04:00
Matthias Clasen
90676540ec
css: Fix tokenization of CDO
...
A CDO is 4 characters: <!--, not 3 as our tokenizer
was pretending.
2020-10-31 00:38:49 -04:00
Matthias Clasen
7db58d5f8d
gsk: Don't compile unused code
...
The NodeSample and GskGLImage code is not used,
so don't compile it.
2020-10-30 23:36:39 -04:00
Matthias Clasen
875452b476
testsuite: Improve coverage for GtkMultiSorter
2020-10-30 23:33:34 -04:00
Matthias Clasen
1c4c5e3b80
testsuite: Improve coverage for GtkStringList
2020-10-30 23:33:15 -04:00
Matthias Clasen
af5e13b9a1
Remove an unused function
...
The only property of GtkStringObject is readonly since
commit fb14f50ec1 , so we don't need a
set_property implementation.
2020-10-30 23:32:30 -04:00
Matthias Clasen
9b78bc4af7
testsuite: Improve coverage
2020-10-30 23:04:23 -04:00
Matthias Clasen
1702a4c223
Drop an unused private function
2020-10-30 22:51:54 -04:00
Matthias Clasen
f0e35c8ed8
Drop unused includes
2020-10-30 22:50:38 -04:00
Matthias Clasen
26150d8489
testsuite: Improve coverage for GtkExpression
2020-10-30 22:27:40 -04:00
Matthias Clasen
48dcbf4935
expression: Fix property expressions for interfaces
...
We were not checking the passed-in type in the right
way. An interface type can still pass the
g_type_is_a (..., G_TYPE_OBJECT) check, if G_TYPE_OBJECT
is one of its prerequisites. What we need to check is
whether the fundamental type is G_TYPE_OBJECT.
2020-10-30 22:27:40 -04:00
Matthias Clasen
59dd7d8900
testsuite: Improve coverage for GtkMultiFilter
2020-10-30 22:27:40 -04:00
Matthias Clasen
c279bdaa81
testsuite: Improve coverage for GtkStringFilter
2020-10-30 20:15:25 -04:00
Matthias Clasen
01d52a7292
testsuite: Make all css tests run again
...
The tests in subdirectories of testsuite/css were
using an environment defined in the parent directory,
causing them to not find their test data. Give each
test directory its own environment.
2020-10-30 20:14:17 -04:00
Matthias Clasen
2b38d14bf5
tests: Improve coverage for css data url parsing
...
Cover the error conditions as well.
2020-10-30 19:26:56 -04:00
Matthias Clasen
d35a21873e
testsuite: Improve coverage for GtkBoolFilter
2020-10-30 18:17:50 -04:00
Matthias Clasen
b23cae9643
Drop unused gtk_buildable_set_buildable_property
2020-10-30 17:19:52 -04:00
Matthias Clasen
505df337c2
Add a test for constraints in ui files
...
Test the various values that are possible for the constraint
attributes.
2020-10-30 16:21:14 -04:00
Matthias Clasen
117997da54
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: add more aggressive clip to transparent subview
See merge request GNOME/gtk!2762
2020-10-30 19:48:57 +00:00
Matthias Clasen
19052d4360
gtk-demo: Tweak descriptions of constraints demos
...
Make these a little longer, and include more details.
2020-10-30 15:26:37 -04:00
Matthias Clasen
2dbaca2464
constraintlayout: Make sure guides get their constraints
...
When using GtkBuilder to create constraints and guides,
the layout manager is already rooted when the guides get
created, and we were forgetting to create the guides
constraints in this case. Fix it by adding a call to
gtk_constraint_guide_update().
This was showing up in the new builder-based constraints
demo as the guide not having the expected effect.
2020-10-30 15:04:13 -04:00
Matthias Clasen
4b8134b19b
constraintlayout: Emit less change notification
...
This isn't strictly required for correctness, but
it makes the GtkBuilder codepath do the same that
the vfl codepath does: call gtk_layout_manager_layout_changed
only once, after all the constraints have been added.
2020-10-30 15:04:13 -04:00
Matthias Clasen
588fe5b5c1
gtk-demo: Tweak the new constraints demo
...
With these somewhat random ordering changes, things get
closer to working the same as the code example. Still,
the guide doesn't work right.
2020-10-30 15:04:13 -04:00
Matthias Clasen
b8f44de48e
constraintlayout: Fix parsing from ui file
...
Guides were not properly looked up when creating
constraints in a ui file.
2020-10-30 15:04:13 -04:00
Matthias Clasen
49bdc4f0c2
Add another constraints demo
...
This one attempts to use constraints in a ui file.
It doesn't work.
2020-10-30 15:04:13 -04:00
Matthias Clasen
a0ee25a21e
gtk-demo: Remove unnecessary code
...
I was distracted by this code that sets names
on widgets in the constraints demo - the names
aren't used and aren't needed, so remove them.
2020-10-30 15:01:50 -04:00
Christian Hergert
d8192013f3
macos: add more aggressive clip to transparent subview
...
The Cairo implementation for the Macos backend uses a toplevel
window with full transparency and a series of NSView to create opaque
regions. This improves compositor performance because it allows the
display server to avoid costly blends.
However, we want to ensure we clip better when exposing the
transparent region so that we only expose the shadows/corners as
necessary.
2020-10-29 19:41:21 -07:00
Matthias Clasen
8ed1f51f7f
Merge branch 'wip/chergert/remove-GDK_WINDOWING_QUARTZ' into 'master'
...
gdk: remove remaining GDK_WINDOWING_QUARTZ usage
See merge request GNOME/gtk!2761
2020-10-30 01:36:10 +00:00
Matthias Clasen
03fec389f4
docs: Add details for gsk_renderer_new_for_surface
...
Mention the GSK_RENDERER variable here.
2020-10-29 18:21:44 -04:00
Matthias Clasen
38c39e2aa1
NEWS: Updates
2020-10-29 18:21:32 -04:00
Christian Hergert
6298fd1eef
gdk: remove remaining GDK_WINDOWING_QUARTZ usage
2020-10-29 13:57:28 -07:00
Matthias Clasen
5a77994516
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2760
2020-10-29 18:55:53 +00:00
Matthias Clasen
6142238237
Merge branch 'wip/chergert/gdk-macos-gl-renderer' into 'master'
...
macos: implement GL rendering on with Cairo renderer
See merge request GNOME/gtk!2759
2020-10-29 18:33:13 +00:00
Matthias Clasen
3164f328b5
docs: Some restructuring
...
Give the GDK docs some more structure.
2020-10-29 14:23:46 -04:00
Matthias Clasen
ce78d0c301
docs: Tweak GdkToplevel docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
94305f248b
docs: Tweak GdkPopup docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
3afd5d7a89
docs: Tweak GdkSurface docs
...
Add more details, and refer to the GdkToplevel / GdkPopup
docs.
2020-10-29 14:23:46 -04:00
Matthias Clasen
d2adbad408
docs: Tweak frame clock docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
2df382277d
docs: Small additions for GdkCursor docs
2020-10-29 14:23:46 -04:00
Matthias Clasen
9f71bdd045
docs: Cosmetics
...
Make the GdkRGBA heading less repetitive.
2020-10-29 14:23:46 -04:00
Matthias Clasen
838d0924b9
docs: Tweak GdkPaintable docs
...
Minor additions here and there.
2020-10-29 14:23:46 -04:00
Matthias Clasen
1f8d593931
docs: Add some detail to GdkTexture docs
...
Minor additions here and there.
2020-10-29 14:23:46 -04:00
Matthias Clasen
574a3a456d
gdk: Drop GdkPoint from the api
...
This typedef was not used in any public APIs, and is
only used in the MacOS backend. It is not worth preserving
as public API, move it to the only user.
2020-10-29 14:23:46 -04:00
Matthias Clasen
3617fbab42
docs: Include GDK_WINDOWING_MACOS
...
We no longer have a Quartz backend, it is called
MacOS now.
2020-10-29 14:23:46 -04:00
Matthias Clasen
29ccd13e15
docs: Stop referring to the Quartz backend
...
Its MacOS now.
2020-10-29 14:23:46 -04:00
Christian Hergert
de9c9efa6f
macos: implement GL context
...
This implements the basics for a GdkGLContext on macOS. Currently, rendering
only is fully working for the GskCairoRenderer case where we read back pixels
into a cairo surface for rendering. More work on synchronization is required for
the GL on GskGLRenderer case.
When we attempt to render a surface itself with GL, the context will ensure that
the new GdkMacosGLView is placed within the NSWindow. In other cases, we
use a dummy NSView and NSWindow for backing the NSOpenGLContext to
ensure that we can get accelerated drawing.
This gets GtkGLArea working when running with GSK_RENDERER=cairo.
2020-10-29 10:57:02 -07:00
Christian Hergert
eb809ba425
macos: tweak gravity while resizing
...
This helps a situation where the window contents has not changed
in time for a drawing. Setting the texture gravity helps that side or
corner to be less jittery while moving.
Ideally, we can get to a point where we are synchronized and keeping
up with drawing fast enough to not need this. That may require some
work to drive frame clocks from drawRect: though.
2020-10-29 10:57:02 -07:00
Christian Hergert
adf60fb3a1
macos: be tolerant of NULL GL context
...
Some code appears to unconditionally attempt to make the context current,
so this makes things tolerant to a NULL GdkGLContext and just return FALSE.
2020-10-29 10:57:02 -07:00
Christian Hergert
a3fd46c516
glsl: tweak pre-processor to support Apple GLSL compiler
...
The Apple GLSL compiler cannot deal with empty pre-processor blocks such as
#if GSK_GLES
#elif GSK_LEGACY
2020-10-29 10:57:02 -07:00
Christian Hergert
0040667965
macos: remove unused GL layer
...
This isn't being used, and instead we'll go the route of a NSView for
the OpenGL implementation.
2020-10-29 10:57:02 -07:00
Christian Hergert
60e67a62e6
macos: move setNeedsDisplay helper to GdkMacosCairoView
...
This isn't needed in the base class, which will eventually get a GL subclass.
2020-10-29 10:57:02 -07:00
Matthias Clasen
931f130377
Merge branch 'wip/chergert/gdk-remove-texture_from_surface' into 'master'
...
gl: remove unused texture_from_surface API
See merge request GNOME/gtk!2756
2020-10-29 15:50:01 +00:00
Christian Hergert
524fbc35a7
gl: remove unused texture_from_surface API
...
This is not used anywhere and only exists within the X11 backend. It
can be removed now.
2020-10-29 08:26:27 -07:00
Matthias Clasen
51d35750f6
Cosmetics
...
Whitespace fix.
2020-10-29 07:40:30 -04:00
Matthias Clasen
90fde9c939
Merge branch 'matthiasc/for-master' into 'master'
...
textview: Update child allocations
See merge request GNOME/gtk!2757
2020-10-29 11:21:30 +00:00
Matthias Clasen
5cbc55578f
textview: Update child allocations
...
This was accidentally lost when display line caching
was introduced.
2020-10-28 20:18:54 -04:00
Piotr Drąg
f90e7b9c56
Update POTFILES.skip
2020-10-28 15:12:01 +01:00
Matthias Clasen
d5b9489408
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #3282
See merge request GNOME/gtk!2755
2020-10-27 22:38:58 +00:00
Matthias Clasen
975d763db1
Merge branch 'dropdown-checkmark' into 'master'
...
Dropdown checkmark
Closes #3291
See merge request GNOME/gtk!2754
2020-10-27 20:41:34 +00:00
Matthias Clasen
907fc30fac
gtk-demo: Add checkmarks to all dropdown demos
...
This follows the mockups that these demos are
copied from. Unfortunately, it has to be implemented
for every item factory, so we repeat it here.
Fixes : #3291
2020-10-27 16:13:44 -04:00
Matthias Clasen
25d2efeabe
dropdown: Add a checkmark to the selected item
...
Make the default factory add a checkmark to the
currently selected item (not the hovered item)
in the popup. This will unfortunately have to be
done in non-default factories too.
Related: #3291
2020-10-27 16:13:38 -04:00
Matthias Clasen
3a119a3d3a
dropdown: Make search entry shrink
...
We don't want the popup to be wider than the button
if we can help it. The search entry does not need
to be very wide.
2020-10-27 15:35:34 -04:00
Matthias Clasen
8df883ed71
Merge branch 'matthiasc/atspi-child' into 'master'
...
Emit ChildrenChanged signal on hierarchy updates
See merge request GNOME/gtk!2752
2020-10-27 18:24:43 +00:00
Matthias Clasen
0c49f7349d
Merge branch 'matthiasc/a11y-buildable' into 'master'
...
Implement accessible attributes for ui files
See merge request GNOME/gtk!2751
2020-10-27 18:13:44 +00:00
Luca Bacci
eef1097c90
GdkW32: remove klassTEMPSHADOW
...
Fixes issue #2019
2020-10-27 18:26:45 +01:00
Benjamin Otte
08004d4eed
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #3295
See merge request GNOME/gtk!2748
2020-10-27 16:27:10 +00:00
Benjamin Otte
6d7e56bed6
cloudprint: Make compile without warnings
2020-10-27 16:43:34 +01:00
Benjamin Otte
8e6701c9a6
gtkmediafile: Use cubic volume function
...
Gstreamer suggests doing that.
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1439
Fixes #3295
2020-10-27 16:32:53 +01:00
Jakub Steiner
6d5c512571
Merge branch 'wip/jimmac/gtk4-dropdown-papercuts' into 'master'
...
Adwaita: dropdown search box
See merge request GNOME/gtk!2747
2020-10-27 12:55:33 +00:00
Jakub Steiner
b94ea1b4f7
Adwaita: dropdown search box
...
- have some whitespace around entry
Partial fix for https://gitlab.gnome.org/GNOME/gtk/-/issues/3291
2020-10-27 13:32:04 +01:00
Matthias Clasen
b2d6011679
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2746
2020-10-27 05:05:33 +00:00
Matthias Clasen
c0aa1c8a49
Merge branch 'popover-menu-custom-child' into 'master'
...
popovermenu: Allow custom items
Closes #3260
See merge request GNOME/gtk!2728
2020-10-27 04:51:00 +00:00
Matthias Clasen
5fe837483c
docs: Add GtkOverlay to the widget gallery
2020-10-27 00:42:38 -04:00
Matthias Clasen
4f15b988e7
docs: Add box, grid and center box to the gallery
2020-10-27 00:24:54 -04:00
Matthias Clasen
6cd3bc7384
modelbutton: Explicitly set up LABELLED-By relation
...
GTK does this automatically based on mnemonics, but only
if the string actually contains a mnemonic. This makes
orca read out menuitems, as expected.
2020-10-26 22:48:01 -04:00
Matthias Clasen
0faadef36f
widget-factory: Add a scale to the gear menu
...
This tests the custom menuitem support, and lets you
control the transition duration for the main stack.
2020-10-26 22:43:12 -04:00
Matthias Clasen
af6c3017fb
popovermenu: Allow adding custom items in ui files
...
Support <child type="ID"> to fill custom child slots
in both GtkPopoverMenus and GtkPopoverMenuBars that
are created in ui files.
2020-10-26 22:42:28 -04:00
Matthias Clasen
8157abe591
popovermenu: Allow custom items
...
Add a way to add children at certain places in
the generated menu for both GtkPopoverMenu and
GtkPopoverMenuBar.
New apis:
gtk_popover_menu_add_child
gtk_popover_menu_remove_child
gtk_popover_menu_bar_add_child
gtk_popover_menu_bar_remove_child
Fixes : #3260
2020-10-26 22:41:33 -04:00
Matthias Clasen
61e08baec1
Merge branch 'master' into 'master'
...
Fix the build with cups < 2.2.12
Closes #2968
See merge request GNOME/gtk!2744
2020-10-26 20:09:30 +00:00
Thomas Lange
0493e89897
Fix the build with cups < 2.2.12
...
PPD_CUSTOM_UNKNOWN was introduced in cups 2.3.
and has been backported to 2.2.12.
Only handle it when we build against a new enough cups.
Fixes : #2968
2020-10-26 19:16:26 +01:00
Matthias Clasen
c783e9aa5f
Treat tristate as an enum when parsing
...
This makes it so that you have to explicitly specify
"true" and "false" for the checked state, but it
matches how this enumeration is meant to be used.
2020-10-26 08:01:13 -04:00
Matthias Clasen
4661f15fab
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2741
2020-10-26 05:28:43 +00:00
Matthias Clasen
e51a98d184
docs: Add GtkDrawingArea to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
b67eee5741
docs: Add GtkShortcutsWindow to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
d9259fc958
docs: Add GtkPopoverMenu to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
65f748fc62
docs: Add GtkPopover to the widget gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
bed3616bf0
docs: Add GtkPopoverMenuBar to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
1605ca0140
docs: Add GtkExpander to the gallery
2020-10-26 01:08:49 -04:00
Matthias Clasen
8692f5d8e3
docs: Add GtkEmojiChooser to the gallery
...
To make this possible enable the doc shooter
to take screenshots of popovers.
2020-10-26 01:08:49 -04:00
Matthias Clasen
42e2c54922
docs: Redo the GtkColorChooserDialog gallery image
...
Show the new palette.
2020-10-25 22:54:53 -04:00
Matthias Clasen
291c61891a
docs: Improve the GtkStackSidebar gallery image
2020-10-25 22:54:41 -04:00
Matthias Clasen
59e08c0dac
docs: Tweak gallery layout
...
Now that the volume button image is small, move it
to a better place in its section. Improves the layout.
2020-10-25 22:46:30 -04:00
Matthias Clasen
a70c9c69a0
docs: Fix the GtkVolumeButton gallery image
...
Give up on showing the popup, we don't do that
for other buttons either.
2020-10-25 22:42:40 -04:00
Matthias Clasen
dffe6b87e4
docs: Add GtkCalendar to the gallery
...
It has been missing far too long.
2020-10-25 22:32:27 -04:00
Matthias Clasen
28b7962bee
docs: Improve the GtkMediaControls gallery image
2020-10-25 22:26:19 -04:00
Matthias Clasen
64e131f285
docs: Improve the GtkVideo gallery image
2020-10-25 22:17:15 -04:00
Matthias Clasen
a9f0f18c3a
docs: Tweak gallery layout
...
Improve the breaks in the container section.
2020-10-25 22:16:26 -04:00
Matthias Clasen
2e0822bed0
docs: Shrink the editable label gallery image
...
Makes it fit better with the other entries.
2020-10-25 21:52:51 -04:00
Matthias Clasen
b0fb31fc96
docs: Some reordering in the gallery
...
Align things better.
2020-10-25 21:47:40 -04:00
Matthias Clasen
163d32eea1
docs: Work around GtkPicture growing
...
Make the GtkPicture gallery image stay within its
limits, by overpowering its request mode.
2020-10-25 21:30:15 -04:00
Matthias Clasen
b7728a884b
docs: Tweak gallery ordering
...
Move GtkSpinButton to the entries, where it
belongs, despite its name.
2020-10-25 21:10:12 -04:00
Matthias Clasen
86b4b2eef2
docs: Fix links from the gallery
...
It turns out gtk-doc can't even parse its own custom
links if you don't arrange for the <link> element to
on a single line, since it is just a glorified sed
script :(
2020-10-25 21:07:12 -04:00
Matthias Clasen
09eda804f7
docs: Add GtkWindowControls to the gallery
2020-10-25 21:06:46 -04:00
Matthias Clasen
37d4932b31
a11y: Add more tests
...
Test some of the attributes that GTK maintains
for every widget.
2020-10-25 19:29:00 -04:00
Matthias Clasen
0fddf73ddb
a11y: Add some parser tests
...
Checking basic support for acessible states, properties
and relations in ui files.
2020-10-25 13:01:44 -04:00
Matthias Clasen
f981ab7a9e
Remove erroneous preconditions
...
Tests found these functions to be non-working.
2020-10-25 12:43:52 -04:00
Matthias Clasen
677ea5f22d
a11y: Reuse builder parsing for enums
...
No need to manually write all these parsing functions
when _gtk_builder_enum_from_string does exactly what
is needed here.
2020-10-25 12:38:52 -04:00
Matthias Clasen
fce455ae0b
a11y: Parse booleans in ui files as expected
...
Accept the same syntax for booleans as GtkBuilder
does elsewhere.
2020-10-25 12:20:55 -04:00
Matthias Clasen
e050a2661c
builder: Expot _gtk_builder_boolean_from_string privately
...
When specifying accessible properties in ui files, it
is better to accept the same syntax for booleans as
elsewhere, so lets reuse this function.
2020-10-25 12:19:21 -04:00
Piotr Drąg
a03581ce39
Update Polish translation
2020-10-25 10:37:47 +01:00
Matthias Clasen
13b9b9b7d8
scale: Set round-digits to -1 initially
...
This ensures that keybindings for small-step changes
work despite draw-value being FALSE now. This was
fallout from 8ca612c966 that showed up
as arrow keys not working anymore for the color scales
in the color chooser.
2020-10-25 00:31:18 -04:00
Matthias Clasen
0a3b370805
Cosmetics
...
Remove some comments that refer to no longer
existing menu code.
2020-10-25 00:31:18 -04:00
Matthias Clasen
313ba0280a
color editor: Add accessible labels
...
Add some labels to the controls in this dialog.
2020-10-24 23:55:56 -04:00
Matthias Clasen
adb7676fc1
a11y: More State<>Change confusion
...
We should really avoid this needless duplication
- the 'state' is never stored anywhere.
2020-10-24 23:12:36 -04:00
Matthias Clasen
8ffb398517
a11y: Handle all cases for state change
...
Make state_change handle state changes for non-widgets,
and handle the cases for HIDDEN involving stack pages.
2020-10-24 22:05:17 -04:00
Matthias Clasen
9a943e21d3
stack: Update HIDDEN a11y state for stack pages
...
This will let us handle additions and removals
in the AT-SPI backend.
2020-10-24 22:04:26 -04:00
Matthias Clasen
7c106578ed
Cosmetics
...
Make gtk_at_spi_root_child_changed take a
GtkAccessible for the child.
2020-10-24 21:35:35 -04:00
Matthias Clasen
d1d9b92aee
Merge branch 'meson-deps-continued' into 'master'
...
Turn more options into "feature"
See merge request GNOME/gtk!2708
2020-10-25 01:10:01 +00:00
Matthias Clasen
434b145ee0
stack: Don't transition when the visible child is remove
...
This is a corner-case, and it is causing crashes in
the shortcuts window, after a11ab6c995 .
2020-10-24 20:54:55 -04:00
Matthias Clasen
2546b88661
a11y: Redo child-added/-removed for toplevels
...
Instead of monitoring the list of toplevels, rely
on GtkWindow updating the HIDDEN state before windows
get removed. This is better, since we still have the
object available when it happens, so we can pass it
to the ATs.
2020-10-24 15:26:12 -04:00
Matthias Clasen
bba6d604f0
window: Maintain accessible HIDDEN state
...
We want to use the HIDDEN state to control when
things get added and removed from the accessible
tree, so ensure that we a) set HIDDEN to true
initially for windows, and b) we update HIDDEN
when a window is shown or hidden.
The second part is handled by gtk_widget_hide
for other widgets, but hiding a window does not
always go through that code path.
2020-10-24 15:25:03 -04:00
Matthias Clasen
274f9ad919
a11y: Emit child notification when toplevels get hidden
...
When a toplevel window gets hidden (and not destroyed),
the frontend code set the HIDDEN state, and we need to
emit child notification when that happens.
2020-10-24 13:17:20 -04:00
Matthias Clasen
89a8c89663
a11y: Improve child index helpers
...
We need to use gtk_accessible_should_present() whenever we
calculate accessible tree positions, to avoid inconsistencies.
While we are at it, make these helpers usable for finding
the position of accesibles that are now ignored, by not
looking at should_present for the object itself. This will
be relevant when we calculate the position of objects whose
HIDDEN state changes.
2020-10-24 13:14:44 -04:00
Matthias Clasen
e7b290debb
a11y: Improve child notification for toplevels
...
We need to translate the list model position into
an accessible tree position, since hidden toplevels
will be skipped.
While we are at it, add an api for this notification
that will be used in the next commit.
2020-10-24 13:13:07 -04:00
Matthias Clasen
46e754a17d
a11y: Skip non-presented children when required
...
Whenever we determine the index of a child, we need
to skip its non-presented siblings.
2020-10-24 11:22:09 -04:00
Matthias Clasen
b12992c1cb
a11y: Handle HIDDEN state changes
...
Hidden elements are not presented in the accessible
tree, so when then HIDDEN state changes, we should
emit child-added or -removed signals.
This commit does not yet handle all cases (HIDDEN
toplevels or hidden stack pages are not handled),
but it should cover the common case.
2020-10-24 11:17:56 -04:00
Matthias Clasen
374a451eeb
a11y: Don't present HIDDEN accessibles
...
The ARIA spec is clear on this: when an element has the
HIDDEN state, it should not be presented in the accessible
tree.
This change is incomplete, we also need to emit child-added/
removed signals when the state changes, but that needs to
wait for the child added infrastructure to land.
2020-10-24 11:17:56 -04:00
Matthias Clasen
1e13acb206
widget: Don't add reordered children
...
gtk_widget_reposition_after is called both to add new children,
and to reposition existing children. We only want to emit
accessible changes in the former case (since AT-SPI doesn't
have events for reordering).
2020-10-24 11:17:56 -04:00
Matthias Clasen
5b2b2feb9f
a11y: Fix up state / change enum confusion
2020-10-24 11:17:56 -04:00
Matthias Clasen
77af993181
Merge branch 'flush-events' into 'master'
...
Flush events
See merge request GNOME/gtk!2740
2020-10-24 12:53:01 +00:00
Matthias Clasen
c5ed5c5ff9
gdk: Deliver queued events on flush
...
The current code was marking queued events as flushed,
but left them in the queue. That doesn't make sense to
me - we should deliver all events we have before we
reach the paint phase of the frame cycle.
2020-10-23 17:03:00 -04:00
Matthias Clasen
6b53a55dd7
NEWS: Updates
2020-10-23 15:07:25 -04:00
Matthias Clasen
83fbdcd5e6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3226
See merge request GNOME/gtk!2739
2020-10-23 17:25:33 +00:00
Matthias Clasen
cb8bf6540c
editablelabel: Properly clean up in dispose
...
Unparenting the stack finalizes the entry and label,
but at least the label is available via the
gtk_editable_get_delegate API, and the a11y
implementation uses that at dispose time. So, clear
the pointers to prevent them from being dangling.
This was showing up as a segfault of the doc-shooter.
2020-10-23 12:27:55 -04:00
Matthias Clasen
fdb1fa4d08
Give all search entries an icon
...
This was first requested for the search entry in
GtkDropDown, but it is better to be consistent and
give every search entry an icon.
Related: #3291
2020-10-23 12:19:31 -04:00
Matthias Clasen
10d7ccc8e0
window: Fix state updates
...
When the compositor unmaximized the window, we get a
state-changed signal, and we update the maximized field.
But then we go and recompute our layout based on the
maximize_initially field, and that is still TRUE, when
we were maximized initially. So we need to update both
fields.
This fixes a problem where using the window menu to
unmaximize an initially maximized window would not
work.
Fixes : #3226
2020-10-23 11:51:02 -04:00
Matthias Clasen
b973f7f375
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2737
2020-10-23 01:45:22 +00:00
Matthias Clasen
7671c1074b
Tweak focus tests
...
These tests are a bit fragile because the initial focus
that is taken depends on what ends up in the center of
the window, horizontally or vertically, which depends
on things like fonts, or theme spacing.
This commit makes some tweaks to push things in the
widget-factory example around far enough to make the
tests work again.
We should figure out a way to make this more robust.
2020-10-22 21:18:46 -04:00
Matthias Clasen
6ce2e19bbe
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2735
2020-10-22 22:53:34 +00:00
Matthias Clasen
3a08706e40
dropdown: Add an icon the search entry
...
A small detail for #3291 .
2020-10-22 14:33:41 -04:00
Matthias Clasen
e5722fe9d2
passwordentry: Respect border spacing
...
We are not using a box layout here since we want
to ignore the icons for measuring. But we still
want the layout to respect border spacing that
comes from the theme.
2020-10-22 14:27:19 -04:00
Matthias Clasen
700f957d9a
Adwaita: Set border-spacing for entries
...
When our entries contain icons, they should not run
directly into the text, so put some spacing between
the children of entries.
2020-10-22 14:26:21 -04:00
Timm Bäder
9109dee072
gl renderer: Don't use blur node bounds
...
The blur node bounds are different/larger than the ones we use. This
made the textures get stretched to the blur node bounds.
Fixes #3282
2020-10-22 17:46:34 +02:00
Timm Bäder
b6a843a05b
gl renderer: Fix two scale_x/y mixups
2020-10-22 17:46:34 +02:00
Timm Bäder
ff1fb4f10d
text: Remove empty root() implementation
2020-10-22 17:46:34 +02:00
Timm Bäder
1bf79a4dae
text: Fix a documentation mishap
2020-10-22 17:46:34 +02:00
Timm Bäder
85d4b86545
text: Fold focus_{in,out} into only caller
2020-10-22 17:46:34 +02:00
Timm Bäder
98e88b7b53
text: Avoid a crash
...
Calculate the "was previous focus in a child widget" condition before
chaining up into grab_focus, to a void that unreffing the prev_focus
widget.
2020-10-22 17:46:34 +02:00
Timm Bäder
85702f8f5d
dnd demo: Make the transform code a bit more idiomatic
2020-10-22 17:46:34 +02:00
Timm Bäder
d97cb851f1
textview: Remove a broken debug output statement
...
redraw_rect does not exist.
2020-10-22 17:46:34 +02:00
Timm Bäder
6dcdb4a601
atspitextbuffer: Explicitly cast between pango and gtk enums
2020-10-22 17:46:34 +02:00
Timm Bäder
41ef1d87ef
atspicontext: Add a few missing break statements
2020-10-22 17:46:34 +02:00
Timm Bäder
44728d09a9
stack: assert for some assumptions
2020-10-22 17:46:34 +02:00
Timm Bäder
b1664534af
gdksurface: Ensure some assumptions
...
Just to please scan-build
2020-10-22 17:46:34 +02:00
Timm Bäder
56e89e8d26
demos: Remove a dead assignment
2020-10-22 17:46:34 +02:00
Timm Bäder
f6ebc06767
filechooserwidget: Avoid an uninitialized value
...
If the operation mode is OPERATION_MODE_RECENT and we end up in the
'goto file_entry' case, we don't set info.result. Then later after
calling check_save_entry, is_empty is TRUE which causes a goto out and
here we then try to use info.result, which is uninitialized.
Initialize info.result before doing all this.
Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3db5e15bde
filechooserwidget: gtk_widget_get_root() can return NULL
2020-10-22 17:46:33 +02:00
Timm Bäder
a2291fb989
showrendernode: Pass error to deserialize()
2020-10-22 17:46:33 +02:00
Timm Bäder
af97f19926
textview: Respect return value of get_text_surface_coords()
2020-10-22 17:46:33 +02:00
Timm Bäder
0dae1f48fd
listbox test: Only compare values for rows we have
...
This shouldn't happen, but don't compare 100 values if we didnt' get 100
values from the listbox.
2020-10-22 17:46:33 +02:00
Timm Bäder
c7dbb8ef91
label: Plug a potential memory leak
...
This only happens in error cases so pretty insignificant.
Found by scan-build
2020-10-22 17:46:33 +02:00
Timm Bäder
3a1e019e83
print-editor: Fix a wrong comparison
...
If error is NULL, replacing the file contents worked and we don't
show the error dialog. The previous version pretty explicitly
dereferenced a NULL pointer by first ensuring that error is NULL and
then accessing error->message.
Found by scan-build
2020-10-22 17:46:33 +02:00
Matthias Clasen
a923be95b3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2736
2020-10-22 14:52:57 +00:00
Matthias Clasen
a11ab6c995
a11y: Handle stack case for addition/removal
...
Since we interpose stack pages as non-widget accessibles,
we need to tweak the signals we emit when their corresponding
widgets get added or removed.
2020-10-22 10:06:06 -04:00
Matthias Clasen
1d802881eb
stack: Change ordering for removal
...
Unparent the child widget before tearing down its
stack page. This is necessary so a11y can still access
the stack page accessible to emit change notification
when it learns that the child is removed.
2020-10-22 10:05:17 -04:00
Emmanuele Bassi
6c796cf201
docs: Fix cross-linking for GIO types
2020-10-22 13:33:49 +01:00
Matthias Clasen
44c6619660
gtk-demo: Speed up image demo
...
The progressive loading demo here was so slow as to appear
broken. Make it faster, and ensure that it updates regularly.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ef7499a31b
gtk-demo: Add alternative text to a GtkPicture
...
This lets us text GtkPicture a11y support.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ed571ae68a
picture: Set alternative text as description
...
Use the alternative text as accessible description
for GtkPicture.
2020-10-22 07:51:44 -04:00
Matthias Clasen
e2b3cbac23
colorbutton: Improve accessibility
...
Make the swatch not appear selectable, and
set an accessible label on it.
2020-10-22 07:51:44 -04:00
Matthias Clasen
ba290eb9b0
a11y: Add actions for color swatches
...
Add the same actions that we exported in GTK 3.
2020-10-21 23:36:22 -04:00
Matthias Clasen
3805e1d507
colorswatch: Export some functions for a11y
...
Make simple functions to activate, select or customize
a GtkColorSwatch. These will be exported by a11y as
actions.
2020-10-21 23:36:22 -04:00
Matthias Clasen
daf3b3a3b4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2734
2020-10-22 02:52:46 +00:00
Matthias Clasen
800eb76a2d
linkbutton: Use the LINK role
...
It is a bit ambiguous, but I think link buttons are
more links than buttons. See WAI-ARIA for a discussion
of the differences.
Update tests to match.
2020-10-21 22:19:54 -04:00
Matthias Clasen
bcbc6159f4
a11y: Document abstract roles
...
Since we mention abstract roles in the documentation
for GtkAccessibleRole, we should say what roles are
abstract. Doing this shows that we actually use two
abstract roles heavily, ourselves: WIDGET and WINDOW.
2020-10-21 21:47:14 -04:00
Matthias Clasen
5f8c6d2287
a11y: Document roles used in menu
2020-10-21 21:40:19 -04:00
Matthias Clasen
88eb3a9c34
atspi: Give model buttons a click action too
...
GtkModelButton is no longer derived from GtkButton,
but can still treat it like a button for the purposes
of having a click action. This lets ATs activate
menu items again.
2020-10-21 21:27:38 -04:00
Matthias Clasen
3e43dda9d4
modelbutton: Recreate our AT context
...
When the button role changes, we want to update the
accessible role to match. Since accessible roles are
unchangeable post-creation of the AT context, we have
to cheat a bit and recreate the whole context.
2020-10-21 21:27:38 -04:00
Matthias Clasen
f96a1cfadd
modelbutton: Initial accessibility setup
...
Set the accessible role to GTK_ACCESSIBLE_ROLE_MENU_ITEM.
This is incomplete, we need to recreate the context when
the buttons role changes, and there are other things that
need to be set.
2020-10-21 21:27:38 -04:00
Matthias Clasen
758bcd5343
popovermenubar: Initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document. This is not quite
complete.
2020-10-21 21:27:38 -04:00
Matthias Clasen
2bfd4196fb
popovermenu: Initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 21:27:38 -04:00
Xavier Claessens
1b7a99cb24
Apply 1 suggestion(s) to 1 file(s)
2020-10-22 00:36:23 +00:00
Matthias Clasen
087c0078ca
menubutton: initial accessibility setup
...
Set roles, properties and relations according to the
ARIA authoring practices document.
2020-10-21 19:47:48 -04:00
Matthias Clasen
b9ae54c951
separator: Remove unnecessary code
...
gtk_widget_update_orientation already sets the
accessible property, no need to do it again.
2020-10-21 19:47:48 -04:00
Emmanuele Bassi
7ac6e25ffc
Use GtkApplication in the examples
...
Some people read the "Getting Started" section as a series of
incremental lessons, and having the examples go from GtkApplication to
the old style "init / spin the main loop" confuses them.
We should be using GtkApplication everywhere in our examples.
2020-10-21 22:44:53 +01:00
Matthias Clasen
d3089ebbc2
progressbar: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the progressbar role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:09:55 -04:00
Matthias Clasen
14a64c7372
levelbar: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the meter role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 15:04:34 -04:00
Matthias Clasen
ca9b06878d
switch: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the switch role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree.
2020-10-21 14:55:13 -04:00
Matthias Clasen
8f100269ad
scale: Hide internal structure from a11y
...
According to section 7.1 of WAI-ARIA, the slider role
has the "Children presentational" characteristic, which
indicates that children should not be represented in
the a11y tree, which makes sense, since these are all
just internal gizmos.
2020-10-21 14:53:17 -04:00
Matthias Clasen
48bb9200d9
a11y: Treat PRESENTATION like NONE
...
This is what ARIA tells us to do. NONE is just another
name for PRESENTATION.
2020-10-21 14:40:34 -04:00
Matthias Clasen
d7794bf608
docs: Add some more to the migration guide
...
Expand the section on life-cycle handling with some
more details.
2020-10-21 14:30:17 -04:00
Matthias Clasen
3151906157
docs: Small corrections to the a11y overview
...
The section titles were mixed up wrt to the content
of the sections.
2020-10-21 14:23:10 -04:00
Matthias Clasen
6153efd02a
Document GTK_ACCESSIBLE_ROLE_NONE
...
We use it for a specific purpose now, so document it.
2020-10-21 14:21:12 -04:00
Matthias Clasen
b5b8f42a0c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3285
See merge request GNOME/gtk!2733
2020-10-21 18:09:42 +00:00
Matthias Clasen
043ffd38bc
text: React to text attribute changes in css
...
Recompute the layout when the css style change
affects text attributes. This matches what we do
in GtkLabel, and without this, changing the
font-features-setting css property in the Inspector
does not have immediate effect.
2020-10-21 13:46:58 -04:00
Carlos Garnacho
32b826e312
Merge branch 'wip/exalm/swipe4' into 'master'
...
gestureswipe: Count last event when calculating velocity
See merge request GNOME/gtk!2715
2020-10-21 16:20:58 +00:00
Alexander Mikhaylenko
700ca3b946
gestureswipe: Count last event when calculating velocity
...
The last event, matching lifting the finger/releasing the mouse button,
is important when there's a large delay between it and the previous events,
as in when performing a movement, stopping, then releasing fingers as
opposed to doing a swipe.
If this event is skipped, doing this will result in kinetic deceleration
matching the previous finger movement, while the expected behavior would
be no deceleration.
See also 5dc6194b98 for a similar fix in
GtkEventControllerScroll.
2020-10-21 20:59:15 +05:00
Emmanuele Bassi
e45dd771db
a11y: Emit ChildrenChanged for toplevel list changes
...
GtkAtSpiRoot is not a context, which means it needs to emit
ChildrenChanged events by itself whenever a toplevel is added to, or
removed from, the list of toplevels.
2020-10-21 15:37:57 +01:00
Emmanuele Bassi
698cbee1fb
a11y: Move ChildrenChanged emitter to ATSPI utilities
...
We are going to use it from GtkAtSpiRoot, which is not a
GtkAtSpiContext.
2020-10-21 15:18:23 +01:00
Emmanuele Bassi
80756322cd
a11y: Handle relations in UI files
...
A bit hacky: we skip parsing values that have a reference or
reference-list type, but we do not error out. Instead, we return a NULL
value, which we catch in the GtkBuildable interface implementation to
get the actual object, and construct a reference list value.
There's still some ickyness around the value type that can only be
solved by having an attribute and role taxonomy.
2020-10-21 14:48:49 +01:00
Emmanuele Bassi
f1e14c4858
a11y: Implement ChildrenChanged atspi.Event
2020-10-21 14:33:20 +01:00
Emmanuele Bassi
8d46bd1d7c
a11y: Notify of changes in the children list
2020-10-21 14:04:49 +01:00
Emmanuele Bassi
fbb08a30e2
a11y: Add child state change to GtkATContext
...
And the required private API in GtkAccessible to notify AT contexts of
changes in the children list.
2020-10-21 14:04:49 +01:00
Matthias Clasen
81371e7c79
columnview: Put overshoot underneath the headers
...
This matches what we do in GtkTreeView.
Fixes : #3285
2020-10-21 08:39:50 -04:00
Emmanuele Bassi
7702670d86
docs: Document the "accessibility" custom tag
2020-10-21 13:33:37 +01:00
Emmanuele Bassi
9e4316bf96
a11y: Add an "accessibility" section to the builder XML tree
...
Accessible attributes are not GObject properties. This means that we
need a custom parser for setting attributes in our UI description files.
The new section is defined as a sub-tree with the `<accessibility>`
element at its root, and elements for each type of accessible
attributes, i.e. properties, relations, and states:
```xml
<object class="..." id="...">
<accessibility>
<property name="label">The accessible label</property>
<state name="pressed">false</state>
<relation name="labelled-by">label1</relation>
</accessibility>
</object>
```
The name of the attribute is the enumeration value; the value is defined
by the WAI-ARIA specification.
2020-10-21 13:33:37 +01:00
Emmanuele Bassi
4ea2a6628f
a11y: Add parsing code for accessible values
...
We need to be able to go from a string representation of an accessible
value to its GtkAccessibleValue instance.
2020-10-21 13:33:37 +01:00
Matthias Clasen
39dfdac771
range: Hide internals from accessibility
...
The nameless, faceless gizmos inside a range do not
contribute to the accessible experience at all, lets
not add them to the tree. All the accessible functionality
is on the main widget (either a scale or a scrollbar).
2020-10-21 08:01:25 -04:00
Matthias Clasen
b7fa00e22d
Cosmetics
2020-10-21 08:01:25 -04:00
Matthias Clasen
3df0a333ad
frame: Set up accessible relations
...
Mark the child as labelled-by the label.
2020-10-21 08:01:25 -04:00
Matthias Clasen
8880e3bd2e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2729
2020-10-21 11:43:58 +00:00
Timm Bäder
0b5b908a74
Merge branch 'wip/exalm/nullable' into 'master'
...
widget: Add missing (nullable) on binding functions
See merge request GNOME/gtk!2730
2020-10-21 08:17:45 +00:00
Alexander Mikhaylenko
31a072497d
widget: Add missing (nullable) on binding functions
...
Even though they are marked as (skip), they are used in Vala and have wrong
types there atm.
2020-10-21 12:27:51 +05:00
Matthias Clasen
cbb6828657
docs: Document more accessible roles
...
Document that GtkText is skipped in accessibility.
2020-10-20 23:19:30 -04:00
Matthias Clasen
8e170217a1
Cosmetics
...
Typo fix.
2020-10-20 23:19:18 -04:00
Matthias Clasen
36d4a8090f
docs: Document more accessible roles
...
GtkColumnView and its various components use a lot
of accessible roles.
2020-10-20 23:09:11 -04:00
Matthias Clasen
341244203f
docs: Document more accessible roles
...
GtkListView and GtkGridView were missing this as well.
2020-10-20 22:53:30 -04:00
Matthias Clasen
2023914186
docs: Document accessible roles of some classes
...
GtkListBox and GtkFlowBox were missing this.
2020-10-20 22:51:11 -04:00
Matthias Clasen
ef9ec43469
a11y: Add some more tests
2020-10-20 22:44:24 -04:00
Matthias Clasen
67411701c6
inspector: Show accessible object path
...
Show the object path of the object on the a11y bus,
this is can be useful information. While we are here,
make sure that the Inspector does not throw criticals
when used with GTK_NO_A11Y=1.
2020-10-20 21:56:54 -04:00
Matthias Clasen
e20a3339bf
atsi: Fix emission of text selection changes
...
We were not emitting text-selection-changed and
text-caret-moved as expected.
2020-10-20 21:31:23 -04:00
Matthias Clasen
a8baee342c
a11y: Fix handling of LABELLED_BY relation
...
There were several places where we were confusing
GList and GSList and list->data and list->next, causing
a crash in the accessible name computation for buttons
with mnemonic labels.
2020-10-20 21:27:39 -04:00
Matthias Clasen
6a1cb3304b
docs: Mention subclassing and destroy in the migration guide
...
Mention changes regarding subclassing and life-cycle
handling in the migration guide.
2020-10-20 18:26:38 -04:00
Benjamin Otte
45400fe381
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #3280
See merge request GNOME/gtk!2725
2020-10-20 14:05:49 +00:00
Matthias Clasen
5504278b78
Merge branch 'matthiasc/for-master' into 'master'
...
Some more a11y tests
See merge request GNOME/gtk!2726
2020-10-20 05:57:45 +00:00
Matthias Clasen
93481e6c2e
a11y: Add tests for GtkFlowBox
...
Test that roles, states and properties are as expected.
2020-10-20 01:12:20 -04:00
Matthias Clasen
b9e9898212
a11y: Add tests for GtkListBox
...
Test that roles, states and properties are as expected.
2020-10-20 01:07:13 -04:00
Matthias Clasen
7c47b6907b
a11y: Add tests for GtkStack and GtkStackSwitcher
...
Test that the roles, states and relations are
as expected.
2020-10-20 00:46:07 -04:00
Matthias Clasen
b10d5ec8ff
a11y: Add a test for label properties
...
Now that we set the label property, we should test it too.
2020-10-20 00:25:39 -04:00
Benjamin Otte
8dad615f04
gtk: Remove unused header include
...
gtkcssnodeprivate.h was mainly used for repositioning CSS nodes in
gadgets, and gadgets are gone now.
2020-10-20 04:50:12 +02:00
Benjamin Otte
23e086089d
entry: Keep widget order
...
... instead of just ordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
9317a9f35c
flowbox: Keep widget order
...
... instead of just ordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
22100089c3
listbox: Reorder the widgets when sorting
...
... instead of just reordering the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
074d54ef5a
listitemwidget: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
2020-10-20 04:50:12 +02:00
Benjamin Otte
ddd1b0958d
notebook: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
Also fix page reordering code to actually reorder the widget instead of
just the CSS nodes.
2020-10-20 04:50:12 +02:00
Benjamin Otte
d77902365d
box: Remove unnecessary code
...
gtk_widget_insert_after() reorders CSS nodes properly.
2020-10-20 04:50:12 +02:00
Benjamin Otte
d9b216e629
widget: Always update the CSS node
...
Anybody who keeps their own CSS nodes around or wants to order CSS nodes
different from widgets will from now on have to do it manually all the
time.
This is outdated behavior, nobody should be doing either of those two
things.
Also, the correct case is much more common, and not doing it
automatically was causing bugs.
Fixes #3280
2020-10-20 04:50:12 +02:00
Matthias Clasen
a7bd6b094a
Merge branch 'matthiasc/for-master' into 'master'
...
Some a11y docs and fixes
See merge request GNOME/gtk!2724
2020-10-20 01:45:17 +00:00
Matthias Clasen
eeae1b1ea7
a11y: Fix accessible tree inconsistency
...
The stack page objects were not properly integrated
in the accessible tree - they were appearing as parent
of the pages when navigating up, but not as children
of the stack when navigating down.
2020-10-19 21:15:44 -04:00
Matthias Clasen
0a71dc1bed
stack: Minor doc addition
2020-10-19 21:15:44 -04:00
Matthias Clasen
feb73a5ebb
docs: Flesh out a11y section
...
Add some advice for making custom widgets accessible.
2020-10-19 20:01:57 -04:00
Matthias Clasen
83d8ae2f30
Merge branch 'wip/chergert/fix-macos-surface-under-pointer' into 'master'
...
macos: fix discovery of surface under pointer
See merge request GNOME/gtk!2722
2020-10-19 21:26:47 +00:00
Emmanuele Bassi
51f5690ae3
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2720
2020-10-19 20:26:57 +00:00
Matthias Clasen
e58e6a0fbe
Merge branch 'a11y/editable' into 'master'
...
Improve the accessible support for editables
See merge request GNOME/gtk!2719
2020-10-19 20:16:21 +00:00
Christian Hergert
eb82b2a9ca
macos: fix discovery of surface under pointer
2020-10-19 12:35:41 -07:00
Matthias Clasen
dfc7d26275
a11y: Tweak name and description computation
...
Instead of falling back to the role nick for both,
fall back to the class name for the name, and to
the empty string for the description. This makes
labels show up in Accerciser the same way they
did in GTK 3, and seems more useful to me than
the alternative.
2020-10-19 14:58:34 -04:00
Matthias Clasen
77d1026c5a
atspi: Use name and description as provided
...
GtkATContext already does fallbacks to derive values
for these, so no need for the atspi implementation to
do its own fallback on top of that.
2020-10-19 14:57:43 -04:00
Matthias Clasen
08ae513064
label: Set the accessible label property
...
This will make label text show up in ATs again.
2020-10-19 14:29:19 -04:00
Emmanuele Bassi
f52c86ae21
docs: Add a section on a11y patterns
2020-10-19 18:39:40 +01:00
Emmanuele Bassi
03745a489c
docs: Start outlining a11y authoring practices
...
We should have documentation for application developers and widget
authors, so they can deal with the new accessibility API.
2020-10-19 18:37:30 +01:00
Matthias Clasen
63421b1876
a11y: Rename some methods
...
Our EditableText implementation works fine for any
editable, so don't name the functions in a way that
looks like they are only for entries.
2020-10-19 12:58:29 -04:00
Matthias Clasen
80e0e3fe4f
gtk-demo: Set an accessible role
...
Set the expected accessible role on the tagged entry
widget in the demo of the same name. Accessible tools
may decide to ignore widgets that have the wrong role,
so setting an appropriate role is important.
2020-10-19 12:56:50 -04:00
Matthias Clasen
ef46fe0e8e
Merge branch 'a11y/component' into 'master'
...
a11y: Implement Component
See merge request GNOME/gtk!2718
2020-10-19 16:54:45 +00:00
Emmanuele Bassi
7c7dabae8c
a11y: Rework accessible name/description computation
...
The ARIA spec determines the name and description of accessible elements
in a more complex way that simply mapping to a single property; instead,
it will chain up multiple definitions (if it finds them). For instance,
let's assume we have a button that saves a file selected from a file
selection widget; the widgets have the following attributes:
- the file selection widget has a "label" attribute set to the
selected file, e.g. "Final paper.pdf"
- the "download" button has a "label" attribute set to the
"Download" string
- the "download" button has a "labelled-by" attribute set to
reference the file selection widget
The ARIA spec says that the accessible name of the "Download" button
should be computed as "Download Final paper.pdf".
The algorithm defined in section 4.3 of the WAI-ARIA specification
applies to both accessible names (using the "label" and "labelled-by"
attributes), and to accessible descriptions (using the "description" and
"described-by" attributes).
2020-10-19 17:54:14 +01:00
Matthias Clasen
9f9e7dffef
atspi: Implement Text for more editables
...
Our Text implementation requires that we have
a GtkEditable with a delegate that is a GtkText
widget.
This change make the Text implementation work for
the custom widget in the tagged entry demo.
2020-10-19 12:44:50 -04:00
Goran Vidović
94729b4880
Update Croatian translation
...
(cherry picked from commit fab2558747 )
2020-10-19 16:37:36 +00:00
Matthias Clasen
3918dd4643
Add gtk_editable_get_delegate
...
We need access to the delegate in the a11y layer,
so we might as well make this function public.
2020-10-19 12:36:54 -04:00
Matthias Clasen
04a51837f7
atspi: Emit bounds-changed
...
This is using the new bounds_change vfunc in GtkATContext.
2020-10-19 12:19:55 -04:00
Matthias Clasen
75a0bef921
widget: Mark the size as changed when it changes
...
This notifies the AT context that the widgets size
has changed.
2020-10-19 12:19:55 -04:00
Matthias Clasen
d50ebd947c
a11y: Add bounds change api
...
Add a way for GTK to pass bounds change information
to the AT context.
2020-10-19 12:19:55 -04:00
Matthias Clasen
8e4f8a45a9
atspi: Implement Component
...
Implement the non-questionable parts of the Component interface
for accessibles which are widgets.
This does not include:
- global coordinates
- setters
- scrolling
- alpha, layers, zorder, and the like
2020-10-19 12:19:55 -04:00
Matthias Clasen
3ad03b1706
a11y: Add a separate vfunc for platform changes
...
The state_change vfunc is becoming unwieldy. Lets move
the platform changes to their own vfunc, as a start.
2020-10-19 12:09:08 -04:00
Matthias Clasen
dfe00c4ac4
atspi: Be more careful
...
We have non-widget accessibles now, so guard against
change notification being emitted on them.
2020-10-19 12:09:08 -04:00
Matthias Clasen
5bb656af4c
Cosmetics
...
Add some more fold markers.
2020-10-19 12:08:47 -04:00
Matthias Clasen
469b913cdf
Cosmetics
2020-10-19 12:00:53 -04:00
Matthias Clasen
9c1c8a554a
Cosmetics
2020-10-19 11:46:25 -04:00
Matthias Clasen
2359510b1f
Merge branch 'matthiasc/for-master' into 'master'
...
Various columnview fixes
Closes #3265 , #3272 , and #3276
See merge request GNOME/gtk!2717
2020-10-19 15:00:17 +00:00
Xavier Claessens
25a1c421b5
Merge branch 'msvc' into 'master'
...
gdkglcontext: Fix build with MSVC
Closes #3268
See merge request GNOME/gtk!2713
2020-10-19 13:46:54 +00:00
Matthias Clasen
ef308e5f17
Merge branch 'annotations_gtkaboutdialog' into 'master'
...
Add nullable return annotations in GtkAboutDialog
See merge request GNOME/gtk!2712
2020-10-19 13:46:32 +00:00
Sophie Herold
33f0809784
Add nullable return annotations in GtkAboutDialog
2020-10-19 13:46:32 +00:00
Matthias Clasen
81ee273e98
columnview: Make right-aligned content work
...
Make right-aligned content work in resized columns.
There is currently no way to make a title right-aligned,
but we can still make it work correctly. This is a follow
up to 7eb0ae39c5 .
Fixes : #3276
2020-10-19 09:39:07 -04:00
Matthias Clasen
f3fe1812aa
Adwaita: Put column separators on the left
...
When resizing columns, we clip a shrunk column
on the right, so the separator disappears in that
case unless we put it on the left side of the other
column.
2020-10-19 09:39:05 -04:00
Xavier Claessens
be8246a6cb
gdkglcontext: Fix build with MSVC
...
GLDEBUGPROC callback is defined with APIENTRY which is a windows
specific calling convention. That macro expands to nothing when building
on other platforms.
Fixes : #3268 .
2020-10-19 09:17:53 -04:00
Matthias Clasen
25d0fb4c76
columview: Make resize area a bit larger
...
This make column resizing feel less like a game
of hit-and-miss. Ultimatively, we should add an
alternative to this.
2020-10-19 08:31:37 -04:00
Matthias Clasen
98b66acbdd
columview: Implement double-click to reset headers
...
Implement the same behavior as GtkTreeView:
double-click on the header boundary resets the
header to its automatic width.
Fixes : #3272
2020-10-19 08:31:37 -04:00
Matthias Clasen
1976df1e54
columnview: Make resize cursors reliable
...
Ensure that the column resize cursor stays in place
for the duration of the resize drag. This is a bit
annoying, since the implicit grab can end up on the
header of a different column from the one we are
resizing, so just set the cursor on all column headers.
2020-10-19 08:30:22 -04:00
Matthias Clasen
39baf4fff4
columnview: Fix more issues with column resizing
...
Make it so that for overlapping resize rectangles (with
very narrow columns), we prefer the narrow column, so you
can regrow a column after shrinking it all the way.
Related: #3274
2020-10-19 08:30:05 -04:00
Matthias Clasen
a88e5a5f4e
columnview: Fix some issues with column resizing
...
Ensure that we place the resize rectangle at the visible
right edge of the column, not where the allocation ends
(we clip the header drawing, after all).
Related: #3274
2020-10-19 08:29:29 -04:00
Matthias Clasen
a39e519bed
inspector: Clear overlays on unroot
...
In dispose(), we can't access the root anymore,
since we're already unrooted.
Fixes : #3265
2020-10-17 13:11:58 -04:00
Emmanuele Bassi
e9eb385f25
Merge branch 'patch-1' into 'master'
...
Add some missing nullable return annotations
See merge request GNOME/gtk!2707
2020-10-17 14:08:29 +00:00
Xavier Claessens
a4aa6d79ad
meson: Use feature options for media and print backends
...
This gracefully disable ffmpeg, gstreamer, cups and cloudprint optional
dependencies when they are not available, while still giving full
control to distributors using -Dauto_features=enabled.
2020-10-17 09:54:47 -04:00
Xavier Claessens
ea3933b87a
meson: Make vulkan and xinerama optional deps default to 'auto'
...
It is nicer for contributors to have a build that works by default.
Distributors should be using -Dauto_features=enabled to get ride of
automagic options.
2020-10-17 09:54:47 -04:00
Xavier Claessens
6ae9f7e7c3
meson: Simplify xinerama dependency check
2020-10-17 09:54:47 -04:00
Xavier Claessens
efbbfb6547
meson: Simplify how cairo dependencies are checked
...
There is no reason to fallback to find_library for cairo and still rely
on pkg-config for all other dependencies, and just when using MSVC. When
building and pkg-config is not working it is preferable to fallback to a
subproject just like for all other dependencies.
Also add cairo.wrap now that meson support has been merged upstream.
2020-10-17 09:54:47 -04:00
Sophie Herold
cd0bef9390
Add some missing nullable return annotations
2020-10-17 15:32:36 +02:00
Matthias Clasen
5a79cc4d70
Merge branch 'wip/chergert/fix-macos-fps-calculation' into 'master'
...
macos: fix fps calculation for frame timings
See merge request GNOME/gtk!2705
2020-10-17 12:20:04 +00:00
Piotr Drąg
954855783a
Update POTFILES.in
2020-10-17 11:11:24 +02:00
Christian Hergert
7ae8ed82c9
macos: fix fps calculation for frame timings
...
We need to mark the timings as complete after adding the
presentation time so that we have a valid FPS for the overlay
widget and/or fishbowl demo.
2020-10-15 21:04:51 -07:00
Matthias Clasen
1021e12121
3.99.3
2020-10-15 23:03:03 -04:00
Matthias Clasen
5833e8afa6
Merge branch 'win32.modal' into 'master'
...
GDK/Win32: Fix modal window handling and window stacking (for GTK4)
See merge request GNOME/gtk!2675
2020-10-16 03:01:38 +00:00
Matthias Clasen
34625142f4
docs: Expand opacity docs
...
Explain the situation with popovers and opacity.
Fixes : #3246
2020-10-15 22:39:01 -04:00
Matthias Clasen
6cbf1d0379
Merge branch 'a11y-action-fixes' into 'master'
...
A11y action fixes
See merge request GNOME/gtk!2703
2020-10-16 02:19:08 +00:00
Chun-wei Fan
2cc650ced2
gdk/Win32: Fix mouse pointer capture
...
Call SetCapture() explcitly for the (new) modal window so that we make the
modal window respond to mouse input, and also call SetCapture() to the parent
of the transient window that we are destroying so that mouse input capture is
returned to the parent window.
This attempts to fix the following:
* Upon creating a new modal window, the new modal window does not receive
pointer input unless one switches to another program and back
* Upon closing a transient window, the parent window that activated the
transient window does not receive pointer input unless one switches to
another and back
2020-10-16 10:03:50 +08:00
Matthias Clasen
7165deb630
Merge branch 'fix-listbox-selection' into 'master'
...
Revert "listbox: Activate single-click rows if n_press >= 1"
Closes #3263
See merge request GNOME/gtk!2704
2020-10-16 02:03:16 +00:00
Руслан Ижбулатов
6a0c181886
GDK W32: Remove stacking functions
...
Stacking functions enforce non-native stacking behaviour that is
mostly unneeded, and doing so introduces bugs and complicates things.
2020-10-16 10:02:57 +08:00
Руслан Ижбулатов
89286af620
Revert "GDK W32: Use SWP_NOOWNERZORDER everywhere it can be applied"
...
This reverts commit fc2008f2 .
Turns out, we *don't* have code to maintain Z-order. Restacking
code is not doint that, it just enforces a few weird Z-order-related
behaviours.
2020-10-16 10:01:46 +08:00
Chun-wei Fan
bc142b9c43
GDK/Win32: Fix modal window handling
...
Make sure that we get the state of the modal window properly, and send out the
corresponding notification signals.
This will ensure that we do not try to activate windows that should have become
inactivated due to it opening modal windows and render the program unresponsive
because we are not activating the correct window that is due to receive user
input.
2020-10-16 09:56:42 +08:00
Matthias Clasen
8eb6e876bd
Revert "listbox: Activate single-click rows if n_press >= 1"
...
This reverts commit e669433cde .
This broke selection in several listbox examples.
Fixes : #3263
2020-10-15 21:46:58 -04:00
Matthias Clasen
ab61b7b9ae
atspi: Properly filter out parent actions
...
We only want to show relevant, local actions for
widgets, but _gtk_widget_get_action_muxer() will
return the muxer of a parent widget (all the way
up to the toplevel), if the widget does not have
any actions of its own. To detect this situation,
compare what _gtk_widget_get_action_muxer() returns
for the parent widget, and act accordingly.
2020-10-15 21:32:11 -04:00
Matthias Clasen
3eae91255d
atspi: Fix a thinko in action filtering
...
get_action_at_index() was trying hard to find out
which actions are valid, only to then return the
invalid ones anyway.
2020-10-15 21:31:58 -04:00
Matthias Clasen
5bbacc647c
Merge branch 'a11y/atspi-action' into 'master'
...
A11y/atspi action
See merge request GNOME/gtk!2699
2020-10-16 00:13:23 +00:00
Emmanuele Bassi
cfb327974b
a11y: Add atspi.Action for GtkPasswordEntry
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
a83d3078c2
Allow toggling the password entry visibility programmatically
...
We are going to need a method for toggling the visibility from the
accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
f67345eb55
a11y: Add atspi.Action for GtkEntry
...
We need to handle the activation on the entry widget, as well as the
activation of the primary and secondary icons.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
c10bcf0a60
Add GtkEntry icon signals emitter
...
We need a (private) way to programmatically trigger the activation of
the entry's icons, so that we can call it from the accessibility layer.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
9ae08fc0f0
a11y: Add atspi.Action for GtkExpander
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
5f1128899c
a11y: De-duplicate some action code
...
The widgets with hard coded actions should share more code, instead of
copy-pasting it.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
e44f27a7ed
a11y: Special case buttons and switches
...
These widgets have specific actions.
2020-10-16 00:34:01 +01:00
Emmanuele Bassi
374bd21340
Initial ATSPI Action implementation for widget
...
Use the actions from the GtkActionMuxer of each widget to populate the
list of actions available.
2020-10-16 00:34:01 +01:00
Matthias Clasen
916ef485d1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3245
See merge request GNOME/gtk!2702
2020-10-15 21:00:44 +00:00
Matthias Clasen
92585b75fa
Fix compiler warnings
2020-10-15 16:33:35 -04:00
Matthias Clasen
4bd2595421
actionmuxer: Make it possible to enumerate local actions
...
This will be useful for exposing actions via the
AT-SPI Actions interface.
Update all callers.
2020-10-15 16:32:55 -04:00
Matthias Clasen
aa4c0bf272
spinbutton: Hide the buttons from accessibility
...
The buttons here are not really buttons (the action
is not tied to the "clicked" signal), so triggering
the buttons via a11y does not have the expected effect.
And we expose the Value interface that ATs can use
to set the value.
2020-10-15 16:32:55 -04:00
Matthias Clasen
4e04c39609
emojicompletion: Avoid a memory overrun
...
Don't read beyond the beginning of the string.
Fixes : #3245
2020-10-15 16:32:55 -04:00
Matthias Clasen
0bd5a96d71
gtk-demo: Fix some issues with the multi view demo
...
The nested window was not modal, causing it to be
inoperable. And the nested views within were all
shrunk down to nothingness. Give them some width.
Fixes : #3257
2020-10-15 14:42:43 -04:00
Matthias Clasen
7d22616a0e
Merge branch 'a11y-list-view-selection-fixes' into 'master'
...
atspi: Add fold markers
See merge request GNOME/gtk!2701
2020-10-15 17:36:47 +00:00
Matthias Clasen
8a14f019d0
atspi: Add fold markers
...
This makes it much easier to navigate in these
multi-implementation files.
2020-10-15 13:14:56 -04:00
Matthias Clasen
329efee643
Merge branch 'a11y-list-view-selection-fixes' into 'master'
...
A11y list view selection fixes
See merge request GNOME/gtk!2700
2020-10-15 17:10:00 +00:00
Matthias Clasen
bf58b6f88c
Merge branch 'ebassi/for-master' into 'master'
...
GdkWayland API cleanups
Closes #3249
See merge request GNOME/gtk!2688
2020-10-15 16:55:19 +00:00
Matthias Clasen
8701e65635
atspi: Implement Selection more correctly
...
The Selection interface is defined in terms of child
positions, so we need to always translate from that
to model positions if we want to use the selection
model apis.
2020-10-15 12:46:52 -04:00
Matthias Clasen
5f22ad8848
Remove debug spew
2020-10-15 12:19:58 -04:00
Matthias Clasen
1d40f29776
wayland: Make gdk_wayland_device_pad_set_feedback private
...
It is not a generally useful api, and awkwardly named.
2020-10-15 12:00:00 -04:00
Matthias Clasen
6d1dcaa92a
docs: Explain the symbolic icon paintable situation
...
Add a paragraph to the migration guide that explains
how to properly render symbolic GtkIconPaintables.
Also mention this in the GtkIconPaintable docs.
There's a reason you can't spell 'paintable' without
'pain'...
2020-10-15 11:42:50 -04:00
Matthias Clasen
9c28ecb0da
Merge branch 'a11y/atspi' into 'master'
...
A11y/atspi
See merge request GNOME/gtk!2698
2020-10-15 14:59:24 +00:00
Matthias Clasen
2488d71a0a
Merge branch 'clipboard-emo' into 'master'
...
gtk-demo: Fix up image handling in the clipboard demo
Closes #3252
See merge request GNOME/gtk!2697
2020-10-15 14:50:54 +00:00
Matthias Clasen
5c8663e383
Merge branch 'wip/wayland-dont-respond-to-destroyed-surface-configure' into 'master'
...
wayland/surface: Clear has_uncommitted_ack_configure when hiding
Closes #3262
See merge request GNOME/gtk!2696
2020-10-15 14:25:55 +00:00
Matthias Clasen
4b36bceb26
Merge branch 'meson-epoxy-subproject' into 'master'
...
meson: Fix error when epoxy is a subproject on Windows
See merge request GNOME/gtk!2695
2020-10-15 13:41:47 +00:00
Matthias Clasen
8cf955731f
gtk-demo: Fix up image handling in the clipboard demo
...
Using GtkIconPaintable+GtkPicture is not good for symbolic
icons - they don't get properly colored that way. So change
things around to use the icon name if we have it.
Fixes : #3252
2020-10-15 09:19:17 -04:00
Jonas Ådahl
7dfb25f124
wayland/surface: Clear has_uncommitted_ack_configure when hiding
...
The 'has_uncommitted_ack_configure' state was added to make sure we're
responding to 'xdg_surface.configure' events with
'xdg_surface.ack_configure' requests, as is necessary according to spec.
What we didn't do was to clear this state when hiding, meaning that if
we hid the surface after a configure event, but before the frame
finished and we processed the 'has_uncommitted_ack_configure', we'd try
to acknowledge the surface configuration after having destroyed the
surface.
Closes : #3262
2020-10-15 14:56:06 +02:00
Matthias Clasen
8737692b2b
atspi: Implement Selection for list views
...
This implementation works for both GtkListView and
GtkGridView, and by extension, also for GtkColumnView
and GtkDropDown, since those just use a list view
internally.
2020-10-15 08:35:06 -04:00
Xavier Claessens
fe89fd2317
meson: Fix error when epoxy is a subproject on Windows
...
epoxy_dep cannot be used in a configure time check when it comes from a
subproject. Use variables set in pc file instead.
This requires https://github.com/anholt/libepoxy/pull/231 .
2020-10-15 08:01:16 -04:00
Matthias Clasen
c7bf33a3de
columnview: Set accessible roles
...
Use the TREE_GRID, ROW, COLUMN_HEADER and GRID_CELL roles
for the various widgets involved in a GtkColumnView. To
enable this, we subclass GtkListView for the internal
list in the column view.
2020-10-15 00:16:25 -04:00
Matthias Clasen
6d562b6176
listview: Set accessible roles
...
Use the LIST and LIST_ITEM roles for GtkListView
and its children. Use the GRID and GRID_CELL roles
for GtkGridView and its children.
2020-10-14 23:34:51 -04:00
Matthias Clasen
1bf21d3dba
Document accessible roles for stacks and notebooks
...
This was forgotten when I implemented the Tabs pattern.
2020-10-14 22:27:09 -04:00
Matthias Clasen
14640cec85
flowbox: Set accessible roles
...
Use the GRID and GRID_CELL roles for GtkFlowBox
and GtkFlowBoxChild.
2020-10-14 22:20:43 -04:00
Matthias Clasen
147868a30c
listbox: Set accessible roles
...
Use the LIST and LIST_ITEM roles for GtkListBox
and GtkListBoxRow.
2020-10-14 22:18:21 -04:00
Matthias Clasen
57ebc351a9
Merge branch 'wip/chergert/fix-macos-popup-events' into 'master'
...
macos: fix popup motion and button event delivery
See merge request GNOME/gtk!2694
2020-10-15 01:41:42 +00:00
Matthias Clasen
375bd5e691
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
macos: fix crash when displaying a context menu
See merge request GNOME/gtk!2693
2020-10-15 01:41:06 +00:00
Matthias Clasen
f4f732694a
atspi: Add some docs
...
Add a comment that explains a few of the more subtle
points of the Atspi context tree contstruction.
2020-10-14 21:04:25 -04:00
Matthias Clasen
bf04beb711
atspi: Implement Selection for notebook tabs
...
This is a bit different from the way things were done
in GTK 3 - we follow what was done for GtkStackSwitcher,
and make the tab bar carry the GTK_ACCESSIBLE_TAB_LIST
role, and implement Selection there.
2020-10-14 21:04:25 -04:00
Matthias Clasen
08b586bb57
notebook: Set accessible roles and properties
...
Set up the necessary roles, relations and properties
for the tab patterns. This parallels what we have done
for GtkStackSwitcher, and implements the Tabs pattern
as described in the ARIA authoring guidelines.
2020-10-14 21:04:25 -04:00
Matthias Clasen
41d4c37563
atspi: Don't crash on unnamed stack pages
...
GtkNotebook creates unnamed stack pages, and we should
not crash when that happens.
2020-10-14 21:04:25 -04:00
Matthias Clasen
984e8ac5e3
gizmo: Add a way to set accessible role
...
This will be used for some of the gizmo used
inside GtkNotebook.
2020-10-14 21:04:25 -04:00
Matthias Clasen
512387afcc
atspi: Implement Selection for GtkStackSwitcher
2020-10-14 21:04:25 -04:00
Matthias Clasen
b39684b692
stackswitcher: Set up relations and states
...
Set up a CONTROLS relation between each tab button
and its page, and update the SELECTED property of
the buttons to match their active state.
2020-10-14 21:04:25 -04:00
Matthias Clasen
380488f829
stackswitcher: Use the tablist and tab roles
...
Set the tablist role on the stackswitcher itself, and
the tab role on the buttons. This is another step towards
implementing the tabs pattern for GtkStack.
2020-10-14 21:04:25 -04:00
Matthias Clasen
2370429752
accessible: Avoid realizing the context prematurely
...
platform change is called from gtk_widget_set_focusable
which is likely to be called early on in init(). We don't
want to create an AT context that early if we can help
it, e.g. since it makes it impossible to override the
accessible-role with a construct property.
2020-10-14 21:04:25 -04:00
Matthias Clasen
7c6c718e19
stack: Turn pages into accessibles
...
This requires some cleanup to remove assumptions
about accessibles being widgets in the backend,
and some code to navigate the tree with these
extra objects in between widgets.
The accessibles for stack pages have the role
GTK_ACCESSIBLE_ROLE_TAB_PANEL. This is the first
step towards implementing the tabs patterns
as described in the aria authoring guidelines
for GtkStack.
2020-10-14 21:04:17 -04:00
Christian Hergert
6e84c7c59e
macos: fix discover of surface under cursor
...
This was incorrectly reporting the toplevel surface instead of the
popup surface that was placed above it. This fixes event delivery
to popups for selecting menu items and more.
2020-10-14 16:59:38 -07:00
Christian Hergert
0af3d21573
macos: only emit popup-layout-changed after initial present
...
Otherwise we risk being re-entrant where GtkPopover will not have a
GdkPopupLayout causing other issues.
2020-10-14 16:28:44 -07:00
Christian Hergert
e089bba4f5
macos: ensure we have access to a GdkMonitor
2020-10-14 16:28:44 -07:00
Matthias Clasen
2dfced7edc
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
macos: fix button release events outside of window during grabs
See merge request GNOME/gtk!2692
2020-10-14 23:04:03 +00:00
Christian Hergert
b462bc35c0
macos: allow pointer release event outside surface coords
...
This helps with grab situations so that we can end it when releasing
the pointer buttons outside of the window coordinates.
2020-10-14 15:45:50 -07:00
Christian Hergert
d700cfa2ef
macos: break grabs after sending release event
2020-10-14 15:45:50 -07:00
Christian Hergert
cdb2c1698c
macos: dont send crossing events during grab
...
Fixes an issue where we can't drag scrollbars or text selections while
outside of the application window.
2020-10-14 15:45:50 -07:00
Matthias Clasen
85394b04e0
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
GTK4: fix macos device state query for surfaces
See merge request GNOME/gtk!2690
2020-10-14 19:10:11 +00:00
Matthias Clasen
a772d8fcac
Merge branch 'wip/baedert/for-master'
...
Leaving out the gboolean -> bool change.
2020-10-14 15:07:09 -04:00
Timm Bäder
f93784f9e7
pixbufutils: Pass calculated height value along
2020-10-14 15:06:13 -04:00
Timm Bäder
d695b15f1a
main: Make sure we don't leak axes
...
Mainly a change to appease the static analyzer
2020-10-14 15:06:13 -04:00
Timm Bäder
e1e53cd8cc
infobar: Remove unused include
2020-10-14 15:06:12 -04:00
Timm Bäder
211d669ae7
overlay: Remove empty finalize implementation
2020-10-14 15:06:12 -04:00
Timm Bäder
20bd8e56ee
gtk4-demo: Add missing margin-bottom
...
This was setting margin-end twice
2020-10-14 15:06:12 -04:00
Timm Bäder
df2d7c56c7
gtk4-demo: Remove connection to removed signal
2020-10-14 15:06:12 -04:00
Timm Bäder
8f24b7ad27
stacksidebar: Fold some functions into their only callers
2020-10-14 15:06:12 -04:00
Timm Bäder
61afb0984c
stacksidebar: Set GtkListBox:show-separators
...
Instead of doing this ourselves
2020-10-14 15:06:12 -04:00
Timm Bäder
93b12a8110
frame: Remove need_resize logic
...
gtk_widget_set_parent() will queue a resize anyway.
2020-10-14 15:06:12 -04:00
Timm Bäder
d9cc589339
windowcontrols: gtk_widget_get_root() can return NULL
2020-10-14 15:06:12 -04:00
Timm Bäder
557a363b4f
windowcontrols: decoration-layout is nullable
2020-10-14 15:06:12 -04:00
Timm Bäder
ae009b344f
stylecontext: Remove some unnused includes
2020-10-14 15:06:12 -04:00
Timm Bäder
78c343ba96
snapshot: Refactor some device code
...
Make a bit clearer what this does.
2020-10-14 15:06:12 -04:00
Timm Bäder
eca3eab96f
Remove unneeded gtkstylecontext.h includes
2020-10-14 15:06:12 -04:00
Timm Bäder
2bcef7f030
stylecontext: Remove render_insertion_cursor()
...
This is unused and there already is a snapshot alternative.
2020-10-14 15:06:12 -04:00
Timm Bäder
18c4bdad6f
widget: Remove gtk_widget_list_devices() from private header
2020-10-14 15:06:12 -04:00
Timm Bäder
f20795471c
window: Remove unused struct member
2020-10-14 15:06:12 -04:00
Timm Bäder
ec8f329332
widget: Slightly update opacity docs
2020-10-14 15:06:12 -04:00
Timm Bäder
07fb33c033
gl renderer: Fix private function name
...
It's a GskGLRenderer, not a GskGLRender
2020-10-14 15:06:12 -04:00
Timm Bäder
1fe7043be4
gl renderer: Add more scale_x/scale_y code
...
We really need all of this to be aware of both dimensions of course...
2020-10-14 15:06:12 -04:00
Timm Bäder
0e6014f2f6
gl renderer: Remove two unused uniforms
2020-10-14 15:06:12 -04:00
Timm Bäder
0a4d442849
gl renderer: return empty texture for too small blurred nodes
2020-10-14 15:06:12 -04:00
Timm Bäder
5f9fa13c65
gl renderer: Use op builder to render flipped texture
...
Otherwise, we don't know about the uniform state
2020-10-14 15:06:12 -04:00
Timm Bäder
da0abfce3a
showrendernode: Plug GOptionContext memory leak
2020-10-14 15:06:12 -04:00
Timm Bäder
161b171004
gl renderer: Remove unused parameter
2020-10-14 15:06:12 -04:00
Timm Bäder
4eee6e732b
filechooserwidget: Cosmetics
2020-10-14 15:06:12 -04:00
Timm Bäder
958e4be86d
testfilechooser: Stop listening to ::selection-changed
...
Doesn't exist anymore.
2020-10-14 15:06:12 -04:00
Timm Bäder
eb345cd033
gl renderer: Use nearest filtering for textures in render_texture()
...
Makes the output in the node editor a bit more bearable.
2020-10-14 15:06:12 -04:00
Timm Bäder
ef7c5747c4
build: Only add -Wcast-align for gcc
...
Either we or clang needs to get its shit together about this warning.
But using it during development with clang just makes actually usable
warnings get lost in a flood of -Wcast-align warnings.
2020-10-14 15:06:12 -04:00
Timm Bäder
f456438051
vulkan: Remove double initialization
...
Clang said:
../gsk/vulkan/gskvulkanrenderpass.c:250:5: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.render.node = node
^~~~~~~~~~~~~~~~~~~
../gsk/vulkan/gskvulkanrenderpass.c:249:13: note: previous initialization is here
.type = GSK_VULKAN_OP_FALLBACK,
^~~~~~~~~~~~~~~~~~~~~~
2020-10-14 15:06:12 -04:00
Timm Bäder
4735c27e69
gl renderer: Avoid some code duplication
2020-10-14 15:06:12 -04:00
Timm Bäder
44f10c5861
gl renderer: Flip texture in render_texture()
2020-10-14 15:06:12 -04:00
Timm Bäder
44d1e81ae9
glsl: Add a comment
2020-10-14 15:06:12 -04:00
Timm Bäder
c5909d4dc4
gtkbuilder: Remove pointless function prototype
2020-10-14 15:06:12 -04:00
Timm Bäder
9698cd67a1
gdkgl: Remove flipping when downloading GL texture
...
This fix is correct and fixes:
1) GL textures being upside down in the inspector. They are getting
downloaded because they've been created in a different GL context
2) GL textures being upside down in the cairo renderer (same reason)
However, it breaks the testsuite. We do the flipping via the projection
matrix, but most of the shaders don't care about that.
2020-10-14 15:06:12 -04:00
Timm Bäder
d4efb5b738
gdkgl: Stop getting the clip region from cairo
...
Unused
2020-10-14 15:06:12 -04:00
Timm Bäder
ddcff9eb0f
gl renderer: simplify ->render() implementation a bit
...
We already use self->scale_factor when initialized whole_surface,
so set self->scale_factor first.
2020-10-14 15:06:12 -04:00
Timm Bäder
9fe21b7181
shaderbuilder: Print error message after source code
...
My terminal scrolls down, so showing the error message last makes sense.
2020-10-14 15:06:12 -04:00
Timm Bäder
7bf858b9d0
gl renderer: Add a helper to setup projection matrix
2020-10-14 15:06:12 -04:00
Timm Bäder
bc034d1190
gl renderer: Ignore rendering if accumulated opacity is too small
2020-10-14 15:06:12 -04:00
Timm Bäder
904772c719
gdkgl: Rename function
...
This returns the name of the shader type.
2020-10-14 15:06:12 -04:00
Timm Bäder
7222a0901d
unblurred outset shadow shader: Use premultiply()
2020-10-14 15:06:12 -04:00
Timm Bäder
a0bb248bb3
gl renderer: Use premultiply() in inset shadow shader`
2020-10-14 15:06:12 -04:00
Timm Bäder
0dc0b03d6f
glarea demo: Add min size to gl area
2020-10-14 15:06:12 -04:00
Timm Bäder
9f574a596f
gdkgl: Remove unused cairo_get_matrix() call
2020-10-14 15:06:12 -04:00
Timm Bäder
4b8f3e9b92
colorscale: Refactor creating the hue texture
...
Make this a bit shorter and don't call gtk_hsv_to_rgb in the inner
loop as that is unnecessary.
2020-10-14 15:06:12 -04:00
Timm Bäder
769b15c29b
colorplane: Remove (un)realize handlers
...
Creating the texture in realize() is unnecessary these days, since we
can just rely on size_allocate to do that.
2020-10-14 15:06:12 -04:00
Timm Bäder
8e9a810045
colorutils: Refactor hsv_to_rgb and fold into only caller
2020-10-14 15:06:12 -04:00
Timm Bäder
663ae67935
colorplane: Refactor create_texture()
...
Create a R8G8B8 texture here so we don't waste memory and do work for
an alpha channel we don't care about.
2020-10-14 15:06:12 -04:00
Timm Bäder
76e4002226
colorutils: Remove unused macro
2020-10-14 15:06:12 -04:00
Timm Bäder
ae71fe3739
colorplane: Whitespace
2020-10-14 15:06:12 -04:00
Emmanuele Bassi
66ce0cbec0
Generate introspection for GdkWayland API
...
Like we do for GdkX11. We can't use all of the public C API, but we can
expose enough type information to allow non-C developers to actually
check if they are running the Wayland GDK backend or not—plus some
additional Wayland-specific API.
2020-10-14 15:06:12 -04:00
Emmanuele Bassi
fe871f9d46
Add type annotations for GdkWayland API
...
The GdkWayland API takes generic GDK types and performs a run time
check, which means we need to properly annotate the actual expected
type in order to have methods recognised as such.
2020-10-14 15:06:12 -04:00
Emmanuele Bassi
40e4f3758e
Skip GdkWayland symbols that use wayland-client types
...
The wayland-client API does not have introspection annotations, so we
can't use these types anyway.
2020-10-14 15:06:12 -04:00
Aurimas Černius
2fb1f4a747
Updated Lithuanian translation
2020-10-14 15:06:12 -04:00
Christian Hergert
fb02c99868
macos: port gtk to GDK_WINDOWING_MACOS
...
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.
Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
2020-10-14 15:06:12 -04:00
Christian Hergert
036b56a43b
gtk: use GDK_WINDOWING_MACOS in gentypefuncs.py
2020-10-14 15:06:12 -04:00
Christian Hergert
9279c2cbd1
gdk: remove quartz subdirectory from backends
2020-10-14 15:06:12 -04:00
Christian Hergert
aed279ed4e
macos: add key equivalent helper
...
This is needed by quartz code in gtk/.
2020-10-14 15:06:12 -04:00
Christian Hergert
cc2e69cbd8
macos: remove workaround for scroll delta
...
This gets handled differently in gtk/ and so we shouldn't translate it here.
2020-10-14 15:06:12 -04:00
Christian Hergert
ff279d03b2
macos: track various changes in GDK
2020-10-14 15:06:12 -04:00
Christian Hergert
1519b40ffa
macos: lookup NSEvent by translated GdkEvent
...
This will be needed by the quartz imcontext.
2020-10-14 15:06:12 -04:00
Christian Hergert
28d2e608f9
macos: move input method names to private header
2020-10-14 15:06:12 -04:00
Piotr Drąg
c753f8f30b
Update Polish translation
2020-10-14 15:05:46 -04:00
Marek Černocký
58769467cf
Updated Czech translation
2020-10-14 15:05:46 -04:00
Matthias Clasen
8a361f901d
gtk-demo: Keep undisplayable resources out of view
...
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
2020-10-14 15:05:46 -04:00
Matthias Clasen
9b26660095
Send focus events to the root
...
We are not propagating focus change events, and that is the only
place where we are listening for focus change events. If GtkWindow
does not see focus-in events for its popovers, we end up with
inadvertendly inactive windows.
Fixes : #3240
2020-10-14 15:05:46 -04:00
Matthias Clasen
8dce92e82b
window: Be more careful when looking for focus
...
When passing focus up to a parent, make sure the
newly chosen focus widget actually accepts the focus.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2d927d0ee0
build: Require sysprof 3.38.0
...
We use sysprof_collector_request_counters, which
was introduced in sysprof 3.38.0.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2273e27808
gtk-demo: Ellipsize columns in the characters demo
...
some of the columns have uneven widths, causing them
to bounce around as you scroll. Ellipsize them and
give them a fixed with.
2020-10-14 15:05:46 -04:00
Matthias Clasen
2bdc8c7d9e
docs: Add more details to the migration guide
...
Add some details about GdkSurface and GtkWindow api changes.
Fixes : #3242
2020-10-14 15:05:45 -04:00
Christian Hergert
9f01d4fe44
macos: fix coordinates and state when querying device
...
When querying a device, we need to ensure we are providing coordinates
in the coordinate system of the surface. Further, we need to actually
provide the button and keyboard state.
This fixes some issues related to dragging scrollbars and selecting list
box rows more reliably.
2020-10-14 11:34:44 -07:00
Christian Hergert
d5b5410b8f
macos: use simple monotonic for event serial
2020-10-14 11:34:44 -07:00
Christian Hergert
d6abc125ad
macos: fix compiler warnings
2020-10-14 11:34:44 -07:00
Matthias Clasen
2142c6c086
docs: Fix a copy-paste error
2020-10-14 08:23:06 -04:00
Emmanuele Bassi
9377192102
Correctly annotate gdk_wayland_seat_get_wl_seat()
...
We expect a `GdkWaylandSeat` as the instance parameter.
2020-10-14 11:57:06 +01:00
Emmanuele Bassi
da007ac97b
Add a public header for GdkWaylandSeat
...
We have public API requiring it as a type.
2020-10-14 11:55:34 +01:00
Jakub Steiner
974ce500d6
Merge branch 'wip/jimmac/sidebar-hover-selected-focus' into 'master'
...
Adwaita: selected:hover and focus:selected:hover states
Closes #3251
See merge request GNOME/gtk!2686
2020-10-14 07:36:06 +00:00
Matthias Clasen
b818b34143
Cosmetics
...
Fix a few copy-paste errors.
2020-10-13 21:27:56 -04:00
Matthias Clasen
32d8db103a
Cosmetics
...
Avoid typo-prone repetition of the full interface names.
We have them in the introspection data already.
2020-10-13 18:58:25 -04:00
Matthias Clasen
9955d900db
dropdown: Use the combox accessible role
...
Its really just a combobox with another name.
2020-10-13 18:31:53 -04:00
Matthias Clasen
e3620bdc22
combobox: Use the combobox accessible role
...
Makes sense.
2020-10-13 17:53:39 -04:00
Matthias Clasen
b15328e0d6
atspi: Implement Selection for GtkFlowBox
...
This is a copy of the listbox implementation.
2020-10-13 17:24:06 -04:00
Matthias Clasen
2664c29454
flowbox: Update accessible state for children
...
Set the SELECTED state to reflect whether the selected
is selected, unselected, or unselectable. This is
enough to make selection changes appear in Accerciser.
While we are at it, also set the multi-selectable
property for the flowbox itself.
2020-10-13 17:24:06 -04:00
Matthias Clasen
db97f99359
atspi: Implement Selection for GtkComboBox
...
This doesn't really work in Accerciser. But then,
neither does the GTK 3 implementation from which
this is copied.
2020-10-13 17:24:06 -04:00
Matthias Clasen
caeea0e368
Remove excessively spammy debug messages
...
Non need to announce the same things for every context
we create, and the path is not really that interesting.
without knowing what it belongs to. I would suggest to
make it visible in the inspector instead, so you can
look it up for the widgets you are interested in.
2020-10-13 17:24:06 -04:00
Matthias Clasen
d0753f645e
Fix compiler warnings
2020-10-13 17:24:06 -04:00
Matthias Clasen
81e107885c
Remove some unused code
2020-10-13 17:24:06 -04:00
Matthias Clasen
8f4bc4a65d
atspi: Fix a variant parser oversight
...
When you pass a variant, the format needs an @.
GVariant is not your friend.
2020-10-13 17:24:06 -04:00
Matthias Clasen
08f57d5c3d
atspi: Implement Selection for listbox
...
Implement the selection interface for GtkListBox.
This also includes a convenience api for context
addresses: gtk_at_spi_context_to_ref.
2020-10-13 17:24:06 -04:00
Matthias Clasen
3cc9ac406d
listbox: Update accessible state for rows
...
Set the SELECTED state to reflect whether the row
is selected, unselected, or unselectable. This is
enough to make selection changes appear in Accerciser.
While we are at it, also set the multi-selectable
property for the listbox itself.
2020-10-13 17:24:06 -04:00
Jakub Steiner
f1e9f853de
Adwaita: selected:hover and focus:selected:hover states
...
- getting pretty deep, but visually seems to make sense. Selected row hovers
increase contrast.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3251
2020-10-13 21:27:17 +02:00
Matthias Clasen
18b6c4e69d
Merge branch 'wip/carlosg/for-master' into 'master'
...
Cascade-close popovers by default
Closes #3200
See merge request GNOME/gtk!2685
2020-10-13 19:25:59 +00:00
Matthias Clasen
ccbacb5cce
Fix the build
...
I forgot a few casts in a02c50e72f .
2020-10-13 11:23:13 -04:00
Carlos Garnacho
a939203e6e
gtkmodelbutton: Drop special case to close GtkPopoverMenu
...
With ::cascade-popdown in place, this special case is not necessary
anymore.
2020-10-13 16:55:53 +02:00
Carlos Garnacho
3ba60b06fe
gtkpopover: Remove GtkPopoverMenu special case
...
Now that there's ::cascade-popdown, we don't need to treat
GtkPopoverMenu especially here.
2020-10-13 16:55:53 +02:00
Carlos Garnacho
024d832d94
gtkpopover: Add cascade-popdown property/functions
...
And honor it in gtk_popover_popdown(). By default, a GtkPopover
pops down automatically if a child popover was closed, if this
property is FALSE, the popover will remain opened.
2020-10-13 16:55:53 +02:00
Matthias Clasen
b909455154
atspi: Fix up the role for password entries
...
We use to set the the 'password text' role for entries with
visibility = FALSE. Nowadays, we have a separate class for
password entries, so fix up the role mapping based on that.
2020-10-13 10:52:43 -04:00
Matthias Clasen
bf0f3a82cf
atspi: Make text change notification work
...
Make text change notification work for editables, by connecting
to the ::insert-text and ::delete-text signals on the wrapped
GtkText widget, and for GtkTextView by connecting to the
corresponding GtkTextBuffer signals.
This code is more or less directly copied from GtkTextViewAccessible
and GtkEntryAccessible in GTK 3.
2020-10-13 09:44:04 -04:00
Matthias Clasen
a02c50e72f
text: Make editable signals work again
...
Since the big editable reorg, GtkText was not emitting
::insert-text and ::delete-text, as is expected of
editables. We want to use those signals for a11y
change notification, so make them work again.
2020-10-13 00:49:10 -04:00
Matthias Clasen
81440675af
atspi: Set placeholder-text attribute
...
This is how GTK3 passes placeholder-text to orca,
and it works - orca reads it.
2020-10-12 23:31:03 -04:00
Matthias Clasen
3af56f5216
atspi: Implement EditableText interface for the entry wrappers
...
Drop the EditableText implementation for GtkText,
and implement it for all the wrapper widgets instead.
2020-10-12 22:07:18 -04:00
Matthias Clasen
63dd0405c7
accessible: Add some docs
...
Explain briefly how a11y works for entry wrappers
(since I won't remember a few months from now).
2020-10-12 21:58:49 -04:00
Matthias Clasen
b7ac660f37
atspi: Implement Text interface for the entry wrappers
...
Drop the Text implementation for GtkText, and implement
it for all the wrapper widgets instead.
2020-10-12 21:45:48 -04:00
Matthias Clasen
76b87272a6
spinbutton: Implement GtkAccessible
...
This copies what was done for GtkEntry: get
the focused state from the GtkText within.
We also add a private getter for the text widget,
which was missing here.
2020-10-12 21:45:48 -04:00
Matthias Clasen
852c72fa28
passwordentry: Implement GtkAccessible
...
This copies what was done for GtkEntry: get
the focused state from the GtkText within.
2020-10-12 21:45:48 -04:00
Matthias Clasen
f796d02fea
searchentry: Implement GtkAccessible
...
This copies what was done for GtkEntry: get
the focused state from the GtkText within.
2020-10-12 21:45:48 -04:00
Matthias Clasen
8faf1f64ee
entry: Implement GtkAccessible
...
Override the get_platform_state vfunc to get
the focused state from the GtkText widget within.
2020-10-12 21:45:48 -04:00
Matthias Clasen
8182fab4d9
text: Ignore text widgets for a11y
...
We want to implement the Text interface on the
wrapper entries.
2020-10-12 21:45:48 -04:00
Matthias Clasen
d0d7848cf2
atspi: Use gtk_accessible_get_platform_state
2020-10-12 21:45:48 -04:00
Matthias Clasen
ade9e4b82a
accessible: Add gtk_accessible_get_platform_state
...
As a companion to go with the platform_change api,
add a gtk_accessible_get_platform_state() function
that can be used by backends to get the platform
state.
This is in preparation for making entries inherit
their focus states from the text widget within.
2020-10-12 21:45:41 -04:00
Matthias Clasen
663934b2dc
atspi: Use gtk_accessible_should_present
...
Replace explicit visibility check by this
more general method of determining whether
an accessible should be presented to the
a11y layer.
2020-10-12 21:43:17 -04:00
Matthias Clasen
d9adc1b5aa
accessible: Add a way to hide accessibles
...
Similar to gtk_widget_should_layout(), add a
gtk_accessible_should_present() function that backends can
use to determine whether an accessible should be presented
or not.
Ways to make a widget not presented in a11y:
- hide the widget
- set its role to NONE
- make it have a NULL AT context
We will use this in future to hide the GtkText inside
an entry, since the Text implementation will be done
by the wrapper.
2020-10-12 21:43:17 -04:00
Matthias Clasen
3bfb32e699
Cosmetics
2020-10-12 21:43:17 -04:00
Matthias Clasen
5eb482ebaa
atspi: Treat all entries the same for collecting state
...
We are determining editable state based on the
accessible role (although we could make it platform
state now), so cover all the roles that we use for
entry wrappers.
2020-10-12 21:43:17 -04:00
Matthias Clasen
61474b5a94
atspi: Fix collecting states
...
This is somewhat embarrassing.
2020-10-12 21:42:51 -04:00
Matthias Clasen
8f63443393
Fix the build
2020-10-12 21:37:09 -04:00
Matthias Clasen
dd650ff90e
atspi: D-Bus methods return tuples
...
I've learned this the hard way: When returning a
value from a D-Bus call, the variant construct must
*always* be g_variant_new ("(...)"...
2020-10-12 15:50:36 -04:00
Matthias Clasen
101cbe690e
Don't unref a floating variant
...
It gets consumed somewhere along the way.
2020-10-12 15:10:40 -04:00
Matthias Clasen
62747eb243
atspi: Unregister objects on the bus
...
When a widget is going away, we need to remove
the context from the bus, or else ATs might have
the idea to call methods on them, leading to badness.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d432cbb02b
atspi: Emit property changes for focus
...
With this orca, actually speaks \o/. Sadly, it only
says 'gtk modelbutton widget' so far, but its a start.
2020-10-12 15:10:40 -04:00
Matthias Clasen
45e82adf87
atspi: Cosmetics
...
Use simple wrappers instead of opencoding bit twiddling
all over the place.
2020-10-12 15:10:40 -04:00
Matthias Clasen
a2d220edfa
widget: Notify a11y of focus changes
...
This is using the new 'platform changes' mechanism
to tell the a11y backends when focus changes.
2020-10-12 15:10:40 -04:00
Matthias Clasen
b5ee73d299
a11y: Pass on platform changes
...
Add an enum for 'platform changes' to the at context
change notification mechanism. This will let us pass
along things that ARIA considers 'platform state' such
as focus or editability. The difference between the
platform state and other ARIA states is that we don't
keep the platform state separately in the at context
- backends are expected to just query the widgets.
This is just about avoiding notify listeners for
change notification.
2020-10-12 15:10:40 -04:00
Matthias Clasen
578c8b5068
atspi: Be more careful about indexes
...
Don't return a number for IndexInParent when we
don't have one.
2020-10-12 15:10:40 -04:00
Matthias Clasen
f9ee23825e
atspi: Set some more atspi states
...
Pass on more of the states that are represented
as properties in aria: modal, multi-line, orientation.
2020-10-12 15:10:40 -04:00
Matthias Clasen
35f70d5a99
Pass orientation property to accessible
...
We should set the accessible properties we have,
where they make sense. So set orientation, if the
widget is orientable.
2020-10-12 15:10:40 -04:00
Matthias Clasen
54f1eb4c04
wip: Emit StateChanged signals
...
This is not fully baked, but it is enough to make accerciser
notice when a text entry goes from editable to not editable.
2020-10-12 15:10:40 -04:00
Matthias Clasen
66a81f1187
atspi: Derive readonly state from aria properties
...
We can use the read-only property, together with the
accessible role, to determine whether to set editable
and read-only states for at-spi. This lets us avoid
directly poking at the widgets.
2020-10-12 15:10:40 -04:00
Matthias Clasen
2a5af4e1d6
text: Set the readonly accessible property
...
This mirrors what we already do for GtkTextView.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d37b0357b3
atspi: Set editable state
...
ATs look at not just the implemented interfaces, but
also the states to decide what to do. It turns out that
the EditableText interface is only used by accerciser
if the editable state is set. So set it.
2020-10-12 15:10:40 -04:00
Matthias Clasen
aea25cbbe5
atspi: Implement EditableText interface
...
Implement EditableText for GtkText and GtkTextView.
2020-10-12 15:10:40 -04:00
Matthias Clasen
a72a7d4aeb
atspi: Break out the Value implementation
...
This isn't necessarily very big, but it keeps
the widget checks out of gtkatspicontext.c, and
it is a nice pattern.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d38182bb5d
atspi: Break out the Text implementations
...
Move the implementation of the Text interface
to its own source file, and split it up along
widget lines, to avoid it becoming too messy.
2020-10-12 15:10:40 -04:00
Matthias Clasen
f22edccb2a
scalebutton: Set accessible value properties
...
This is what we did in GTK 3.
2020-10-12 15:10:40 -04:00
Matthias Clasen
dc9fee6185
paned: Set accessible value properties
...
This is what we did in GTK 3.
2020-10-12 15:10:40 -04:00
Matthias Clasen
776b4aee0c
Simplify GetInterfaces handling
...
It is error prone to keep the same conditions in sync
in two places. Instead, just assemble the list of interfaces
as we register objects, and use when GetInterfaces is called.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d37782c533
atspi: Implement Value for more widgets
...
Apply the Value implementation to the widgets where
we had one in GTK 3: GtkLevelBar, GtkRange, GtkScaleButton,
GtkSpinButton, GtkPaned, GtkProgressBar. To make these
work, the widgets need to set the accessible value properties.
2020-10-12 15:10:40 -04:00
Matthias Clasen
8c3e5124c2
atspi: Implement Value interface for ranges
2020-10-12 15:10:40 -04:00
Matthias Clasen
190059dca1
atspi: Implement Text interface for text views
...
With this, all relevant widgets support the
Text interface.
2020-10-12 15:10:40 -04:00
Matthias Clasen
925ef1f90f
atspi: Add textview utilities
...
These are very similar to the pango utilities,
and are copying code from the textview accessible
implementation in GTK 3.
2020-10-12 15:10:40 -04:00
Matthias Clasen
ba63daa1d2
atspi: Export more pango utils
...
We are going to reuse some of the code that does
the pango -> atspi attribute conversion for text
tags.
2020-10-12 15:10:40 -04:00
Matthias Clasen
5b076fee12
atspi: Implement text for GtkText widgets too
...
There is some open question here whether the interface
should be implemented on the outer or the inner widget
of the entry-text pairs. For now, our hand is forced,
since only GtkText provides access to the layout that
we need for implementing many of the interface methods.
2020-10-12 15:10:40 -04:00
Matthias Clasen
b80272a7e7
atspi: Implement Text interface for labels
...
This is a not-quite-complete implementation of the
Text interface for GtkLabel. The missing parts are
anything around extents and positions, as well as
the ScrollSubstring apis.
2020-10-12 15:10:40 -04:00
Matthias Clasen
7c8a16812e
atspi: Add pango utilities
...
This code is more or less a direct copy of what
we had in gtkpango.c in 3.x.
2020-10-12 15:10:40 -04:00
Matthias Clasen
ddb72accc0
atspicontext: Fix GetIndexInParent for toplevels
...
For toplevels, we need to return the index in the
list of toplevels, since that is what GtkAtspiRoot
is using.
2020-10-12 15:10:40 -04:00
Matthias Clasen
824ab7e4ed
atcontext: labelled-by has a reference list
...
This is unclear - our docs state that all the
relations have value type reference, but in fact
they all have value type reference list.
2020-10-12 15:10:40 -04:00
Matthias Clasen
3a867e26d0
atspicontext: Implement GetRelationSet
...
This translates relations as far as the match.
I'm not sure yet what we can do about the fact that
atspi expects relations to be bidirectional (ie have
label-for *and* labelled-by) while aria has only one
direction.
2020-10-12 15:10:40 -04:00
Matthias Clasen
e269cb7a81
atspiroot: Stub out GetRelationSet
...
This needs to be fully implemented, for now sending
an empty relation set back prevents accerciser from
getting hung up.
2020-10-12 15:10:40 -04:00
Matthias Clasen
0ae2ae7944
atspi: Add the AtspiRelationType enum
...
This is what we need to map the aria relation
types to.
2020-10-12 15:10:40 -04:00
Matthias Clasen
5db6c4b038
Move atspi enums to gtkatspiprivate.h
2020-10-12 15:10:40 -04:00
Matthias Clasen
db6bd018ca
Add a GetInterfaces method
...
It turns out that accerciser depends on this undocumented
method that is not in the xml at all, otherwise interface
sections in the accerciser ui never get enabled.
2020-10-12 15:10:40 -04:00
Matthias Clasen
9d43e5bd59
Don't pass NULL to g_variant_new_string
...
That does not work.
2020-10-12 15:10:40 -04:00
Matthias Clasen
edfc55ae89
atspi utils: Fix an oversight
...
gtk_accessible_role_to_atspi_role must always return
an atspi role. The fallback was returning an aria
role.
2020-10-12 15:10:40 -04:00
Matthias Clasen
d6b64b5e29
Fixup: Add a forgotten #pragma once
2020-10-12 15:10:40 -04:00
Emmanuele Bassi
13aa053f6b
Rename libgtk_only symbol in GdkWaylandToplevel
...
All public non-exported symbols in GDK can be used by GTK.
2020-10-12 16:49:10 +01:00
Emmanuele Bassi
4f316f3249
docs: Remove private GdkWayland API from the reference
2020-10-12 16:44:36 +01:00
Emmanuele Bassi
38304fc138
Hide gdk_wayland_display_prefers_ssd()
...
The function is not exported, so it should not be in a public header.
2020-10-12 16:44:05 +01:00
Emmanuele Bassi
da6c0f3ecb
Move private GdkSurface Wayland API into its own header
...
This allows us to hide private API from installed headers,
documentation, and introspection.
2020-10-12 16:40:19 +01:00
Emmanuele Bassi
9ce790032d
a11y: Convenience API for referencing ATSPI root node
...
We turn the root node into a reference fairly often, so it's worth it to
have a utility function that does this for us.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
35163bd7cc
a11y: Add utility function for null refs
...
ATSPI was written for CORBA, which allows passing around "nil"
as valid object references.
2020-10-12 16:19:32 +01:00
Matthias Clasen
9d0952bd7f
atspicontext: Implement GetState
...
Translate the aria states to at-spi's interpretation
of atk states.
2020-10-12 16:19:32 +01:00
Matthias Clasen
e189ccc8ed
atspiroot: Fix GetState implementation
...
When the GetState signature says 'au', it actually
means a bitset that is sent as a pair of 32bit integers.
2020-10-12 16:19:32 +01:00
Matthias Clasen
762fbf34fc
atspiroot: Implement GetIndexInParent
...
Just for good measure
2020-10-12 16:19:32 +01:00
Matthias Clasen
9f73638d43
atspicontext: Implement GetIndexInParent
...
This is needed for ATs to take our tree seriously.
2020-10-12 16:19:32 +01:00
Matthias Clasen
057b447137
atspicontext: Implement more accessible api
...
Implement GetChildAtIndex, GetChildren and ChildCount.
2020-10-12 16:19:32 +01:00
Matthias Clasen
78690845b1
atspiroot: Implement GetChildren
...
No surprises here.
2020-10-12 16:19:32 +01:00
Matthias Clasen
2ea338a8cf
atspiroot: Don't leak references
...
The reffing getter trap, lurking behind g_list_model_get_item().
2020-10-12 16:19:32 +01:00
Matthias Clasen
e2f3039663
atspiroot: Implement GetLocale
2020-10-12 16:19:32 +01:00
Matthias Clasen
8f20133769
atspicontext: Print out the a11y bus address
...
Make our debug spew useful: Having the bus address
makes it easy to jump on the a11y bus to look around
with dbus tools.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
55b1fbd0f3
a11y: Localise the role name of the root node
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
b57f1588df
a11y: Register the Accessible interface on all AtSpiContext instances
...
This is not a complement implementation.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
60acdb9cad
a11y: Implement more ATSPI methods on the root node
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
07759b158a
a11y: Add method to extract desktop data
...
We are going to need the desktop name and path to populate the parent
property of AtSpiContexts associated to top level widgets.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
9511c8273a
a11y: Validate the DBus context path
...
UUIDs use dashes to separate the various blocks; unfortunately, this
results in an invalid DBus object path. Replace the dashes with an
underscore.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
b85b1f5b51
a11y: Turn accessible roles to string
...
Add a simple utility function to turn GtkAccessibleRole values into the
appropriate string, including localization.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
716024d882
a11y: Convert GTK roles to ATSPI ones
...
There's not a precise, 1:1 mapping between the newer ARIA roles and the
older ATSPI ones. We make do with what we have.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
21482e8264
a11y: Compute the label for a GtkATContext
...
The ARIA spec defines the mechanism for determining the name of an
accessible element—see §4.3 of the WAI-ARIA spec.
We follow the specification as much as it makes sense for GTK to do
so:
1. if the element is hidden, return an empty string
1. if the element has a labelled-by relation set, retrieve the
label of the related element
2. if the element has a label property set, use the value of
the property
3. if neither labelled-by nor label attributes are set, we use
the role to compute the name:
- for a `range` role, we return the contents of the value of
the `value-text` or `value-now` properties
- for any other role, we return a textual representation of
the GtkAccessibleRole enumeration value
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
88113956a3
tests: Use the test ATContext for every test
...
Otherwise we're going to need a full desktop session in order to run the
test suite.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
e6c5d57ffe
a11y: Return the ATSPI role for the root element
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
d7ebf18723
a11y: Add AT-SPI cache object
...
Right now, the cache is unused, and we still need to implement the
serialisation method and emit the signals.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
658d910967
a11y: Ignore widgets during destruction
...
There's no point in creating a GtkATContext when a widget is getting
destroyed.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
bd43e9cfc5
a11y: Register the accessible root object
...
When we create the first AT-SPI context we also need to register the
accessible root on the accessibility bus. The accessible root object is
the main entry point of an accessible application, and it holds the
global state to present to the ATs that connect to the bus.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
8c18480092
a11y: Add a display to GtkATContext
...
Since we need to check at run time what kind of AT context to use, we
need a hook into the whole GDK backend machinery. The display connection
seems to be the best choice, in this case, as it allows us to determine
whether we're running on an X11 or Wayland system, and thus whether we
should create a GtkAtSpiContext.
This requires some surgery to fix the GtkATContext creation function, in
order to include a GdkDisplay instance.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
8f19bb0832
a11y: Add dummy AT-SPI context
...
Does not do anything, at the moment, but it's going to get filled out
soon.
The backend is selected depending on the platform being compiled in;
since we're using AT-SPI on X11 and Wayland, and we don't have other
accessibility implementations, we currently don't care about run time
selection, but we're going to have to deal with that.
2020-10-12 16:19:31 +01:00
Emmanuele Bassi
c50916d27b
a11y: Add the AT-SPI DBus descriptions
...
And generate the code for the DBus interfaces.
We don't want the full object manager experience, here, because we're
going to have a single object responding to various interfaces and
remote method calls. For this reason, we're not using the gnome module
in Meson to call gdbus-codegen for us: we need to use the interface info
command line arguments, and those are not available from Meson.
2020-10-12 16:19:31 +01:00
Emmanuele Bassi
4b60e7470a
Use test AT context with installed tests
...
Otherwise we're going to need an AT-SPI service on the session, and the
accessibility bus.
2020-10-12 16:19:31 +01:00
Matthias Clasen
77d4729483
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2683
2020-10-12 14:39:39 +00:00
Emmanuele Bassi
daac36ea4c
Generate introspection for GdkWayland API
...
Like we do for GdkX11. We can't use all of the public C API, but we can
expose enough type information to allow non-C developers to actually
check if they are running the Wayland GDK backend or not—plus some
additional Wayland-specific API.
2020-10-12 14:07:26 +01:00
Emmanuele Bassi
f83ee2ab6a
Add type annotations for GdkWayland API
...
The GdkWayland API takes generic GDK types and performs a run time
check, which means we need to properly annotate the actual expected
type in order to have methods recognised as such.
2020-10-12 14:07:26 +01:00
Emmanuele Bassi
33e84edf0c
Skip GdkWayland symbols that use wayland-client types
...
The wayland-client API does not have introspection annotations, so we
can't use these types anyway.
2020-10-12 14:07:26 +01:00
Aurimas Černius
08fb8c1c2a
Updated Lithuanian translation
2020-10-11 17:25:45 +03:00
Matthias Clasen
035e303f83
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
...
various build fixes for GDK/GTK on macos
See merge request GNOME/gtk!2680
2020-10-10 11:55:01 +00:00
Piotr Drąg
91ba0a31e7
Update Polish translation
2020-10-10 12:45:37 +02:00
Marek Černocký
72ea3a1655
Updated Czech translation
2020-10-10 12:17:27 +02:00
Christian Hergert
07bb07abbe
macos: port gtk to GDK_WINDOWING_MACOS
...
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.
Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
2020-10-09 20:08:23 -07:00
Christian Hergert
41101673c3
gtk: use GDK_WINDOWING_MACOS in gentypefuncs.py
2020-10-09 20:05:20 -07:00
Christian Hergert
97f03edae4
gdk: remove quartz subdirectory from backends
2020-10-09 20:04:27 -07:00
Christian Hergert
d8ba916586
macos: add key equivalent helper
...
This is needed by quartz code in gtk/.
2020-10-09 20:03:52 -07:00
Christian Hergert
3f519e4d9b
macos: remove workaround for scroll delta
...
This gets handled differently in gtk/ and so we shouldn't translate it here.
2020-10-09 20:02:38 -07:00
Christian Hergert
58f9413464
macos: track various changes in GDK
2020-10-09 20:02:18 -07:00
Christian Hergert
59cdd7ae69
macos: lookup NSEvent by translated GdkEvent
...
This will be needed by the quartz imcontext.
2020-10-09 19:59:21 -07:00
Christian Hergert
a30adfe1e0
macos: move input method names to private header
2020-10-09 19:56:21 -07:00
Christian Hergert
6706623731
demo: fix out of bounds array index usage
2020-10-09 19:55:25 -07:00
Matthias Clasen
758675f44e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3242 and #3240
See merge request GNOME/gtk!2679
2020-10-09 13:35:57 +00:00
Matthias Clasen
8fcd4ac0f9
gtk-demo: Keep undisplayable resources out of view
...
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
2020-10-09 07:52:29 -04:00
Matthias Clasen
4c3eb7c6f7
Merge branch 'ebassi/for-master' into 'master'
...
Tone down a user visible message
See merge request GNOME/gtk!2678
2020-10-09 11:47:38 +00:00
Matthias Clasen
115ed005e6
Send focus events to the root
...
We are not propagating focus change events, and that is the only
place where we are listening for focus change events. If GtkWindow
does not see focus-in events for its popovers, we end up with
inadvertendly inactive windows.
Fixes : #3240
2020-10-09 07:43:40 -04:00
Matthias Clasen
6a0704aeb4
window: Be more careful when looking for focus
...
When passing focus up to a parent, make sure the
newly chosen focus widget actually accepts the focus.
2020-10-09 07:43:25 -04:00
Matthias Clasen
eb647299d4
build: Require sysprof 3.38.0
...
We use sysprof_collector_request_counters, which
was introduced in sysprof 3.38.0.
2020-10-09 07:43:25 -04:00
Matthias Clasen
e7aa10342b
gtk-demo: Ellipsize columns in the characters demo
...
some of the columns have uneven widths, causing them
to bounce around as you scroll. Ellipsize them and
give them a fixed with.
2020-10-09 07:43:25 -04:00
Matthias Clasen
c835df5602
docs: Add more details to the migration guide
...
Add some details about GdkSurface and GtkWindow api changes.
Fixes : #3242
2020-10-09 07:43:25 -04:00
Emmanuele Bassi
43300b4047
Tone down a user visible message
...
Self-deprecating humour badly translates to a demo message.
2020-10-09 10:14:41 +01:00
Timm Bäder
cdd2a2af1b
Merge branch 'kjellahl/gdkseat' into 'master'
...
gdkseat: Make gdk_seat_get_tools() public
Closes #3241
See merge request GNOME/gtk!2677
2020-10-08 15:05:57 +00:00
Kjell Ahlstedt
cb98a732e4
gdkseat: Make gdk_seat_get_tools() public
...
Fixes #3241
2020-10-08 16:22:05 +02:00
Timm Bäder
4450f64421
Merge branch 'fix.builder.msvc' into 'master'
...
testsuite/gtk/builder.c: Fix running on Visual Studio
See merge request GNOME/gtk!2676
2020-10-08 09:42:04 +00:00
Chun-wei Fan
1e4d3b6ca1
testsuite/gtk/builder.c: Fix running on Visual Studio
...
Explicitly say in the code that we are exporting the symbols so that when the
test program runs, it can find the required builder symbols.
2020-10-08 16:11:35 +08:00
Matthias Clasen
08ecf779f9
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2674
2020-10-08 02:19:42 +00:00
Matthias Clasen
5d7907caa5
gdk: Drop gdk_surface_new_temp
...
It is not used anymore.
2020-10-07 21:18:25 -04:00
Matthias Clasen
606ab611bd
win32: Stop using gdk_surface_new_temp
...
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:07:40 -04:00
Matthias Clasen
27ef9d9e5e
broadway: Stop using gdk_surface_new_temp
...
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:04:05 -04:00
Matthias Clasen
839baf2bef
x11: Stop using gdk_surface_new_temp
...
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:02:22 -04:00
Matthias Clasen
e602d67e59
wayland: Stop using gdk_surface_new_temp
...
No need to roundtrip through the frontend to create
one of our own surfaces.
2020-10-07 21:02:22 -04:00
Matthias Clasen
ba108f261f
gdk: Drop some unused private api
...
No users of gdk_display_peek_event, gdk_display_has_pending
_gdk_display_event_data_copy or _gdk_display_event_data_free,
so drop all of these, and related vfuncs.
2020-10-07 21:02:22 -04:00
Matthias Clasen
668868fb1f
Merge branch 'master' into 'master'
...
Allow LPR backend to print PDF and PS file formats
See merge request GNOME/gtk!418
2020-10-07 20:51:40 +00:00
Benjamin Otte
bc5723a846
Merge branch 'wip/otte/for-master' into 'master'
...
textbuffer: Don't serialize the \0 byte
See merge request GNOME/gtk!2672
2020-10-07 20:33:25 +00:00
Matthias Clasen
98c7de4aa3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3237
See merge request GNOME/gtk!2673
2020-10-07 20:30:52 +00:00
Benjamin Otte
0fdb33e82a
textbuffer: Don't serialize the \0 byte
...
... when converting to text/plain.
2020-10-07 22:14:18 +02:00
Matthias Clasen
cfb316799a
colorchooser: Bring color names back
...
These are useful for accessibility.
Fixes : #3237
2020-10-07 15:56:11 -04:00
Jan Alexander Steffens (heftig)
fb0c062506
gtkplacessidebar: Disconnect and unref cloud_manager in dispose
...
The manager's providers-changed signal can fire after the sidebar has
been freed. Make sure we disconnect the sidebar from the manager.
https://bugs.archlinux.org/task/57984
https://bugs.archlinux.org/task/68123
2020-10-07 15:16:31 -04:00
Matthias Clasen
3d9eb61bba
gtk-demo: Fix an off-by-one error
...
This was found by the asan build in our ci.
2020-10-07 15:16:31 -04:00
Timm Bäder
4993cde0cb
Merge branch 'migration-guide-fix' into 'master'
...
migration guide: Remove stray html tags
See merge request GNOME/gtk!2670
2020-10-07 08:00:43 +00:00
Nicola Fontana
35b0796a1f
migration guide: Remove stray html tags
2020-10-07 08:38:26 +02:00
Matthias Clasen
d839c1beab
Merge branch 'svg-demo' into 'master'
...
Svg demo
See merge request GNOME/gtk!2668
2020-10-06 20:55:28 +00:00
Matthias Clasen
5a9547da41
gtk-demo: Add an svg paintable demo
...
It is a little annoying that this demo will not show up
if we don't find librsvg, but I think showing how easy
this paintable is outweights the annoyance.
2020-10-06 15:12:09 -04:00
Matthias Clasen
25cbc1a15a
gtk-demo: Recognize .svg as images
...
We can't guarantee that we can load it, but worst
case you'll get a missing image.
2020-10-06 15:11:08 -04:00
Matthias Clasen
043207133d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3235
See merge request GNOME/gtk!2667
2020-10-06 18:25:48 +00:00
Matthias Clasen
490163efcd
Merge branch 'aboutwindow' into 'master'
...
gtkaboutdialog: Directly specialize GtkWindow
See merge request GNOME/gtk!2666
2020-10-06 18:25:27 +00:00
Matthias Clasen
44fd0c18c8
aboutdialog: Fix updating license tab
...
We need to update the license button visibility
whenever the license type changes.
2020-10-06 12:53:46 -04:00
Adrien Plazas
a17f33b1fe
gtkaboutdialog: Directly specialize GtkWindow
...
As it doesn't act as a dialog, there is no point specializing GtkDialog,
so his makes it specialize GtkWindow directly.
2020-10-06 18:46:48 +02:00
Matthias Clasen
22eac2f407
window: Fix setting min size
...
We were inadvertedly setting the windows min size
to the default size, making it so that you can never
shrink a window below its default size.
Fixes : #3235
2020-10-06 11:06:36 -04:00
Matthias Clasen
bdbfaef4d8
gdk: Tweak our GL debug message callback
...
Go back to installing our debug message callback
unconditionally if G_ENABLE_CONSISTENCY_CHECKS is
defined, and allow opting into it using GDK_DEBUG=gl-debug
otherwise.
2020-10-06 10:34:30 -04:00
Matthias Clasen
214c35ffc7
gdk: Docs tweaks
...
We don't have library initialization api anymore,
update the section title to reflect that.
2020-10-06 07:58:01 -04:00
Matthias Clasen
7698b4dd63
treelistrowsorter: Add a bandaid
...
The GtkTreeListRowSortKeys implementation doesn't
know how it wants to cache its keys, and just crashes.
Since that is not cool, add a bandaid fix that forces
it to recreate its keys instead. Extra work, but hey,
no crash.
Related: #3228
2020-10-06 07:58:01 -04:00
Emmanuele Bassi
e532f2322b
Merge branch 'FixWin32PopupFocus' into 'master'
...
Gtk4/Win32: Fix popup focus stealing when CSD is disabled
See merge request GNOME/gtk!2665
2020-10-06 10:30:07 +00:00
firox263
f0a8c6311e
Fix Win32 popup focus when using SSD
...
Prevents GDK Popups from stealing focus from the parent window when
using Server Side Decorations on win32.
It uses `ShowWindow` and the `SW_SHOWNOACTIVATE` flag.
2020-10-06 22:37:35 +13:00
Matthias Clasen
b6d4067717
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtkpopover: Revert focus to parent on hide()
Closes #3214
See merge request GNOME/gtk!2653
2020-10-06 02:14:54 +00:00
Matthias Clasen
ac164d240b
Cosmetic
...
Don't call gtk_root_get_focus when we already have
the GtkWindowPrivate struct at hand. And use
gtk_window_set_focus to update the focus, like the
old code did.
2020-10-05 21:53:05 -04:00
Carlos Garnacho
38547120b2
gtkwindow: Ensure to revert focus to a parent on hide()
...
When a widget is hidden, check harder for the keyboard focus being
contained in that widget, in order to reset it. Portions of the
focus child hierarchy may be outdated at the time, so it is more
reliable to check GtkRoot::focus (i.e. the property we intend to
update here).
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3214
2020-10-06 03:29:13 +02:00
Matthias Clasen
7f5deed2eb
Merge branch 'simple-resizing-fixes' into 'master'
...
Simple resizing fixes
Closes #3076
See merge request GNOME/gtk!2661
2020-10-06 01:25:25 +00:00
Matthias Clasen
ccdc10d9df
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3196
See merge request GNOME/gtk!2662
2020-10-06 00:57:30 +00:00
Timm Bäder
982ebf1b69
gradient shaders: Reduce out values as well
...
We only do 6 color stops here now. Also works around a driver bug.
Fixes #3196
2020-10-05 20:35:34 -04:00
Matthias Clasen
20fb7812df
window: Fix window size snapping back
...
We were not updating the remembered size at all when
the window is interactively resized, causing it to
snap back to its default size the next time we call
gdk_toplevel_present().
This is a bandaid fix to prevent very broken resizing
behavior, until we have properly redone toplevel sizing.
Fixes : #3076
2020-10-05 20:24:19 -04:00
Matthias Clasen
082edd957e
wayland: Don't forget to reapply margins
...
When using the saved size because the compositor
told us to, we were forgetting to readd the margins.
The visible symptom of this was the window getting
smaller every time we went to tiled state and back.
2020-10-05 20:17:50 -04:00
Matthias Clasen
e5cd2568c8
wayland: Don't save size when tiled
...
Don't remember the surface size when we are in tiled
state either. This matches the 'fixed_size' condition
in gdk_wayland_surface_configure_toplevel.
This change fixes an issue where moving a window first
to tiled, then to maximized state and back would lead
to the unmaximized window having the tiled dimensions.
2020-10-05 20:15:33 -04:00
Matthias Clasen
d51608a2c9
wayland: Don't emit premature configure events
...
We should not emit configure events before we are realized - size
changes at this point are not relevant.
This gets rid of a mysterious emission of GdkSurface::size-changed
with a size of 52x52, that is happening when GtkWindow sets the
shadow_width before the window is mapped.
2020-10-05 17:18:14 -04:00
Matthias Clasen
67c6f0a08a
gtk-demo: Mention dataset size for Characters
2020-10-05 14:43:38 -04:00
Matthias Clasen
7311464c67
gl: Install the debug message callback for gl-debug
...
Always install the debug message callback when we can
and GDK_DEBUG=gl-debug is specified. Previously, we
were only installing the callback when the build was
a non-optimized debug build.
2020-10-05 14:43:31 -04:00
Matthias Clasen
aaab461c27
Merge branch 'fix-texture-cache' into 'master'
...
gl renderer: Fix up texture cache key
See merge request GNOME/gtk!2659
2020-10-05 14:58:20 +00:00
Matthias Clasen
6b0c65cc38
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2660
2020-10-05 14:23:08 +00:00
Matthias Clasen
74d99766e4
gtk-demo: Fix up the Characters demo
...
Move the Unicode names to a separate source file,
and only build the demo if we have harfbuzz (since
we use script names, and those are only available
with harfbuzz).
Also, fix a forgotten type name.
2020-10-05 09:56:04 -04:00
Alexander Larsson
24a27ba44f
gl renderer: Fix up texture cache key
...
The commit e14d2be1 forgot to actually set the parent_rect in the texture
key in the case it is necessary.
2020-10-05 15:43:04 +02:00
Matthias Clasen
6156c3583d
NEWS: Updates
...
Trying a new scheme - when updating NEWS outside of doing
a release, keep the version out, to make the it clear that
this is just about the tip of the branch, not a complete
release.
2020-10-05 08:18:56 -04:00
Matthias Clasen
2b03674464
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2658
2020-10-05 11:29:10 +00:00
Matthias Clasen
5d26d11868
gtk-demo: Add a column view demo
...
Make a column view that is showing some Unicode data.
2020-10-04 22:53:45 -04:00
Matthias Clasen
34f33b36f8
Prevent a crash with script names
...
We can't pass NULL to gettext().
2020-10-04 21:20:48 -04:00
Matthias Clasen
bea3bc5d27
Update the copy in gtk-demo too
2020-10-04 19:48:46 -04:00
Matthias Clasen
5d5625dec8
Update script names to Unicode 13
...
It would be better if this was provided elsewhere...
2020-10-04 16:15:09 -04:00
Matthias Clasen
cb833d52fb
Merge branch 'emoji-data-cldr' into 'master'
...
Update Emoji data
Closes #1511 and #950
See merge request GNOME/gtk!2656
2020-10-04 13:56:40 +00:00
Matthias Clasen
9007d153c8
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2657
2020-10-04 13:56:30 +00:00
Matthias Clasen
8ca612c966
scale: Make draw-value default to FALSE
...
This is rarely what you want, so lets turn it off
by default.
Update the one place in our demos where we want to
draw a value, add support for this to gtk-builder-tool,
add a test and mention this change in the migration
guide.
2020-10-04 08:26:44 -04:00
Matthias Clasen
452c909b64
Redo the handling of Emoji data
...
Use the data files from https://github.com/milesj/emojibase.git
as source for our Emoji data. Slightly change our data format by
adding a group to each item, in both the Emoji data and in the
setting for recent-emoji.
Install translated versions of the data as separate resource
bundles in $prefix/gtk-4.0/emoji, and load them when appropriate.
Currently, we have data for de, en, es, fr, zh, with data taken
from Unicode 13 and CLDR 13.
Fixes : #950 #1511
2020-10-04 01:14:42 -04:00
Matthias Clasen
7ef5921022
Emoji: Drop the shortname field from emoji.data
...
Match the name for Emoji completion, and display
it too. 'man worker' looks a lot more natural in
the UI than ':man_worker:'.
2020-10-03 20:06:31 -04:00
Matthias Clasen
1d9d5fcf39
Do case-folding and tokenization when creating emoji.data
...
We can avoid doing the extra work of case-folding and
tokenization whenever we filter in the Emoji chooser.
2020-10-03 19:46:46 -04:00
Matthias Clasen
ed724ebc35
emoji: Add keywords to the data
...
And use them for matching in the Emoji chooser.
2020-10-03 19:46:46 -04:00
Matthias Clasen
44448016e8
emoji: Some work on the conversion tool
...
Document the variant format, and write out json
format if asked to.
2020-10-03 19:46:46 -04:00
Matthias Clasen
a4284569c0
Fix Emoji completion
...
This is some late fallout from the container removal.
2020-10-03 19:42:19 -04:00
Matthias Clasen
9a2faf2197
widget-factory: Enable emoji completion somewhere
...
Without a quick way to test this, it is bound to
fall apart. As it has.
2020-10-03 19:41:26 -04:00
Matthias Clasen
6e594da5f2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #506
See merge request GNOME/gtk!2655
2020-10-03 19:27:15 +00:00
Matthias Clasen
ac79c0e799
textbuffer: Improve some get_iter apis
...
Make these functions return FALSE if they did not
return the exact position that was requested.
Adapt tests.
Based on a patch by Sebastien Wilmet
Fixes : #506
2020-10-03 14:29:07 -04:00
Matthias Clasen
d0b7a4a4ec
testsuite: Add a test that checks for property accessors
...
Make sure that every object property in GTK has accessors for getting
its value (if the property is readable) or setting it (if it is
writable).
Since we are still missing accessors, the test is allowed to
fail for now. Sadly, mesons xfail support is busted, so we just
disable the test entirely :(
Based on initial work by Benjamin Otte.
Related: #2440
2020-10-03 14:28:37 -04:00
Matthias Clasen
60b1b4669e
spinbutton: Add some missing accessors
...
Add a setter and getter for the climb-rate property.
2020-10-03 13:11:20 -04:00
Matthias Clasen
9d0d4cef03
Cosmetics
2020-10-03 13:11:20 -04:00
Matthias Clasen
1b1bf6c90a
text: Add some missing setters and getters
...
Add getters and setters for the enable-emoji-completion,
propagate-text-width and truncate-multiline properties.
2020-10-03 13:11:20 -04:00
Matthias Clasen
38bd4439e8
directorylist: Drop the item-type property
...
No need for this to be a property.
This showed up in a test for missing accessors.
2020-10-03 13:11:20 -04:00
Matthias Clasen
9fdb71cbd2
icontheme: Add a missing getter
...
We want to have a get_display() method on every object
that is tied to the display, so add one here.
2020-10-03 13:11:20 -04:00
Matthias Clasen
ff7bcf738c
colorbutton: Properly override interface properties
...
This showed up in a test for missing property accessors.
2020-10-03 13:11:20 -04:00
Matthias Clasen
5640208f31
node-editor: Don't insert hyphens
...
This can be a bit confusing in multi-line strings.
2020-10-03 13:11:20 -04:00
Matthias Clasen
cef1cd19ff
gsk: Avoid long lines in serialized nodes
...
When encoding big blobs of data in base64, insert newlines.
Base64 allows it, CSS allows it, so not need to make GtkTextView
struggle with multi-megabyte lines.
Update nodeparser tests to reflect this change.
2020-10-03 13:10:55 -04:00
Matthias Clasen
279d3c08a9
gtk-demo: Rename the transition shader files
...
Easier to find them when their name matches the title
that we show in the UI.
2020-10-03 00:01:25 -04:00
Matthias Clasen
949f22b8b2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2261 and #1002
See merge request GNOME/gtk!2654
2020-10-03 03:55:32 +00:00
Matthias Clasen
19d760f9dd
gtk-demo: Fix a typo
2020-10-02 23:54:15 -04:00
Matthias Clasen
a9809b0f67
Allow inserting newlines in css strings
...
Rename _gtk_css_print_string to strip the _ and add
an insert_newlines argument to it. Update all callers,
and make the render node serializer insert newlines.
2020-10-02 23:40:16 -04:00
Matthias Clasen
9033336a23
css: Move _gtk_css_print_string around
...
Move this to a separate header, since it is not
parser functionality, and kill the duplicate
gtkcssparserprivate.h header.
2020-10-02 23:40:16 -04:00
Jakub Steiner
68ae8506d5
Merge branch 'stackswitcher-button-styling' into 'master'
...
Adwaita: Simplify stackswitcher button styling
See merge request GNOME/gtk!2498
2020-10-02 15:09:07 +00:00
Matthias Clasen
da8ee53e2d
emojichooser: Allow inserting multiple Emoji
...
Don't close the Emoji chooser when the Control
key is held while clicking. So you can insert
multiple Emoji without having to reopen the
chooser every time.
Fixes : #1002
2020-10-01 23:45:05 -04:00
Matthias Clasen
f6bd2f4d3f
Add a test for gsk_gl_shader_compile
...
This is not super useful, but at least we can
test that we get an error message including the
shader text.
2020-10-01 23:45:05 -04:00
Matthias Clasen
c9f3034e82
gdk: Remove an unused variable
2020-10-01 19:33:43 -04:00
Matthias Clasen
3cf8904d0b
Add GTK_INPUT_HINT_PRIVATE
...
Add a flag that requests that input methods should not
update personalized data (such as typing history).
Fixes : #2261
2020-10-01 17:14:58 -04:00
Matthias Clasen
c43d535aab
docs: Fix a copy-paste error
2020-10-01 17:07:53 -04:00
Matthias Clasen
f4bfa16136
Update the release script
...
If things go according to plan, we don't need to include
gtk-doc as a subproject in the next snapshot.
2020-10-01 15:14:33 -04:00
Matthias Clasen
4d90259b9b
Use gtk-doc from master
...
I've merged the relevant parts from the gtk-doc-for-gtk4
branch.
2020-10-01 15:11:37 -04:00
Matthias Clasen
ffb51b6888
Require gtk-doc 1.33
...
We'll hopefully get a gtk-doc release out with that
version number soon.
2020-10-01 15:09:26 -04:00
Matthias Clasen
dc3b140fd7
Cosmetics
2020-10-01 13:48:24 -04:00
Matthias Clasen
ce29545470
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3220
See merge request GNOME/gtk!2652
2020-10-01 14:21:34 +00:00
Matthias Clasen
cbe3de9ce7
Merge branch 'master' into 'matthiasc/for-master'
...
# Conflicts:
# .gitlab-ci/test-msys2.sh
2020-10-01 13:56:37 +00:00
Matthias Clasen
6de7022458
Merge branch 'ci-win32-introspection-enabled' into 'master'
...
CI: Enable introspection again for the Windows build
See merge request GNOME/gtk!2651
2020-10-01 13:50:02 +00:00
Christoph Reiter
9601863569
CI: Enable introspection again for the Windows build
...
The underlying bug was fixed in glib and backported in MSYS2:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1665
2020-10-01 15:16:18 +02:00
Matthias Clasen
c278261be0
Merge branch 'wip/jimmac/infosearch-close' into 'master'
...
Adwaita: close button for infobar, searchbar
Closes #3215
See merge request GNOME/gtk!2650
2020-10-01 12:01:23 +00:00
Matthias Clasen
028cd1e23a
Revert "Fix the build with cups < 2.3"
...
This reverts commit d761e3cf2c .
I am seeing PPD_CUSTOM_UNKNOWN in the cups headers in our
ci images, and that is cups 2.2.12. So this commit was
mistaken.
2020-10-01 07:59:30 -04:00
Matthias Clasen
6e7c0ce06b
ci: Give up on sysprof for now
...
Using sysprof and glib as subprojects of the same
project sadly does not work. Subprojects are not
as robust as they should be.
2020-10-01 07:37:44 -04:00
Jakub Steiner
81cfcba5ad
Adwaita: close button for infobar, searchbar
...
fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3215
2020-10-01 13:14:25 +02:00
Matthias Clasen
9bac129707
ci: Try to get everything building again
...
It turns out that the sysprof meson setup does not
work with meson 0.54 :( So version 25 of our ci images
bumps the meson version to 0.55.3.
2020-09-30 23:43:03 -04:00
Matthias Clasen
91c8f6b7df
build: Try to fix docs+subprojects
...
Apparently, subprojects don't have pkgconfig variables :(
2020-09-30 16:21:39 -04:00
Matthias Clasen
103080c384
build: Remove an unneeded version check
...
We are requiring a newer meson than we were checking
for here.
2020-09-30 16:09:56 -04:00
Matthias Clasen
b936419125
ci: Remove --fatal-meson-warnings
...
meson adds features that then trigger warnings when we run
a newer meson over some of our subprojects. This is all too
fragile.
2020-09-30 15:53:15 -04:00
Matthias Clasen
72eb89eda7
gtk-demo: Add the shader paintable sources
...
This is currently not public GTK api, just part of
the demo. So we should show it here.
2020-09-30 15:41:05 -04:00
Matthias Clasen
b0da095944
gsk: Fix compiler warnings
...
We forgot to teach the broadway renderer about new enum
values, and our ci didn't catch it because werror didn't
actually work there until now.
2020-09-30 15:39:30 -04:00
Matthias Clasen
21c8bc2b47
build: Require meson 0.54
2020-09-30 15:26:20 -04:00
Matthias Clasen
7780b89e8a
ci: Really enable werror
...
We wanted to enable werror for gtk without enabling it
for all our subprojects. Sadly, we failed. Try again
2020-09-30 15:26:20 -04:00
Matthias Clasen
517a8406b0
ci: Use the v24 images
...
These images have meson 0.54.
2020-09-30 15:26:20 -04:00
Matthias Clasen
dfd16e3982
ci: Use a newer meson in images
...
We need meson 0.54.
2020-09-30 15:26:20 -04:00
Xavier Claessens
fd1e8afe9d
meson: Change introspection option to yielding feature
...
Yielding option means that if pango is built as a subproject, it will
take the value of that option from the parent project (e.g. gst-build).
For that to work it must be of the same type, which is "feature" instead
of "boolean" in all GStreamer modules.
2020-09-30 15:11:27 -04:00
Benjamin Otte
5829bc7c91
Use correct child widget when measuring
...
Fixes a copy/paste error.
Fixed #3220
2020-09-30 15:11:27 -04:00
Matthias Clasen
5a3aed8ade
Merge branch 'introspection' into 'master'
...
meson: Change introspection option to yielding feature
See merge request GNOME/gtk!2648
2020-09-30 17:50:21 +00:00
Benjamin Otte
5b89253fd9
Use correct child widget when measuring
...
Fixes a copy/paste error.
Fixed #3220
2020-09-30 17:48:24 +00:00
Matthias Clasen
fd631937f3
transition demo: Make buttons symbolic
...
It looks better.
2020-09-30 13:43:36 -04:00
Matthias Clasen
77ec961126
Merge branch 'ebassi/for-master' into 'master'
...
demo: Replace g_print with g_debug
See merge request GNOME/gtk!2645
2020-09-30 15:22:57 +00:00
Matthias Clasen
924e510512
gtk-demo: Update text for the transitions demo
...
The fire is gone, but we have wobbly widgets!
2020-09-30 11:19:12 -04:00
Matthias Clasen
97ffd94d20
Merge branch 'snazzy-demo' into 'master'
...
gtk-demo: Make gltransitions demo a bit snazzier
See merge request GNOME/gtk!2644
2020-09-30 15:00:58 +00:00
Alexander Larsson
d6648871b1
gtk-demo/gltransition: Replace fire background with more mellow blobs
2020-09-30 16:38:50 +02:00
Alexander Larsson
5d4a6940fa
gtk-demo: Use duck in transitions to get some alpha example
2020-09-30 16:25:30 +02:00
Xavier Claessens
0e5dac8c25
meson: Change introspection option to yielding feature
...
Yielding option means that if pango is built as a subproject, it will
take the value of that option from the parent project (e.g. gst-build).
For that to work it must be of the same type, which is "feature" instead
of "boolean" in all GStreamer modules.
2020-09-30 09:50:24 -04:00
Matthias Clasen
2dcf750198
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2647
2020-09-30 13:42:55 +00:00
Matthias Clasen
5fa765b284
Mention icon theme in the migration guide
...
This was requested in #3216 .
2020-09-30 08:55:39 -04:00
Matthias Clasen
9d701129cc
icontheme: Clarify the docs
...
Mention that icons directly in /$app_id/icons/ are treated
as unthemed icons.
See #3216
2020-09-30 08:55:39 -04:00
Alexander Larsson
e14d2be1e8
gl renderer: Fix render node texture cache
...
We're caching two things, either a node itself being rendered, or a
parent storing a cached version of a child as rendered to an offscreen
the size and location of the parent.
If both the parent and child uses the cache this will cause a conflict in
the cache as it is currently use keying of a node pointer which will have
the same value for the node-as-itself and the child-node-of-the-parent.
We fix this by adding another part to the key "pointer_is_child" which means
we can have the same node pointer twice in the cache.
Additionally, in the child-is-rendered-offscreen case the offscreen
result actually depends on the position and size of the parent viewport,
so we need to store the parent bounds in that case.
2020-09-30 14:53:13 +02:00
Emmanuele Bassi
b0a0f07bd7
demo: Replace g_print with g_debug
...
The GtkGears widget is a bit too chatty, especially when used inside
demos like the fishbowl. Let's use g_debug() instead of g_print() for
the GL debugging message.
2020-09-30 12:35:31 +01:00
Matthias Clasen
7defc3b759
Fix the release script some more
...
Still trying to master the tar commandline.
2020-09-30 06:51:46 -04:00
Alexander Larsson
e9885f9cde
gtk-demo: Make gltransitions demo a bit snazzier
...
This adds a bunch of snazz to the gltransitions demo. It is perhaps
a bit overloaded now, but it demos everything that we can do.
Changes:
* The fire shader is now not a bin, it just renders an animating
background with no textures involved.
* The stacks don't all start on the same page.
* The shaderbin passes the mouse coordinate to the shader.
* The shaderbin allows specifying a "border" so that you can
cause effects outside the bin child (something that is new to gtk4).
* All the buttons and the stacks are now in shader-bins that runs
a wobbly-widget effect based on the mouse position that
wobbles outside the child allocation.
2020-09-30 11:40:37 +02:00
Matthias Clasen
87393c7fb6
Merge branch 'small-cleanup' into 'master'
...
menubutton: Remove obsolete private method
See merge request GNOME/gtk!2643
2020-09-29 21:52:37 +00:00
Matthias Clasen
76d616909f
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2642
2020-09-29 20:45:00 +00:00
Matthias Clasen
31069d5e96
release script: Fix doc tarball generation
...
Strip one level from the directories.
2020-09-29 15:07:13 -04:00
Florian Müllner
7ad42df727
menubutton: Remove obsolete private method
...
It was only added for the fallback app menu in headerbars, which
has been removed in the meantime.
2020-09-29 20:58:25 +02:00
Emmanuele Bassi
c6cedf608a
Add annotations for GtkBuildable virtual functions
...
Now that the functions that wrap them have gone away from the public
API, we need proper annotations for the virtual functions, otherwise
languages will not have enough information on nullable arguments and
ownership transfer.
2020-09-29 19:48:55 +01:00
Matthias Clasen
218b905a88
3.99.2
2020-09-29 14:44:31 -04:00
Matthias Clasen
00c6340777
gsk: Add some more shader docs
...
Do a pass over the docs and address minor inconsistencies,
cosmetics and formatting differences.
Mention GSK_DEBUG=shaders.
2020-09-29 14:44:31 -04:00
Matthias Clasen
687ed74d46
Merge branch 'snapshot-stack-optimize' into 'master'
...
Minor optimizations to GtkSnapshot state stack
See merge request GNOME/gtk!2641
2020-09-29 18:44:07 +00:00
Emmanuele Bassi
97276a5cd4
Remove gtk-doc stanzas from private GtkBuildable API
...
Various functions were moved to the private GtkBuildable header by
commit 2715b3ec31 , but the functions still
have gtk-doc stanzas.
2020-09-29 19:39:34 +01:00
Alexander Larsson
796e6ee306
snapshot: Preallocate and don't memset the state stack
...
Most of the time the snapshot is less than 16 levels deep (did some testing
in gtk-demo), so lets pre-allocate 16 levels of state stack to avoid the
extra allocation most of the time.
2020-09-29 16:03:06 +02:00
Alexander Larsson
18b8b499de
gdkarray: Add support for GDK_ARRAY_NO_MEMSET
...
If all your callers already initialize the array element as needed,
then we don't need to memset it to zero first.
This is pretty useful for the snapshot state stack, because due
to the per-node-type data area the elements on the stack are
quite large, but often a lot of it is not used.
2020-09-29 16:02:59 +02:00
Alexander Larsson
8a0dd452d2
gdkarray: Inline splice and reserve
...
This inlines the splice and reserver GdkArray calls. These are
typically only called from the gdk_array_(append/set_size) functions
anyway, and inlining the caller means we can constant propagate the
constant arguments in those calls. Its hard to get exact numbers, but
in fishbowl i noticed a significant decrease in the time spent in
the array code when pushing and poping states.
2020-09-29 15:57:33 +02:00
Matthias Clasen
4cfa9ee19f
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2639
2020-09-29 12:57:36 +00:00
Matthias Clasen
719c44a610
Merge branch 'glshader-track-uniform-state' into 'master'
...
gl: Track the current uniform state for custom programs
See merge request GNOME/gtk!2638
2020-09-29 12:49:22 +00:00
Matthias Clasen
4a2c817690
docs: Document various entry ::activate signals
2020-09-29 07:04:07 -04:00
Matthias Clasen
aac9414117
statusbar: Remove a misleading doc comment
2020-09-29 07:04:07 -04:00
Matthias Clasen
c897daf797
snapshot: Document radial gradient apis
2020-09-29 07:04:07 -04:00
Matthias Clasen
f1299410bf
docs: Fix a typo
2020-09-29 07:04:07 -04:00
Matthias Clasen
165768b6ad
wayland: Match header and doc arguments
...
gtk-doc doesn't take this lightly.
2020-09-29 07:04:07 -04:00
Matthias Clasen
07c338b487
gsk: Document radial gradient api
2020-09-29 07:04:07 -04:00
Matthias Clasen
3af249c046
Silence a compiler warning
...
These variables are not used anymore since
commit 11e4a46967 .
2020-09-29 07:04:07 -04:00
Matthias Clasen
91c3edba35
NEWS: Updates
2020-09-29 07:04:07 -04:00
Alexander Larsson
51ab56d33a
gl: Track the current uniform state for custom programs
...
This allows us to avoid updating uniforms if that is not necessary. This
in turn allows us to sometimes reuse the same draw op by just extending the
vertex array size we draw rather than doing a separate glDraw call.
For example, in the fishbowl demo, all the icons added at the same
time will have the same time and size, so we emit single draw calls
with 100s of triangles instead of 100s of draw calls with 2 triangles.
2020-09-29 11:52:39 +02:00
Alexander Larsson
2e5caa68bc
Merge branch 'glshader-node' into 'master'
...
Add support for GLShader nodes
See merge request GNOME/gtk!2594
2020-09-29 08:30:48 +00:00
Matthias Clasen
4e55220d76
Add some shader tests
...
These are just basic api usage tests, no rendering.
They found the issues fixed in the preceding commits.
2020-09-29 09:51:16 +02:00
Alexander Larsson
e76cb3e1e4
gtk-demo: Add a shader paintable to the fishbowl
...
This gets around 500 instances at 60fps on my system.
2020-09-29 09:51:16 +02:00
Alexander Larsson
8bcb031418
gtk-demo: Add GskGLShaderNode demo
...
Add adds a demo showing off GskGLShaderNode in various ways.
It has a transistion widget, using some examples from
gl-transitions.com, with child widgets being both images, a GL area
and real widgets (that let you edit the transition shaders
themselves.
It also has a fancy fire effect on hove on the buttons.
2020-09-29 09:51:16 +02:00
Alexander Larsson
4d697283ae
Support GLShaderNode in backends
...
For vulkan/broadway this just means to ignore it, but for the gl
backend we support (with up to 4 texture inputs, which is similar to
what shadertoy does, so should be widely supported).
2020-09-29 09:51:16 +02:00
Alexander Larsson
950cc41e15
GtkSnapshot: Add gtk_snapshot_push_glshader()
2020-09-29 09:51:16 +02:00
Alexander Larsson
7ea755e206
Add GskGLShaderNode and GskGLShader
...
A GskGLShader is an abstraction of a GLSL fragment shader that
can produce pixel values given inputs:
* N (currently max 4) textures
* Current arguments for the shader uniform
Uniform types are: float,(u)int,bool,vec234)
There is also a builder for the uniform arguments which are
passed around as immutable GBytes in the built form.
A GskGLShaderNode is a render node that renders a GskGLShader inside a
specified rectangular bounds. It renders its child nodes as textures
and passes those as texture arguments to the shader. You also pass it
a uniform arguments object.
2020-09-29 09:51:16 +02:00
Matthias Clasen
6e9b58b6f0
gsk: Add more shader debug spew
...
Print out the full assembled shader sources when
GSK_DEBUG=shaders is given. This is very verbose,
but may be useful to see what we actually pass
to the compiler.
2020-09-29 09:51:16 +02:00
Alexander Larsson
645fc6a9a5
GtkWindow: Create renderer before realizing child widgets
...
This way the child widgets can rely on the renderer (for example what
type it is) to decide details about how they render (such as if they
should use OpenGL shaders).
2020-09-29 09:51:16 +02:00
Matthias Clasen
a91b6b4786
css: Move the last parser api to the new header
...
This lets us use it from the render node parser
in gsk.
2020-09-29 09:51:16 +02:00
Alexander Larsson
16cdb33c6c
shadertoy demo: Fix GLSL on GLES
...
I was getting "assignment to varying fragColor" errors
2020-09-29 09:51:16 +02:00
Alexander Larsson
bacb3affb3
gl: Add some namespacing to the preamble symbols
...
This adds a gsk prefix to the stuff in the preamble, as we want to
avoid it conflicting with things in the main shader. Especially once
we start allow some customization of shaders.
2020-09-29 09:51:16 +02:00
Alexander Larsson
9460d0131f
gl backend: Add line numbers to source in glsl compilation errors
...
Almost always the source is created by combining various sources, which
means the line numbers in the error messages are hard to use. Adding
the line numbers to the source in the error message helps with this.
2020-09-29 09:51:16 +02:00
Alexander Larsson
7edcd1748c
gl: Properly report error if shader linking fails
...
In gsk_gl_shader_builder_create_program(), if linking fails we
need to return -1 to indicate error, rather than the old deleted
program id.
2020-09-29 09:51:16 +02:00
Alexander Larsson
6887d0ce24
glrenderer: Move ProgramState into Program
...
There is no real reason to have this on the side indexed via the
index, as it is stored next to each other anyway. Plus, storing them
together lets use use `Program` structures not in the array.
2020-09-29 09:51:10 +02:00
Matthias Clasen
e29c586b7c
Merge branch 'arnaudb/menubutton-direction' into 'master'
...
Make GtkMenuButton::direction more useful.
Closes #2811
See merge request GNOME/gtk!2636
2020-09-29 01:55:24 +00:00
Matthias Clasen
4f8a211c51
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3202
See merge request GNOME/gtk!2637
2020-09-29 01:53:02 +00:00
Matthias Clasen
30b7545fb5
Add a reftest for flipping transforms
...
Verify that a scale of -1 does in fact cause a
gradient to go the other direction.
2020-09-28 21:07:51 -04:00
Matthias Clasen
a799c86edb
textbuffer: Elaborate docs
...
Explain a bit more what gtk_text_buffer_get_content_provider()
is for.
Fixes : #3202
2020-09-28 20:51:13 -04:00
Matthias Clasen
68bb532290
window: Don't get surfaces needlessly
...
There is a 1-1 correspondence between natives and
surfaces, so we can just compare the natives, no
need to get the surface for every single one.
2020-09-28 20:51:13 -04:00
Matthias Clasen
d2f0e3fa6b
doc: Document some apis as widget implementor only
...
A better solution for this would be nice. For the
time being, just add a sentence to the docs.
2020-09-28 20:51:13 -04:00
Arnaud Bonatti
4684082232
Make GtkMenuButton::direction more useful.
...
This property was only used until now when
there was neither an icon nor a label set,
for arrow direction and popover placement.
Starting with Gtk4, a GtkMenuButton with a
label shows an arrow at the right (in LTR)
of the label. Allow disabling the arrow or
changing its direction using the direction
property, to have a way to restore a Gtk3-
like look or to improve popover placement.
Fixes #2811 .
2020-09-29 02:26:13 +02:00
Matthias Clasen
5536a2ffe6
Merge branch 'wip/carlosg/for-master' into 'master'
...
gtkeventcontrollerscroll: Drop device type checks
Closes #3210
See merge request GNOME/gtk!2635
2020-09-28 22:03:36 +00:00
Carlos Garnacho
11e4a46967
gtkeventcontrollerscroll: Drop device type checks
...
Kinetic scrolling (and begin/end tracking) broke with commit cab1dcb696
since the pointing device used on X11 does not get as much GdkInputSource
granularity as the source device used to have in GTK3.
Actually this is kinda pointless, devices incapable of smooth scroll
should send discrete events, without those devices in the picture, we
want kinetic scroll to apply on every other device capable of smooth
scroll, so just do that.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3210
2020-09-28 23:35:36 +02:00
Yosef Or Boczko
01ddc181f9
Update Hebrew translation
...
(cherry picked from commit f6e3dfd73e )
2020-09-28 19:00:52 +00:00
Yosef Or Boczko
2b3c2962ab
Update Hebrew translation
...
(cherry picked from commit 02d1d9714e )
2020-09-28 18:59:32 +00:00
Matthias Clasen
27b3bb59eb
Merge branch 'another-attempt-to-fix-shadertoy' into 'master'
...
Flip GLArea textures
See merge request GNOME/gtk!2634
2020-09-28 16:16:51 +00:00
Matthias Clasen
ff61f35b77
Merge branch 'cloudproviders-ci' into 'master'
...
Cloudproviders ci
Closes #2480
See merge request GNOME/gtk!2632
2020-09-28 15:45:08 +00:00
Matthias Clasen
5206cfa837
Merge branch 'wip/otte/for-master' into 'master'
...
snapshot: Don't flip textures
See merge request GNOME/gtk!2633
2020-09-28 15:43:02 +00:00
Matthias Clasen
b711c12bbe
glarea: Flip our texture
...
The texture that produce is upside-down, compared to what
GSK expects, so flip things around with a transform.
This fixes the shadertoy demo being upside-down after a
recent fix to avoid downloading and reuploading the texture.
2020-09-28 11:34:23 -04:00
Matthias Clasen
431f144f37
gsk: Normalize when transforming bounds
...
Bounds are assumed to be normalized, and transforms
with negative scales or 3d rotations can make us get
negative sizes.
Fix by Benjamin Otte.
2020-09-28 11:34:16 -04:00
Benjamin Otte
651c92c0ed
snapshot: Don't flip textures
...
... or gradients or borders or shadows. Instead, ensure that affines
have non-negative scale factors. Otherwise add a transform node.
The only place where this check is not necessary is color nodes, but
special casing them seems not worth it.
2020-09-28 16:14:28 +02:00
Milo Casagrande
8487e82133
Update Italian translation
2020-09-28 07:41:47 +00:00
Aurimas Černius
15b635d7bd
Updated Lithuanian translation
2020-09-27 22:06:30 +03:00
Matthias Clasen
3aa2519c2b
ci: Use v23 images
...
I added libcloudproviders to the base image, but
now I see that we already enabled libcloudproviders
in the build anyway, so I'm a bit confused.
Fixes : #2480
2020-09-27 11:48:19 -04:00
Matthias Clasen
55bd6d08d4
ci: Add libcloudproviders to the image
...
Add libcloudproviders to fedora-base:v23 and fedora:v23.
This is so we can enable the cloud-providers feature in
our ci builds.
2020-09-27 11:41:04 -04:00
Matthias Clasen
536e1a1954
Merge branch 'patch-1' into 'master'
...
treestore: Document the fact that iter is modified by the function, in a machine-readable fashion.
See merge request GNOME/gtk!2613
2020-09-27 15:03:04 +00:00
Danny Milosavljevic
32baa0a549
Update gtktreestore.c: gtk_tree_store_remove didn't have the proper comment annotation
...
"inout" for the parameter ITER passed. This means that bindings would misjudge what
the function does. In the case of guile-gi, it would be misjudged for a predicate,
see gulie-gi bug 87.
2020-09-27 15:03:03 +00:00
Matthias Clasen
6f823cd0bd
Merge branch 'issue2627-gtk4' into 'master'
...
gdk/wayland: Replace gtk-primary-selection with primary-selection-unstable-v1
See merge request GNOME/gtk!2630
2020-09-27 14:51:23 +00:00
Matthias Clasen
97d052ef1b
Merge branch 'avoid-gl-texture-download' into 'master'
...
gsk: Avoid downloading GL textures when possible
See merge request GNOME/gtk!2628
2020-09-27 14:47:52 +00:00
Robert Mader
9ea0469ab0
gdk/wayland: Replace gtk-primary-selection with primary-selection-unstable-v1
...
The later is the public upstream version, while identical implementation wise.
https://gitlab.gnome.org/GNOME/gtk/-/issues/2591
2020-09-27 16:23:42 +02:00
Matthias Clasen
895c1681f0
Merge branch 'fontchooser-no-lang' into 'master'
...
fontchooser: Fix builds without PangoFT2
See merge request GNOME/gtk!2629
2020-09-27 12:42:42 +00:00
Matthias Clasen
9ca9f42452
gsk: Avoid downloading GL textures when possible
...
I found that the gears demo was spending 40% cpu
downloading a GL texture every frame, only to
upload it again to another context.
While the GSK rendering and the GtkGLArea use different
GL contexts, they are (usually) connected by sharing data
with the same global context, so we can just use the
texture without the download/upload dance. This brings
gears down to < 10% cpu.
2020-09-26 21:55:28 -04:00
Matthias Clasen
752270253f
fontchooser: Fix builds without PangoFT2
...
Currently, only if PangoFT2 is present and used it is supported
to retrieve the languages that are supported by a particular font.
If we don't have PangoFT2, remove the language filtering and the
sample text selection.
Based on earlier work by Chun-wei Fan, see
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2614
2020-09-26 19:15:45 -04:00
Matthias Clasen
92e551f895
Merge branch 'BUG_gtktreeview_headers_focus_on_click_GTK4' into 'master'
...
GtkTreeviewColumn: don't focus-on-click header buttons
See merge request GNOME/gtk!1806
2020-09-26 22:50:23 +00:00
Matthias Clasen
593907f7b0
testupload: Test more formats
...
Copy the format conversion code from GdkMemoryTexture
so we can produce all formats, and test them all.
The upload fast paths assume that the stride is a
multiple of four, so some of the padding values cause
it to fail. Apart from that, things seem to work for
all combinations.
2020-09-26 17:26:12 -04:00
Matthias Clasen
34ec226852
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2626
2020-09-26 14:00:32 +00:00
Matthias Clasen
d56ad7c40c
Add a test for various texture uploads
...
Create textures with various characteristics (alpha, premultiplication,
stride) that trigger different code paths in the gl texture upload
function, and show the resulting images. If all goes well, they all
should look the same.
On my system, this tests texture upload for memory formats
GDK_MEMORY_B8G8R8A8_PREMULTIPLIED, GDK_MEMORY_R8G8B8A8, and
GDK_MEMORY_R8G8B8, and it works with both gl and gles.
2020-09-26 09:20:00 -04:00
Matthias Clasen
ae09e20e8a
NEWS: Updates
2020-09-26 09:04:42 -04:00
Matthias Clasen
54944c9cea
Merge branch 'fix-texture-upload-more' into 'master'
...
More texture upload fixes
Closes #3198
See merge request GNOME/gtk!2624
2020-09-26 12:52:25 +00:00
Matthias Clasen
fe8986f2d5
Merge branch 'matthiasc/for-master' into 'master'
...
gl: Make debug spew more complete
Closes #3197
See merge request GNOME/gtk!2623
2020-09-26 02:02:13 +00:00
Matthias Clasen
d6912a6791
More texture upload fixes
...
In some cases, with bpp == 3 and a rowstride
that is divisible by 4, we were passing invalid
parameters to GL.
Fixes : #3198
2020-09-25 21:59:33 -04:00
Matthias Clasen
db4b7e3d11
Merge branch 'add-child-clash' into 'master'
...
Make GtkBuildable vfunc accessor functions private
Closes #3191
See merge request GNOME/gtk!2619
2020-09-26 01:17:08 +00:00
Matthias Clasen
6cdbf1a352
popup: Fix up a doc blurb
...
The GdkPopup:autohide property was mis-documented.
Fixes : #3197
2020-09-25 20:43:01 -04:00
Matthias Clasen
3d881752bf
gl: Make debug spew more complete
...
List GL_EXT_unpack_subimage among the extensions
we check for.
2020-09-25 20:42:01 -04:00
Matthias Clasen
1b93108d10
Merge branch 'fix-rgb-upload' into 'master'
...
gl: Fix RGB uploads
Closes #3194
See merge request GNOME/gtk!2620
2020-09-26 00:30:31 +00:00
Florian Müllner
e4d4b50d6d
docs: Document GtkBuildable changes in migration guide
...
https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
2020-09-26 02:16:57 +02:00
Florian Müllner
2715b3ec31
buildable: Make vfunc accessor functions private
...
With the exception of gtk_buildable_get_id(), those are only used
to construct objects from XML descriptions, which is functionality
internal to GTK.
The API is therefore unlikely to be missed, and keeping it internal
means they can no longer unintentionally shadow object methods in
bindings with less namespacing; for example it's currently ambiguous
whether `infoBar.add_child()` refers to gtk_info_bar_add_child() or
gtk_buildable_add_child().
https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
2020-09-26 02:16:57 +02:00
Florian Müllner
12189bc10f
buildable: Rename set_name() to set_buildable_id()
...
GtkBuildable's get_name()/set_name() methods may shadow
GtkWidget's methods. Avoid that by renaming the API to
get_buildable_id()/set_buildable_id(), which also reflects
the name of the XML attribute the API refers to.
https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
2020-09-26 02:16:05 +02:00
Matthias Clasen
3db217ab7a
gl: Reset GL_UNPACK_ALIGNMENT
...
Reset GL_UNPACK_ALIGNMENT to its initial value of 4 after
changing it for a glTexImage2D call.
2020-09-25 16:17:45 -04:00
Matthias Clasen
a9de1d702e
Merge branch 'matthiasc/for-master' into 'master'
...
columnview: Simplify column constructors
See merge request GNOME/gtk!2622
2020-09-25 18:25:09 +00:00
Matthias Clasen
0c3f42e06e
columnview: Simplify column constructors
...
Drop gtk_column_view_column_new_with_factory and
just make gtk_column_view_column_new accept a
nullable factory. This follows what we've been
doing elsewhere.
Update all callers.
2020-09-25 13:57:10 -04:00
Matthias Clasen
d4b740ce62
Merge branch 'wip/carlosg/for-master' into 'master'
...
Wip/carlosg/for master
Closes #3125 and #3121
See merge request GNOME/gtk!2621
2020-09-25 17:49:59 +00:00
Carlos Garnacho
d9d494826f
gtkbutton: Clean up priv->in_button
...
This is now only toggled around, may be cleaned up.
2020-09-25 19:20:27 +02:00
Carlos Garnacho
ea6e575901
gtkbutton: Check release coordinates on all release event types
...
The priv->in_button state that used to be relied upon for pointer
events has been reduced over time to a broken state, since the button
does not track crossing events anymore.
Make the coordinate-based checks apply for pointer events too, besides
touch events. This fixes GtkButton mistakenly emitting ::clicked with
pointer button releases outside the widget.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3121
2020-09-25 19:20:04 +02:00
Matthias Clasen
12f05e80aa
gl: Fix RGB uploads
...
I don't really know what to say, other than:
OpenGL is terrible
Fixes : #3194
2020-09-25 13:16:47 -04:00
Carlos Garnacho
0ccdbfd802
gtktextview: Avoid GtkGestureClick claiming on touch press
...
We still want the drag gesture (and text selection) to work. Avoid claiming
the gesture early, like it's done in the pointer case.
2020-09-25 19:02:26 +02:00
Carlos Garnacho
7d5accc69f
gtkscrolledwindow: Do not eagerly claim touch press event
...
Claiming early makes the contents unable to react to the touch press
event. Do this on GtkGestureDrag::update past a threshold, so the
child widget(s) can claim before the scrolledwindow does.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3125
2020-09-25 18:58:44 +02:00
Carlos Garnacho
b1606db839
gtkscrolledwindow: Drop gtk_scrolled_window_set_capture_button_press()
...
This API is kinda stuck in the GdkEvent days, we now negotiate ownership
of the input sequence via GtkGestures. Remove it as it reflects a way to
work that was not exactly accurate and it will turn plainly wrong soon.
2020-09-25 18:57:40 +02:00
Matthias Clasen
c9f6a9f7c5
Merge branch 'gles-texture-colors' into 'master'
...
Fix uploads of textures in GLES (and make texture uploads better)
See merge request GNOME/gtk!2616
2020-09-25 14:53:19 +00:00
Timm Bäder
09564a5798
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2617
2020-09-25 13:35:20 +00:00
Alexander Larsson
a299bbfc58
Drop gdk_cairo_surface_upload_to_gl() helper
...
There is nothing really special about this code, its just a helper for
uploading pixel data to opengl, and we're not really in the business
of doing opengl-specific helper functions.
2020-09-25 15:00:07 +02:00
Alexander Larsson
90fc671ef8
gl backend: Avoid roundtripping via surface when updloading
...
Do custom uploads rather than using gdk_cairo_surface_upload_to_gl(),
because this way we avoids a roundtrip (memcpy and possibly conversion)
to the cairo image surface format.
2020-09-25 10:04:48 +02:00
Alexander Larsson
c71921a6be
gdk_gl_context_upload_texture() avoid conversion for pixbuf format
...
The gdk-pixbuf non-rgba format can be directly uploaded without
conversion.
The rgba format needs alpha premultiplication though, which is not
supported by GL during upload.
2020-09-25 09:31:43 +02:00
Alexander Larsson
1001995d49
Correctly upload textures for GLES
...
GLES doesn't support the GL_BGRA + GL_UNSIGNED_INT_24_8 hack that
we use on desktop OpenGL to upload textures directly in the cairo
pixel format. This adds the required conversions to all the places
that currently need it.
We also add a data_format to the internal gdk_gl_context_upload_texture()
function to make it clearer what the format are. Currently it is always
the cairo image surface format, but eventually we want to support other
formats so that we can avoid some of the unnecessary conversions we do.
Also, the current gdk_gl_context_upload_texture() code always converts
to a cairo format and uploads that like we did before. Later commits
will allow this to use other upload formats that gl supports to avoid
conversions.
2020-09-25 09:31:43 +02:00
Alexander Larsson
8e59cdabac
Add GDK_MEMORY_R8G8B8A8_PREMULTIPLIED
...
This is the default OpenGL format, and in fact the only pixel format
that GLES supports uploading as. Actually, the premultiplied part is
really just about how we use the textures, but all textures in GTK
are premultiplied.
2020-09-25 09:31:43 +02:00
Alexander Larsson
88b709d5ec
texture: Unvirtualize download_surface
...
We only have one implementation, so why do all this vfunc work?
2020-09-25 09:31:43 +02:00
Matthias Clasen
e6d5a3c4e8
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3180 , #3178 , and #3179
See merge request GNOME/gtk!2618
2020-09-24 18:50:26 +00:00
Matthias Clasen
e70ed905d1
columview: Don't overdraw
...
Just always tell the title and cell widgets to
clip their children to the right size. Otherwise
we risk things getting out of sync and unintended
overdraw.
Fixes : #3179
2020-09-24 14:30:40 -04:00
Matthias Clasen
7eb0ae39c5
columview: Fix column resizing
...
We were not handling the fixed_width quite right,
and that was causing screaming from the GTK size
allocation machinery.
Fixes : #3178
2020-09-24 14:18:38 -04:00
Timm Bäder
2f93287473
cssimagefallback: Whitespace
2020-09-24 19:08:22 +02:00
Timm Bäder
484dcc043b
cssimagefallback: Avoid allocating GPtrArray for colors
...
If we just parse a color, like image(#FFF), avoid allocating the
GPtrArray to store images. This happens in Adwaita for background images
of backdrop buttons. We save around 70 GPtrArrays this way.
2020-09-24 19:08:22 +02:00
Timm Bäder
716b5afe6a
Adwaita: Fix calendar header button backdrop bg color
2020-09-24 19:08:22 +02:00
Timm Bäder
fd728ea8bc
gl renderer: Lower maximum gradient stop count
...
6 is still plenty according to my market research.
Should help with #2624
2020-09-24 19:08:22 +02:00
Timm Bäder
8d7b3bade3
gl renderer: Fall back to cairo if gradients use too many stops
2020-09-24 19:08:22 +02:00
Timm Bäder
12cc178756
textbuffer: Don't try to inset NULL text from clipboard
...
That used to generate a critical error message.
Also free() the data.
2020-09-24 19:08:22 +02:00
Timm Bäder
9eaa8bd1e7
gl renderer: Only return error if creating programs failed
2020-09-24 19:08:22 +02:00
Timm Bäder
15994db74d
gl renderer: Use scale_x/y when rendering clipped nodes
2020-09-24 19:08:22 +02:00
Timm Bäder
467be0b7dc
gl renderer: Don't use ops_get_scale() when rendering clip nodes
...
Differentiate between scale_x and scale_y. This works better for e.g.
transform nodes using scaleX().
2020-09-24 19:08:22 +02:00
Timm Bäder
84d2a33c10
gl renderer: Support scaleX/Y better when rendering radial gradients
...
We should do this everywhere, but this is a start.
2020-09-24 19:08:22 +02:00
Matthias Clasen
9fde0137a0
listview: Avoid a critical when reordering
...
When sorting a cell into the place its already at,
we were triggering criticals. Avoid that.
Fixes : #3180
2020-09-23 22:53:21 -04:00
Matthias Clasen
9dab51e7be
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3188
See merge request GNOME/gtk!2612
2020-09-23 22:44:22 +00:00
Matthias Clasen
810218b2f5
fontchooser: Don't center the list
...
The centered layout of the font previews don't look appealing
and make it harder to judge the relative width and weight of
the individual styles.
Fixes : #3188
2020-09-23 16:32:48 -04:00
Balázs Úr
7acbbd6bdd
Update Hungarian translation
2020-09-23 15:25:12 +00:00
Balázs Úr
a364ab1efb
Update Hungarian translation
2020-09-23 14:39:40 +00:00
Thomas Holder
4325c20013
gtktreeview: Fix child access after TEST_EXPAND_ROW
...
In gtk_tree_view_build_tree with recurse=TRUE, the TEST_EXPAND_ROW
signal might invalidate the child iterator. Getting the iterator after
the signal (instead of before) fixes the issue.
Fixes https://gitlab.com/inkscape/inkscape/-/issues/1879
2020-09-23 07:53:33 -04:00
Matthias Clasen
7bae48335f
Merge branch 'wip/jimmac/osd-spinbutton' into 'master'
...
Adwaita: osd spinbutton specificity bump
Closes #2769
See merge request GNOME/gtk!2610
2020-09-23 11:47:01 +00:00
Matthias Clasen
571f15cac6
Merge branch 'make-claiming-button-release-work' into 'master'
...
gestures: Make claiming button release work
See merge request GNOME/gtk!2576
2020-09-23 11:35:59 +00:00
Jakub Steiner
78236bfdbe
Adwaita: osd spinbutton specificity bump
...
- mimic the peculiar selector from the normal style onto osd to
override.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2769
2020-09-23 10:16:55 +02:00
Matthias Clasen
5e4180b5f0
Merge branch 'improve-columnview-styling' into 'master'
...
Adwaita: Improve columnview styling
See merge request GNOME/gtk!2608
2020-09-22 03:01:38 +00:00
nana-4
2d6a9990b7
Adwaita: Don't restrict columnview editablelabel style to .data-table
...
This should be available without .data-table.
2020-09-22 10:40:15 +09:00
nana-4
42be26f1b1
Adwaita: Improve columnview styling
...
- Move padding from parent row to child cell.
- Align horizontal sizing of cell with header button.
- Properly support GtkColumnView:show-column-separators.
- Change cell height with and without .data-table.
2020-09-22 10:37:04 +09:00
nana-4
f98055b075
Adwaita: Fix separator color for lists
2020-09-22 10:35:15 +09:00
Matthias Clasen
3252d4cab2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2607
2020-09-21 18:11:41 +00:00
Matthias Clasen
2c527ec87e
inspector: Make switches go back to normal size
2020-09-21 11:53:48 -04:00
Matthias Clasen
d5e315c470
gtk-demo: Improve the pickers demo
...
"Two of every kind..." Add some customized pickers
here. This found a number of issues that have been
fixed in the preceding commits.
2020-09-21 11:53:48 -04:00
Matthias Clasen
256f845d89
colorbutton: Fix handling of transient parents
...
When we create the dialog before the button has
been rooted, we need to update its transient
parent when that happens.
2020-09-21 11:53:48 -04:00
Timm Bäder
b3c21bc89a
Merge branch 'fix-hover-tracking' into 'master'
...
main: Update pointer focus state for button releases
Closes #3172
See merge request GNOME/gtk!2601
2020-09-21 12:20:00 +00:00
Marek Černocký
6bc46a9a69
Updated Czech translation
2020-09-21 08:30:59 +02:00
Matthias Clasen
1d34f955a2
filechooser: Fix gtk_file_chooser_set_choice
...
This broke when it was ported to GtkDropDown.
2020-09-20 12:04:49 -04:00
Matthias Clasen
ee75bae8f8
fontchooser: Make sure the tweak button is updated
...
This was showing up as tweak buttons being visible
when they should not. The code probably relied on
widgets being hidden by default (as they were in
GTK3).
2020-09-20 10:59:37 -04:00
Matthias Clasen
3c62cd90d4
fontchooser: Handle families without faces
...
This might seem useless, but I've met fonts
where pango_font_family_get_face (family, NULL)
return NULL. Handle it without criticals.
2020-09-20 10:59:37 -04:00
Matthias Clasen
81793b62d8
docs: Improve gtk_widget_set_font_map docs
2020-09-20 10:59:37 -04:00
Matthias Clasen
9ee7bdf4cb
Merge branch 'fix-wayland-popups' into 'master'
...
wayland: Fix grabbing popup
See merge request GNOME/gtk!2604
2020-09-20 14:19:50 +00:00
Matthias Clasen
bb402a1f1d
wayland: Fix grabbing popup
...
A typo snuck into commit 3023a61e1d that
caused us to fail all grabbing popups with
"grab failed: not viewable". Fix that.
2020-09-20 10:02:53 -04:00
Emin Tufan Çetin
02614713da
Update Turkish translation
2020-09-20 06:38:03 +00:00
Matthias Clasen
18a5ca257a
Merge branch 'kill-widget-new' into 'master'
...
Drop gtk_widget_new
See merge request GNOME/gtk!2603
2020-09-19 21:25:32 +00:00
Matthias Clasen
874b9ef8b0
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2602
2020-09-19 21:22:30 +00:00
Matthias Clasen
d89f7fd046
Drop gtk_widget_new
...
An abstract type should not have a constructor.
If you want to be generic, just use g_object_new.
2020-09-19 16:58:42 -04:00
Matthias Clasen
aeeffe27c2
NEWS: Updates
2020-09-19 16:49:46 -04:00
Matthias Clasen
cdc5e83ef2
Merge branch 'matthiasc/for-master' into 'master'
...
textbuffer: Redo insert markup a little bit
See merge request GNOME/gtk!2600
2020-09-19 20:48:49 +00:00
Matthias Clasen
661da6baec
main: Update pointer focus state for button releases
...
Failure to do so makes the old pointer focus target
'sticky', because we end up ignoring the result of
picking the pointer focus until a motion event comes
in.
Fixes : #3172
2020-09-19 16:48:15 -04:00
Matthias Clasen
e927866ed4
shortcutswindow: Drop the Private struct
2020-09-19 16:22:04 -04:00
Matthias Clasen
4b9e7ac355
revealer: Drop the Private struct
2020-09-19 14:41:41 -04:00
Matthias Clasen
bebe0b5c1b
magnifier: Drop the Private struct
2020-09-19 14:36:44 -04:00
Matthias Clasen
2ad9864cdc
Cosmetic
2020-09-19 14:31:02 -04:00
Matthias Clasen
ec46900f06
colorscale: Drop the Private struct
2020-09-19 14:29:35 -04:00
Matthias Clasen
93cfa3855c
Merge branch 'wayland-backend-api-cleanup' into 'master'
...
wayland: Change backend api to use GdkToplevel
See merge request GNOME/gtk!2598
2020-09-19 18:19:18 +00:00
Matthias Clasen
6b708e9b60
textbuffer: Redo insert markup a little bit
...
Redo the tag insertion function to avoid quadratic
behavior, and at the same time, fix handling of
alpha for color attributes.
Update the copy of this function in gtk4-demo
as well.
2020-09-19 14:17:28 -04:00
Matthias Clasen
6e81573776
Merge branch 'password-entry-activate' into 'master'
...
Add GtkPasswordEntry::activate
Closes #3174
See merge request GNOME/gtk!2599
2020-09-19 18:12:35 +00:00
Matthias Clasen
dd0da0f3cc
passwordentry: Add an ::activate signal
...
GtkSearchEntry has one, no reason why GtkPasswordEntry
should not as well.
Fixes : #3174
2020-09-19 13:25:03 -04:00
Matthias Clasen
48594a2d7a
passwordentry: Drop the Private struct
2020-09-19 13:23:40 -04:00
Matthias Clasen
31042bd761
docs: Add missing Wayland backend api
...
Since Wayland is now our flagship backend,
we should put some effort into the docs.
2020-09-19 13:13:31 -04:00
Matthias Clasen
3023a61e1d
wayland: Change backend api to use GdkToplevel
...
Most of the surface api we have in the Wayland backend
only makes sense for toplevels, so reshuffle things to
take a GdkToplevel instead of a GdkSurface.
Update all callers and the docs.
2020-09-19 13:07:11 -04:00
Matthias Clasen
c1e33056fb
NEWS: Updates
2020-09-19 12:09:24 -04:00
Matthias Clasen
57253b0039
Merge branch 'wip/baedert/radial-gradient' into 'master'
...
Radial gradients
Closes #2262 , #3170 , and #3173
See merge request GNOME/gtk!2597
2020-09-19 15:49:14 +00:00
Matthias Clasen
84d82dcda9
Merge branch 'wip/fontchooser-language-filtering' into 'master'
...
fontchooser: add language filtering
See merge request GNOME/gtk!2551
2020-09-19 15:06:56 +00:00
Matthias Clasen
4e35d56263
fontchooser: Remove signal handlers in dispose
...
Avoid ordering issues in dispose by disconnecting
the rows_changed_cb handler first thing.
2020-09-19 10:44:50 -04:00
Matthias Clasen
a9bf129286
fontchooser: Don't show "No fonts" prematurely
...
Don't switch to the empty page while we are still busy
filtering. Fonts might yet appear.
2020-09-19 10:25:45 -04:00
Matthias Clasen
76b7f0ca1c
fontchooser: Use filter language for sample text
...
When you are asking to only see fonts that support
a given language, you probably want to see the
sample text for that language too.
2020-09-19 10:13:36 -04:00
Matthias Clasen
09604eb3eb
fontchooser: Add user filtering
...
Add a popover that has filtering options. As a start,
allow filtering by monospace and by language coverage.
2020-09-19 10:13:36 -04:00
Matthias Clasen
0485a6c008
Improve language names
...
Shorten a few of the names we pick up by removing
parentheses that make them excessively long.
2020-09-19 09:47:15 -04:00
Matthias Clasen
169c208b7a
Merge branch 'matthiasc/for-master' into 'master'
...
win32: Fix compiler warnings
See merge request GNOME/gtk!2596
2020-09-19 13:26:34 +00:00
Matthias Clasen
7b2c4fdb6a
Merge branch 'font-chooser-sample-text' into 'master'
...
fontchooser: Determine sample text intelligently
See merge request GNOME/gtk!2546
2020-09-19 13:19:28 +00:00
Matthias Clasen
e0b1c3e8b0
win32: Fix compiler warnings
...
The compiler informs me that GetLastError() return a DWORD,
so use %lx to print it.
2020-09-19 08:29:29 -04:00
Matthias Clasen
6b9622f0da
Try one more time to fix win32 ci
2020-09-19 08:13:35 -04:00
Zander Brown
cfd1520a9f
Update British English translation
2020-09-19 11:42:18 +00:00
Timm Bäder
79dc25e0b1
cssimageradial: Avoid creating color stops with an offset > 1
2020-09-19 08:55:18 +02:00
Timm Bäder
1d371db8d8
scrolledwindow: Ignore captured motion events if no child is set
...
Fixes #3173
2020-09-19 08:44:58 +02:00
Matthias Clasen
69d5dc7c9a
fontchooser: Determine sample text intelligently
...
Look at the languages supported by a font, and pick
a suitable sample text from the pango list of sample
texts. We can only implement this on platforms using
fontconfig, since it relies on pangofc apis.
This bumps the pango dependency to 1.47.1.
2020-09-18 23:04:39 -04:00
Timm Bäder
f938377464
rendernodes: Clarify color_stops arguments
2020-09-18 19:01:10 +02:00
Timm Bäder
6e14b26622
gsk: Add docs for radial gradient nodes
2020-09-18 18:41:01 +02:00
Timm Bäder
5d5fbc69a4
rendernodes: Enfore end > start for radial gradient nodes
2020-09-18 18:29:08 +02:00
Timm Bäder
a770ab34c4
gl renderer: Consolidate color pre-multiplication
...
Add a common function that tells us what it does and replace all the
manual stuff with it.
Fixes #3170
2020-09-18 15:45:08 +02:00
Timm Bäder
b8e4240751
gl renderer: Add radial gradient shader
2020-09-18 15:39:07 +02:00
Timm Bäder
2c5a4a799a
rendernode: Pull local variable into closest scope
2020-09-18 15:39:07 +02:00
Timm Bäder
07b6431afe
Inspector: Show radial gradient node info
2020-09-18 15:39:07 +02:00
Timm Bäder
0c2d00835b
gl renderer: Set an error if we don't have one already
...
We can't fail and not set the error, since caller don't expect that.
2020-09-18 15:39:07 +02:00
Timm Bäder
dbfc172f6a
radial gradients: Allow 0 start/end values
2020-09-18 15:39:07 +02:00
Timm Bäder
6a089816fc
gsk: Parse radial gradient nodes
2020-09-18 15:39:07 +02:00
Matthias Clasen
2886e19772
css: switch to h/vradius
2020-09-18 15:39:07 +02:00
Matthias Clasen
c08df82d54
snapshot: switch to h/vradius
2020-09-18 15:39:07 +02:00
Matthias Clasen
ebfb3e771d
rendernode: switch to h/vradius
2020-09-18 15:39:04 +02:00
Matthias Clasen
2881d347d3
css: Use snapshot api for radial gradients
2020-09-18 15:39:04 +02:00
Matthias Clasen
66d16049c3
snapshot: Add api for radial gradients
...
These are the equivalents of the linear gradient apis.
2020-09-18 15:39:04 +02:00
Matthias Clasen
0c6226c20b
gsk: Add a radial gradient node
...
Only a fallback implementation for now.
Fixes #2262
2020-09-18 15:38:55 +02:00
Matthias Clasen
9267f705ef
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Cosmetic changes
See merge request GNOME/gtk!2590
2020-09-18 02:00:46 +00:00
Matthias Clasen
a8adbfbc9f
gtk-demo: Cosmetic changes
...
Polish the text view demos a little bit.
2020-09-17 21:38:10 -04:00
Matthias Clasen
f00f6e9641
Merge branch 'language-names-GError-fixes' into 'master'
...
Language names g error fixes
See merge request GNOME/gtk!2589
2020-09-17 23:34:03 +00:00
Peter Bloomfield
50f373fbc2
language-names: Do not g_free() a GError
...
It's NULL anyway, so freeing GError with g_free() when it's allocated with
GSlice never actually happens, but it just looks bad.
2020-09-17 23:34:03 +00:00
Matthias Clasen
f2f0a9ee0e
Merge branch 'wip/wayland-respond-to-configure' into 'master'
...
Make sure to respond to configure events in time
Closes #2910
See merge request GNOME/gtk!2588
2020-09-17 18:49:31 +00:00
Jonas Ådahl
4200936f21
wayland/surface: Make sure to commit ack_configure
...
We must wl_surface.commit after xdg_surface.ack_configure to make it
have an effect. We failed to do so when a configure event didn't result
in new updates, so make sure we fall back on an simple
wl_surface.commit if there was no new actual frame painted.
Closes : #2910
2020-09-17 18:20:08 +02:00
Goran Vidović
90991a341d
Update Croatian translation
...
(cherry picked from commit 1c07a20ca4 )
2020-09-17 15:39:02 +00:00
Jonas Ådahl
1abcd6f304
wayland: Commit surface from cairo context
...
In order to make the cairo renderer/context behave more similar to how
the OpenGL and Vulkan renderer/context behaves, request a frame callback
and commit in the end frame vfunc.
This means the end frame vfunc in cairo does
* attach buffer
* request frame callback
* sync surface state
* commit
Where as e.g. the OpenGL version of the same flow does
* attach buffer
* request frame callback
* sync surface state
* eglSwapBuffers()
where eglSwapBuffers() indirectly calls wl_surface_commit().
2020-09-17 17:35:35 +02:00
Jonas Ådahl
f87de393b5
wayland/surface: Remove 'committed' signal
...
It wasn't used by anything anymore, lets remove it.
2020-09-17 16:01:08 +02:00
Matthias Clasen
35c3a60c08
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2587
2020-09-17 03:41:32 +00:00
Matthias Clasen
cf1ed3a72a
gtk-demo: Fix toggle- vs checkbutton confusion
2020-09-16 23:07:21 -04:00
Matthias Clasen
18e46bd6f8
gtk-demo: Beef up the hypertext demo
...
Its almost a dictionary.
2020-09-16 23:01:49 -04:00
Matthias Clasen
7082624fd7
textview: Properly delete anchored children
...
When we remove anchors with widgets from the text
buffer, we used to call gtk_widget_destroy(), which
indirectly called gtk_container_remove() which cleared
the child properly. When gtk_widget_destroy() was
removed, we replaced the calls with gtk_widget_unparent(),
but that is not enough. Explicitly call
gtk_text_view_remove() instead - we know the parent
is a text view.
2020-09-16 23:01:49 -04:00
Matthias Clasen
25d30011a0
textview: Make clickable tags work again
...
We were claiming the clicks too eagerly, preventing
clickable links, e.g. in GtkAboutDialog, from working.
2020-09-16 22:30:58 -04:00
Matthias Clasen
cd60ed4391
Plug a memory leak in an error case
...
gtk_show_uri() not freeing the error after showing
it to the user.
Pointed out by Peter Bloomfield in #3166
2020-09-16 19:13:18 -04:00
Matthias Clasen
a1e21c1acb
Merge branch 'wip/sadiq/headerbar-demo' into 'master'
...
gtk-demo: Add a switch to headerbar demo
See merge request GNOME/gtk!2571
2020-09-16 23:12:26 +00:00
Milo Casagrande
ba6c14ad34
Update Italian translation
2020-09-16 07:43:11 +00:00
Matthias Clasen
c6aff910ed
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Add another demo
See merge request GNOME/gtk!2584
2020-09-16 02:56:08 +00:00
Matthias Clasen
d71337513f
gtk-demo: Add another demo
...
Show how to add a context menu to a custom widget,
and how to make a GtkPicture lookalike.
2020-09-15 22:40:13 -04:00
Matthias Clasen
2741431d6e
Merge branch 'stack-add-child' into 'master'
...
stack: Add gtk_stack_add_child
Closes #3165
See merge request GNOME/gtk!2583
2020-09-16 02:22:36 +00:00
Matthias Clasen
cc9fe4b354
stack: Add gtk_stack_add_child
...
The name of children is not essential, so add
a way to add children without providing one.
Fixes : #3165
2020-09-15 18:39:09 -04:00
Matthias Clasen
e4d29ba9fd
Merge branch 'master.win32' into 'master'
...
Some more fixes for Windows
Closes #3157
See merge request GNOME/gtk!2580
2020-09-15 11:12:27 +00:00
Matthias Clasen
6f56d8df28
Merge branch 'wip/jimmac/dnd-green' into 'master'
...
Adwaita: update tango color for DND
Closes #3158
See merge request GNOME/gtk!2581
2020-09-15 11:04:59 +00:00
Matthias Clasen
9eb4eef48b
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2582
2020-09-15 11:04:54 +00:00
Matthias Clasen
e69b623a27
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2579
2020-09-15 10:54:31 +00:00
Jakub Steiner
d1a68ac7ba
Adwaita: update tango color for DND
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3158
2020-09-15 12:18:55 +02:00
Chun-wei Fan
52ba70d549
gdksurface-win32.c: Fix display of CSD windows
...
Since the changes to GDK to use surface subtypes, CSD windows were
broken because we did not set the window styles properly. Fix this by
first acquiring whether decorations are used by the GtkWindow, and based
on that result we set the decorations that we want to use accordingly
and so apply them.
Thanks to Matt Jakeman for investigating into the issue and providing
pointers to a proposed fix.
Fixes issue #3157 , besides the part where window sizes are not correct
since that is likely caused a separate issue.
2020-09-15 15:56:36 +08:00
Chun-wei Fan
02aec7f5f4
gdkevents-win32.c: Clean up WM_ACTIVATE handling a bit
...
We can group some things together, to make things a little bit more clear
2020-09-15 15:53:34 +08:00
Chun-wei Fan
c766e31e8f
demos: Fix minesweeper demos on Windows
...
Make sure the callback functions in the .ui files are exported, so that
those functions can be recognized at runtime so that things run
properly.
2020-09-15 15:53:20 +08:00
Timm Bäder
a545fa15e4
inspector: Remove unsued function
2020-09-15 05:28:31 +02:00
Timm Bäder
e669433cde
listbox: Activate single-click rows if n_press >= 1
...
Quickly clicking rows should always activate the row if
single-click-activation is enabled. Before, only the first click
(n_press == 1) would activate the row.
2020-09-15 05:21:54 +02:00
Timm Bäder
a6f86d9c26
popover: Only destroy arrow render node if position changed
2020-09-15 05:21:54 +02:00
Timm Bäder
d0f182757a
sizegroup demo: Fix a checkbutton/togglebutton mixup
2020-09-15 05:21:54 +02:00
Timm Bäder
c8f4c8c4f0
filechooserwidget: Plug a memory leak
...
g_list_store_append refs the file
2020-09-15 05:21:54 +02:00
Timm Bäder
87f589f738
emojichooser: Fix typo in css class
2020-09-15 05:21:54 +02:00
Timm Bäder
27f3600419
listbox: Add preconditions to remove()
2020-09-15 05:21:53 +02:00
Timm Bäder
40ee7186bf
build: Unify two if statements
...
They both check glib_minor_req.is_odd()
2020-09-15 05:21:53 +02:00
Timm Bäder
a0422bfe25
inspector: Fix huge listbox rows
...
This is handled by .rich-list
2020-09-15 05:21:53 +02:00
Matthias Clasen
67c1600ac2
Document some API as widget-implementation only
...
Using gtk_widget_insert_before on a complex container
is a *bad* idea; it will mess up the containers bookkeeping
of its children and can easily lead to failure and crashes.
2020-09-14 20:28:44 -04:00
Matthias Clasen
50400879e0
gtk-demo: Add more detail to the dnd demo text
2020-09-14 17:49:16 -04:00
Matthias Clasen
b20e67dc83
gtk-demo: Add some keywords
...
Make the builder demo show up in searches for toolbar and
menubar.
2020-09-14 17:33:12 -04:00
Matthias Clasen
a3dcfafba6
gtk-demo: Improve the builder demo
...
Make the keyboard shortcuts work.
2020-09-14 17:06:34 -04:00
Matthias Clasen
82ce1a9d6b
gtk-demo: Improve the builder demo
...
Make the toolbar look right.
2020-09-14 16:51:05 -04:00
Matthias Clasen
cc6faeab50
gtk-demo: More space
...
Increase the inter-paragraph spacing in the info
text, to make paragraphs more clearly separated.
2020-09-14 16:21:13 -04:00
Matthias Clasen
aa32613beb
gtk-demo: Cosmetic change
2020-09-14 16:20:52 -04:00
Matthias Clasen
6a3e12cfae
gtk-demo: Add some details
2020-09-14 16:11:11 -04:00
Rūdolfs Mazurs
fc6d621146
Update Latvian translation
2020-09-14 19:45:03 +00:00
Matthias Clasen
37a24711a4
Merge branch 'issue-2923' into 'master'
...
Annotate the expression array as "nullable"
Closes #2923
See merge request GNOME/gtk!2578
2020-09-14 17:01:54 +00:00
Emmanuele Bassi
595cc929e6
Annotate the expression array as "nullable"
...
While it's a bit dubious whether array+length annotations should be
marked as "nullable", we do this elsewhere in the API, so might as well
be consistent.
In practice, the array argument is only ever allowed to be NULL iff the
length argument is 0; annotations are static, so if somebody decides to
pass a NULL argument with a non-zero value, they will get a run time
critical error, instead of a compile time one, which is somewhat counter
to the point of annotating the API in the first place.
Fixes : #2923
2020-09-14 17:00:23 +01:00
Matthias Clasen
27e6826860
Merge branch 'matthiasc/for-master' into 'master'
...
widget-factory: Fix the toggle buttons on page 3
See merge request GNOME/gtk!2577
2020-09-14 15:44:51 +00:00
Matthias Clasen
7a2400c8a1
widget-factory: Fix the toggle buttons on page 3
...
They should not both be active initially.
2020-09-14 11:19:39 -04:00
Piotr Drąg
3c4259393c
Update POTFILES.skip
2020-09-14 16:55:31 +02:00
Matthias Clasen
a201bfd9a5
Merge branch 'wip/jimmac/navlist-expander-whitespace' into 'master'
...
Adwaita: navigation list expander whitespace
See merge request GNOME/gtk!2575
2020-09-14 12:59:05 +00:00
Matthias Clasen
921f3a6e16
Merge branch 'wip/jimmac/gridview-whitespace' into 'master'
...
Wip/jimmac/gridview whitespace
Closes #3164
See merge request GNOME/gtk!2574
2020-09-14 12:49:52 +00:00
Matthias Clasen
53dddf163d
gestures: Make claiming button release work
...
When claiming a sequence in a gesture signal handler,
the expected result is that GtkGesture::handle-event
returns TRUE, causing the event to not be propagated
further.
This doesn't work for button release events, since
gtk_gesture_handle_event does the following:
add point
emit ::update
remove point
check claimed status
The ::update signal is where the application code
claims the sequence. But removing the point purges
the sequence from the gestures memory, so checking
the claimed status returns FALSE.
This patch fixes things to behave as expected, by
checking the claimed status before removing the point.
2020-09-14 08:35:44 -04:00
Jakub Steiner
e7c75f04dd
Adwaita: navigation list expander whitespace
...
- Address https://gitlab.gnome.org/GNOME/gtk/-/issues/3138#note_910476
2020-09-14 14:31:23 +02:00
Jakub Steiner
7dd819dffc
icon-browser: use content-view
...
- make content prominent by using content-view style for the main grid.
2020-09-14 14:18:52 +02:00
Jakub Steiner
8eab10dabf
Adwaita: whitespace for the grid
...
- separate labels
- 12px margins around cells
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3164
2020-09-14 14:18:52 +02:00
Mohammed Sadiq
bd900fe8c9
gtk-demo: Add a switch to headerbar demo
...
We don't have any demos with a switch in headerbar.
2020-09-14 17:11:13 +05:30
Matthias Clasen
6a676d527c
Merge branch 'wip/jimmac/natigation-sidebar-whitespace' into 'master'
...
Wip/jimmac/natigation sidebar whitespace
Closes #3138
See merge request GNOME/gtk!2572
2020-09-14 11:13:52 +00:00
Jakub Steiner
f125e6234b
Merge branch 'wip/jimmac/cut-finger' into 'master'
...
assets: adjust gesture graphic
Closes #3074
See merge request GNOME/gtk!2573
2020-09-14 10:34:52 +00:00
Jakub Steiner
bcb2861447
assets: adjust gesture graphic
...
- quick, somebody on the internet is offended!
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3074
2020-09-14 12:14:40 +02:00
Jakub Steiner
962f76ddc9
Adwaita: navigation-sidebar spacing
...
- split from placessidebar as it's more generic
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3138
2020-09-14 11:51:54 +02:00
Matthias Clasen
d45aabb4ec
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2570
2020-09-14 04:45:07 +00:00
Matthias Clasen
9f03462ffb
gtk-demo: Improve the scrolling demo
...
Add an fps label to the scrolling demo.
2020-09-13 23:43:45 -04:00
Matthias Clasen
3b11896581
gtk-demo: Impove the fishbowl demo
...
Use tnum for the fps label to avoid jiggling.
2020-09-13 23:43:45 -04:00
Matthias Clasen
c66a8cb941
gtk-demo: Use gdk_frame_clock_get_fps
...
Remove another copy of this code in the theme
switching benchmark.
2020-09-13 23:43:45 -04:00
Matthias Clasen
c462f35a5e
inspector: Use gdk_frame_clock_get_fps
2020-09-13 23:35:01 -04:00
Matthias Clasen
b166999683
Add gdk_frame_clock_get_fps
...
We already have more than one copy of this code
in GTK, so just export this function.
2020-09-13 23:35:01 -04:00
Matthias Clasen
4b589b6afb
main: Reshuffle debug code
...
Mode all the debug flags related code together,
to make gtkmain.c a bit less messy.
2020-09-13 22:48:29 -04:00
Matthias Clasen
fedeb51f31
Drop support for GTK_TEST_TOUCHSCREEN
...
This environment variable is undocumented, and you can
just use GTK_DEBUG=touchscreen insead.
2020-09-13 22:44:32 -04:00
Matthias Clasen
d2faa38eed
Move version-related functions to gtkversion.c
...
This is just an internal cleanup, to make gtkmain.c
a bit less messy.
2020-09-13 22:23:06 -04:00
Matthias Clasen
ff9ca2b68d
Clean up debug flags code a bit
...
Use the GtkDebugFlags enum, since we have it.
2020-09-13 22:10:25 -04:00
Matthias Clasen
aa5207b349
iconview: Small doc additions
2020-09-13 21:51:42 -04:00
Matthias Clasen
2b5b6e0885
Drop gtk_render_slider from headers
...
The function does not exist.
2020-09-13 21:51:42 -04:00
Matthias Clasen
93d9a2ceda
colorchooser: Bring back gtk_color_chooser_widget_new
...
This was removed by accident in commit f392fbfb6d6f1116728b.
2020-09-13 21:51:42 -04:00
Matthias Clasen
5ab77e72e2
docs: Misc updates
...
Pick up a number of symbols that have been missed,
and drop GtkAccelLabel.
2020-09-13 21:51:42 -04:00
Matthias Clasen
5a7faa6512
docs: Add new check button apis
2020-09-13 21:51:42 -04:00
Matthias Clasen
b7d42502ce
docs: Some touchups to the migration guide
2020-09-13 21:51:42 -04:00
Matthias Clasen
2d766dff96
NEWS: Updates
2020-09-13 21:51:42 -04:00
Matthias Clasen
e3bab0b766
Merge branch 'gtk-demo-demo' into 'master'
...
Gtk demo demo
See merge request GNOME/gtk!2569
2020-09-13 23:37:22 +00:00
Matthias Clasen
d3c5c7f4ef
Merge branch 'update-default-palette' into 'master'
...
colorchooserwidget: Update default palette
See merge request GNOME/gtk!2568
2020-09-13 23:28:57 +00:00
nana-4
f6e4486338
colorchooserwidget: Update default palette
...
This makes it completely in line with the new GNOME HIG color palette.
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3146
2020-09-14 07:05:04 +09:00
Matthias Clasen
9d6990fdb9
gtk-demo: Don't offer to run titles
...
When a group is selected (such as 'Benchmark'),
make the run button insensitive - there is nothing
to run.
2020-09-13 17:55:10 -04:00
Matthias Clasen
3f1fa66479
Demo thyself
...
Make gtk-demo show itself as a useful example.
2020-09-13 17:54:58 -04:00
Matthias Clasen
8094f757eb
Merge branch 'demo-keywords' into 'master'
...
gtk-demo: add keywords to filtering
See merge request GNOME/gtk!2567
2020-09-13 21:13:21 +00:00
Matthias Clasen
d732c869c2
gtk-demo: Add keywords to demos
...
Add the names of the main widgets as keywords to
our demos, but also things like "game". This helps
finding relevant demos in our growing list. You
can now for example type "label", and find the
"error states" and "links" demos showing GtkLabel
features.
2020-09-13 15:00:14 -04:00
Matthias Clasen
691261c71a
gtk-demo: Support keywords for search
...
Filter the sidebar on keywords that can be provided
by the demos. We extract keywords from the doc comment
at the top of each demo source by looking for words that
look like class names. We also allow to specify keywords
explicitly.
2020-09-13 15:00:14 -04:00
Matthias Clasen
fe6f70efe1
gtk-demo: Ignore some lines in info
...
Ignore lines starting with # in the info comment at
the top of source files. This will be used to add
keywords for search in following commits.
2020-09-13 14:42:03 -04:00
Matthias Clasen
cddbc8f1cc
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2566
2020-09-13 18:39:12 +00:00
Matthias Clasen
a90801e696
gtk-demo: Add another demo
...
This one is a more or less direct copy of the
settings dialog from widget-factory, demonstrating
error states and builder scopes.
2020-09-13 12:36:30 -04:00
Rūdolfs Mazurs
f445cc0d70
Update Latvian translation
2020-09-13 12:30:52 +00:00
Claude Paroz
6cf7b95bec
Updated French translation
2020-09-13 10:46:33 +02:00
Matthias Clasen
7518fd0d70
gtk-demo: Make F11 toggle fullscreen
...
In the video player demo, we have a button to make
the window fullscreen, but no easy way back. Add
the usual F11 keybinding, to make things at least
somewhat recoverable.
2020-09-13 02:31:41 -04:00
Matthias Clasen
30c3a533f4
video: Make autoplay work
...
We were setting things up in the wrong order, so
autoplay had no effect when you using gtk_video_set_file().
2020-09-13 01:56:56 -04:00
Matthias Clasen
52304fe7da
gtk-demo: Add some example videos
...
Add buttons to show the gtk-logo animation and
the Big Buck Bunny trailer.
2020-09-13 01:51:55 -04:00
Matthias Clasen
22257b124a
placessidebar: Remove a pointless restriction
...
The sidebar was refusing to show shortcuts for
things that don't have a local path, for no
good reason.
2020-09-13 01:14:00 -04:00
Matthias Clasen
4629182246
filechooser: Fix setting unlisted filters
...
This is documented to work, but it was broken
when we ported things to list models.
2020-09-13 01:12:51 -04:00
Matthias Clasen
c8a9e7fa82
Fix a compiler warning
2020-09-13 01:12:39 -04:00
Matthias Clasen
8f593827cf
widget-factory: Fix error states demo
...
Fix a corner case of input validation in the settings
dialog.
2020-09-13 00:17:19 -04:00
Matthias Clasen
8984fe3c35
Cosmetics
2020-09-13 00:17:19 -04:00
Matthias Clasen
fc720b57e2
gtk-demo: Don't refer to removed demos
...
The animated background demos was referring to the
pixbuf demo that was removed a while ago. Reword
the text accordingly.
2020-09-13 00:17:19 -04:00
Emin Tufan Çetin
4cb367a6e2
Update Turkish translation
2020-09-12 17:11:40 +00:00
Matthias Clasen
b534752d5c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3110 and #2994
See merge request GNOME/gtk!2565
2020-09-12 16:25:17 +00:00
Matthias Clasen
929a56e53c
Clean up lots of GTK+ -> GTK
...
Replace most remaining uses of GTK+ in the docs and
user-visible strings by GTK. Also remove some leftover
"Was added in 3.x" sentences from the docs.
2020-09-12 12:01:04 -04:00
Matthias Clasen
6ed1c181ee
AUTHORS: some updates
2020-09-12 11:52:14 -04:00
Matthias Clasen
0011a1032d
text: Claim the sequence when we start selecting
...
Without this, drag-select will only work sporadically
in entries in headerbars.
Fixes : #2994
2020-09-12 11:18:36 -04:00
Matthias Clasen
38b71ba292
Cosmetics
...
Add a missing comma.
2020-09-12 11:11:28 -04:00
Matthias Clasen
b5f3ac9718
Add a testcase for controls in headerbars
...
This is meant to help with figuring out entry
selection drag issues.
2020-09-12 10:58:07 -04:00
Matthias Clasen
756c52ef08
filechooser: Prevent a crash
...
With csd, we are handling external widgets when
there is an entry in the headerbar. Use a weak ref
to prevent that pointer from going stale. This fixes
a crash when cancelling a save dialog.
Fixes : #3110
2020-09-12 10:40:13 -04:00
Emmanuele Bassi
9afdb41b6b
Merge branch 'ebassi/for-master' into 'master'
...
Properly annotate GtkLayoutManagerClass.create_layout_child()
Closes #3156
See merge request GNOME/gtk!2564
2020-09-12 14:24:13 +00:00
Emmanuele Bassi
25bcec5cbb
Properly annotate GtkLayoutManagerClass.create_layout_child()
...
We're missing the ownership transfer rule for the created GtkLayoutChild
instance; this makes the virtual function not introspectable.
Fixes : #3156
2020-09-12 14:33:24 +01:00
Emin Tufan Çetin
eba5232e35
Update Turkish translation
2020-09-12 06:14:30 +00:00
Matthias Clasen
7ee3439522
Merge branch 'emblem-demo' into 'master'
...
Emblem demo
See merge request GNOME/gtk!2563
2020-09-12 01:33:51 +00:00
Matthias Clasen
71ea619274
gtk-demo: Add an emblem demo
...
Add a simple demo for adding emblems to icons
using GdkPaintable.
2020-09-11 21:09:41 -04:00
Matthias Clasen
f679ba566e
gtk-demo: Tweak the animated paintable
...
Make it possible to have no background in
the animated paintable. This will be used
in a future demo.
Update all users.
2020-09-11 21:08:36 -04:00
Matthias Clasen
2679e29375
gtk-demo: Fix a few crash
...
The paintable demos were forgetting to clear
their window variable.
2020-09-11 21:07:10 -04:00
Matthias Clasen
e55bdf87b5
Merge branch 'text-layout-speedup' into 'master'
...
textlayout: Avoid some iter comparisons
See merge request GNOME/gtk!2561
2020-09-11 21:20:38 +00:00
Matthias Clasen
c09575d9cb
textlayout: Avoid some iter comparisons
...
We were doing more iter comparisons than necessary in the
inner loop of gtk_text_layout_snapshot(), in the presence
of a selection. Rewrite the code to compare line numbers
instead, which is faster than full iter comparisons.
2020-09-11 16:41:42 -04:00
Matthias Clasen
c3b925d696
Merge branch 'wip/otte/for-master' into 'master'
...
contentserializer: Don't send the terminating \0 byte for strings
Closes #3150
See merge request GNOME/gtk!2560
2020-09-11 15:50:23 +00:00
Benjamin Otte
640856edec
contentserializer: Don't send the terminating \0 byte for strings
...
Fixes #3150
2020-09-11 17:25:02 +02:00
Matthias Clasen
1e7fccf46f
Merge branch 'wip/jimmac/new-colors' into 'master'
...
Wip/jimmac/new colors
Closes #3146
See merge request GNOME/gtk!2558
2020-09-11 13:56:48 +00:00
Matthias Clasen
ff392fbfb6
colorchooser: Don't parse color names needlessly
...
We have a fancy macro to initialize GdkRGBAs without
any runtime work, lets use them.
2020-09-11 09:31:17 -04:00
Matthias Clasen
498cbae95c
colorchooser: Drop color names
...
These were not used anymore, after a11y stopped using them.
2020-09-11 09:12:34 -04:00
Matthias Clasen
fa9608fd02
color chooser: Don't show too many custom colors
...
The code was hardcoding a fixed number of custom
colors, but we really want to match the number
of columns in the palette(s). Make it so.
2020-09-11 08:42:03 -04:00
Jakub Steiner
8700e136da
colorChooser: updte color palette
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3146
2020-09-11 10:47:24 +02:00
Ask Hjorth Larsen
2e54810937
Updated Danish translation of gtk-properties
2020-09-11 02:31:50 +02:00
Ask Hjorth Larsen
93a09a4a6a
Updated Danish translation of gtk
2020-09-11 02:31:41 +02:00
Matthias Clasen
299b1bd848
Merge branch 'matthiasc/for-master' into 'master'
...
x11: Print all tested glx extensions
See merge request GNOME/gtk!2556
2020-09-10 21:56:46 +00:00
Matthias Clasen
1e9a9876d5
x11: Print all tested glx extensions
...
When initializing a glx context, print all the extensions
we look for.
2020-09-10 17:30:28 -04:00
Matthias Clasen
1de7440c8c
Merge branch 'gdk-cleanups' into 'master'
...
Gdk cleanups
Closes #2790
See merge request GNOME/gtk!2553
2020-09-10 20:21:12 +00:00
Matej Urbančič
5c87432a0c
Update Slovenian translation
2020-09-10 20:12:10 +00:00
Matej Urbančič
80e53e704c
Update Slovenian translation
2020-09-10 20:09:27 +00:00
Matthias Clasen
24bf01dd42
Merge branch 'fix-vulkan-context-creation' into 'master'
...
Fix vulkan context creation
Closes #3147
See merge request GNOME/gtk!2555
2020-09-10 18:18:55 +00:00
Matthias Clasen
2113f98c5c
gdk: Don't create surfaces of size 0x0
...
Don't pass 0x0 as size when calling gdk_surface_new().
The Wayland backend takes us literally, and we end
up with a surface that (temporarily) has these
dimensions, confusing other APIs that we pass the
size to, such as Vulkan.
2020-09-10 13:56:44 -04:00
Matthias Clasen
b9d4654fca
vulkan: Fix swapchain creation
...
We end up with a surface that has size 0x0 at the
time we create the Vulkan context, and that is a
size that Vulkan doesn't like, so ensure we request
at least 1x1.
Fixes : #3147
2020-09-10 13:55:16 -04:00
Matthias Clasen
7151b1fc31
Merge branch 'ebassi/for-master' into 'master'
...
docs: Add note on command line arguments
See merge request GNOME/gtk!2554
2020-09-10 17:39:25 +00:00
Emmanuele Bassi
790733673f
docs: Add note on command line arguments
...
We don't parse them any more, and developers should stop using them when
migrating from GTK3 to GTK4.
2020-09-10 17:53:50 +01:00
Milo Casagrande
aff788e583
Update Italian translation
2020-09-10 08:03:38 +00:00
Matthias Clasen
d5d4af585d
gdk: Move GdkSurfaceEdge to the right header
...
This is only used in gdktoplevel.h, so move it there.
2020-09-10 00:44:05 -04:00
Matthias Clasen
93078e52c0
gdk: Rename GdkSurfaceState to GdkToplevelState
...
That is what it is.
Fixes : #2790
2020-09-10 00:39:03 -04:00
Matthias Clasen
cee275980a
gdk: Move GdkSurfaceState to the right header
...
This is really a toplevel state, so move it
to that header.
2020-09-10 00:25:51 -04:00
Matthias Clasen
b3aa5ad4f9
Move GdkFullscreenMode to the right header
...
This enum is just used for a GdkToplevel property now,
so move the declaration to the gdktoplevel.h header.
2020-09-10 00:22:26 -04:00
Matthias Clasen
9b0b19d335
NEWS: Updates
2020-09-09 23:49:58 -04:00
Matthias Clasen
d47d036663
search entry: Don't propagate handled events
...
When the text says it has handled the event,
trust it. We don't want to emit ::search-started
if the content hasn't changed, but we still
should not propagate e.g. an Insert key press
if it has already toggled overwrite mode in
the text.
Fixes : #2874
2020-09-09 22:26:27 -04:00
Matthias Clasen
5c67fe0bc2
Merge branch 'fix-gl-texture-cache' into 'master'
...
gsk: Fix the gl texture cache
See merge request GNOME/gtk!2552
2020-09-09 19:27:24 +00:00
Matthias Clasen
1057588a8f
gsk: Fix the gl texture cache
...
We need to include both the scale and the filtering
in the key for the texture cache, since those affect
the texture.
This fixes misrendering in the recorder in the inspector
whenever transforms are involved. An example where this
was showing up is testrevealer's swing transition.
2020-09-09 13:55:09 -04:00
Tim Sabsch
75f0b7acaa
Update German translation
2020-09-09 17:23:14 +00:00
Benjamin Otte
9a927176df
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #3137
See merge request GNOME/gtk!2550
2020-09-09 16:44:29 +00:00
Benjamin Otte
cb5b375f43
revealer: Remove arbitrary 100x scale limit
...
This is no longer necessary because the bug it was rying to solve is now
solved via the preference for min and nat size.
2020-09-09 17:38:37 +02:00
Benjamin Otte
dfccaa8831
revealer: Prefer min and nat size
...
Assume that the fully expanded revealer will likely get an allocation
that matches the child's minimum or natural allocation, so we
special-case these two values.
So when - due to the precision loss - multiple sizes would match the
current allocation, we don't pick one at random, we prefer the min and
nat size.
The preference of nat size over min sie was decided after an IRC vote,
we don't actually have an idea what's more likely to happen in the real
world.
Should we ever get better data, we might want to switch.
2020-09-09 17:38:37 +02:00
Benjamin Otte
cc58956dbb
revealer: Use floor(), not ceil()
...
We use ceil() in measure(), so using it again will increase the
child's size whenever there is even a tiny rounding error.
This should also not make the size too small, because:
min = ceil(child_min * scale)
min / scale >= child_min
floor (min / scale) >= floor (child_min) = child_min
The last equality is because child_min is an integer.
Fixes #3137
2020-09-09 17:38:37 +02:00
Benjamin Otte
0ad10ccf39
revealer: Refactor code
...
Assign the values in the same place.
2020-09-09 17:38:37 +02:00
Benjamin Otte
8cb03a8cc0
widget: Add a critical when allocation is too small.
2020-09-09 17:38:37 +02:00
Emmanuele Bassi
df7cbdfff4
Merge branch 'issue-3140' into 'master'
...
Make sure we don't call back into GtkEntryBuffer
Closes #3140
See merge request GNOME/gtk!2549
2020-09-09 10:54:07 +00:00
Emmanuele Bassi
f4b410daa7
Make sure we don't call back into GtkEntryBuffer
...
After commit 7e77afe94c moved the deletion
of text into the signal handler, in order to make undo work, we need to
override the GtkEntryBuffer::deleted-text class closure when subclassing
GtkEntryBuffer, as well as overriding GtkEntryBufferClass.delete_text,
otherwise the default class closure will be invoked, and will try to
delete an empty buffer.
Fixes : #3140
2020-09-09 11:29:16 +01:00
Emmanuele Bassi
b3d3d81c82
Merge branch 'gtksecurememory-win32' into 'master'
...
Port gtksecurememory.c to Windows
See merge request GNOME/gtk!2548
2020-09-09 10:12:44 +00:00
Chun-wei Fan
3095bccd2e
gtksecurememory.c: Port secure memory allocation to Windows
...
Use the Windows API CryptProtectMemory() to encrypt the data that we want to
secure, and use CryptUnprotectMemory() to de-crypt the secured data that we
want to access, since mmap() and mlock() are not available on Windows.
2020-09-09 13:50:15 +08:00
Chun-wei Fan
c72b2f6167
gtksecurememory.c: Don't include unistd.h unconditionally
...
It is not universally available on non-POSIX systems.
2020-09-09 13:48:33 +08:00
Matthias Clasen
3d10b28df4
Merge branch 'matthiasc/for-master' into 'master'
...
shadertoy demo: Cosmetic fixes
See merge request GNOME/gtk!2547
2020-09-09 00:40:54 +00:00
Matthias Clasen
d6807b966c
shadertoy demo: Cosmetic fixes
2020-09-08 20:08:23 -04:00
Matthias Clasen
887d0b7411
Merge branch 'ebassi/secure-buffer' into 'master'
...
Add secure entry buffer
Closes #3119 and #2403
See merge request GNOME/gtk!2545
2020-09-08 23:48:25 +00:00
Matthias Clasen
3921476504
Merge branch 'shadertoy-demo' into 'master'
...
gtk-demo: Add shadertoy demo
See merge request GNOME/gtk!2540
2020-09-08 23:47:54 +00:00
Emmanuele Bassi
ae97284409
docs: Add a note on GtkPasswordEntry's secure storage
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
7cda32d49e
Use GtkPasswordEntryBuffer in GtkPasswordEntry
...
Now that we have a secure buffer, we should start using it.
Fixed : #3119
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
fb99bde840
Add a secure GtkEntryBuffer
...
We have a widget for password and passphrase entries, but we have no way
to handle the data securely. This is usually performed by a separate
GtkEntryBuffer—for instance, the one in GCR. While we have API for
setting a new entry buffer on GtkText, we don't have API for
GtkPasswordEntry, though, so the options are:
- expose additional API for GtkPasswordEntry to allow setting a secure
text buffer on the internal GtkText widget
- provide a secure text buffer out of the box
Given that an insecure-by-default GtkPasswordEntry is basically
pointless, might as well have a secure buffer built in.
We don't really need to make the password entry buffer public out of the
box, but we can re-evaluate at a later date.
Fixes : #2403
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
9dc5c6a0f3
Move g_autoptr macro for GtkEntryBuffer
...
We need it into its own header, so we can derive from GtkEntryBuffer
with G_DECLARE_* macros without including gtk.h.
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
107e49002d
Check for mlock()
...
We use it in the secure memory allocator, if it's available.
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
31a7574544
Import egg-secure-memory allocator from gcr
...
We can re-use the code inside gcr, as we know that it's working, tested,
and license compatible.
2020-09-08 23:50:12 +01:00
Emmanuele Bassi
859df747ac
Merge branch 'sorter-constructor-fix-warning' into 'master'
...
Fix warning in listview_settings demo
See merge request GNOME/gtk!2544
2020-09-08 17:54:25 +00:00
Andreas Persson
81c835c418
Fix warning in listview_settings demo
...
Fix a warning introduced when sorter constructors were changed to return
exact types.
2020-09-08 18:48:54 +02:00
Ask Hjorth Larsen
33e633cc5c
Updated Danish translation of gtk-properties
2020-09-08 16:23:16 +02:00
Ask Hjorth Larsen
73b46eafe1
Updated Danish translation of gtk
2020-09-08 16:23:05 +02:00
Marek Černocký
710ef690ec
Updated Czech translation
2020-09-08 15:33:40 +02:00
Matthias Clasen
cb2b0688ca
Merge branch 'filter-constructors' into 'master'
...
Filter constructors
See merge request GNOME/gtk!2360
2020-09-08 12:58:27 +00:00
Danial Behzadi
45c61fdbe3
Update Persian translation
2020-09-08 12:50:36 +00:00
Alexandre Franke
ec49b68257
Update French translation
2020-09-08 09:15:19 +00:00
Alexander Larsson
0092a08dfc
gtk-demo: Add shadertoy demo
...
This adds a small demo of using OpenGL shaders, it renders a quad
over the entire widget with a custom fragment shader. The coordinates
and the uniform names are compatible with the ones on shadertoy.com
(although some features, like texture inputs are missing currently).
The default shader in the demo is
https://www.shadertoy.com/view/wsjBD3 which is CC0, so it is
redistributable by Gtk+ (most other shaders are CC-BY-NC-SA which
isn't obviously compatible). I also added a set of buttons loading
a few other CC0 shaders I found.
2020-09-08 09:56:25 +02:00
Matthias Clasen
bab7092a69
Merge branch 'gl-linear' into 'master'
...
Gl: use linear interpolation
See merge request GNOME/gtk!2523
2020-09-07 21:27:09 +00:00
Matthias Clasen
3b6941b04b
Add some tests for the axis-aligned check
2020-09-07 14:22:47 -04:00
Matthias Clasen
fe429ffc45
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2541
2020-09-07 17:03:27 +00:00
Matthias Clasen
d595c6ab12
gsk: Complain if we fail to realize a renderer
...
The only likely place where this is going to happen
is if a renderer was explicitly requested with the
GSK_RENDERER environment variable, and in that case,
it is misleading to silently use a different renderer.
2020-09-07 11:18:45 -04:00
Matthias Clasen
2738d5bc93
gsk: Mention gl as valid value for GSK_RENDERER
2020-09-07 11:18:45 -04:00
Matthias Clasen
5a8267dfae
text: Set the hotspot for the drag icon
...
This makes the drag icon align properly with the
dragged text at the beginning of the drag.
2020-09-07 11:18:45 -04:00
Marek Černocký
d03ce22446
Updated Czech translation
2020-09-07 14:34:07 +02:00
Gil Forcada
350051c56e
Update Catalan translation
2020-09-07 10:31:39 +00:00
Daniel Mustieles
979ec828d2
Updated Spanish translation
2020-09-07 08:59:50 +02:00
Fran Dieguez
99ddb3c927
Update Galician translation
2020-09-06 23:22:39 +00:00
Fran Dieguez
770910e608
Update Galician translation
2020-09-06 23:20:08 +00:00
Matthias Clasen
7180bfc288
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3123
See merge request GNOME/gtk!2539
2020-09-06 21:39:08 +00:00
Matthias Clasen
bc80ed4240
aboutdialog: Disable text undo
...
The text buffers here are not editable, so it
does not make sense to have text undo enabled
for them.
Fixes : #3123
2020-09-06 17:02:00 -04:00
Matthias Clasen
4d45c2669c
text history: Update state when enabled changes
...
This makes can-undo go FALSE when we disable the
text history, as it should.
2020-09-06 17:02:00 -04:00
Balázs Úr
dd8ca7259f
Update Hungarian translation
2020-09-06 20:31:44 +00:00
Matthias Clasen
06c866f45e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2538
2020-09-06 19:38:56 +00:00
Baurzhan Muftakhidinov
2bd7ed5ebd
Update Kazakh translation
2020-09-06 17:36:39 +00:00
Matthias Clasen
adc9d91e0e
text: Stop drag updates when a dnd starts
...
This prevents the selection from changing underneath
us, messing up move dnd operations.
2020-09-06 12:19:44 -04:00
Matthias Clasen
1150c23b0f
Merge branch 'listwidgets-doc-fix' into 'master'
...
docs: Update list widgets docs
See merge request GNOME/gtk!2537
2020-09-06 15:53:59 +00:00
Matthias Clasen
9b8c175f23
textview: Fix dnd
...
When we start a dnd of the selection in the drag-update handler,
set the gesture state to denied. Otherwise, we get more drag-update
signals, and things get really confused, leading to no dnd and
sadness.
2020-09-06 11:48:10 -04:00
Andreas Persson
e0134aaf15
docs: Update list widgets docs
...
Removed sentence that claimed the view will wrap the model in a
GtkSingleSelection, as it's no longer true. Fixed the code example in
GtkListView for the same reason. Fixed a small typo in GtkDropDown docs.
2020-09-06 17:19:24 +02:00
Matthias Clasen
bd7aa1782c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2535
2020-09-06 13:25:43 +00:00
Alexandre Franke
007c9c6218
Update French translation
2020-09-06 12:44:35 +00:00
Matthias Clasen
8c8baa9aa6
gtk-demo: Add some comments
...
Add some comments to the math in the transforms demo.
2020-09-06 08:43:58 -04:00
Asier Sarasua Garmendia
7ae0f56378
Update Basque translation
2020-09-06 09:01:32 +00:00
Kukuh Syafaat
3fcf7adb25
Update Indonesian translation
2020-09-06 05:16:58 +00:00
Matthias Clasen
8b38d1895c
gtk-demo: Simplify the constraints demos
...
Give them all a close button in the header.
2020-09-05 22:54:16 -04:00
Matthias Clasen
a4ba25f0f8
inspector: Fix teardown of the general tab
...
We were connecting signal handlers to the display
and seats here, and never cleaning them up, leading
to crashes after the inspector is closed. This is
fairly easy to reproduce under Wayland, where the
scroll device is only created the first time we
create a scroll event.
2020-09-05 22:35:30 -04:00
Matthias Clasen
24389a0ef5
Make sorter constructors return exact types
...
Make functions like gtk_custom_sorter_new() return
the actual type they construct.
Update all callers.
2020-09-05 21:50:15 -04:00
Matthias Clasen
dfabe74c59
Make filter constructors return exact types
...
Make functions like gtk_custom_filter_new() return
the actual type they construct.
Update all callers.
2020-09-05 21:43:42 -04:00
Goran Vidović
716c7b2f21
Update Croatian translation
2020-09-05 20:45:50 +00:00
Aurimas Černius
c74c38ad06
Updated Lithuanian translation
2020-09-05 19:57:34 +03:00
Matthias Clasen
727f25f6da
Merge branch 'revert-43ca43a22f' into 'master'
...
Revert "Adwaita: rich-list styling"
See merge request GNOME/gtk!2533
2020-09-05 16:00:33 +00:00
Matthias Clasen
01959e1662
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3122
See merge request GNOME/gtk!2534
2020-09-05 14:49:10 +00:00
nana-4
12afc10ec3
Revert "Adwaita: rich-list styling"
...
This reverts commit 2f0a4c7128 .
It seems the commit was accidentally added when
768e24afc1 was manually merged and pushed.
2020-09-05 23:13:24 +09:00
Matthias Clasen
2f70279f85
Merge branch 'typo_correction' into 'master'
...
Typo correction
Closes #3086 and #3090
See merge request GNOME/gtk!2532
2020-09-05 13:54:18 +00:00
Matthias Clasen
ffc77ca926
css: Use an array when parsing selectors
...
There's no need for us to have a hard size-limit here;
with GdkArray we don't have to give up on stack-preallocation
either.
2020-09-05 09:51:59 -04:00
Emin Tufan Çetin
021eeedef0
Update Turkish translation
2020-09-05 12:45:24 +00:00
Matthias Clasen
635492b016
text: Don't replace unselected text with Emoji
...
We must be careful to not select everything on focus-in
before we have the Emoji inserted. This was accidentally
broken in d5121af876 .
Fixes : #3122
2020-09-05 08:40:02 -04:00
Yuri Chornoivan
bd226cc31e
Update Ukrainian translation
2020-09-05 12:29:46 +00:00
Ahmed Eldemery
cbd3158d91
add a missing comma
2020-09-05 13:49:01 +02:00
Ahmed Eldemery
982cf0c4d3
Merge remote-tracking branch 'upstream/master' into master
2020-09-05 13:46:27 +02:00
Piotr Drąg
d37cb36eb1
Update Polish translation
2020-09-05 13:27:57 +02:00
Piotr Drąg
e374917c56
Update POTFILES.in
2020-09-05 11:53:39 +02:00
Matthias Clasen
1dd4e91fee
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2531
2020-09-04 17:57:23 +00:00
Matthias Clasen
c1bf9f3b41
layoutmanager demo: Make icons come out upright
...
Rearrange the vertices so that the icons show
up in the proper orientation.
2020-09-04 13:40:10 -04:00
Matthias Clasen
8a3621a125
Beef up transform testcase
...
Make this show 'paintings in paintings'.
2020-09-04 13:20:59 -04:00
Matthias Clasen
81f84fbe8f
modelbutton: Claim the gesture
...
This aligns the model button behavior with what
GtkButton does.
2020-09-04 13:20:33 -04:00
Matthias Clasen
60e37d3368
Update gsk tests
...
Add a clip-coordinates-2d test that is similar
to clip-coordinates-3d, but actually uses a 2D
transform.
2020-09-04 13:19:01 -04:00
Matthias Clasen
e0cc7b5d86
Check for pixel-alignedness for interpolation
...
When rendering to an offscreen because of transforms,
check if transforming the bounds of the node results
in a non-axis-aligned quad. If it doesn't, we want
GL_NEAREST interpolation to get sharp edges. Otherwise,
we use GL_LINEAR to get better results for things
that are actually transformed.
2020-09-04 13:16:53 -04:00
Matthias Clasen
9843515736
gl: Reshuffle some code
...
Just rearrange the cases in this switch, no effective change.
2020-09-04 13:16:11 -04:00
Matthias Clasen
41497aeb8b
Add gsk_matrix_transform_rect
...
This is a projecting version of the corresponding
graphene api. While we are at it, rewrite
gsk_matrix_transform_bounds() to use
gsk_matrix_transform_rect().
2020-09-04 13:15:21 -04:00
Matej Urbančič
bb2a0e69f4
Updated Slovenian translation
2020-09-04 17:30:55 +02:00
Matthias Clasen
f70e37a341
Merge branch 'release-script' into 'master'
...
Release script
See merge request GNOME/gtk!2530
2020-09-04 15:30:35 +00:00
Benjamin Otte
1a445d79c4
Merge branch 'demo_css_pixbufs_fix' into 'master'
...
gtk-demo: Fix CSS in pixbufs demo
See merge request GNOME/gtk!2529
2020-09-04 14:40:36 +00:00
Matthias Clasen
925a01162f
build: Add a release script
...
I've goofed up too many times producing the separate
doc tarballs. So lets collect the required steps in a script.
2020-09-04 10:26:16 -04:00
Björn Daase
3bcbb4a7cc
gtk-demo: Fix CSS in pixbufs demo
2020-09-04 16:14:09 +02:00
Matthias Clasen
a8eae7afaa
build: Move the gtk-doc dep to the toplevel
...
We want to include the gtk-doc subproject in release
tarballs, using --include-subprojects, but that only
works if we've actually built the subproject. And
enabling gtk-doc for dist builds is problematic -
it tends to break meson dist.
So declare the gtk-doc dependency independent of
-Dgtk_doc, and use --force-fallback-for for it.
2020-09-04 09:57:14 -04:00
Dušan Kazik
99a09e0d08
Update Slovak translation
2020-09-04 12:42:52 +00:00
Matthias Clasen
275302a9d5
Merge branch 'fix-gtk-application-menu-example' into 'master'
...
GtkApplicationWindow: Fix menubar example
See merge request GNOME/gtk!2528
2020-09-04 12:32:40 +00:00
Emmanuele Bassi
749d0744da
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #3118
See merge request GNOME/gtk!2527
2020-09-04 11:56:03 +00:00
Emmanuel Gil Peyrot
62f7395c77
GtkApplicationWindow: Fix menubar example
...
This example was using invalid attribute syntax.
2020-09-04 13:49:28 +02:00
Emmanuele Bassi
f7f0bc0369
Use consistent argument name
...
Declarations, definitions, and gtk-doc stanzas should use the same name
for arguments. Otherwise both g-ir-scanner and gtk-doc will complain
that they can't find the argument.
2020-09-04 12:05:01 +01:00
Emmanuele Bassi
1896d7f463
build: Make sysprof truly optional
...
We are falling back to the sysprof subproject even if sysprof support
has been explicitly disabled.
Fixes : #3118
2020-09-04 12:02:15 +01:00
Emmanuele Bassi
927c4abf23
Merge branch 'fix-vulkan-dependency-searching' into 'master'
...
meson: Fix Vulkan dependency checking
Closes #3108
See merge request GNOME/gtk!2526
2020-09-04 10:49:50 +00:00
Chun-wei Fan
b322ddba5c
gdksurface-win32.c: Fix missed include
...
We need to include gdkdevice-win32.h for gdksurface-win32.c
2020-09-04 17:24:57 +08:00
Nirbheek Chauhan
b25871438d
meson: Fix Vulkan dependency checking
...
The dependency block was completely wrong. It was:
1. Not searching for the lib manually when -Dvulkan=enabled (default).
The else block was only hit when -Dvulkan=auto.
2. Unconditionally searching for the vulkan library in the else block
when -Dvulkan=disabled
The manual searching is also not required because Meson has a custom
'vulkan' dependency class that already supports Windows, and is more
correct than the code here. Specifically, the current code does not
support picking up the Vulkan SDK from a custom path.
Fixes #3108
2020-09-04 11:50:50 +05:30
Jordi Mas
aff3cc6194
Update Catalan translation
2020-09-04 06:26:23 +02:00
Ahmed Eldemery
f2c4ad0087
Merge remote-tracking branch 'upstream/master' into master
2020-09-03 20:24:26 +02:00
Matthias Clasen
1a131a04d3
3.99.1
2020-09-03 14:20:06 -04:00
Matthias Clasen
887539e4ff
gridview: Make constructor arguments nullable
...
I forgot to adjust the precondition when copying things
around.
2020-09-03 14:20:06 -04:00
Matthias Clasen
98440142da
Merge branch 'layout-manager-transform-demo' into 'master'
...
Layout manager transform demo
See merge request GNOME/gtk!2519
2020-09-03 14:49:31 +00:00
Matthias Clasen
acc2516b3c
Add another layout manager demo
...
This demo uses transforms to place icons on a sphere.
2020-09-03 10:09:22 -04:00
Matthias Clasen
fd7a9069ce
Cosmetic improvement to the layout manager demo
...
Give this a better title, since we will have more
than one layout manager demo soon.
2020-09-03 10:09:22 -04:00
Matthias Clasen
1a8f109af8
Add a simple testcase for transforms
...
This can help in tracking various things down,
from picking to clipping.
2020-09-03 10:09:22 -04:00
Matthias Clasen
eee6d28c67
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3109 and #3112
See merge request GNOME/gtk!2522
2020-09-02 19:47:40 +00:00
Matthias Clasen
30ab8b3eca
Fix picking
...
My previous change here was too hasty - this code is not
actually transforming points - it is just a convoluted
way to transform the z axis from child coordinates to
the parent.
2020-09-02 15:20:58 -04:00
Matthias Clasen
d5121af876
text widgets: Don't lose focus after Emoji
...
Make sure to grab focus back when the Emoji chooser
disappears. This prevents focus going nowhere when
the Emoji chooser is canceled.
Fixes : #3112
2020-09-02 15:20:58 -04:00
Matthias Clasen
9512e461d5
textview: Fix placement of Emoji chooser
...
If the selection extends beyond the visible range,
place the Emoji chooser over the center of the window.
Fixes : #3109
2020-09-02 15:20:58 -04:00
Matthias Clasen
70c5dee968
NEWS: Updates
2020-09-02 15:20:58 -04:00
Emin Tufan Çetin
6c9fe63a23
Update Turkish translation
2020-09-02 18:26:15 +00:00
Mario Blättermann
a909f9d0f5
Update German translation
2020-09-02 17:14:28 +00:00
Carlos Garnacho
21b9dad9e6
Merge branch 'gesture-nullable-sequence' into 'master'
...
Annotate sequence argument of GtkGesture signals as nullable
See merge request GNOME/gtk!2520
2020-09-02 11:11:54 +00:00
Sebastian Dröge
ae5d1cd161
Annotate sequence argument of GtkGesture signals as nullable
2020-09-02 13:32:20 +03:00
Matthias Clasen
f53b59533d
README: Cosmetics
2020-09-01 19:21:32 -04:00
Matthias Clasen
062822ab06
Merge branch 'checkbutton-fixes' into 'master'
...
Checkbutton fixes
See merge request GNOME/gtk!2518
2020-09-01 22:15:33 +00:00
Goran Vidović
fc333ead79
Update Croatian translation
2020-09-01 21:14:00 +00:00
Matthias Clasen
746bdd3d47
checkbutton: Don't notify write-only properties
...
Nobody is listening...
2020-09-01 16:31:07 -04:00
Matthias Clasen
c5c67cbb8c
action helper: Drop G_GNUC_INTERNAL from headers
...
We haven't needed this for a long time now.
2020-09-01 16:29:21 -04:00
Matthias Clasen
639c839ba4
Add docs about grouping via action
...
Mention this in the docs for gtk_check_button_set_group
and gtk_toggle_button_set_group.
2020-09-01 16:29:21 -04:00
Matthias Clasen
5f8769e1a8
checkbutton: Support GtkActionable properly
...
Support grouping buttons via a radio action, as well
as via explicit gtk_check_button_set_group() calls.
2020-09-01 16:29:21 -04:00
Matthias Clasen
3569360949
actionhelper: Add a getter
...
Add a getter for the GtkActionHelper:role property.
2020-09-01 16:29:20 -04:00
Aurimas Černius
7070459c40
Updated Lithuanian translation
2020-09-01 22:45:16 +03:00
Matthias Clasen
1c0bf2604c
checkbutton: Don't leak the action helper
2020-09-01 15:24:34 -04:00
Fran Dieguez
c2786fefa8
Update Galician translation
2020-09-01 19:08:43 +00:00
Matthias Clasen
1bbab5664d
Merge branch 'license-clarification' into 'master'
...
License clarification
See merge request GNOME/gtk!2517
2020-09-01 18:58:52 +00:00
Matthias Clasen
a3030d3a62
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3107
See merge request GNOME/gtk!2516
2020-09-01 18:26:21 +00:00
Matthias Clasen
ec6d3ead03
Add a license clarification
2020-09-01 14:25:56 -04:00
Matthias Clasen
87855dd375
Move timsort sources to a subdirectory
...
This makes it easier to identify the files that
belong together, and are under the same license.
2020-09-01 14:25:56 -04:00
Matthias Clasen
0e6eba3968
inspector: Plug another memory leak
...
Fixes : #3107
2020-09-01 13:06:20 -04:00
Matthias Clasen
aaef9bec7f
treelistrowsorter: Plug a memory leak
2020-09-01 13:01:34 -04:00
Matthias Clasen
391c05ef70
inspector: Plug a small memory leak
2020-09-01 12:57:08 -04:00
Benjamin Otte
133a9a6784
Merge branch 'listview-constructors' into 'master'
...
list widgets: Simplify the constructors
See merge request GNOME/gtk!2515
2020-09-01 16:42:09 +00:00
Matthias Clasen
b628338db3
list widgets: Simplify the constructors
...
Now that both arguments to the _new_with_factory() constructors
are nullable, there's no good reason to keep a separate _new()
around. Just make gtk_list_view_new() and gtk_grid_view_new()
take both a model and a factory.
2020-09-01 12:24:06 -04:00
Matthias Clasen
7051fdee5d
Merge branch 'projective-transform' into 'master'
...
Replace uses of graphene_matrix_transform_
See merge request GNOME/gtk!2514
2020-09-01 13:44:38 +00:00
Matthias Clasen
e36b594867
Replace uses of graphene_matrix_transform_
...
Replace our uses of graphene_matrix_transform_point,
_point3d and _bounds by our own versions that handle
projective transforms correctly.
This fixes render node bounds being incorrect for widgets
involving projective transforms (e.g. testrevealer swing
transformations), and also fixes picking on such widgets.
2020-09-01 09:18:38 -04:00
Matthias Clasen
99a7a2188a
gsk: Add some private transform apis
...
Some of the graphene_matrix_transform apis don't work
correctly with projective matrices, so add our own
variants.
2020-09-01 09:18:38 -04:00
Asier Sarasua Garmendia
3ac9f78141
Update Basque translation
2020-09-01 12:21:34 +00:00
Benjamin Otte
a8d6ba9517
Merge branch 'view-selection-model-3' into 'master'
...
list widgets: Use selection models in the api
See merge request GNOME/gtk!2512
2020-09-01 11:08:51 +00:00
Daniel Mustieles
482794515b
Updated Spanish translation
2020-09-01 11:05:08 +02:00
Matthias Clasen
9377ce984d
Merge branch 'adwaita-more-border-spacing' into 'master'
...
Adwaita: Add border-spacing to some container widgets and style classes (properly)
See merge request GNOME/gtk!2479
2020-08-31 21:17:21 +00:00
Matthias Clasen
8d79a32c50
list widgets: Use selection models in the api
...
Change the apis in GtkListView, GtkColumnView and
GtkGridView to be explicitly about GtkSelectionModel,
to make it obvious that the widgets handle selection.
Update all users.
2020-08-31 17:15:05 -04:00
Matej Urbančič
b661bd9775
Updated Slovenian translation
2020-08-31 21:53:05 +02:00
Matej Urbančič
87dd79bc17
Updated Slovenian translation
2020-08-31 21:50:01 +02:00
Matthias Clasen
d2d8b748e9
NEWS: Updates
2020-08-31 13:37:52 -04:00
Matthias Clasen
ccb447da02
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #2777
See merge request GNOME/gtk!2503
2020-08-31 16:30:21 +00:00
Matthias Clasen
4580e71250
Merge branch 'fix_resource_leak_in_gdkdisplayclose_gtk4' into 'master'
...
Fix resource leak in gdk_display_close() under Wayland
See merge request GNOME/gtk!2511
2020-08-31 16:17:05 +00:00
Matthias Clasen
76b5ff6a00
pagesetupdialog: Just use labels in check buttons
...
Check buttons lost their ability to hold general
content. And while that is maybe sad, the tiny
images here are not really useful anyway, and
should just go away.
2020-08-31 12:05:53 -04:00
Julien Ropé
665955b81e
Fix resource leak in gdk_display_close() under Wayland
...
When using the gdk_display_close(), the handle to the Wayland compositor was not released. This could cause the consumption of all available handles, preventing other processes from accessing the display.
Fixing this by calling wl_display_disconnect() when releasing the GdkWaylandDisplay object.
Signed-off-by: Julien Ropé <jrope@redhat.com >
2020-08-31 17:46:18 +02:00
Matthias Clasen
501cf493bf
Fix a typo
2020-08-31 10:50:14 -04:00
sicklylife
684c36c13f
Update Japanese translation
2020-08-31 14:36:14 +00:00
sicklylife
d93eb0d88f
Update Japanese translation
2020-08-31 14:30:59 +00:00
Boyuan Yang
64b049f798
Update Chinese (China) translation
2020-08-31 13:44:27 +00:00
Matthias Clasen
03dd629257
Fix up the focus-chain tests
...
Several typos here, and some of the expected
output changes due to widget class changes.
2020-08-31 08:20:25 -04:00
Matthias Clasen
6ccc6a5650
doc shooter: Remove radio button remnants
2020-08-31 08:13:20 -04:00
Rafael Fontenelle
5adc1dc40f
Update Brazilian Portuguese translation
2020-08-31 11:12:54 +00:00
Jakub Steiner
768e24afc1
Merge branch 'nana-4/gtk-fix-circular-button-styling'
2020-08-31 11:27:29 +02:00
nana-4
4cf9228659
Adwaita: Ensure button.circular is a perfect circle
...
It seems the commit 9d60047616 had no
effect, even on image buttons.
2020-08-31 11:24:46 +02:00
Jakub Steiner
2f0a4c7128
Adwaita: rich-list styling
...
FIXME: why is the second list in Demo>List Box>Controls taller?
2020-08-31 11:21:57 +02:00
Yuri Chornoivan
e64b08ab90
Update Ukrainian translation
2020-08-31 06:13:57 +00:00
Kukuh Syafaat
9bc97fb52c
Update Indonesian translation
2020-08-31 06:04:08 +00:00
Kukuh Syafaat
077f21c9ff
Update Indonesian translation
2020-08-31 06:02:57 +00:00
Matthias Clasen
cff211ea1f
migration guide: Mention button hierarchy changes
2020-08-30 22:25:56 -04:00
Matthias Clasen
17c4838569
Drop GtkRadioButton
2020-08-30 22:25:36 -04:00
Matthias Clasen
bb6045f02d
builder-tool: Replace radio buttons by check buttons
...
For --3to4, replace GtkRadioButton by either GtkCheckButton
or GtkToggleButton, depending on the value of :draw-indicator.
Update the testsuite to cover this.
2020-08-30 22:17:31 -04:00
Matthias Clasen
b98352de3e
widget-factory: Stop using radio buttons
...
Use grouped toggle buttons for the view switcher
on page 2.
2020-08-30 22:17:31 -04:00
Matthias Clasen
1125a4379c
iconbrowser: Stop using radio buttons
...
Replace them with grouped toggle buttons.
2020-08-30 22:14:05 -04:00
Matthias Clasen
f085ac837c
fontrendering demo: Stop using radio buttons
...
Replace them with grouped toggled buttons.
2020-08-30 22:14:05 -04:00
Matthias Clasen
28d7f497ef
togglebutton: Add grouping
...
This is the replacement for groups of radiobuttons
with draw-indicator = FALSE.
2020-08-30 22:14:05 -04:00
Matthias Clasen
b69e8d8e7b
Remove GtkRadioButton uses in ui files in tests
2020-08-30 21:23:25 -04:00
Matthias Clasen
c7b6c2f441
Remove GtkRadioButton references in the docs
2020-08-30 21:23:25 -04:00
Matthias Clasen
2c5c938f0d
Clean up uses of gtk_toggle_button_get/set_active
...
Replace all uses on check buttons by the corresponding
check button api.
2020-08-30 21:23:25 -04:00
Matthias Clasen
cfade230ce
docs: Update the gallery image for check buttons
...
Show grouped and ungrouped check buttons.
2020-08-30 21:23:25 -04:00
Matthias Clasen
238d52497d
doc shooter: Drop radio buttons
...
Instead, show grouped checkbuttons.
2020-08-30 21:23:25 -04:00
Matthias Clasen
ba6070b7be
build: The doc shooter works without x11 now
...
No need to restrict the build to just x11.
We're not using pixmaps anymore.
2020-08-30 21:23:25 -04:00
Matthias Clasen
8f1bf594b9
Drop a long-dead test
...
We don't parse rc files anymore. Time for testrc.c to go.
2020-08-30 21:23:25 -04:00
Matthias Clasen
1b6f734019
tests: Stop using radio buttons
...
Use grouped check buttons.
2020-08-30 21:23:25 -04:00
Matthias Clasen
cd284da794
checkbutton: Reuse a helper function
2020-08-30 21:23:25 -04:00
Matthias Clasen
591b52584e
checkbutton: Fix clicking on the last group member
...
Clicking on the last group member was letting me
uncheck it, creating a radio group without active
item, which is not what we want.
2020-08-30 21:23:25 -04:00
Matthias Clasen
f30d32f609
pagesetupdialog: Drop gtkradiobutton.h include
...
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
33b65d5e61
stackswitcher: Drop gtkradiobutton.h include
...
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
00124b593e
inspector: Drop gtkradiobutton.h include
...
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
2d6c43b598
checkbutton: Drop gtkradiobutton.h include
...
No longer used.
2020-08-30 21:23:25 -04:00
Matthias Clasen
d6e1276fe1
mountoperation: Stop using radio buttons
...
Use grouped check buttons instead.
2020-08-30 21:23:25 -04:00
Matthias Clasen
151b9c71db
printeroptionwidget: Stop using radio buttons
...
Use grouped check buttons instead.
2020-08-30 21:23:25 -04:00
Matthias Clasen
c9eb497989
gtk-demo: Fix up the fontrendering demo
2020-08-30 21:23:14 -04:00
Matthias Clasen
dc8b88393d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3104
See merge request GNOME/gtk!2507
2020-08-30 22:01:45 +00:00
Matthias Clasen
7a05381825
gtk-demo: Port to font explorer to grouped checkbuttons
...
Stop using radio buttons here.
2020-08-30 17:59:23 -04:00
Matthias Clasen
e21b6a5721
widget-factory: Fix up radio buttons
...
Keep calling them radiobutton, since that is what they are.
And make the insensitive second group of three match what
we have in gtk3-widget-factory, and be parallel to the
insensitive checkbuttons next to it.
2020-08-30 17:59:23 -04:00
Matthias Clasen
d3042dabf4
printdialog: Make collate image smaller
...
This matches the appearance on GTK 3, and prevents
the checkbuttons next to the image from being spaced
out.
2020-08-30 17:59:23 -04:00
Matthias Clasen
830b2b7f30
printdialog: Fix radio groups
...
We need to use grouped checkbuttons now.
2020-08-30 17:59:23 -04:00
Matthias Clasen
af155838bd
fontchooser: Fix radio groups for features
...
We need to use grouped checkbuttons now.
2020-08-30 17:59:23 -04:00
Matthias Clasen
2212daf979
Better fontconfig suppression
2020-08-30 13:14:55 -04:00
Matthias Clasen
5ef0ed1189
inspector: Add some translator comments
...
Some of the strings we have here are hard to translate,
so leave some hints, and some context.
Fixes : #3104
2020-08-30 13:12:10 -04:00
Matthias Clasen
071763c844
inspector: Add a dark background to the recorder
...
Add a button to toggle the background in the node
view between dark and light. This helps to discern
the borders of some nodes.
2020-08-30 08:59:13 -04:00
Matthias Clasen
c69ac09afb
Another attempt to make circular buttons square
...
circular button, square hole...
2020-08-30 08:34:30 -04:00
Matthias Clasen
4ba84d6426
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3098
See merge request GNOME/gtk!2506
2020-08-30 12:29:24 +00:00
Bruce Cowan
fac0e7abd8
Update British English translation
2020-08-30 11:46:48 +00:00
Asier Sarasua Garmendia
14daddfa9d
Update Basque translation
2020-08-30 10:26:53 +00:00
Asier Sarasua Garmendia
0c150e48f1
Update Basque translation
2020-08-30 10:23:55 +00:00
Matthias Clasen
c51f69c446
gtk-demo: Cosmetic change to the css shadows demo
...
Make the text view in the bottom take up the bulk
of the window, as it used to be.
2020-08-29 16:42:30 -04:00
Matthias Clasen
8e74687ab3
page setup dialog: Prevent cascading paper dialogs
...
We trigger the paper dialog when the "manage" item
in the dropdown is selected. But the selection also
changes due to internal changes, such as reloading
the custom paper list when the paper dialog is
closed. We need to be extra careful to avoid triggering
another paper dialog when that happens.
Fixes : #3098
2020-08-29 16:30:34 -04:00
Matthias Clasen
15c6760a96
print dialog: Prevent cascading paper dialogs
...
We trigger the paper dialog when the "manage" item
in the dropdown is selected. But the selection also
changes due to internal changes, such as reloading
the custom paper list when the paper dialog is
closed. We need to be extra careful to avoid triggering
another paper dialog when that happens.
2020-08-29 16:30:26 -04:00
Matthias Clasen
6ffb3d3fe5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2504
2020-08-29 17:37:18 +00:00
Matthias Clasen
0f42d37f8b
css: Fix parsing of scientific notation
...
The parser got its chars mixed up while parsing numbers
like 2.3e-04. While it is unlikely to meet such numbers
in human-generated css, we do have them e.g. when saving
render node trees with transforms.
Also add some css parser tests for number parsing.
2020-08-29 12:44:26 -04:00
Boyuan Yang
02d57f1fd7
Update Chinese (China) translation
2020-08-29 15:22:48 +00:00
Timm Bäder
1375fb4464
Change button hierarchy
...
A radiobutton without indicator is really just a togglebutton with a
group.
A radiobutton with indicator is really just a checkbutton with a group.
Make checkbutton its own widget not inheriting from GtkButton.
GtkRadioButton could be removed but it stays for now.
Radiobutton && !draw-indicator => Togglebutton
Checkbutton && !draw-indicator => Togglebutton
Radiobutton && draw-indicator => CheckButton + group
2020-08-29 16:46:28 +02:00
Timm Bäder
51b398b960
rendernodes: Whitespace
2020-08-29 16:46:28 +02:00
Timm Bäder
b0d89b1882
wayland: Fix a GSettingsSchema leak
2020-08-29 16:46:28 +02:00
Timm Bäder
c1c2205018
gl renderer: Adjust gaussian blur sigma
...
To look more like what browsers do.
2020-08-29 16:46:28 +02:00
Timm Bäder
7a8d71138f
testoutsetshadowdrawing: Make window background white
...
This makes it easier to compare the rendering with other sources.
2020-08-29 16:46:28 +02:00
Timm Bäder
2bff84ca6c
gl: Adjust blur radius_multiplier
...
2.0 Looks much closer to what my browser does.
Fixes #2777
2020-08-29 16:46:25 +02:00
Boyuan Yang
e8805eb9bf
Update Chinese (China) translation
2020-08-29 14:19:45 +00:00
Timm Bäder
21e2c7fa33
icon-browser: Add .navigation-sidebar to sidebar
2020-08-29 11:11:29 +02:00
Timm Bäder
53eed09e08
gdkcairoprivate: Fix header guard
2020-08-29 11:11:29 +02:00
Timm Bäder
0fd8a287fc
spinbutton: Whitespace
2020-08-29 11:11:29 +02:00
Timm Bäder
1d6ac9b47b
button: Use gtk_widget_class_add_shortcut directly
...
To show how that works
2020-08-29 11:11:29 +02:00
Timm Bäder
acbb59bfae
button: Whitespace
2020-08-29 11:11:29 +02:00
Timm Bäder
ea21e50cc1
testadjustsize: Fix overlay/box confusion
2020-08-29 11:11:29 +02:00
Timm Bäder
e970c69843
gsk: Fix border node diff implementation
...
This was showing up in the interactive constraint demo in gtk4-demo.
2020-08-29 11:11:29 +02:00
Piotr Drąg
ce737f69d7
Update POTFILES.skip
2020-08-29 10:55:11 +02:00
Changwoo Ryu
e4ad403a9a
Update Korean translation
2020-08-29 03:57:33 +00:00
Changwoo Ryu
722cab1b6b
Update Korean translation
2020-08-29 03:56:51 +00:00
Matthias Clasen
38c2555d46
Merge branch 'issue-3099' into 'master'
...
demo: Fix the resource path for css_pixbufs demo
Closes #3099
See merge request GNOME/gtk!2500
2020-08-29 03:54:32 +00:00
Emmanuele Bassi
ebef48f7df
demo: Fix the resource path for css_pixbufs demo
...
Fixes : #3099
2020-08-28 18:39:59 +01:00
Ahmed Eldemery
a67899870a
Merge remote-tracking branch 'upstream/master' into master
2020-08-28 18:45:15 +02:00
Asier Sarasua Garmendia
a0565ea8d9
Update Basque translation
2020-08-28 18:45:01 +02:00
Matthias Clasen
1d2634e73b
NEWS: Updates
2020-08-28 18:45:01 +02:00
Matthias Clasen
18a85998dc
idle sizer: Request a motion event after layout
...
When we are reallocating widgets, make sure that
we get a motion event in the next frame cycle,
so the hover state gets updated.
2020-08-28 18:45:01 +02:00
Matthias Clasen
c6fee8cee5
Add a function to request motion events
...
We want to ensure that the pointer position is reflected
when widget geometry changes, so add a function that tells
GDK "please create a motion event at the current position
on this surface, if one doesn't happen already".
2020-08-28 18:45:01 +02:00
Jordi Mas
dc17cf19b4
Update Catalan translation
2020-08-28 18:45:01 +02:00
Matthias Clasen
df88abb9c4
bookmarksmanager: Cancel async reads properly
...
This was causing the objects-finalize test to fail in ci.
2020-08-28 18:45:01 +02:00
Matthias Clasen
bba7f444dc
Don't export gdk_surface_constrain_size
...
It has one last use in gtkwindow.c, but that will
go away and doesn't need this function to be exported
anyway.
2020-08-28 18:45:01 +02:00
Kukuh Syafaat
6b9db59e62
Update Indonesian translation
2020-08-28 18:45:01 +02:00
Carlos Garnacho
0077f95ace
gdk/wayland: Use double-click/drag-threshold settings from g-d-s
...
Handle both these settings, and the older settings-daemon ones for
backwards compatibility. The keys are already checked for existence
in the schema, so it will just use the existing ones.
2020-08-28 18:45:01 +02:00
Carlos Garnacho
c770adb918
gdk/wayland: Look for font settings in gsettings-desktop-schemas
...
Prefer this location, but also look for the old location in
settings-daemon for backwards compatibility. This applies to both
direct settings lookups and via the settings portal.
2020-08-28 18:45:01 +02:00
Alexander Mikhaylenko
529b44625d
wayland: Fix dnd hotspot movement
...
_gdk_wayland_surface_offset_next_wl_buffer() moves the surface relatively
to its current position, pass it a delta instead of new position.
2020-08-28 18:45:01 +02:00
Matthias Clasen
c10636789d
gdk: Drop an unused vfunc
2020-08-28 18:45:01 +02:00
Matthias Clasen
8124f5896d
gdk: Cosmetics
2020-08-28 18:45:01 +02:00
Matthias Clasen
28f831ebb0
broadway: Fix up surface_at_position
2020-08-28 18:45:01 +02:00
Matthias Clasen
3ec7a6c861
win32: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-28 18:45:01 +02:00
Matthias Clasen
8da4a02da0
wayland: Drop unused argument from query_state
...
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-28 18:45:01 +02:00
Matthias Clasen
e6d4555b34
wayland: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-28 18:45:01 +02:00
Matthias Clasen
f854c2850f
broadway: Drop unused argument from query_state
...
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-28 18:45:01 +02:00
Matthias Clasen
d6392c9035
broadway: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-28 18:45:01 +02:00
Matthias Clasen
02631d2b6e
x11: Drop unused argument from query_state
...
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-28 18:45:01 +02:00
Matthias Clasen
9cddc36fe2
x11: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-28 18:45:01 +02:00
Matthias Clasen
690d72e696
gdk: Drop the query_state vfunc
...
It is no longer used.
2020-08-28 18:45:01 +02:00
Matthias Clasen
9dbf81e7d9
x11: Stop setting the query_state vfunc
2020-08-28 18:45:01 +02:00
Matthias Clasen
0546f09b1d
win32: Stop using the query_state vfunc
2020-08-28 18:45:01 +02:00
Matthias Clasen
22099ebb05
macos: Stop setting the query_state vfunc
2020-08-28 18:45:01 +02:00
Matthias Clasen
07ef594be1
wayland: Stop using the query_state vfunc
...
Just call the backend implementation directly.
2020-08-28 18:45:01 +02:00
Matthias Clasen
d785212706
broadway: Stop using the query_state vfunc
...
Just call the backend implementation directly.
2020-08-28 18:45:01 +02:00
Matthias Clasen
9b0c2e62ba
Drop _gdk_device_query_state
...
It is now unused.
2020-08-28 18:45:01 +02:00
Matthias Clasen
983f072514
macos: Stop using _gdk_device_query_state
...
Directly use the backend implementation.
2020-08-28 18:45:01 +02:00
Matthias Clasen
275b95841b
win32: Stop using _gdk_device_query_state
...
Directly use the backend implementation.
2020-08-28 18:45:01 +02:00
Matthias Clasen
7d9bc01797
x11: Stop using _gdk_device_query_state
...
Directly use the backend implementation.
2020-08-28 18:45:01 +02:00
Matthias Clasen
028644d0ad
Make gdk_surface_get_device_position return a boolean
...
A year ago, we make this function not return the child
surface anymore. But the information whether the device
is actually over the surface is still useful, and we
should not loose it.
2020-08-28 18:45:01 +02:00
Matthias Clasen
76e83d3216
main: Avoid a crash with crossing event handling
...
We are reusing the GtkCrossingData struct for multiple
calls here, so we need to make sure that the targets
stay alive from beginning to end.
Fixes : #3090
2020-08-28 18:45:01 +02:00
Matthias Clasen
002376f837
widget: Avoid a crash in crossing event handling
...
We need to make sure that the crossing data stays
alive until we are done handling it, so take references
on all the widgets in it.
2020-08-28 18:45:01 +02:00
Alexander Larsson
39d71dbb0a
broadway: Prune fully clipped render nodes
...
If some node is fully outside the clip region we don't send it to the daemon.
This helps a lot in how much data we send for scrolling viewports.
However, sending partial trees makes node reuse a bit more tricky. We
can't save for reuse any node that could possibly clip different depending on
the clip region, as that could be different next frame. So, unless the
node is fully contained in the current clip (and we thus know it is not
parial) we don't allow reusing that next frame.
This fixes #3086
2020-08-28 18:45:01 +02:00
Alexander Larsson
b5e7499bbd
broadway: Track the clip region in the renderer
...
If we know what can't possibly be visible we may can later decide to
not expose a node.
2020-08-28 18:45:01 +02:00
Fran Dieguez
fed6ba9bd0
Update Galician translation
2020-08-28 18:45:01 +02:00
Alexander Larsson
5581f78f41
Broadway: Fix handling of debug nodes
...
The debug nodes have id BROADWAY_NODE_DEBUG, which happens to be "12".
So, don't hardcode the wrong number "14".
2020-08-28 18:45:01 +02:00
Alexander Larsson
a97ea17c92
broadway: Correct handling of opaque colors
...
If alpha is 255, we use rgb() instead of rgba(), not if alpha is 0.
This makes the title bar gradient go from fully transparent to blue
rather than black to blue..
2020-08-28 18:45:01 +02:00
Matthias Clasen
67f259cd1a
fontchooser: Populate the list incrementally
...
By adding 20 fonts / frame to the font list, we can
get the font chooser dialog to show up much faster.
This change gets the font chooser up in 265ms here.
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
e5f4459e4b
a11y: Simplify the ATContext::state-change signal
...
We cannot pass all the data we pass to the virtual function, because the
types are private, but the class and the signal are public API.
The signal is just a notification, so we can decouple the virtual
function (which stays the same, for internal types that implement the
ATContext API contract) from the signal.
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
890c7816f0
Annotate GValue-variants methods of GtkAccessible
...
The variadic arguments methods cannot be used by language bindings,
which means we can let them use their names when calling the
GValue-based methods.
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
e25e73c56c
Properly document GtkAccessible:accessible-role
...
Use a gtk-doc stanza, instead of the GParamSpec strings.
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
8a2b3f0692
a11y: Do not notify of empty state changes
...
If the ATContext state hasn't changed—for instance, if the accessible
attributes have been set to their default value, or have been set to the
same value—do not emit an accessible state change. State changes can be
arbitrarily expensive, so we want to ensure that they are meaningful.
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
1ec4995d14
a11y: Notify callers when an attributes set changes
...
We can use that information inside the ATContext.
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
dd624de8e8
a11y: GtkATContext.update_state() was renamed to update()
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
92737b27bf
a11y: Allow bulk attribute update with the GValue API
...
Like we do for the varargs API.
2020-08-28 18:45:01 +02:00
Emmanuele Bassi
fe50286e14
a11y: Different value types cannot be equal
...
Bail out early, instead of going deep into the GtkAccessibleValue type
equal() implementation, where we expect both accessible values to have
the same type.
2020-08-28 18:45:01 +02:00
Aurimas Černius
9d65ee58c9
Updated Lithuanian translation
2020-08-28 18:45:01 +02:00
nana-4
ad5a78b1e7
gtk-demo: Avoid double borders in the blendmodes demo
2020-08-28 18:45:01 +02:00
nana-4
cd3a7b416e
gtk-demo: Avoid double borders in the fontrendering demo
...
Replace the frame with a separator.
2020-08-28 18:45:01 +02:00
nana-4
fc63c6371f
gtk-demo: Avoid double borders in the dnd demo
...
Replace the frame with a separator.
2020-08-28 18:45:01 +02:00
nana-4
d13fa73d04
gtk-demo: Avoid double borders in the panes demo
...
Using frames for the children of the panes looks bad.
2020-08-28 18:45:01 +02:00
nana-4
c6976d6897
inspector: Avoid double borders in the resource tab
...
Replace the frames with a separator.
2020-08-28 18:45:01 +02:00
nana-4
6371fca799
inspector: Avoid double borders in the accessibility tab
...
Replace the frame with a separator.
2020-08-28 18:45:01 +02:00
nana-4
68379c3ff7
Adwaita: Simplify stackswitcher button styling
...
Simply use negative margins against the padding.
Also remove the indicator only when the .needs-attention style class is
removed.
2020-08-28 22:06:44 +09:00
Asier Sarasua Garmendia
f3ebb76746
Update Basque translation
2020-08-28 10:26:30 +00:00
Timm Bäder
620388a071
gtk4-demo: Add background to CSS Basics demo
...
So people can at least read the textview contents
2020-08-28 04:35:46 +02:00
Matthias Clasen
f6adba57bb
NEWS: Updates
2020-08-27 20:50:40 -04:00
Matthias Clasen
5533494839
Merge branch 'synthetic-motion' into 'master'
...
Synthetic motion
See merge request GNOME/gtk!2493
2020-08-27 20:24:34 +00:00
Matthias Clasen
5b5d2665d3
idle sizer: Request a motion event after layout
...
When we are reallocating widgets, make sure that
we get a motion event in the next frame cycle,
so the hover state gets updated.
2020-08-27 16:01:45 -04:00
Jordi Mas
1a39ac64ab
Update Catalan translation
2020-08-27 20:54:16 +02:00
Matthias Clasen
78134fc6d3
Add a function to request motion events
...
We want to ensure that the pointer position is reflected
when widget geometry changes, so add a function that tells
GDK "please create a motion event at the current position
on this surface, if one doesn't happen already".
2020-08-27 13:33:45 -04:00
Matthias Clasen
564ae4bdb1
Merge branch 'matthiasc/for-master' into 'master'
...
bookmarksmanager: Cancel async reads properly
See merge request GNOME/gtk!2495
2020-08-27 17:04:34 +00:00
Matthias Clasen
e4215ec4c7
bookmarksmanager: Cancel async reads properly
...
This was causing the objects-finalize test to fail in ci.
2020-08-27 12:36:36 -04:00
Matthias Clasen
74f8c59236
Merge branch 'matthiasc/for-master' into 'master'
...
Don't export gdk_surface_constrain_size
See merge request GNOME/gtk!2494
2020-08-27 12:12:52 +00:00
Matthias Clasen
dd0c43b7ba
Don't export gdk_surface_constrain_size
...
It has one last use in gtkwindow.c, but that will
go away and doesn't need this function to be exported
anyway.
2020-08-27 07:31:45 -04:00
Kukuh Syafaat
9de7390ea0
Update Indonesian translation
2020-08-27 03:03:54 +00:00
Matthias Clasen
81e113d8aa
Merge branch 'wip/carlosg/shuffle-font-mouse-settings' into 'master'
...
Look up font and mouse settings in gsettings-desktop-schemas
See merge request GNOME/gtk!2489
2020-08-27 00:08:45 +00:00
Matthias Clasen
b26f4d5429
Merge branch 'wip/exalm/hotspot-fix' into 'master'
...
wayland: Fix dnd hotspot movement
See merge request GNOME/gtk!2492
2020-08-26 23:44:15 +00:00
Alexander Mikhaylenko
0a59429dc8
wayland: Fix dnd hotspot movement
...
_gdk_wayland_surface_offset_next_wl_buffer() moves the surface relatively
to its current position, pass it a delta instead of new position.
2020-08-27 04:04:48 +05:00
Matthias Clasen
70ae073394
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2488
2020-08-26 22:34:08 +00:00
Carlos Garnacho
6421355065
gdk/wayland: Use double-click/drag-threshold settings from g-d-s
...
Handle both these settings, and the older settings-daemon ones for
backwards compatibility. The keys are already checked for existence
in the schema, so it will just use the existing ones.
2020-08-27 00:27:50 +02:00
Carlos Garnacho
536966e848
gdk/wayland: Look for font settings in gsettings-desktop-schemas
...
Prefer this location, but also look for the old location in
settings-daemon for backwards compatibility. This applies to both
direct settings lookups and via the settings portal.
2020-08-27 00:18:09 +02:00
Matthias Clasen
1c44910dfe
gdk: Drop an unused vfunc
2020-08-26 18:09:47 -04:00
Matthias Clasen
bf9bb71813
gdk: Cosmetics
2020-08-26 17:56:41 -04:00
Matthias Clasen
75915bc782
broadway: Fix up surface_at_position
2020-08-26 17:56:41 -04:00
Matthias Clasen
618891a41a
win32: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
0d82fcf76f
wayland: Drop unused argument from query_state
...
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-26 17:56:41 -04:00
Matthias Clasen
0091de63b4
wayland: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
338d6adb10
broadway: Drop unused argument from query_state
...
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-26 17:56:41 -04:00
Matthias Clasen
c4c155d698
broadway: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
b9016229c1
x11: Drop unused argument from query_state
...
Now that this is backend-only api, we can just
drop unused arguments.
2020-08-26 17:56:41 -04:00
Matthias Clasen
cf257e6676
x11: Fix return value of get_device_state
...
We need to look a the position, not the child surface.
2020-08-26 17:56:41 -04:00
Matthias Clasen
62ed769e74
gdk: Drop the query_state vfunc
...
It is no longer used.
2020-08-26 17:56:41 -04:00
Matthias Clasen
f3a0357ab0
x11: Stop setting the query_state vfunc
2020-08-26 17:56:41 -04:00
Matthias Clasen
1d8ac79296
win32: Stop using the query_state vfunc
2020-08-26 17:56:41 -04:00
Matthias Clasen
374c776749
macos: Stop setting the query_state vfunc
2020-08-26 17:56:41 -04:00
Matthias Clasen
8c9e1e7444
wayland: Stop using the query_state vfunc
...
Just call the backend implementation directly.
2020-08-26 17:56:41 -04:00
Matthias Clasen
73d81d7178
broadway: Stop using the query_state vfunc
...
Just call the backend implementation directly.
2020-08-26 17:56:41 -04:00
Matthias Clasen
84355ccbff
Drop _gdk_device_query_state
...
It is now unused.
2020-08-26 17:56:41 -04:00
Matthias Clasen
b2c92392fc
macos: Stop using _gdk_device_query_state
...
Directly use the backend implementation.
2020-08-26 17:56:41 -04:00
Matthias Clasen
9e06e830b7
win32: Stop using _gdk_device_query_state
...
Directly use the backend implementation.
2020-08-26 17:56:41 -04:00
Matthias Clasen
62a4a356c9
x11: Stop using _gdk_device_query_state
...
Directly use the backend implementation.
2020-08-26 15:31:07 -04:00
Matthias Clasen
1e4c6cde10
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3090
See merge request GNOME/gtk!2485
2020-08-26 18:02:18 +00:00
Matthias Clasen
372db8d239
Merge branch 'broadway-prune' into 'master'
...
broadway: Prune fully clipped render nodes
Closes #3086
See merge request GNOME/gtk!2487
2020-08-26 17:52:57 +00:00
Alexander Larsson
d57e6b754f
broadway: Prune fully clipped render nodes
...
If some node is fully outside the clip region we don't send it to the daemon.
This helps a lot in how much data we send for scrolling viewports.
However, sending partial trees makes node reuse a bit more tricky. We
can't save for reuse any node that could possibly clip different depending on
the clip region, as that could be different next frame. So, unless the
node is fully contained in the current clip (and we thus know it is not
parial) we don't allow reusing that next frame.
This fixes #3086
2020-08-26 18:08:00 +02:00
nana-4
59e0959186
Adwaita: Add border-spacing to some container widgets and style classes
...
This commit adds border-spacing to actionbar, searchbar, .toolbar and
.app-notification, so their child widgets won't appear to be connected
even without margin.
2020-08-27 00:47:08 +09:00
Fran Dieguez
3b1300632d
Update Galician translation
2020-08-26 15:42:23 +00:00
nana-4
738f5f4523
Adwaita: Fix border-spacing for headerbar
...
GtkHeaderBar uses GtkCenterBox internally nowadays, so the theme needs
to correspond to it.
2020-08-27 00:38:17 +09:00
Alexander Larsson
4b1ea7c4a1
broadway: Track the clip region in the renderer
...
If we know what can't possibly be visible we may can later decide to
not expose a node.
2020-08-26 16:55:56 +02:00
Matthias Clasen
74a452df6c
Make gdk_surface_get_device_position return a boolean
...
A year ago, we make this function not return the child
surface anymore. But the information whether the device
is actually over the surface is still useful, and we
should not loose it.
2020-08-26 09:11:28 -04:00
Timm Bäder
45046a53eb
Merge branch 'broadway-debug-nodes' into 'master'
...
Broadway: Fix handling of debug nodes
See merge request GNOME/gtk!2486
2020-08-26 12:38:09 +00:00
Alexander Larsson
918996b047
Broadway: Fix handling of debug nodes
...
The debug nodes have id BROADWAY_NODE_DEBUG, which happens to be "12".
So, don't hardcode the wrong number "14".
2020-08-26 14:01:00 +02:00
Matthias Clasen
b6eb85ee72
main: Avoid a crash with crossing event handling
...
We are reusing the GtkCrossingData struct for multiple
calls here, so we need to make sure that the targets
stay alive from beginning to end.
Fixes : #3090
2020-08-26 07:27:38 -04:00
Matthias Clasen
44741e1b77
widget: Avoid a crash in crossing event handling
...
We need to make sure that the crossing data stays
alive until we are done handling it, so take references
on all the widgets in it.
2020-08-26 07:26:49 -04:00
Emmanuele Bassi
eef1818cee
Merge branch 'broadway-alpha-colors' into 'master'
...
broadway: Correct handling of opaque colors
See merge request GNOME/gtk!2484
2020-08-26 11:20:03 +00:00
Alexander Larsson
fcaa6e98d0
broadway: Correct handling of opaque colors
...
If alpha is 255, we use rgb() instead of rgba(), not if alpha is 0.
This makes the title bar gradient go from fully transparent to blue
rather than black to blue..
2020-08-26 12:18:28 +02:00
Matthias Clasen
f48a1e4069
Merge branch 'matthiasc/for-master' into 'master'
...
fontchooser: Populate the list incrementally
See merge request GNOME/gtk!2483
2020-08-25 20:53:02 +00:00
Emmanuele Bassi
c21b9bec95
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2480
2020-08-25 20:34:18 +00:00
Aurimas Černius
659ec97456
Updated Lithuanian translation
2020-08-25 23:23:57 +03:00
Matthias Clasen
42cc15bb74
Merge branch 'demo-double-border-fixes' into 'master'
...
gtk-demo: Avoid double borders
See merge request GNOME/gtk!2478
2020-08-25 20:19:49 +00:00
Matthias Clasen
8e452b2b54
Merge branch 'inspector-double-border-fixes' into 'master'
...
inspector: Avoid double borders
See merge request GNOME/gtk!2477
2020-08-25 20:18:47 +00:00
Matthias Clasen
740559a54f
fontchooser: Populate the list incrementally
...
By adding 20 fonts / frame to the font list, we can
get the font chooser dialog to show up much faster.
This change gets the font chooser up in 265ms here.
2020-08-25 15:51:04 -04:00
Matthias Clasen
75cf990f74
Merge branch 'matthiasc/for-master' into 'master'
...
Revert unintentional calendar change
See merge request GNOME/gtk!2482
2020-08-25 18:29:27 +00:00
Matthias Clasen
612d2ea1f0
Revert unintentional calendar change
...
This was unintentionally included in c0efadc0f3 .
2020-08-25 14:12:35 -04:00
Emmanuele Bassi
d58136e23d
a11y: Simplify the ATContext::state-change signal
...
We cannot pass all the data we pass to the virtual function, because the
types are private, but the class and the signal are public API.
The signal is just a notification, so we can decouple the virtual
function (which stays the same, for internal types that implement the
ATContext API contract) from the signal.
2020-08-25 16:36:08 +01:00
Emmanuele Bassi
256c9c9873
Annotate GValue-variants methods of GtkAccessible
...
The variadic arguments methods cannot be used by language bindings,
which means we can let them use their names when calling the
GValue-based methods.
2020-08-25 16:36:08 +01:00
Emmanuele Bassi
fd568e63c2
Properly document GtkAccessible:accessible-role
...
Use a gtk-doc stanza, instead of the GParamSpec strings.
2020-08-25 16:36:08 +01:00
Emmanuele Bassi
797b3bd1b1
a11y: Do not notify of empty state changes
...
If the ATContext state hasn't changed—for instance, if the accessible
attributes have been set to their default value, or have been set to the
same value—do not emit an accessible state change. State changes can be
arbitrarily expensive, so we want to ensure that they are meaningful.
2020-08-25 16:36:08 +01:00
Emmanuele Bassi
32a1cd13c8
a11y: Notify callers when an attributes set changes
...
We can use that information inside the ATContext.
2020-08-25 16:36:08 +01:00
Emmanuele Bassi
1338dcddcb
a11y: GtkATContext.update_state() was renamed to update()
2020-08-25 16:36:08 +01:00
Emmanuele Bassi
911a71c705
a11y: Allow bulk attribute update with the GValue API
...
Like we do for the varargs API.
2020-08-25 16:36:08 +01:00
Emmanuele Bassi
701a0dabd0
a11y: Different value types cannot be equal
...
Bail out early, instead of going deep into the GtkAccessibleValue type
equal() implementation, where we expect both accessible values to have
the same type.
2020-08-25 16:36:08 +01:00
Matthias Clasen
4dc1aea2ad
Merge branch 'adwaita-rounded-frames' into 'master'
...
Adwaita: Make frames rounded
See merge request GNOME/gtk!2476
2020-08-25 12:52:36 +00:00
nana-4
09fa3886ba
gtk-demo: Avoid double borders in the blendmodes demo
2020-08-25 21:24:10 +09:00
nana-4
bb7d5b2de6
gtk-demo: Avoid double borders in the fontrendering demo
...
Replace the frame with a separator.
2020-08-25 21:24:10 +09:00
nana-4
d906242c78
gtk-demo: Avoid double borders in the dnd demo
...
Replace the frame with a separator.
2020-08-25 21:24:10 +09:00
nana-4
d9e8223b03
gtk-demo: Avoid double borders in the panes demo
...
Using frames for the children of the panes looks bad.
2020-08-25 21:24:10 +09:00
nana-4
b79797ea97
inspector: Avoid double borders in the resource tab
...
Replace the frames with a separator.
2020-08-25 21:20:57 +09:00
nana-4
5bfc95321e
inspector: Avoid double borders in the accessibility tab
...
Replace the frame with a separator.
2020-08-25 21:20:57 +09:00
nana-4
c0efadc0f3
Adwaita: Make frames rounded
...
As per GNOME mockups.
Since GtkFrame now sets GTK_OVERFLOW_HIDDEN, we can round the frame
without corner overlapping.
This also adds some margin to the child label of GtkFrame to ensure it
will not be clipped by the rounded corners of the frame.
2020-08-25 21:12:35 +09:00
nana-4
ef837f0415
Adwaita: Remove a shadow-type leftover
...
After commit edae2a8dc5 , frames always
draw frames. So, remove the unused frame.flat styling.
2020-08-25 21:12:35 +09:00
Emmanuele Bassi
944607f240
Merge branch 'wip/smcv/no-yelp' into 'master'
...
docs: Don't build Yelp manual for bundled gtk-doc subproject
See merge request GNOME/gtk!2475
2020-08-25 11:18:35 +00:00
Simon McVittie
43781652b3
docs: Don't build Yelp manual for bundled gtk-doc subproject
...
This adds dependencies that would otherwise be unnecessary.
Signed-off-by: Simon McVittie <smcv@debian.org >
2020-08-25 11:55:35 +01:00
Matthias Clasen
9729a060f5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2979
See merge request GNOME/gtk!2474
2020-08-25 02:37:57 +00:00
Matthias Clasen
43ec96684a
text: Properly handle focus moving to a descendent
...
To discriminate between is-focus and contains-focus,
we need to use notify::is-focus. This makes sure
we don't get annoying warnings when the blink_cb
gets triggered on an unfocused entry.
Fixes : #2979
2020-08-24 18:31:35 -04:00
Matthias Clasen
66e0f8505e
emojichooser: Grab focus on map
...
This is the right thing to do, since we have a visible
entry and want text input to go there.
2020-08-24 18:31:08 -04:00
Matthias Clasen
22c914b7f5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2473
2020-08-24 21:57:11 +00:00
Matthias Clasen
fd7d61887c
colorchooser: Fix the add_palette api
...
When adding a custom palette, we need to arrange
for the custom section to stay at the bottom.
Maybe there should be a way to turn off custom
colors, too.
2020-08-24 17:20:17 -04:00
Matthias Clasen
bdaf346128
gtk-demo: Make the color picker demo less boring
...
Maybe the first ever use of the add_palette api.
Surprise, it doesn't work!
2020-08-24 17:19:36 -04:00
Bruce Cowan
6af7704858
Update British English translation
2020-08-24 18:39:24 +00:00
Matthias Clasen
7ff326e700
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3081
See merge request GNOME/gtk!2472
2020-08-24 16:43:39 +00:00
Matthias Clasen
c890d5991c
Add reftests for center layout
...
Add a test that checks behavior with invisible children,
and another one that ensures we go back to box-like
layout if min-size is forced.
2020-08-24 12:02:34 -04:00
Matthias Clasen
d27f9abbca
Merge branch 'unmapped-text' into 'master'
...
Unmapped text
See merge request GNOME/gtk!2466
2020-08-24 15:52:08 +00:00
Matthias Clasen
08f58122d1
Add a reftest for grid layouts
...
This tests that invisible children don't influence
the layout.
2020-08-24 11:38:00 -04:00
Matthias Clasen
17dcb10707
Add a reftest for box layouts
...
This tests that invisible children don't influence
the layout.
2020-08-24 11:34:30 -04:00
Matthias Clasen
2ac51ad827
centerlayout: Some spacing-related fixes
...
Try to arrange for border-spacing to actually be
respected in the final layout.
Fixes : #3081
2020-08-24 11:34:30 -04:00
Matthias Clasen
2e72b663b0
Merge branch 'wip/carlosg/start-spinbutton-start' into 'master'
...
gtkspinbutton: Group up/down button gestures with self
Closes #3085
See merge request GNOME/gtk!2471
2020-08-24 13:31:06 +00:00
Carlos Garnacho
e61f516a7c
gtkspinbutton: Group up/down button gestures with self
...
We are adding click gestures on the up/down buttons, but can't let
the GtkButton built-in ones prevent ours to run.
As the saying goes, if you can't beat them, join them. Group the
spinbutton and GtkButton gestures together, so it's irrelevant which
gets called first and ends up winning.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3085
2020-08-24 14:55:47 +02:00
Daniel Mustieles
f71c9a2146
Updated Spanish translation
2020-08-24 12:07:49 +02:00
Matthias Clasen
7428731e5b
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Some updates to GtkWidgetClass docs
See merge request GNOME/gtk!2470
2020-08-24 02:28:00 +00:00
Matthias Clasen
6043ed8c89
docs: Some updates to GtkWidgetClass docs
...
Mention layout managers for vfuncs that are skipped
if you have one.
2020-08-23 20:40:15 -04:00
Goran Vidović
f394375719
Update Croatian translation
2020-08-23 22:02:30 +00:00
Goran Vidović
ae2a914f07
Update Croatian translation
2020-08-23 22:01:05 +00:00
Rafael Fontenelle
cd9bee83ef
Update Brazilian Portuguese translation
2020-08-23 21:52:38 +00:00
Matthias Clasen
ca0f136deb
text: Don't compute invisible char needlessly
...
There is no real reason to do expensive text layout
operations unless we need the invisible char because
the text's visibilty is FALSE.
2020-08-23 17:41:13 -04:00
Matthias Clasen
c0191c7225
text: Defer most recomputation until we're mapped
...
It doesn't make sense to update scroll positions or
im cursor locations while we're unmapped, and doing
so causes us to do expensive text measuring.
2020-08-23 17:41:13 -04:00
Matthias Clasen
d5114cc18d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2464
2020-08-23 21:36:07 +00:00
Matthias Clasen
40d7092f4a
widget: Queue a draw when we need to
...
The code in gtk_widget_real_css_changed assumes that
queue_resize > queue_allocate > queue_draw, but the
second one is not really true. These days, we happily
keep reusing the same render node even when the child
allocation is changed.
So, if a css change has flags that tell us we should
redraw, we need to queue a draw, otherwise we might
end up reusing an outdated render node.
This fixes spinners staying visible when they stop
spinning, despite the theme setting their opacity
to 0.
2020-08-23 17:07:37 -04:00
Matthias Clasen
dc963dcbcb
Cosmetics
...
gtk_css_style_change_affects takes flags for a reason,
no need to call it multiple times.
2020-08-23 16:45:15 -04:00
Matthias Clasen
c4d350c260
build: Start using meson feature options
...
Use feature options for things that are optional features,
update the docs.
Visible changes here is that the 'print-backends' option
got renamed to 'print' to go better with 'media', and the
'tracker3' option got renamed to 'tracker'.
For options that have been changed into features, the
syntax now is -Dfeature=enabled or -Dfeature=disabled
or -Dfeature=auto.
2020-08-23 16:45:15 -04:00
Matthias Clasen
54e4bf8b75
Fix a leak in the font chooser widget
...
Contrary to what you may expect, pango_attr_font_desc_new()
is not transfer full, it makes a copy of the font description.
2020-08-23 16:45:15 -04:00
Matthias Clasen
0540337531
Merge branch 'fix_widget_factory_ui' into 'master'
...
fix position of radiobutton1
See merge request GNOME/gtk!2463
2020-08-23 16:26:35 +00:00
Ahmed Eldemery
86acb13057
fix position of radiobutton1
2020-08-23 17:39:17 +02:00
Boyuan Yang
11314cf0b4
Update Chinese (China) translation
2020-08-23 15:04:45 +00:00
Goran Vidović
37ce545d72
Update Croatian translation
2020-08-23 11:14:23 +00:00
Emin Tufan Çetin
85764ce505
Update Turkish translation
2020-08-22 21:26:01 +00:00
Boyuan Yang
ff5cdbaf03
Update Chinese (China) translation
2020-08-22 20:18:25 +00:00
Yuri Chornoivan
420c4e1f16
Update Ukrainian translation
2020-08-22 16:30:41 +00:00
Jakub Steiner
a498aca3ab
Adwaita: error labels insensitive & backdrop states
...
- address colored labels for the two states
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3063#note_891618
2020-08-22 10:14:11 -04:00
Matthias Clasen
4eacfdba60
Merge branch 'remove-unnecessary-frames' into 'master'
...
Remove unnecessary frames from some widgets
See merge request GNOME/gtk!2462
2020-08-22 14:09:35 +00:00
Andika Triwidada
4fefea7471
Update Indonesian translation
2020-08-22 13:19:15 +00:00
Piotr Drąg
bc132dae54
Update Polish translation
2020-08-22 15:17:37 +02:00
Piotr Drąg
5822cdbc95
Update POTFILES.in and POTFILES.skip
2020-08-22 13:48:19 +02:00
nana-4
6a7a0f0b8a
viewport: Remove unused frame
...
We've always removed this with Adwaita.
2020-08-22 09:30:28 +09:00
nana-4
1948f8a07f
placessidebar: Remove unused frame
...
We've always removed this with Adwaita.
2020-08-22 09:23:52 +09:00
nana-4
8eb807d7f4
entrycompletion: Remove unnecessary frame
...
The popover already has a border as a frame. Don't create double
borders.
2020-08-22 09:18:31 +09:00
Matthias Clasen
125ed52ccb
Merge branch 'new-sysprof' into 'master'
...
Port profiling to sysprof-collector api
See merge request GNOME/gtk!2457
2020-08-21 23:58:09 +00:00
Matthias Clasen
e915a1aa7f
Rename the profiler option
...
We don't support any profilers other than sysprof,
so name the option accordingly. While we are at it,
change it to a meson feature option, so
-Dprofiler=true becomes -Dsysprof=enabled
2020-08-21 18:51:48 -04:00
Matthias Clasen
7a9501b1fb
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2461
2020-08-21 22:36:45 +00:00
Matthias Clasen
81e88c1d9e
Alterative sysprof build support
...
Don't link libgtk against libsysprof. We only
need that for the test-performance binary.
2020-08-21 18:28:29 -04:00
Matthias Clasen
f4511ff91c
ci: Use depth=1 for all subprojects
...
This helps reduce bandwidth requirements for ci.
2020-08-21 17:45:00 -04:00
Matthias Clasen
f00e2e2146
inhibit: Pass valid arguments when Inhibiting
...
When we pass "" as reason, gnome-session responds
with a "Reason not specified" error. So, send
"Reason not specified" instead. Its true.
2020-08-21 17:40:36 -04:00
Christian Hergert
5a5b30681e
testsuite: use SysprofProfiler for profiling
...
Instead of using sysprof-cli to profile subprocesses, this uses
libsysprof's SysprofProfiler directly so that we can avoid an indirect
subprocess as well as disabling the polkit nag.
To do this, we have to link against libsysprof instead of
libsysprof-capture. This is limited to the -Dbuild-tests=true and
-Dprofiler=true case.
2020-08-21 13:51:52 -07:00
Matthias Clasen
ab5e62ddab
Merge branch 'matthiasc/for-master' into 'master'
...
layoutmanager: Fix the child-widget property
Closes #3080
See merge request GNOME/gtk!2460
2020-08-21 20:45:53 +00:00
Matthias Clasen
936f3f1ad9
Explicitly set grid positions in the ui file
...
We were outsmarted by a combination of gtk-builder-tool
removing default values and GtkGrid guessing good values
for omitted properties.
Fixes : #3080
2020-08-21 16:22:59 -04:00
Matthias Clasen
865b29500c
layoutmanager: Fix the child-widget property
...
We were setting the child-widget property to the parent.
Oops.
2020-08-21 14:29:14 -04:00
Matthias Clasen
7039f31391
fixup a counting error
...
Remember: 1, 2, 3, _4_, 5...
2020-08-21 13:39:38 -04:00
Matthias Clasen
ed67d9c103
Merge branch 'codespell-changes' into 'master'
...
*: Fix spelling mistakes found by codespell
See merge request GNOME/gtk!2459
2020-08-21 17:32:12 +00:00
Matthias Clasen
5377026e61
wip: Port test-performance to use sysprof-cli
...
This isn't working for the tests yet, since it
needs a single-application mode that we don't
quite have in sysprof-cli.
2020-08-21 13:24:29 -04:00
Matthias Clasen
40f3da19ae
Update the docs around profiling
...
Mention sysprof-cli, and stop mentioning GTK_TRACE_FD.
2020-08-21 10:55:01 -04:00
Matthias Clasen
d4e069a629
Port tracing to the sysprof collector api
...
Use the new sysprof collector api to do tracing.
2020-08-21 10:55:01 -04:00
Matthias Clasen
a416650f6b
application: Drop support for profiler activation
...
Drop support for the org.gnome.Sysprof3.Profiler
D-Bus interface. It is not really used, and if
we don't expose it, we can simplify our profiler
infrastructure.
2020-08-21 10:55:01 -04:00
Matthias Clasen
e5d088208a
Merge branch 'fontconfig-speedup' into 'master'
...
Trigger fontconfig initialization early
See merge request GNOME/gtk!2454
2020-08-21 14:49:31 +00:00
Björn Daase
3ef7772552
docs: Reword GtkTreeView question 28
2020-08-21 15:35:29 +02:00
Björn Daase
24ce38bb36
docs: Reword gtk4-update-icon-cache description
2020-08-21 15:33:12 +02:00
Björn Daase
6315cd977c
*: Fix spelling mistakes found by codespell
2020-08-21 15:29:34 +02:00
Matthias Clasen
9770e064e8
Merge branch 'builder-tool-boxes' into 'master'
...
builder-tool: Rewrite GtkBox
See merge request GNOME/gtk!2447
2020-08-21 13:22:48 +00:00
Jason Francis
2437622b5f
builder-tool: Rewrite GtkBox
...
Rewrite expand/fill properties on GtkBox to
hexpand/halign/vexpand/valign on the child widget.
Rewrite GtkVBox and GtkHBox to GtkBox, setting the orientation
property.
Added a test for boxes.
2020-08-20 23:41:29 -04:00
Goran Vidović
bb8c818ba1
Update Croatian translation
2020-08-20 21:47:34 +00:00
Jakub Steiner
dd2e1e4867
Merge branch 'wip/jimmac/rich-list-styling' into 'master'
...
Adwaita: rich-list styling
See merge request GNOME/gtk!2456
2020-08-20 20:58:31 +00:00
Jakub Steiner
5f630481db
Adwaita: rich-list styling
...
FIXME: why is the second list in Demo>List Box>Controls taller?
https://gitlab.gnome.org/GNOME/gtk/-/issues/3073
2020-08-20 19:39:18 +02:00
Matej Urbančič
da6253eadc
Updated Slovenian translation
2020-08-20 18:14:54 +02:00
Matthias Clasen
c6b261afa0
Merge branch 'frame-overflow-hidden' into 'master'
...
frame: Set GTK_OVERFLOW_HIDDEN
See merge request GNOME/gtk!2455
2020-08-20 14:03:41 +00:00
nana-4
e07827e976
frame: Set GTK_OVERFLOW_HIDDEN
...
It doesn't really make sense for the frame to allow drawing children
outside of it.
2020-08-20 22:24:36 +09:00
Marek Kasik
5a8f90357d
printing: Use original names for remote CUPS printers
...
CUPS uses resource paths in the form of "printers/printer_name"
or "classes/class_name" so it is enough to remove the "printers/"
or "classes/" prefix and use the string behind it as a name.
There was recently introduced a wrong check for the prefix.
This commit fixes it in the way it was originally intended.
2020-08-20 13:54:02 +02:00
Matthias Clasen
a674832658
Trigger fontconfig initialization early
...
Add a pango call to create the fontmap already in gtk_init.
This will let us hide the cost of FcInit() (which on font-heavy
systems can be ~100ms) in a thread, on the pango side.
2020-08-19 22:12:00 -04:00
Matthias Clasen
2031bcd388
Merge branch 'replace-hardcoded-margins' into 'master'
...
tooltip & placessidebar: Replace hard-coded margins with theme
See merge request GNOME/gtk!2444
2020-08-20 00:30:37 +00:00
Goran Vidović
4e157b33dc
Update Croatian translation
2020-08-19 21:51:29 +00:00
Matthias Clasen
174c9a938e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2453
2020-08-19 20:46:18 +00:00
Timm Bäder
ec81ccd5f9
label: Try to avoid a pango_layout_get_extents call
...
Measuring text is quite expensive, so only do this if really necessary.
2020-08-19 16:14:59 -04:00
Matthias Clasen
8acd60fda9
widget-factory: Improve the error states example
...
Elaborate the error state handling, and make it show
delayed states in GtkSwitch too.
2020-08-19 13:22:44 -04:00
sicklylife
bcd0a9e5d8
Update Japanese translation
2020-08-18 10:03:51 +00:00
sicklylife
5b35c5fb19
Update Japanese translation
2020-08-18 09:46:29 +00:00
Baurzhan Muftakhidinov
1dcb68c8e3
Update Kazakh translation
2020-08-18 07:20:38 +00:00
Andika Triwidada
bca6113539
Update Indonesian translation
2020-08-18 04:50:25 +00:00
Fran Dieguez
e35c000b4a
Update Galician translation
2020-08-17 16:47:55 +00:00
Baurzhan Muftakhidinov
29d7d652c4
Update Kazakh translation
2020-08-17 10:26:54 +00:00
Jakub Steiner
581f224b61
Merge branch 'wip/jimmac/error-labels-insensitive' into 'master'
...
Adwaita: error labels insensitive & backdrop states
See merge request GNOME/gtk!2449
2020-08-17 08:21:58 +00:00
Jakub Steiner
aabb713594
Adwaita: error labels insensitive & backdrop states
...
- address colored labels for the two states
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3063#note_891618
2020-08-17 10:00:29 +02:00
Piotr Drąg
a0af12e492
Update Polish translation
2020-08-16 11:56:23 +02:00
nana-4
19c2cc1296
placessidebar: Replace hard-coded margins with theme
...
So we can easily adjust the widget sizing in the theme.
2020-08-15 22:46:31 +09:00
nana-4
9b42edbef4
tooltip: Replace hard-coded margins with theme
...
So we can easily adjust the widget sizing in the theme.
2020-08-15 22:46:31 +09:00
Matthias Clasen
303e023c36
Merge branch 'gtkassistant_docstring' into 'master'
...
gtkassistant: Minor docstring wording changes
See merge request GNOME/gtk!2442
2020-08-15 12:49:29 +00:00
Timm Bäder
5e35ca5692
Merge branch 'slider-button-style-class-again' into 'master'
...
pathbar: Set .slider-button style class to slider buttons again
See merge request GNOME/gtk!2443
2020-08-15 10:49:02 +00:00
nana-4
667b3b117d
pathbar: Set .slider-button style class to slider buttons again
...
This was set in the .ui file that no longer exists, so we need to set it
again here.
2020-08-15 18:31:32 +09:00
Holger Knust
cb7c903594
gtkassistant: Minor docstring wording changes
...
Changed the wording to improve the clarity of the documentation. Fixed grammar issue ("spllited")
2020-08-15 05:20:03 -04:00
Matthias Clasen
e6e2d6b45a
Merge branch 'gdk-internal-cleanup' into 'master'
...
Gdk internal cleanup
See merge request GNOME/gtk!2438
2020-08-14 13:00:13 +00:00
Matthias Clasen
fa0a88ae22
Merge branch 'api-touchups' into 'master'
...
Api touchups
See merge request GNOME/gtk!2439
2020-08-14 12:47:50 +00:00
Jakub Steiner
17cdc13847
Merge branch 'wip/jimmac/error-entries-and-labels' into 'master'
...
Adwaita: error labels and entries
See merge request GNOME/gtk!2440
2020-08-14 12:42:56 +00:00
Florentina Mușat
d40d4d5fae
Update Romanian translation
2020-08-14 12:16:01 +00:00
Jakub Steiner
131e2f6e43
Adwaita: error labels and entries
...
See https://gitlab.gnome.org/GNOME/gtk/-/issues/3063
2020-08-14 14:13:37 +02:00
Matthias Clasen
b3786b7b07
gdk: Slim down gdkinternals.h more
...
Move things to the private headers they belong in.
2020-08-14 07:45:53 -04:00
Matthias Clasen
6cf8f1cdf2
gdk: Move GdkSurfaceTypeHint to its sole user
...
The x11 backend is the only place where surface
type hints are used in any way. Move the enum
there.
2020-08-14 07:45:53 -04:00
Matthias Clasen
79c2c3e353
win32: Drop vestigial surface type hint field
...
This wasn't used in any way.
2020-08-14 07:45:53 -04:00
Matthias Clasen
ae7cefd97d
Drop style class defines
...
We document the supported style classes by name,
not by macro name, and these macros don't really
add any value. Drop them for GTK 4.
2020-08-14 07:03:27 -04:00
Matthias Clasen
35708162cc
Make GtkNativeInterface private
...
We are not sure yet if allowing out-of-tree
implementations of GtkNative are a good idea.
2020-08-14 07:03:27 -04:00
Piotr Drąg
e29e569d6f
Update POTFILES.skip
2020-08-14 12:16:51 +02:00
Matthias Clasen
3d7343144f
wayland: Drop unused surface type hint field
...
This wasn't used at all.
2020-08-13 22:24:06 -04:00
Matthias Clasen
3c44e9c563
gdk: Slim down gdkinternals.h
...
Move things to the private headers they belong in.
2020-08-13 22:24:06 -04:00
Matthias Clasen
8a13d18655
Drop gdk_device_get_position
...
Convert the last user to _gdk_device_query_state
and drop this unused internal api.
2020-08-13 22:24:06 -04:00
Matthias Clasen
9786185cc0
gdk: Clean up gdkdevice.h
...
This header looked just too disorderly.
Same for gdkdevicetool.h.
2020-08-13 22:24:06 -04:00
Matthias Clasen
22ac6d3148
gdk: Documentation touchups
...
Minor rewordings here and there, strip nonpublic
functions of doc comments, deemphasize logical/physical
devices.
2020-08-13 22:24:06 -04:00
Matthias Clasen
97e0f1108d
docs: Cosmetics
2020-08-13 22:24:06 -04:00
Matthias Clasen
0ae7f794a3
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Fix the builder demo
See merge request GNOME/gtk!2437
2020-08-13 23:44:58 +00:00
Matthias Clasen
15bd2a2a5c
Merge branch 'fix_expander_demo' into 'master'
...
fix resource not found in expander demo
See merge request GNOME/gtk!2436
2020-08-13 23:08:09 +00:00
Matthias Clasen
28c1e74220
docs: Minor tweaks to the tutorial
...
Fix a link, and mention meson in a few places.
2020-08-13 17:45:04 -04:00
Matthias Clasen
e694a4137c
examples: Fix multiple small problems
...
Add a paragraph about running the example apps
uninstalled in the README, and verify that the
standalone Makefiles actually work. Hint: some
didn't.
2020-08-13 17:30:47 -04:00
Matthias Clasen
005f9a995e
gtk-demo: Fix the builder demo
...
The about dialog here wasn't working.
At the same time, make the statusbar
useful for something by showing our
action messages there.
2020-08-13 17:19:59 -04:00
Matthias Clasen
e48a1d2df0
Merge branch 'list-styles' into 'master'
...
Implement and document list styles
See merge request GNOME/gtk!2421
2020-08-13 21:15:22 +00:00
Matthias Clasen
6191404656
Merge branch 'async-highlight' into 'master'
...
gtk-demo: Async highlight
See merge request GNOME/gtk!2435
2020-08-13 21:15:09 +00:00
Ahmed Eldemery
6037d08bd8
fix resource not found in expander demo
2020-08-13 22:46:38 +02:00
Matthias Clasen
bcc5e475fc
gtk-demo: Do markup parsing incrementally too
...
Pango has a markup parser api, might as well
use it to keep things responsive.
2020-08-13 16:33:16 -04:00
Matthias Clasen
a0cdb544ed
gtk-demo: Fix the Windows build
2020-08-13 16:33:16 -04:00
Matthias Clasen
80cddd4cc1
gtk-demo: Move the highlighting to a separate file
...
Move all the logic related to asynchronous highlighting
to fontify.c, to keep main.c from becoming too cluttered.
2020-08-13 16:33:16 -04:00
Jakub Steiner
f4561d3fd5
Adwaita: rich-list rows
...
- add whitespace to match the existing look
2020-08-13 16:30:22 -04:00
Jakub Steiner
c5963b960a
Adwaita: fix focus for .navigation-sidebar
2020-08-13 16:30:22 -04:00
Jakub Steiner
df4c57c001
flatpak: builder options
...
- avoid vulkan from crashing the inspector
2020-08-13 16:30:22 -04:00
Matthias Clasen
2b0e9542cb
gtk-demo: take off the makeup
...
Remove all the hardcoded spacing from the listbox
demo, so the rich-list styling can take effect.
2020-08-13 16:30:22 -04:00
Matthias Clasen
b49fd47276
Adwaita: Fix hover in navigation sidebars
...
The placessidebar gets this from somewhere else, but
it wasn't working in the gtk-demo sidebar, so add it
explicitly. placessidebar specific styles should be
dropped from Adwaita as much as possible, but not
doing that here.
2020-08-13 16:30:22 -04:00
Jakub Steiner
bdb1d87859
Adwaita: style rich-list and data-table
...
- style special list types
- add navigation-sidebar too
https://gitlab.gnome.org/GNOME/gtk/-/issues/2929
2020-08-13 16:30:22 -04:00
Matthias Clasen
d1b1b5bd9b
widget-factory: Use rich-list style
...
Use the .rich-list style for the listbox on page 2.
2020-08-13 16:30:22 -04:00
Matthias Clasen
283fc9d7e4
gtk-demo: Use style classes in the listbox demo
...
Add a .rich-list style class to the controls demo.
2020-08-13 16:30:22 -04:00
Matthias Clasen
d8753a9fa3
gtk-demo: Use style classes in the settings demo
...
Use .navigation-sidebar on the left, and .data-table
on the right.
2020-08-13 16:30:22 -04:00
Matthias Clasen
a9858c6662
gtk-demo: Use a style class on the sidebar
...
Use .navigation-sidebar for the main sidebar.
2020-08-13 16:30:21 -04:00
Matthias Clasen
0279e1c76b
inspector: Use the new list style classes
...
Set .rich-list and .data-table on lists, as appropriate.
2020-08-13 16:30:21 -04:00
Matthias Clasen
cce3ff6f04
placessidebar: Use the .navigation-sidebar style class
2020-08-13 16:30:21 -04:00
Matthias Clasen
221786dda3
lists: Mention list style classes in docs
...
Document that GtkListView, GtkColumnView and GtkListBox
support .rich-list, .navigation-sidebar and .data-table
style classes.
2020-08-13 16:30:21 -04:00
Matthias Clasen
aacb06dbee
gtk-demo: Insert markup incrementally
...
The slowest step of highlighting our buffers is
inserting the markup into the buffer. Do that
incrementally, to avoid blocking the UI for
extended periods.
2020-08-13 12:59:52 -04:00
Matthias Clasen
ea887959bd
textbuffer: Some more insert_with_attributes speedup
...
There is no need for use to collect tags in an array;
we can just insert them into the text buffer right away.
2020-08-13 12:36:39 -04:00
Matthias Clasen
4c78f628db
gtk-demo: Fontify asynchronously
...
Run highlight asynchronously. It isn't a problem for
most demos, but the cursor demo has an unusually large
ui file, which takes highlight a little bit of time
to produce.
2020-08-13 12:25:38 -04:00
Emmanuele Bassi
0228c89011
Merge branch 'openbsd-roaring' into 'master'
...
OpenBSD: don't include malloc.h
See merge request GNOME/gtk!2434
2020-08-13 16:23:20 +00:00
Antoine Jacoutot
b4508be3c9
OpenBSD: don't include malloc.h
...
This header doesn't exist anymore on recent OpenBSD releases.
2020-08-13 17:48:34 +02:00
Matthias Clasen
dded2ddb21
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2433
2020-08-13 12:08:54 +00:00
Matthias Clasen
e9afb63a01
widget-factory: Add more error states
...
Add a label with the .error style class in the
configuration dialog, also add another entry validation
here, to have it in one place.
2020-08-13 07:40:54 -04:00
Daniel Mustieles
3a0fdffe5e
Updated Spanish translation
2020-08-13 10:41:42 +02:00
Daniel Mustieles
ff51d7b838
Updated Spanish translation
2020-08-13 10:34:43 +02:00
Daniel Mustieles
ef22c4a4fa
Updated Spanish translation
2020-08-13 10:34:33 +02:00
Matthias Clasen
ebaf533a31
Merge branch 'matthiasc/for-master' into 'master'
...
Speed up gtk_text_buffer_insert_markup
See merge request GNOME/gtk!2432
2020-08-13 03:40:22 +00:00
Matthias Clasen
88dcd2597a
Speed up gtk_text_buffer_insert_markup
...
Instead of blindly creating new tags for every attribute,
reuse existing tags. For the syntax highlighting of the
ui file of the cursors demo, this gets us down from
20.000 tags to 6.
2020-08-12 22:51:59 -04:00
Matthias Clasen
0d0807fc44
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Group small images
See merge request GNOME/gtk!2431
2020-08-13 01:07:36 +00:00
Matthias Clasen
7226878916
gtk-demo: Group small images
...
Instead of showing 30 tabs, put all the cursor images
into one page. Do the same for the small images in
the css animated background demo.
2020-08-12 20:26:15 -04:00
Fran Dieguez
afa9d9aa8c
Update Galician translation
2020-08-12 22:40:19 +00:00
Matthias Clasen
28a3911b15
Merge branch 'matthiasc/for-master' into 'master'
...
widget-factory: Add an entry with error state
See merge request GNOME/gtk!2430
2020-08-12 21:14:54 +00:00
Matthias Clasen
94696490dc
widget-factory: Add an entry with error state
...
Enter the wrong thing into the age entry for seeing
error states.
2020-08-12 13:26:46 -04:00
Matthias Clasen
dbc6a94daf
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2429
2020-08-12 10:51:17 +00:00
Matthias Clasen
0a9acd10d2
gtk-demo: Celebrate losses too
...
Everybody is a winner!
2020-08-11 23:26:06 -04:00
Matthias Clasen
3340a5ee04
gtk-demo: Visual improvement to solitaire
...
Make the fields visible.
2020-08-11 23:10:48 -04:00
Matthias Clasen
5e2aeee9b0
gtk-demo: Add a layout manager demo
...
This is more or less a copy of the layout manager
example from clutter.
2020-08-11 23:10:48 -04:00
Matthias Clasen
9b0a5b1fde
Add sizes to toplevelsize warnings
...
Might as well be informative while we're annoying.
2020-08-11 16:27:03 -04:00
Matthias Clasen
540cffee89
gtk-demo: Drop the pixbufs demo
...
It is from a different era, and doesn't show
the apis we want to promote. The visuals live
on, in the Css/Animated Backgrounds demo.
2020-08-11 16:26:04 -04:00
Matthias Clasen
e0b95c6234
Merge branch 'wip/smcv/roaring-license' into 'master'
...
Add attribution and licensing information for "roaring bitmaps" code
See merge request GNOME/gtk!2408
2020-08-11 16:02:25 +00:00
Yuri Chornoivan
40c32bbef6
Update Ukrainian translation
2020-08-11 15:58:16 +00:00
Timm Bäder
d0b192325a
Merge branch 'afranke-master-patch-25531' into 'master'
...
Fix a string
See merge request GNOME/gtk!2428
2020-08-11 14:26:23 +00:00
Alexandre Franke
e16d108b68
Fix a string
2020-08-11 14:05:58 +00:00
Emin Tufan Çetin
f8b8c90c3d
Update Turkish translation
2020-08-10 22:29:47 +00:00
Matthias Clasen
823219d429
Merge branch 'button-claim-clicks' into 'master'
...
button: Claim click events
Closes #3054
See merge request GNOME/gtk!2425
2020-08-10 22:24:50 +00:00
Matthias Clasen
102acd2581
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3058
See merge request GNOME/gtk!2427
2020-08-10 21:45:09 +00:00
Matthias Clasen
82253d1a0a
gtk-demo: Give the video player a default size
2020-08-10 16:36:36 -04:00
Matthias Clasen
19b93fc9f7
gtk-demo: Add a file filter for the video player
...
We are only interested in video files here.
2020-08-10 16:36:36 -04:00
Matthias Clasen
e9d03d06fe
window: Fix an oversight
...
Commit 658719a205 moved the call to
gtk_window_compute_default_size() outside the
if (priv->needs_default_size)
but unfortunately, that function cleared that field,
so we never entered the branch.
Keep the setting of priv->needs_default_size in the
branch, where it belongs.
2020-08-10 16:36:36 -04:00
Matthias Clasen
63fb2126db
gtk-demo: Make the image demo more robust
...
Make sure we don't crash if the demo is closed
early.
Fixes : #3058
2020-08-10 16:35:56 -04:00
Matthias Clasen
90080d5bec
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2426
2020-08-10 17:46:37 +00:00
Matthias Clasen
be5b03224c
gtk-demo: Give the video player a default size
2020-08-10 12:53:41 -04:00
Matthias Clasen
091289a85d
gtk-demo: Add a file filter for the video player
...
We are only interested in video files here.
2020-08-10 12:53:41 -04:00
Matthias Clasen
17710709f9
window: Fix an oversight
...
Commit 658719a205 moved the call to
gtk_window_compute_default_size() outside the
if (priv->needs_default_size)
but unfortunately, that function cleared that field,
so we never entered the branch.
Keep the setting of priv->needs_default_size in the
branch, where it belongs.
2020-08-10 12:53:41 -04:00
Matthias Clasen
6fafc8b811
button: Claim click events
...
This fixes issues with double activation on clicks.
Fixes : #3054
2020-08-09 22:58:22 -04:00
Matthias Clasen
bc20fe3cca
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Add a little extra in peg solitaire
Closes #3051
See merge request GNOME/gtk!2424
2020-08-10 01:10:41 +00:00
Matthias Clasen
8cbca4f693
print-editor: Icon credits
...
Give the artist credits.
2020-08-09 20:30:00 -04:00
Matthias Clasen
6e9de7f271
node-editor: Don't install the icon
...
We don't want to install an icon if we're not
installing the app. Also give the artist credit.
Fixes : #3051
2020-08-09 20:28:56 -04:00
Matthias Clasen
aa1b9531c1
gtk-demo: Add a little extra in peg solitaire
...
A win needs to be celebrated!
2020-08-09 18:59:29 -04:00
Matthias Clasen
66fa530574
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3027
See merge request GNOME/gtk!2423
2020-08-09 22:46:50 +00:00
Matthias Clasen
e5247b7cbb
gtk-demo: Finish peg solitaire demo
...
The restart button was simply not implemented.
While we are at it, make the pegs a bit bigger,
so clicking them is easier.
2020-08-09 18:27:18 -04:00
Matthias Clasen
da0955feeb
gtk-demo: Cosmetic fixes to the textmask demo
...
Make this come up with the right size.
2020-08-09 18:05:27 -04:00
Matthias Clasen
2335953c5d
gtk-demo: Cosmetic fixes for the fontrendering demo
...
Make this look a bit less thrown together.
2020-08-09 18:02:04 -04:00
Matthias Clasen
42902085e5
gtk-demo: Dark theme support for dnd demo
...
Add minimal dark theme support to the dnd demo,
by picking suitable default colors for our items.
2020-08-09 17:36:41 -04:00
Matthias Clasen
230107cd84
gtk-demo: Cosmetic improvements to the expander demo
...
Set the textview up like our other readonly textviews.
Also sneak in a little easter egg.
2020-08-09 17:12:04 -04:00
Matthias Clasen
b69dc3d054
gtk-demo: Add warnings to the themes demo
...
Add a warning that the flickering here may be
hazardous to photosensitive viewers.
2020-08-09 16:36:00 -04:00
Matthias Clasen
a85fc0008c
wayland: Don't send invalid anchor rectangles
...
When we send an anchor rectangle with a width or
height of 0, mutter reponds with "Invalid anchor
rectangle size". So, don't do that.
This was seen as sudden disappearance of gtk4-demo
when you click the fishbowl benchmark all the way
through to the menubuttons.
Fixes : #3027
2020-08-09 16:02:25 -04:00
Matthias Clasen
2bf9ae005f
Adwaita: Small improvement for dropdown
...
Put some space between the arrow and the text.
This was noticable in the new listbox2 demo.
2020-08-09 15:43:46 -04:00
Matthias Clasen
4650f7ec14
gtk-demo: Cosmetic improvement to listbox2 demo
...
Make the checkbutton and the check align vertically.
2020-08-09 15:43:01 -04:00
Asier Sarasua Garmendia
5dd0262a56
Update Basque translation
2020-08-09 19:39:35 +00:00
Christian Kirbach
b13e1a5a7b
Update German translation
2020-08-09 19:05:18 +00:00
Matthias Clasen
ce1cd67fa4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2422
2020-08-09 17:11:18 +00:00
Matthias Clasen
eb5329d389
gtk-demo: Group the listbox demos
2020-08-09 12:36:06 -04:00
Matthias Clasen
5b41612f28
gtk-demo: Add another listbox demo
...
This is a more typical listbox use.
2020-08-09 12:36:06 -04:00
Matthias Clasen
473ed75ed5
Adwaita: be careful with list separators
...
We only want the list .separators class to affect its
immediate children - otherwise, we end up with separators
in dropdowns that are places into button strips. As a side
benefit, restricting this to immediate children makes for
faster matching.
2020-08-09 12:01:08 -04:00
Matthias Clasen
3760d44f18
gtk-demo: Fix an indentation mishap
2020-08-09 11:14:28 -04:00
Matthias Clasen
79f0687929
gtk-demo: Drop the modelbutton demo
...
Not a public api, so shouldn't be featured in a demo.
2020-08-09 10:59:22 -04:00
Matthias Clasen
c80a612af7
gtk-demo: Improve filtering
...
Show sidebar rows if any parent matches. This lets one
search for "lists" and get just the subtree with all the
listview demos.
2020-08-09 10:54:45 -04:00
Emin Tufan Çetin
358b698efa
Update Turkish translation
2020-08-09 08:19:33 +00:00
Matthias Clasen
0f7b2159b6
Merge branch 'demo-polish' into 'master'
...
Demo polish
See merge request GNOME/gtk!2420
2020-08-09 04:28:31 +00:00
Matthias Clasen
7f565806a8
gtk-demo: Make source formatting uniform
...
Give the text view in the source tab the same
formatting as tabs we add for extra sources.
2020-08-09 00:03:43 -04:00
Matthias Clasen
1d49f933e9
gtk-demo: Adapt hightlighting style for dark themes
...
Switch to a highlight style that is readable with
dark background, if prefer-dark is set or we are
in HighContrastInverse.
2020-08-08 23:50:45 -04:00
Matthias Clasen
1d1d9de09e
gtk-demo: Cosmetics
2020-08-08 23:41:50 -04:00
Matthias Clasen
d1aacc01d4
gtk-demo: Make content views monospace
...
That works better for code.
2020-08-08 23:41:05 -04:00
Matthias Clasen
2a3d3ec079
gtk-demo: Follow font settings again
...
highlight puts font and size information into
its pango markup; strip that out to make our
text follow font settings again.
2020-08-08 23:38:07 -04:00
Matthias Clasen
c60fba0267
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3048
See merge request GNOME/gtk!2419
2020-08-08 23:08:44 +00:00
Matthias Clasen
75ad180c78
textutil: Do a little better on retro X servers
...
When running on a non-composited, non-rgba X server
(such as Xnest), force the drag icons for text selections
to have a background, so we don't end up with black
text on black background.
Fixes : #3048
2020-08-08 18:33:56 -04:00
Matthias Clasen
765fe201ce
inspector: Avoid a crash
...
I've seen the inspector crash when running on an
X server without an xsettings manager around. Better
be safe.
2020-08-08 18:33:56 -04:00
Matthias Clasen
3469c639f6
bookmarksmanager: Load bookmarks initially
...
This was broken in 1e6171a4a7 .
2020-08-08 18:33:56 -04:00
Matthias Clasen
d642bfc8ce
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3037 and #3030
See merge request GNOME/gtk!2417
2020-08-08 19:13:44 +00:00
Matthias Clasen
c6a7b39ee1
Remove deprecation guards around gtk_window_present
...
It is not deprecated anymore.
2020-08-08 14:49:50 -04:00
Matthias Clasen
112883186c
gtk-demo: Fix iconscroll complex text
...
We changed the way fontify works.
Adapt the iconscroll use.
2020-08-08 14:38:18 -04:00
Matthias Clasen
57a213a4ea
gtk-demo: Fix iconscroll colors
...
We changed the way the color grid works.
Adapt the iconscroll use of it.
Fixes : #3030
2020-08-08 14:36:48 -04:00
Matthias Clasen
dbbc9b5c58
placessidebar: Fix dnd cancellation
...
When the drag is canceled by being dropped outside,
we get a ::cancel emission, that we want to handle
just like ::dnd-finished.
Fixes : #3037
2020-08-08 14:26:31 -04:00
Matthias Clasen
e18de295c6
placessidebar: Fix the bookmark drag icon
...
Just use the widget; a paintable only works if the
widget it is based on actually gets drawn, the
clone we create here wasn't.
2020-08-08 14:24:45 -04:00
Matthias Clasen
4eaf08e964
placessidebar: Fix bookmarks dnd
...
We were not handling drops of bookmarks correctly,
leading to criticals during DND.
Fixes : #3037
2020-08-08 14:11:29 -04:00
Matthias Clasen
2d5b44703c
placessidebar: We're not a listbox anymore
...
The placessidebar used to derive from GtkListBox,
but it doesn't anymore. There was one case leftover,
leading to criticals during bookmark DND.
2020-08-08 14:11:29 -04:00
Matthias Clasen
19c6ef38fe
bookmarksmanager: Load bookmarks initially
...
This was broken in 1e6171a4a7 .
2020-08-08 14:11:29 -04:00
Matthias Clasen
4f5e3b7b0d
gtk-demo: Improve an error message
...
Be more helpful when we can't do syntax highlighting.
2020-08-08 13:56:17 -04:00
Simon McVittie
95cd8c1eb9
Move roaring bitmaps code to gtk/roaring/ and add a README
...
As suggested by Matthias Clasen on gtk!2408. This keeps the
Apache-licensed stuff together.
As per the discussion on gtk!2408 and gtk!2409, replacing this with
upstream CRoaring is specifically not supported by the GTK maintainers.
Signed-off-by: Simon McVittie <smcv@debian.org >
2020-08-08 18:30:41 +01:00
Simon McVittie
dfb16019f8
Include a copy of the Apache license
...
4(a) requires giving recipients of the work a copy of the license, and
in any case it's best for source code distributions to be self-contained
(including the full text of all applicable licenses).
Signed-off-by: Simon McVittie <smcv@debian.org >
2020-08-08 18:27:37 +01:00
Simon McVittie
bef86d48af
roaring.[ch]: Add attribution and licensing information
...
OS distributions that take copyright and licensing seriously will tend
to become concerned about source files that appear to come from a
third party and do not come with copyright/licensing information,
and stating that these files are modified is required by clause 4(b)
of the Apache license.
Signed-off-by: Simon McVittie <smcv@debian.org >
2020-08-08 18:27:37 +01:00
Matthias Clasen
d1d269ea6b
Merge branch 'patch-1' into 'master'
...
Correct typos in gtktextbtree.c
See merge request GNOME/gtk!2413
2020-08-08 17:05:25 +00:00
Matthias Clasen
3d807f4b00
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #3047 , #3034 , #3038 , and #3036
See merge request GNOME/gtk!2416
2020-08-08 16:27:27 +00:00
Matthias Clasen
9654fff6e0
Merge branch 'scroll-to-cursor' into 'master'
...
Scroll to cursor after canceling a selection
Closes #2960
See merge request GNOME/gtk!2321
2020-08-08 16:18:19 +00:00
Matthias Clasen
8a67899e0f
bookmarksmanager: Ignore delete events
...
Surpisingly, when a monitored file gets atomically replaced
with g_file_set_contents(), the file monitor reports a
DELETED event for the temp file, which is not the file
I'm monitoring.
Just ignore DELETED events.
Fixes : #3036
2020-08-08 11:48:32 -04:00
Matthias Clasen
bb30a23004
x11: Fix getting the primary monitor
...
Actually return the primary monitor.
Fixes : #3038
2020-08-08 11:48:32 -04:00
Matthias Clasen
3faa7feb7c
label: Disable unavailable actions
...
Fixes : #3034
2020-08-08 11:48:32 -04:00
Matthias Clasen
d099276b89
printeditor: Create the dialog every time
...
Trying to work around gtk_show_about_dialog() is
not worth it, just recreate the dialog from scratch.
2020-08-08 11:48:32 -04:00
Matthias Clasen
56afa05b97
widgetfactory: Create the dialog every time
...
Trying to work around gtk_show_about_dialog() is
not worth it, just recreate the dialog from scratch.
Fixes : #3047
2020-08-08 11:48:32 -04:00
Matthias Clasen
c6fdfeae7e
about dialog: remove unnecessary guards
...
We decided to undeprecate gtk_window_present,
so no deprecation guards needed.
2020-08-08 11:48:32 -04:00
Matthias Clasen
8725fd308b
Merge branch 'surface-size' into 'master'
...
Surface size
See merge request GNOME/gtk!2415
2020-08-08 14:44:52 +00:00
Emmanuele Bassi
c40e23bde6
Merge branch 'wip/smcv/cloudprint-redundant-decls' into 'master'
...
cloudprint: Fix redundant declarations
See merge request GNOME/gtk!2414
2020-08-08 13:59:37 +00:00
Simon McVittie
afcb9c0e63
cloudprint: Fix redundant declarations
...
G_DEFINE_DYNAMIC_TYPE declares these functions as static, and
-Werror=redundant-decls won't let us redeclare them. This is the
equivalent of 72c72d0b , but for a different backend.
Signed-off-by: Simon McVittie <smcv@debian.org >
2020-08-08 14:24:31 +01:00
Matthias Clasen
fd1033f974
surface: Add width and height properties
2020-08-08 09:24:30 -04:00
Matthias Clasen
16505a4d1e
gdk: Move the ::popup-layout-changed signal
...
Move this signal from GdkSurface to GtkPopup,
where it belongs.
2020-08-08 09:24:30 -04:00
Piotr Drąg
a1ec68422f
Update POTFILES.in and POTFILES.skip
2020-08-08 13:07:18 +02:00
Felix Yan
f8060b859d
Correct typos in gtktextbtree.c
2020-08-08 09:29:08 +00:00
Matthias Clasen
0c0ced1374
Merge branch 'activatable-colorswatch-style' into 'master'
...
Adwaita: Limit color swatch's hover effect to .activatable
See merge request GNOME/gtk!2411
2020-08-08 03:09:30 +00:00
Matthias Clasen
bfd8c5383f
Merge branch 'wip/chergert/popover-offset' into 'master'
...
popover: allow setting popup layout offset
See merge request GNOME/gtk!2412
2020-08-08 02:41:04 +00:00
Christian Hergert
4d88e3af17
popover: allow setting popup layout offset
...
Currently there is no way to alter the offset of the popup when positioning
with GdkPopupLayout. This makes using the popup difficult for scenarios
like completion windows where you may need to offset the window by a given
amount for aligning text.
gtk_popover_set_offset() allows setting these values and are analagous to
the function of the same name for GdkPopupLayout.
2020-08-07 17:10:52 -07:00
nana-4
b694771728
colorbutton: Remove .activatable style class from the color swatch
...
The button itself is activatable, but its color swatch is not.
2020-08-08 08:37:33 +09:00
nana-4
51d6ec5131
Adwaita: Limit color swatch's hover effect to .activatable
...
Non-activatable color swatches shouldn't have the interactive effect.
2020-08-08 08:33:38 +09:00
Efstathios Iosifidis
7625ccd6fa
Update Greek translation
2020-08-07 20:41:27 +00:00
Matthias Clasen
95e2a2b4b3
Merge branch 'leak-fixes' into 'master'
...
Leak fixes
See merge request GNOME/gtk!2406
2020-08-07 20:29:02 +00:00
Matthias Clasen
4e774eddb9
Merge branch 'wip/chergert/fix-textview-yrange-invalidation' into 'master'
...
linedisplaycache: improve invalidation with y_range
See merge request GNOME/gtk!2407
2020-08-07 20:17:22 +00:00
Christian Hergert
35325ea11a
linedisplaycache: improve invalidation with y_range
...
When we invalidate a y_range using the common pattern of y==0 and
old_height==new_height, we are generally invalidating the entire buffer.
This short-circuits that case to just invalidate the buffer in a faster
and more complete form. The problem here appears to be that we can't
always calculate the ranges properly to invalidate because validation
has not run far enough.
2020-08-07 12:44:26 -07:00
Matthias Clasen
5673310364
textbuffer: Fix a leak
...
gtk_text_buffer_insert_markup was leaking all the tags
that it inserts.
2020-08-07 15:26:11 -04:00
Matthias Clasen
2d72ba21ce
gtk-demo: Don't leak the markup
2020-08-07 15:19:33 -04:00
Matthias Clasen
e0786a4a00
gtk-demo: Fix a memory leak
...
The colors demo was leaking a reference to its model.
This was showing up as crash when you manage to close
both the demo window and the main window while the
sorting is ongoing.
2020-08-07 15:15:18 -04:00
Matthias Clasen
0b21883518
toplevel: Revise docs wording a bit
...
The documentation of ::compute-size didn't quite
keep up with the changes in the MR. Fix it up.
2020-08-07 14:56:42 -04:00
Matthias Clasen
1ccab92813
Merge branch 'matthias/fix-min-size' into 'master'
...
Matthias/fix min size
See merge request GNOME/gtk!2404
2020-08-07 18:46:24 +00:00
Matthias Clasen
f6d9e15c16
window: Don't set min_size > size
...
This fixes the failing reftest.
2020-08-07 13:55:02 -04:00
Jakub Steiner
cd0b9a2359
Merge branch 'wip/jimmac/vte-bg-color' into 'master'
...
Wip/jimmac/vte bg color
Closes vte#226
See merge request GNOME/gtk!2403
2020-08-07 17:16:14 +00:00
Jakub Steiner
96500816bc
Adwaita: add public color for text views
...
- define @text_view_bg to complement @theme_text_color for high
contrast legible text views.
Fixes https://gitlab.gnome.org/GNOME/vte/-/issues/226
2020-08-07 18:58:32 +02:00
Jakub Steiner
9d60047616
Adwaita: force circular imagebuttons to be square
...
Addresses https://gitlab.gnome.org/GNOME/gnome-clocks/-/merge_requests/123#note_884741
2020-08-07 18:57:45 +02:00
Matthias Clasen
a95012caa3
Check sanity of toplevel sizes
...
Emit a warning when sizes returned in GdkToplevelSize
don't look sane. This is the case in the failing
reftest.
2020-08-07 12:45:19 -04:00
Matthias Clasen
51d55e4fbc
Merge branch 'demo-highlighting' into 'master'
...
gtk-demo: Modernize source highlighting
See merge request GNOME/gtk!2401
2020-08-07 16:21:55 +00:00
Matthias Clasen
05255bfc90
gtk-demo: Modernize source highlighting
...
Drop the homegrown highlighting code, and just use highlight
to produce Pango markup.
When using an external highlighter, we can also highlight css,
xml, headers, at least.
2020-08-07 11:54:10 -04:00
Matthias Clasen
41ef2c5f34
Merge branch 'wip/dont-leak-toplevel-present-callback' into 'master'
...
wayland/toplevel: Don't leak wl_callback used during present()
See merge request GNOME/gtk!2399
2020-08-07 12:58:05 +00:00
Matthias Clasen
4dfd413e0b
Merge branch 'wip/oholy/gtkmountoperation-newline' into 'master'
...
gtkmountoperation: Drop the new line character when splitting a message
See merge request GNOME/gtk!2397
2020-08-07 12:51:46 +00:00
Jonas Ådahl
6724d4250f
wayland/toplevel: Don't leak wl_callback used during present()
2020-08-07 14:01:16 +02:00
Matthias Clasen
8cd2f615ad
Merge branch 'wip/fix-wayland-toplevel-present-callback' into 'master'
...
Fix Wayland toplevel present callback issues
Closes #3026
See merge request GNOME/gtk!2395
2020-08-07 11:56:30 +00:00
Ondrej Holy
517a34bdc8
gtkmountoperation: Drop the new line character when splitting a message
...
When asking for a password, the message string is split on primary
and secondary if it contains a newline character. However, the newline
character is currently part of both strings, which creates weird
spacing between the GtkLabels. I suppose this is bug, which was not
visible as in most cases (if not all) the message string hasn't
contained the new line characters so far. But we are going to change
that now, see GNOME/gvfs!82 . Let's drop the new line character similarly
as it is done when asking for a question, or showing processes in order
to fix the weird spacing.
2020-08-07 10:37:19 +02:00
Jonas Ådahl
658719a205
gtk/window: Fix min size calculation
...
It should always use "preferred" size, not any remembered or otherwise
computed one, otherwise we won't be able to shrink to the preferred size.
2020-08-07 10:18:32 +02:00
Jonas Ådahl
c27f811462
wayland/surface: Destroy toplevel present callback if ignored
...
We might break the loop early, e.g. if we're unmapped before the round
trip finishes, and to avoid the callback to write to invalid stack
memory, destroy the callback so it won't be invoked.
Fixes : #3026
2020-08-07 09:06:21 +02:00
Jonas Ådahl
3590923c8b
wayland/surface: Fix toplevel present roundtrip condition
...
We should round trip until we both have received callback and have
ensured we received the initial configuration.
2020-08-07 09:06:21 +02:00
Matthias Clasen
1b7004ffc7
Merge branch 'about-polish' into 'master'
...
About polish
See merge request GNOME/gtk!2394
2020-08-07 02:35:09 +00:00
Matthias Clasen
85c713127e
aboutdialog: Make margins more uniform
...
Use similar margins in the Credits and System tabs.
2020-08-06 22:18:14 -04:00
Matthias Clasen
87a8fda163
demos: Brush up about dialogs
...
Show OS info, and generally polish this here and there.
2020-08-06 22:17:36 -04:00
Matthias Clasen
79e6269058
Merge branch 'gtk-demo-leaks' into 'master'
...
Gtk demo leaks
See merge request GNOME/gtk!2393
2020-08-07 01:36:34 +00:00
Matthias Clasen
6cf04c505f
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2392
2020-08-07 01:16:11 +00:00
Matthias Clasen
14900efe38
gtk-demo: Plug a big memory leak
...
The colors demo was leaking all its colors. Oops.
2020-08-06 21:14:11 -04:00
Matthias Clasen
04c3c659f5
gtk-demo: Plug a small memory leak
...
The settings demo was leaking a GtkBuilderScope.
2020-08-06 21:13:39 -04:00
Benjamin Otte
8557aaf327
demo: fix memleak
2020-08-07 02:53:21 +02:00
Benjamin Otte
052962a760
treeview: Use gtk_snapshot_append_border()
...
No need to construct the node manually.
2020-08-07 02:52:22 +02:00
Benjamin Otte
278fbcbbb4
demo: Don't crash when closing words demo
...
Make sure the stringlist we're loading into doesn't go away.
It'd be better to have a cancellable, but I'm lazy.
2020-08-07 02:52:22 +02:00
Matthias Clasen
26542778f7
Merge branch 'dnd-leaks' into 'master'
...
Dnd leaks
See merge request GNOME/gtk!2391
2020-08-07 00:34:38 +00:00
Matthias Clasen
a712ffa2ab
widgetpaintable: Clear an idle in dispose
...
We were not removing the pending_update idle
in dispose, which is at least suspicious, if
not deadly. Move the idle cleanup code into
unset_widget(), which we are already calling
in dispose().
2020-08-06 20:02:33 -04:00
Matthias Clasen
12450cfcef
wayland: Don't leak content formats
...
We were not unreffing the formats here.
2020-08-06 20:02:33 -04:00
Matthias Clasen
71373ff6fb
drop: Don't leak the surface and formats
2020-08-06 20:02:33 -04:00
Matthias Clasen
1fa9261fe3
contentdeserializer: Add some missing annotations
2020-08-06 20:02:33 -04:00
Matthias Clasen
c212dd4ec0
Merge branch 'scroll-compression-leak' into 'master'
...
Fix a leak in scroll event compression
See merge request GNOME/gtk!2390
2020-08-06 23:56:56 +00:00
Matthias Clasen
2ae1f40da2
Merge branch 'cairo-node-leak' into 'master'
...
gsk: Don't leak cairo nodes
See merge request GNOME/gtk!2389
2020-08-06 23:33:20 +00:00
Matthias Clasen
0c82aa314c
Fix a leak in scroll event compression
...
We were leaking the last event in a sequence
of scroll events.
2020-08-06 19:31:38 -04:00
Matthias Clasen
9e5ddeaa8a
gsk: Don't leak cairo nodes
...
Not chaining up in finalize is a leak, after all.
2020-08-06 18:35:41 -04:00
Matthias Clasen
4e3251872c
Merge branch 'focus-workaround' into 'master'
...
gridview: Work around unexpected focus changes
See merge request GNOME/gtk!2387
2020-08-06 19:31:24 +00:00
Matthias Clasen
c13d70479b
gridview: Work around unexpected focus changes
...
As things currently stand, we get events for focus changes
before the widget is allocated, and try to scroll in response.
Therefore, leaving n_columns at 0 until size-allocate leads
to plenty of division-by-zero. Just set it to 1 initially
to avoid that. This is a workaround for #3025 .
2020-08-06 14:35:19 -04:00
Matthias Clasen
ecd50891ff
Merge branch 'toplevel-size-declaration' into 'master'
...
gdk/toplevel: fix declarations of GdkToplevelSize
See merge request GNOME/gtk!2386
2020-08-06 14:43:28 +00:00
Andreas Persson
71cec2ef5d
gdk/toplevel: fix declarations of GdkToplevelSize
...
GDK_AVAILABLE_IN_ALL was missing from gdk_toplevel_size_get_bounds and
gdk_toplevel_size_set_max_size was declared though it doesn't exist.
2020-08-06 16:14:10 +02:00
Emmanuele Bassi
83e9b5b408
Merge branch 'rsvg-check' into 'master'
...
Specify version for optional librsvg dependency
See merge request GNOME/gtk!2385
2020-08-06 12:35:19 +00:00
Andreas Persson
f4a6a99b7c
Specify version for optional librsvg dependency
...
The testsvg test uses a method in librsvg that was introduced in
2.46.0. The test is now skipped if the librsvg version is too old.
(It was previously already skipped if librsvg wasn't found.)
2020-08-06 14:02:02 +02:00
Matthias Clasen
dd0c364938
Merge branch 'matthiasc/for-master' into 'master'
...
testsvg: Some additions
See merge request GNOME/gtk!2383
2020-08-06 04:15:01 +00:00
Matthias Clasen
2eec82c32a
testsvg: Some additions
...
Load a file from the commandline, and implement
intrinsic width/height.
2020-08-05 23:53:29 -04:00
Matthias Clasen
9212d95b0f
Merge branch 'svg-viewer' into 'master'
...
Add an svg test
See merge request GNOME/gtk!2382
2020-08-06 03:44:18 +00:00
Matthias Clasen
29ba8f0819
Add an svg test
...
tests/testsvg is a minimal paintable implementation wrapped
around RsvgHandle.
2020-08-05 23:22:03 -04:00
Matthias Clasen
8f7edb8a7d
Merge branch 'fix-puzzle-keynav' into 'master'
...
Fix puzzle keynav
Closes #3023
See merge request GNOME/gtk!2381
2020-08-06 02:00:05 +00:00
Matthias Clasen
dcf37412c1
gtk-demo: Fix keynav in the puzzle demo
...
Fixes : #3023
2020-08-05 20:52:22 -04:00
Matthias Clasen
d6c35ab02f
NEWS: Updates
2020-08-05 20:38:22 -04:00
Matthias Clasen
66df338087
Merge branch 'wip/carlosg/stop-spinbutton-stop' into 'master'
...
Let spinbuttons stop
Closes #3016
See merge request GNOME/gtk!2380
2020-08-05 22:42:41 +00:00
Christoph Reiter
d1718355cd
Merge branch 'msys2-ccache-setup-first' into 'master'
...
CI: move ccache setup before building anything
See merge request GNOME/gtk!2379
2020-08-05 22:05:25 +00:00
Carlos Garnacho
bb3675b3c7
gtkspinbutton: Claim button gestures when starting to spin
...
The gesture should be acknowledged by the spin button, in order to
guarantee it will also receive the button release.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3016
2020-08-06 00:01:34 +02:00
Carlos Garnacho
36711b6691
gtkbutton: Don't claim gesture till emission
...
That means waiting till button release.
2020-08-06 00:01:18 +02:00
Carlos Garnacho
dc8adcda0e
gtkgesture: ::cancel if a claimed sequence goes denied
...
The regular paths just emit ::end, which isn't the whole thing.
This gives an opportunity to gestures that are stolen the sequence
to clean themselves up.
2020-08-06 00:01:18 +02:00
Matthias Clasen
883a43ddd7
Merge branch 'wip/chergert/fix-anchored-cleanup' into 'master'
...
textview: properly remove anchored widgets
Closes #3021
See merge request GNOME/gtk!2378
2020-08-05 21:49:42 +00:00
Christian Hergert
5ff2b8535f
textview: properly remove anchored widgets
...
Fixes #3021
2020-08-05 14:08:07 -07:00
Matthias Clasen
750f9917e3
Merge branch 'gdk-doc-cleanup' into 'master'
...
docs: Clean up dangling links in gdk docs
See merge request GNOME/gtk!2377
2020-08-05 20:21:18 +00:00
Christoph Reiter
e77d82eaac
CI: move ccache setup before building anything
...
otherwise glib/pango end up in the wrong cache dir
2020-08-05 21:58:46 +02:00
Matthias Clasen
4babdcd662
Merge branch 'fontrendering-demo-fix' into 'master'
...
gtk-demo: Make fontrendering demo work more than once
Closes #3019
See merge request GNOME/gtk!2375
2020-08-05 19:54:34 +00:00
Matthias Clasen
f5b0cab5cf
Merge branch 'ci-git-build-test' into 'master'
...
CI: msys2: build glib/pango master manually before gtk
Closes #3002
See merge request GNOME/gtk!2376
2020-08-05 19:53:28 +00:00
Matthias Clasen
1d7b273669
docs: Clean up dangling links in gdk docs
...
Clean up references to no-longer-existing APIs.
2020-08-05 15:45:43 -04:00
Christoph Reiter
774d431525
CI: msys2: build glib/pango master manually before gtk
...
The win toolchain has problems linking meson subprojects to libgtk.
To work around that build glib/pango from git and install them first
as long as the installed version is too old at least.
Fixes #3002
2020-08-05 21:35:38 +02:00
Matthias Clasen
845afdbcd8
Merge branch 'fix-aspect-frame' into 'master'
...
aspectframe: Fix use in ui files
Closes #3020
See merge request GNOME/gtk!2374
2020-08-05 18:46:11 +00:00
Matthias Clasen
b58bad557b
gtk-demo: Make fontrendering demo work more than once
...
We weren't cleaning up properly, causing the window
to not close the second time it is opened.
Fixes : #3019
2020-08-05 14:36:54 -04:00
Matthias Clasen
6dfd92b191
aspectframe: Fix use in ui files
...
GtkAspectFrame code assumes that its child will be in
self->child, but that is only the case if we arrange
for <child> in ui files to end up calling
gtk_aspect_frame_set_child(). Therefore, implement
GtkBuildable.
Fixes : #3020
2020-08-05 14:05:47 -04:00
Matthias Clasen
d7c4f93c76
Merge branch 'wip/compute-size' into 'master'
...
Compute size via signal
See merge request GNOME/gtk!2325
2020-08-05 16:19:19 +00:00
Matthias Clasen
0b0f7dc9c0
Merge branch 'inspector-settings-crash' into 'master'
...
inspector: Stop showing settings bindings
Closes #3015
See merge request GNOME/gtk!2373
2020-08-05 16:13:52 +00:00
Matthias Clasen
df19049dde
inspector: Stop showing settings bindings
...
We were playing fast-and-loose with private GIO data
when showing settings bindings in the property editor,
and this was causing crashes.
We can show this information again if GIO ever gets
api to introspect it.
Fixes : #3015
2020-08-05 11:11:58 -04:00
Matthias Clasen
edc2adbb5b
Merge branch 'fix-solid-csd' into 'master'
...
Adwaita: Reduce the solid csd borders
Closes #2997
See merge request GNOME/gtk!2372
2020-08-05 14:13:21 +00:00
Jonas Ådahl
2ff74eb667
gdk/toplevel: Negotiate surface size via a compute-size signal
...
GTK will not up front know how to correctly calculate a size, since it
will not be able to reliably predict the constraints that may exist
where it will be mapped.
Thus, to handle this, calculate the size of the toplevel by having GDK
emitting a signal called 'compute-size' that will contain information
needed for computing a toplevel window size.
This signal may be emitted at any time, e.g. during
gdk_toplevel_present(), or spontaneously if constraints change.
This also drops the max size from the toplevel layout, while moving the
min size from the toplevel layout struct to the struct passed via the
signal,
This needs changes to a test case where we make sure we process
GDK_CONFIGURE etc, which means we also needs to show the window and
process all pending events in the test-focus-chain test case.
2020-08-05 15:49:00 +02:00
Matthias Clasen
cfd3651003
Merge branch 'matthiasc/for-master' into 'master'
...
testborderdrawing: Don't crash on exit
See merge request GNOME/gtk!2370
2020-08-05 12:48:41 +00:00
Matthias Clasen
7c252e3830
Merge branch 'gradient-hard-stop-test' into 'master'
...
Add a reftest for gradients with hard stops
See merge request GNOME/gtk!2371
2020-08-05 12:48:30 +00:00
Matthias Clasen
d44d9ad40d
Adwaita: Reduce the solid csd borders
...
Reduce the borders we draw ourselves for solid csd
to 1 pixel. It still doesn't look great, but at least
it doesn't look outright broken.
Fixes : #2997
2020-08-05 08:47:00 -04:00
Matthias Clasen
9c8bceb691
testborderdrawing: Don't crash on exit
2020-08-05 08:19:07 -04:00
Matthias Clasen
21a1413bf3
Add a reftest for gradients with hard stops
...
This is testing the issue described in #1293 .
No fix though, this is still broken in Vulkan.
It works correctly in GL and with cairo.
2020-08-05 08:10:35 -04:00
Matthias Clasen
8870ec5e7b
Merge branch 'hex-color-parse' into 'master'
...
Hex color parse
Closes #2931
See merge request GNOME/gtk!2356
2020-08-05 11:46:55 +00:00
Matthias Clasen
c46f262d6e
Merge branch 'master.win32' into 'master'
...
Another round of fixes for GDK/Win32
See merge request GNOME/gtk!2369
2020-08-05 11:31:52 +00:00
Chun-wei Fan
edc1c28236
GdkGLContext: Drop gdk_gl_context_has_[framebuffer_blit|frame_terminator]()
...
gdk_gl_context_has_framebuffer_blit() and gdk_gl_context_has_frame_terminator()
were only used by by GDK/Win32, and they do not provide performance advantages
in GTK master, so clean up the code a bit by dropping them.
2020-08-05 18:56:57 +08:00
Chun-wei Fan
f454c6f9d0
testsuite/gsk: Only run Broadway tests if enabled
...
We may not have enabled building the broadway renderer for our build, so don't
run the broadway renderer tests unless it is enabled.
2020-08-05 16:23:14 +08:00
Chun-wei Fan
cf5a6a003a
testsuite: Setup tests env by platform
...
Check whether we really have x11 and wayland enabled before we try to setup the
tests to use these respective GDK backends, and only attempt to setup tests
running with the Broadway backend if it has been enabled.
Also, add a setup for running tests with the GDK-Win32 backend on Windows, for
builds that target Windows.
2020-08-05 16:23:14 +08:00
Chun-wei Fan
d2291abe2a
gdksurface-win32.c: Fix resizing
...
Use gdk_surface_get_geometry() to get the correct x and y coordinates of the
window that we are resizing, so that the window does not reposition itself
automatically at the top-left corner at resizing as we to used hard-code the x
and y coordinates to 0.
2020-08-05 16:23:14 +08:00
Chun-wei Fan
5ce0098adc
gdkvulkancontext-win32.c: Implement ->begin_frame()
...
By doing so, we ensure that resizes of windows will work on Vulkan renderer, by
first calling gdk_win32_surface_handle_queued_move_resize() before we proceed
as usual
2020-08-05 16:23:14 +08:00
Chun-wei Fan
46a8a3fe31
gdk[cairo|gl]context-win32.c: Use gdk_win32_surface_handle_queued_move_resize()
...
Use the shared function that was added in the previous commit, to simplify
things.
Also make gdk_win32_surface_get_queued_window_rect() and
gdk_win32_surface_apply_queued_move_resize() back into static functions, since
they are now used only by the code in gdksurface-win32.c
2020-08-05 16:23:14 +08:00
Chun-wei Fan
c6ada2a329
gdksurface-win32.c: Add function to handle queued moves/resizes
...
Since we need to deal with queued moves and resizes in the Cairo, GL and Vulkan
draw contexts, and the logic involved in all three of these are largely
similar, add a function gdk_win32_surface_handle_queued_move_resize() that will
handle this, which will be shared between these three types of draw contexts.
2020-08-05 16:23:12 +08:00
Fran Dieguez
a7d665f28b
Update Galician translation
2020-08-05 07:56:11 +00:00
Chun-wei Fan
69bb4f8beb
GDK-Win32: Move some functions around
...
Move gdk_win32_surface_get_queued_window_rect() and
gdk_win32_surface_apply_queued_move_resize() to gdksurface-win32.c, since these
functions are not only used for Cairo draw contexts, but is also used for GL
draw contexts, and will be used for Vulkan draw contexts.
2020-08-05 15:38:08 +08:00
Chun-wei Fan
06f28af80f
gdksurface-win32.c: Fix Aerosnap computation
...
Don't get the default display when we compute the Aerosnap region, but instead
get it from the underlying GdkSurface that we are using for the computation.
Also, don't unref the monitors that we obtain from the display in the wrong
place, which was why we had crashes whenever we triggered AeroSnap code (and we
are actually not supposed to do that as they are owned by the GdkDisplay that
is owned by the GdkSurface we are using), and this will eliminate lots of
criticals that are spewed as a result.
2020-08-05 15:38:08 +08:00
Matthias Clasen
e60d6f70bf
Merge branch 'drop-accel-label' into 'master'
...
Drop accel label
See merge request GNOME/gtk!2368
2020-08-05 03:44:43 +00:00
Matthias Clasen
9126132e42
Merge branch 'docs-cleanup' into 'master'
...
Docs cleanup
See merge request GNOME/gtk!2367
2020-08-05 03:17:06 +00:00
Matthias Clasen
8562c623d3
Drop GtkAccelLabel
...
We no longer use this widget anywhere.
2020-08-04 23:05:18 -04:00
Matthias Clasen
2b8aeed4d8
Drop GtkCallback
...
It is no longer used in any of our public APIs.
2020-08-04 22:24:33 -04:00
Matthias Clasen
ce89f1eda1
selectionfiltermodel: Drop a leftover symbol
...
We decided not to do new_for_type() for list model
wrappers, so this function does not exist.
2020-08-04 22:11:34 -04:00
Matthias Clasen
f561000124
docs: Clean up many dangling links
...
In many cases, these were references to no longer
existing api, so some rewording was necessary.
2020-08-04 22:11:34 -04:00
Matthias Clasen
93c9600145
docs: Drop GtkPlacesSidebar from visual index
...
No longer a public widget.
2020-08-04 19:31:22 -04:00
Fran Dieguez
31726cdc95
Update Galician translation
2020-08-04 22:12:01 +00:00
Matthias Clasen
39eeb2a723
Merge branch 'try-to-fix-xvfb-in-ci' into 'master'
...
ci: Pass -noreset to Xvfb
See merge request GNOME/gtk!2366
2020-08-04 16:56:12 +00:00
Matthias Clasen
a06339fb48
ci: Pass -norest to Xvfb
...
This may help with the sporadic "No display" failures
we are seeing when running tests under X11 in ci.
2020-08-04 11:59:32 -04:00
Matthias Clasen
0e1afbbdad
Merge branch 'popoverflow' into 'master'
...
popover: Set overflow: hidden
Closes #3012
See merge request GNOME/gtk!2365
2020-08-04 15:47:50 +00:00
Matthias Clasen
a42738729b
Merge branch 'a11y-crash' into 'master'
...
A11y crash
Closes #3014
See merge request GNOME/gtk!2364
2020-08-04 15:47:36 +00:00
Matthias Clasen
d6e352e862
popover: Set overflow: hidden
...
This keeps overlay scrollbars from wrecking our
nice rounded corners.
Fixes : #3012
2020-08-04 11:10:49 -04:00
Matthias Clasen
f7eb5f8897
a11y: Don't do unnecessary work
...
Only serialize all the attributes if we are actually
going to print them.
2020-08-04 11:02:00 -04:00
Matthias Clasen
7398323b82
scrolledwindow: Fix a11y support code
...
This error was introduced by me in 971ee2d28a
and causes a crash in the scrolling benchmark in gtk-demo.
Fixes : #3014
2020-08-04 11:00:32 -04:00
Jonas Ådahl
4ee82e8175
gdk/toplevel: Fix typo in documentation
2020-08-04 16:53:10 +02:00
Jonas Ådahl
cebe469898
gtk/window: Don't remember size from GdkSurface
...
If we're maximized, and try to remember the non-maximized size, we'd
still get the maximized size.
2020-08-04 15:04:24 +02:00
Florentina Mușat
bbb15f65a7
Update Romanian translation
2020-08-04 11:23:33 +00:00
Matthias Clasen
b3a874c4d1
Merge branch 'modern-doc-shooter' into 'master'
...
Modern doc shooter
See merge request GNOME/gtk!2363
2020-08-04 11:22:07 +00:00
Matthias Clasen
f49d267187
docs: Add a gallery image for GtkDropDown
2020-08-04 00:33:37 -04:00
Matthias Clasen
2c306f75c4
docs: Add a gallery image for GtkEditableLabel
2020-08-04 00:26:51 -04:00
Matthias Clasen
d7cd28c641
docs: Add gallery image for GtkPasswordEntry
2020-08-04 00:19:08 -04:00
Matthias Clasen
92cb629640
docs: Avoid focus in gallery images
...
Seeing focus rectangles and selections in these
images is a distraction, and we used to avoid it.
Bring that back.
2020-08-04 00:18:30 -04:00
Matthias Clasen
1492e8cf0e
docs: Improve the gallery image for scales
2020-08-04 00:18:30 -04:00
Matthias Clasen
0ae46040a4
docs: Add gallery images for some more widgets
...
This adds GtkPicture, GtkVideo, GtkMediaControls.
2020-08-04 00:18:30 -04:00
Matthias Clasen
1d1e1a0068
docs: Regenerate widget gallery images
2020-08-04 00:18:30 -04:00
Matthias Clasen
1e3df88ee0
docs: Redo the doc shooter code
...
Steal snapshotting code from the reftests to
make this work again.
Other changes here: catch up with container removal.
2020-08-04 00:18:30 -04:00
Matthias Clasen
e818e98187
Merge branch 'pagesetup-leftover' into 'master'
...
Pagesetup leftover
See merge request GNOME/gtk!2362
2020-08-04 03:47:13 +00:00
Matthias Clasen
b4050482ec
Merge branch 'doc-links' into 'master'
...
Doc links
See merge request GNOME/gtk!2361
2020-08-04 00:35:40 +00:00
Matthias Clasen
942a90cd64
pagesetupdialog: Fix leftover tree model code
...
This was overlooked when the rest of the dialog
was ported to use list models.
2020-08-03 20:25:00 -04:00
Matthias Clasen
20c1fb0a0a
docs: Tweak documentation for list widgets
...
Fix numerous cases of : vs :: for signal references,
add some more details here and there.
2020-08-03 18:43:25 -04:00
Matthias Clasen
7972dc8776
docs: Unify docs around incremental operations
...
Sync up the wording around incremental filtering
and sorting to be more similar.
2020-08-03 18:43:25 -04:00
Matthias Clasen
7cb0dd9039
docs: Fix signal references
...
It is :: for signals, : for properties, | for actions.
2020-08-03 18:43:25 -04:00
Matthias Clasen
a5058c605f
docs: Fix typos
2020-08-03 18:43:21 -04:00
Matthias Clasen
70b0bdd5e3
docs: Tell pandoc we need Docbook4
...
gtk-doc assumes Docbook4, with <ulink> and so on.
Without this, all the links in markdown are converted
to <link xlink:href=...> and then lost in the docbook->html
conversion.
2020-08-03 16:53:44 -04:00
Matthias Clasen
2d72cd00e3
docs: Fix a typo
2020-08-03 16:53:32 -04:00
Yuri Chornoivan
95a533e8e1
Update Ukrainian translation
2020-08-03 17:02:11 +00:00
Matthias Clasen
0eb36cb823
Merge branch 'patch-1' into 'master'
...
show: remove obsolete comment
See merge request GNOME/gtk!2359
2020-08-03 16:22:19 +00:00
Alex
c8d51a7b98
show: remove obsolete comment
...
g_app_info_launch_default_for_uri supports x-scheme-handler directly since at least 2.27.1, released almost 10 years ago.
Link: https://bugzilla.gnome.org/show_bug.cgi?id=631410
Link: 9b262f1c5f
2020-08-03 15:36:36 +00:00
Matthias Clasen
c77600f1e9
Merge branch 'treeview-editing' into 'master'
...
treeview: Don't react to clicks on cell editables
Closes #3008
See merge request GNOME/gtk!2358
2020-08-03 12:28:20 +00:00
Matthias Clasen
64b8d8b3e4
ci: Update subprojects
...
Otherwise, we end up stuck on old checkouts, and
bumping requirements lets to build failures.
2020-08-03 08:11:03 -04:00
Matthias Clasen
83682d919f
treeview: Don't react to clicks on cell editables
...
We need to let these pass through, otherwise we
interfere with the entries that are used for editing.
Fixes : #3008
2020-08-03 07:51:09 -04:00
Matthias Clasen
6ed1cd63b6
Merge branch 'filechoosernative-docs' into 'master'
...
docs: Introspect GtkFileChooserNative info
Closes #2799
See merge request GNOME/gtk!2357
2020-08-03 11:09:03 +00:00
Matthias Clasen
cb320849de
docs: Introspect GtkFileChooserNative info
...
We were missing gtk_file_chooser_native_get_type
in gtk4.types.in, causing introspected info to not
be included.
Fixes : #2799
2020-08-03 00:13:10 -04:00
Matthias Clasen
9659d3f78a
Merge branch 'applaunch-warning' into 'master'
...
x11: Ignore stray DestroyNotify events
Closes #3006
See merge request GNOME/gtk!2355
2020-08-03 03:30:59 +00:00
Matthias Clasen
1f3327d326
rgba: Use pango_color_parse_with_alpha
...
Use this newly exported pango function, so we
can support hex colors with alpha like #rrggbbaa.
Fixes : #2931
2020-08-02 23:30:33 -04:00
Matthias Clasen
15325fe546
Bump the pango dependency
...
Require pango 1.45.5, so we can use pango_color_parse_with_alpha.
2020-08-02 23:30:33 -04:00
Matthias Clasen
4152e90e7e
x11: Ignore stray DestroyNotify events
...
There's no use in making a delete event with a
NULL surface. Just ignore such events.
Fixes : #3006
2020-08-02 22:45:28 -04:00
Matthias Clasen
c211fdcf42
Merge branch 'fishbowl-crash' into 'master'
...
Fishbowl crash
Closes #2996 and #3003
See merge request GNOME/gtk!2352
2020-08-03 02:19:01 +00:00
Matthias Clasen
af63893377
Merge branch 'search-demo-fixes' into 'master'
...
Search demo fixes
Closes #3004
See merge request GNOME/gtk!2354
2020-08-03 02:18:41 +00:00
Matthias Clasen
3304df7042
Merge branch 'tagged-entry-demo' into 'master'
...
gtk-demo: Simplify the tagged entry demo
Closes #3005
See merge request GNOME/gtk!2353
2020-08-03 02:18:28 +00:00
Matthias Clasen
df85ef1754
gtk-demo: Fix cleanup of search entry demo
...
We can't use the ::destroy signal anymore; use
a weak ref instead, and make ensure the entry
stays around long enough for us to finish the
cleanup.
Fixes : #3004
2020-08-02 21:53:59 -04:00
Matthias Clasen
a7e25f2c73
gtk-demo: Make search progress visible again
...
Set a progress fraction, so that the pulsing progress
in the search entry demo is actually visible.
2020-08-02 21:47:21 -04:00
Matthias Clasen
1c583edfb7
Merge branch 'font-explorer-crash' into 'master'
...
gtk-demo: Avoid invalid OpenType feature tags
Closes #2962
See merge request GNOME/gtk!2351
2020-08-03 01:40:51 +00:00
Matthias Clasen
89c10e092a
Merge branch 'emoji-insert-fix' into 'master'
...
textview: Make insert-emoji replace the selection
Closes #2996
See merge request GNOME/gtk!2350
2020-08-03 01:40:43 +00:00
Matthias Clasen
4bdd94fd3f
gtk-demo: Simplify the tagged entry demo
...
No need for an intermediate box widget here;
we can just use a box layout. As a side-effect,
this fixes the theme to apply to the selection.
Fixes : #3005
2020-08-02 21:39:23 -04:00
Matthias Clasen
5a55f6ff7b
gdk: Fix gdk_surface_get_layout_monitor
...
We are determining the monitor by maximizing the
intersection; that only works if our rectangle
is not empty.
Fixes : #3003
2020-08-02 21:29:18 -04:00
Matthias Clasen
af07cfea5f
gtk-demo: Avoid invalid OpenType feature tags
...
ss00 doesn't exist, and we use xxxx as placeholder
for 'default' choices in alternatives. Add a warning
in case we run across invalid OpenType feature tags
in fonts.
Fixes : #2962
2020-08-02 21:13:37 -04:00
Matthias Clasen
348a38a876
textview: Make insert-emoji replace the selection
...
This is the expected behavior, and matches what
GtkText does.
Fixes : #2996
2020-08-02 20:48:14 -04:00
Matthias Clasen
0d98bab82b
Merge branch 'filechooser-completions' into 'master'
...
filechooser: Prevent over-eager completions
Closes #2995
See merge request GNOME/gtk!2347
2020-08-03 00:23:28 +00:00
Matthias Clasen
992c5fade7
Merge branch 'wip/chergert/gtk4-textview-fix-selections' into 'master'
...
textlinedisplaycache: short-circuit y_range invalidation
Closes #2975
See merge request GNOME/gtk!2348
2020-08-03 00:23:13 +00:00
Matthias Clasen
75d09d5ab3
Merge branch 'fix-win32-ci' into 'master'
...
ci: Don't use --werror for the win32 build
See merge request GNOME/gtk!2349
2020-08-03 00:19:43 +00:00
Matthias Clasen
1c49371edf
ci: Don't use --werror for the win32 build
...
This leads to warnings from the glib win32 build
failing our ci. Only use werror for gtk itself.
2020-08-02 19:59:25 -04:00
Christian Hergert
94d17a6809
textlinedisplaycache: short-circuit y_range invalidation
...
If we have a y==-1 then we are generally invalidating the whole textview.
For this case, we can just discard the entire GtkTextLineDisplay cache.
Fixes #2975
2020-08-02 16:35:50 -07:00
Matthias Clasen
9605e49fbf
filechooser: Prevent over-eager completions
...
We don't want the completions to pop up after we call
gtk_file_chooser_set_current_name(). This used to be
handled by gtk_entry_set_text() blocking the completion
signal handler. We don't have that anymore, so block
popup completion around the call to gtk_editable_set_text()
instead.
Fixes : #2995
2020-08-02 19:18:11 -04:00
Matthias Clasen
43816ba8d9
Merge branch 'grid-api' into 'master'
...
grid layout: Rename some properties
Closes #2967
See merge request GNOME/gtk!2345
2020-08-02 23:17:40 +00:00
Matthias Clasen
71be1751c6
builder-tool: Rewrite top/left-attach
...
Rewrite the GtkGrid:top/left-attach child properties
to the GtkGridLayoutChild:row/column layout properties.
Update expected test output to match.
2020-08-02 17:58:03 -04:00
Matthias Clasen
ed13e6a41e
grid layout: Rename some properties
...
Rename GtkGridLayoutChild:left-attach/top-attach to
GtkGridLayoutChild:column/row. Update all users.
Fixes : #2967
2020-08-02 17:58:03 -04:00
Matthias Clasen
7fe7d5ab4f
Merge branch 'fix-textiter-tests' into 'master'
...
textbuffer: Fix a test failure
See merge request GNOME/gtk!2346
2020-08-02 21:55:43 +00:00
Matthias Clasen
4340f75304
textbuffer: Fix a test failure
...
The previous change to gtktextbuffer.c was breaking
the textiter testcase.
2020-08-02 17:23:26 -04:00
Matthias Clasen
0add626822
textbuffer: Be careful with tags when copying
...
We can only insert tags in the buffer if they come
from the same GtkTextTagTable as the buffer uses.
If that is not the case, paste the text without tags.
Fixes : #2991
2020-08-02 13:54:06 -04:00
Matthias Clasen
793ea05f4a
Merge branch 'text-drag-select' into 'master'
...
textview: Only claim the event when appropriate
Closes #2999
See merge request GNOME/gtk!2344
2020-08-02 17:45:30 +00:00
Matthias Clasen
638ea2d6fc
Merge branch 'fallback-menu-critical' into 'master'
...
popovermenu: Avoid a critical
Closes #2998
See merge request GNOME/gtk!2343
2020-08-02 17:42:22 +00:00
Matthias Clasen
c959f9c701
textview: Only claim the event when appropriate
...
Don't claim the event unconditionally for the click gesture,
since we may want to start a drag selection.
Fixes : #2999
2020-08-02 13:32:37 -04:00
Matthias Clasen
f8a303b0e5
popovermenu: Avoid a critical
...
While we guarantee that the widget that a controller
is attached to stays around while it is handling an event,
the same is not true for the root that the widget belongs
to. In corner cases (such as clicking "Close" in the
fallback window menu), it may already be gone.
Avoid a critical in that case.
Fixes : #2998
2020-08-02 13:09:00 -04:00
Matthias Clasen
ddda963f81
Merge branch 'selectable-label-draw' into 'master'
...
label: Redraw when focus changes
See merge request GNOME/gtk!2342
2020-08-02 16:40:12 +00:00
Matthias Clasen
9bf50e5650
Merge branch 'linked-button-fixes' into 'master'
...
Adwaita: Add linked styling for particular button widgets
Closes #2939 and #1903
See merge request GNOME/gtk!2339
2020-08-02 16:39:59 +00:00
Matthias Clasen
acc57ea799
Merge branch 'controllers-list' into 'master'
...
Controllers list
See merge request GNOME/gtk!2341
2020-08-02 16:25:50 +00:00
Matthias Clasen
1c8471c38f
label: Redraw when focus changes
...
When focus changes in a selectable label, we need to
redraw to make the text caret (dis)appear.
2020-08-02 12:11:38 -04:00
Matthias Clasen
17208ca7fa
Go back to keeping a list of event controllers
...
This reverts 4b9e5304cc . It caused a number of regressions,
such as event controller ordering changes.
2020-08-02 12:01:06 -04:00
Matthias Clasen
1c16cb751f
Revert "Add gtk_widget_prepend_controller"
...
This reverts commit 692cc42e10 .
2020-08-02 12:01:06 -04:00
Matthias Clasen
127612d213
Revert "entry completion: Make keynav work again"
...
This reverts commit 53a30eaa12 .
2020-08-02 12:01:06 -04:00
Matthias Clasen
4ad401f3fa
Merge branch 'matthiasc/for-master' into 'master'
...
shortcutswindow: Clear search entry on unmap
Closes #2981
See merge request GNOME/gtk!2340
2020-08-02 15:05:17 +00:00
Matthias Clasen
888a65c1fb
shortcutswindow: Clear search entry on unmap
...
Otherwise, the search term will linger around until
somebody clicks the search button again.
Fixes : #2981
2020-08-02 09:33:52 -04:00
Piotr Drąg
3d65178f37
Update Polish translation
2020-08-02 14:36:18 +02:00
nana-4
891027f0c3
Adwaita: Add linked styling for particular button widgets
...
Those button widgets need some special linked styling like what
combobox has.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1903
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2939
2020-08-02 19:14:26 +09:00
nana-4
5f00675de4
appchooserbutton: Set a CSS name
...
Otherwise it has a CSS name "widget".
2020-08-02 18:26:40 +09:00
Matthias Clasen
be03613e30
Merge branch 'ci-installed-tests' into 'master'
...
Run installed tests in ci
Closes #2966
See merge request GNOME/gtk!2335
2020-08-02 03:47:22 +00:00
Matthias Clasen
d17e51df06
Merge branch 'inspector-device-details' into 'master'
...
inspector: Introspect enum values
See merge request GNOME/gtk!2338
2020-08-02 03:25:33 +00:00
Matthias Clasen
5ecf1431f0
cups: Don't emit a warning if we can't talk to avahi
...
The g_warning in this case makes the templates test
fail if it can't connect to the system bus (as is the
case for running installed tests in ci).
2020-08-01 23:24:36 -04:00
Matthias Clasen
28a9fa2486
installed-tests: Fix the icontheme test
...
We forgot to install some of the icons, causing
the test to fail.
2020-08-01 23:24:36 -04:00
Matthias Clasen
7cf61e6a4b
ci: Add a build that runs installed tests
...
This will hopefully prevent regressions in
installed-tests.
2020-08-01 23:24:36 -04:00
Matthias Clasen
0d608c492d
inspector: Introspect enum values
...
Stop hardcoding arrays with names for enum values.
This has bitten us repeatedly as these enums were
changed around; time to stop doing it.
2020-08-01 23:05:24 -04:00
Matthias Clasen
7bc553a5cc
Merge branch 'label-copy-link-fix' into 'master'
...
Label copy link fix
See merge request GNOME/gtk!2337
2020-08-02 02:45:53 +00:00
Matthias Clasen
934946acfc
Merge branch 'matthiasc/for-master' into 'master'
...
testsuite: Fix installed tests
Closes #2966
See merge request GNOME/gtk!2336
2020-08-02 02:45:30 +00:00
Matthias Clasen
3a9b824ce5
ci: Use newer fedora image
...
v22 adds gnome-desktop-testing-runner and enables sudo.
2020-08-01 22:12:47 -04:00
Matthias Clasen
501b2b43ef
ci: Enable sudo in the image
...
This is needed so we can install what we built.
2020-08-01 22:12:08 -04:00
Matthias Clasen
aea253bc60
ci: Add gnome-desktop-testing to images
2020-08-01 22:12:08 -04:00
Matthias Clasen
4fed32315c
testsuite: Fix installed tests
...
This broken recently, when we converted the tests
array to a dictionary.
Fixes : #2966
2020-08-01 22:12:08 -04:00
Matthias Clasen
d19e60a40d
testsuite: Fix installed tests
...
This broken recently, when we converted the tests
array to a dictionary.
Fixes : #2966
2020-08-01 22:06:21 -04:00
Matthias Clasen
e0c7d7daeb
menusectionbox: Avoid a critical warning
...
The popover may already be gone when the item
is activated. Don't trigger a critical in that
case.
Related: #2986
2020-08-01 22:03:41 -04:00
Matthias Clasen
64ed69c56f
label: Be more selective when selecting on focus-in
...
We don't want to select on focus-in when the focus
comes from a child. The case where this does harm
is when you activate copy or paste actions from the
context menu. We close the menu before triggering the
action, and if that causes the text in the label to
be selected, unexpected things happen, since the action
applies to the current selection.
This is the equivalent of cd9f5733b3 for GtkLabel.
2020-08-01 22:01:52 -04:00
Matthias Clasen
2a962e1c9a
Merge branch 'glib-build-fix' into 'master'
...
togglebutton: Don't crash on click
See merge request GNOME/gtk!2334
2020-08-02 01:30:31 +00:00
Matthias Clasen
74662776d4
togglebutton: Don't crash on click
...
The code used to do
if (parent_class->clicked)
parent_class->clicked (...)
That is pointless because the parent_class never changes,
so there' no need for that if and commit 415946eb0f
took it out. Unfortunately, p arent_class->clicked is NULL
though, so the whole call needs to go.
2020-08-01 20:09:05 -04:00
Matthias Clasen
0b2833f69c
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #2980 , #2974 , #2949 , and #2766
See merge request GNOME/gtk!2333
2020-08-01 23:58:04 +00:00
Timm Bäder
41b458fba7
Fix and improve various code samples
2020-08-01 20:01:04 +02:00
Timm Bäder
f716daa483
aboutdialog: Fix a code sample
...
gdk_texture_new_from_file takes a GFile these days.
2020-08-01 19:30:31 +02:00
Timm Bäder
415946eb0f
togglebutton: Modernice source file
...
Make this a little less ancient looking.
2020-08-01 19:24:54 +02:00
Timm Bäder
65b79d2585
Avoid refering to old GtkContainer API in the docs
2020-08-01 15:34:59 +02:00
Timm Bäder
e976825342
button: Use g_object_notify_by_pspec()
2020-08-01 15:34:07 +02:00
Timm Bäder
b489a1f6b5
stack: Allow NULL names
...
Does this work?
2020-08-01 15:27:13 +02:00
Timm Bäder
2f65459fcc
stack: Only compare page names if the new page has one
2020-08-01 15:26:53 +02:00
Timm Bäder
f5af18738b
listbox: Add _append
...
To have easy replacement API for gtk_container_add.
2020-08-01 15:26:28 +02:00
Timm Bäder
b37b85333d
adwaita: Reset popover background in backdrop
...
Otherwise it inherits the generic background color from .background
Fixes #2766
2020-08-01 10:34:04 +02:00
Timm Bäder
76f2396764
popover: Use gtk_widget_add_css_class
2020-08-01 10:31:38 +02:00
Timm Bäder
547842e7f0
window: Keep titlebar after main child
...
Fixes #2949
2020-08-01 09:30:48 +02:00
Timm Bäder
ebaea07286
inspector: Avoid some failing casts
...
We might be inspecting a non-widget here, so can't just cast that.
2020-08-01 08:59:46 +02:00
Timm Bäder
0822de1971
textview: Only show "insert emoji" menu item if editable
...
Fixes #2974
2020-08-01 08:59:46 +02:00
Timm Bäder
954a144336
mediastream demo: Add a weak pointer to the window
...
Do what other demos do as well.
Fixes 2983
2020-08-01 08:59:46 +02:00
Timm Bäder
bf24da0d80
inspector: Add a type check
...
We only connect to this signal if sl->obejct is a GtkAccessible, so only
disconnect from it on the same condition.
Fixes #2980
2020-08-01 08:59:41 +02:00
Jordi Mas
d743e757ec
Update Catalan translation
2020-08-01 07:33:03 +02:00
Rico Tzschichholz
746a40bbfe
Merge branch 'ricotz/for-master' into 'master'
...
Add annotations to improve GIR API
See merge request GNOME/gtk!2332
2020-07-31 19:31:40 +00:00
Rico Tzschichholz
d1cab4fbdd
gtk: Add annotations to improve GIR API
2020-07-31 20:56:36 +02:00
Rico Tzschichholz
7a58a6a097
gsk: Add annotations to improve GIR API
2020-07-31 20:56:36 +02:00
Rico Tzschichholz
371cdf3250
gdk/x11: Add annotations to improve GIR API
2020-07-31 20:56:36 +02:00
Matthias Clasen
1087ff48f0
Merge branch 'glib-build-fix' into 'master'
...
widget: Drop unnecessary includes
See merge request GNOME/gtk!2328
2020-07-31 18:52:50 +00:00
Matthias Clasen
15982ab6d2
meson: Try to limit the damage
...
Try to teach meson not to build our subprojects with
-Werror, since that is just insane, and exposes us
to random build failures in subprojects.
2020-07-31 14:20:11 -04:00
Matthias Clasen
0dc6ee2c44
Merge branch 'dont-always-inline' into 'master'
...
gsk: Don't the always_inline function attribute
See merge request GNOME/gtk!2331
2020-07-31 17:39:22 +00:00
Matthias Clasen
f136a6f51f
testgtk: More GTimeVal eradication
2020-07-31 13:37:29 -04:00
Matthias Clasen
6ab13a6303
gsk: Don't the always_inline function attribute
...
Visual C doesn't understand it, and the compiler
should know better, anyway.
2020-07-31 13:13:46 -04:00
Matthias Clasen
358f66482d
Merge branch 'master.win32' into 'master'
...
Some improvements for GDK/Win32
See merge request GNOME/gtk!2327
2020-07-31 17:10:47 +00:00
Matthias Clasen
0d3fa01be2
Merge branch 'wip/carlosg/cursor-fallout' into 'master'
...
gdk: Fix toplevel calculation on pointer grab switch
Closes #2970
See merge request GNOME/gtk!2330
2020-07-31 17:10:05 +00:00
Matthias Clasen
e0d1aac8a5
Bump the glib dependency
...
Some of the new apis we want to use to avoid
deprecations were only introduced in 2.65.
2020-07-31 13:07:31 -04:00
Matthias Clasen
fc31f3d629
placesview: Keep up with GLib deprecations
...
We were using deprecated GBookmarkFile api here too.
2020-07-31 12:54:57 -04:00
Carlos Garnacho
9564cba492
gdk: Fix toplevel calculation on pointer grab switch
...
This check used to read if (grab || device_type != GDK_DEVICE_TYPE_PHYSICAL),
the grab check was only reserved to physical devices, which the current
pointer device definitely doesn't act like. So the condition was "fixed" the
wrong way around, and the latter check is now moot, so the condition should
really go away. We always want to check the new toplevel under the pointer
here.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2970
2020-07-31 18:53:01 +02:00
Matthias Clasen
90eec6734f
Merge branch 'cups-build-fix' into 'master'
...
Fix the build with cups < 2.3
Closes #2968
See merge request GNOME/gtk!2329
2020-07-31 16:33:46 +00:00
Matthias Clasen
72e14bd6dd
recentmanager: Keep up with GLib deprecations
...
All the time_t based apis in GBookmarkFile have
been deprecated; use GDateTime instead. This
changes a few GtkRecentManager APIs.
2020-07-31 12:18:47 -04:00
Matthias Clasen
99bb8bb3f7
numericsorter: Ignore deprecations
...
We use g_value_get_char here; replacing it with
g_value_get_schar is not entirely trivial, so just
ignore deprecations for now.
2020-07-31 11:36:03 -04:00
Matthias Clasen
ff42c94174
gtkicontheme: Stop using GTimeVal
...
It has been deprecated and the deprecation warnings
break our -Werror build in ci.
2020-07-31 11:22:16 -04:00
Chun-wei Fan
20388f83f5
GDK-Win32: Use SetProcessDpiAwarenessContext() where available
...
This allows us to use DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 for the
DPI awareness mode, which will help us to better support use cases with
multiple monitors. This is actualy a more advaned version of the
current PROCESS_PER_MONITOR_DPI_AWARE via using SetProcessDpiAwareness().
Note that this is not enabled by default, but also enabled via using
GDK_WIN32_PER_MONITOR_HIDPI, as in the PROCESS_PER_MONITOR_DPI_AWARE
case.
Note also, that appliation compatibility settings and DPI-awareness
manifests takes precedence over this API call, as before.
2020-07-31 23:20:25 +08:00
Chun-wei Fan
c97979873a
demos: Fix running on Visual Studio builds
...
We need to mark the non-static callback functions for export.
2020-07-31 23:20:25 +08:00
Chun-wei Fan
d6955d4427
gskrenderer.c: Default to the GL renderer on Windows too
...
Since we have now made the Win32 GL contexts share the global context as
the other backends have, we are more ready to use the GL renderer by
default on Windows as well.
Note that currently we can only enable this when not running on
OpenGL/ES as the OpenGL/ES shaders are not ready at this point, and the
OpenGL/ES support that we have from libANGLE does not support full
desktop OpenGL operations.
2020-07-31 23:20:14 +08:00
Chun-wei Fan
85706dc39d
gdkglcontext-win32.c: Create a global shared GL context
...
Like the other backends, we ought to create our WGL/EGL GL contexts like
the following:
"Create a global GL context that connects all GL contexts on a display
and lets us share textures between them."
2020-07-31 23:19:28 +08:00
Chun-wei Fan
07166a55ee
gdksurface-win32.c: Deal with modal and decoration props
...
Handle these cases, especially the modal case, which we did not handle
previously after the conversion to surface subtypes.
2020-07-31 23:19:28 +08:00
Matthias Clasen
2dfa5ac804
x11: Stop using GTimeVal
...
It has been deprecated, and that is breaking our
ci builds with -Werror.
2020-07-31 10:58:53 -04:00
Matthias Clasen
8c66e2ff66
widget: Drop unnecessary includes
...
We don't need to include gobjectnotifyqueue.c anymore,
since style properties are gone. This should fix the
build with -Werror.
2020-07-31 10:34:37 -04:00
Matthias Clasen
d761e3cf2c
Fix the build with cups < 2.3
...
PPD_CUSTOM_UNKNOWN was introduced in cups 2.3.
Only handle it when we build against a new enough cups.
Fixes : #2968
2020-07-31 10:01:45 -04:00
Florentina Mușat
360ffb8e87
Update Romanian translation
2020-07-31 13:42:35 +00:00
Yuri Chornoivan
731b672875
Update Ukrainian translation
2020-07-31 12:52:54 +00:00
Daniel Mustieles
d5a31daa41
Updated Spanish translation
2020-07-31 13:48:24 +02:00
Matthias Clasen
554954d126
3.99.0
2020-07-30 22:16:31 -04:00
Matthias Clasen
73477b5abf
testsuite: Use Wayland by default
...
I'm tired of xwayland crashing and killing my shell.
2020-07-30 22:16:31 -04:00
Matthias Clasen
62803c19f5
Merge branch 'focus-active' into 'master'
...
Focus active
Closes #2390
See merge request GNOME/gtk!2324
2020-07-30 17:50:54 +00:00
Matthias Clasen
643d873f47
eventcontrollerkey: Update im focus when active window changes
...
Use the new GTK_CROSSING_ACTIVE crossing events to update
the im context focus when the window becomes active or
inactive. IBus requires this, since it has only a single,
global focus location.
Fixes : #2390
2020-07-30 13:23:45 -04:00
Matthias Clasen
b0d40403e1
window: Emit GTK_CROSSING_ACTIVE crossing events
...
Emit crossing events when the active window changes.
We don't want to emit GTK_CROSSING_FOCUS events, since
every window has its own focus location (focus does not
jump from window to window), so we use the new
GTK_CROSSING_ACTIVE type of crossing event for this.
2020-07-30 13:22:26 -04:00
Matthias Clasen
12170acf46
Define GTK_CROSSING_ACTIVE
...
Document the different crossing event kinds that we use,
and add GTK_CROSSING_ACTIVE. We are going to use it in
the future when the active window changes.
2020-07-30 13:21:28 -04:00
Matthias Clasen
38648855b0
Merge branch 'wip/carlosg/more-device-api-cleanup' into 'master'
...
More device API cleanup
See merge request GNOME/gtk!2323
2020-07-30 17:01:15 +00:00
Carlos Garnacho
96452a2e46
gdk: Rename gdk_seat_get_physical_devices() to gdk_seat_get_devices()
...
We don't want to tell what they are, and the distinction is now less
clear. Remove the adjective from the function name.
2020-07-30 18:44:40 +02:00
Carlos Garnacho
46eb054337
gdk: Drop gdk_device_get_device_type()
...
There is no longer a hierarchy of devices, or none that is seen
on the outside.
2020-07-30 18:44:40 +02:00
Carlos Garnacho
4a2050e220
gdk/x11: Make device type a X11 detail
...
The only legit uses of device types are here in gdk/x11, move the
concept of device type to X11, so we can drop it from public API.
2020-07-30 18:30:13 +02:00
Carlos Garnacho
3c68db8e47
gdk: Make gdk_device_list_physical_devices() private
...
Physical devices should probably be accounted internally in gdk/x11,
make this out of private API so at least the implementation details
don't leak.
2020-07-30 18:30:13 +02:00
Carlos Garnacho
9912c80d70
gdk: Drop gdk_device_get_associated_device()
...
Devices are no longer associated like this, the seat should be used
to resolve queries on other devices.
2020-07-30 18:30:13 +02:00
Carlos Garnacho
2f792396d7
gtkimcontext: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:30:13 +02:00
Carlos Garnacho
6730b26b43
gtktextview: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:30:13 +02:00
Carlos Garnacho
6e83d1f54e
gtkwindowhandle: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:19:44 +02:00
Carlos Garnacho
fb9db7fede
gtkdragsource: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:19:44 +02:00
Carlos Garnacho
7991032aeb
gdk/x11: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:19:44 +02:00
Carlos Garnacho
0cbc857ea4
gdk/win32: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:17:42 +02:00
Carlos Garnacho
398c1d1ad7
gdk/macos: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:17:42 +02:00
Carlos Garnacho
94982dbab7
gdk: Avoid gdk_device_get_associated_device()
...
Query the seat for that.
2020-07-30 18:17:42 +02:00
Benjamin Otte
4dc2ab61c9
Merge branch 'wip/otte/geometry' into 'master'
...
Some GdkGeometry cleanups
See merge request GNOME/gtk!2322
2020-07-30 15:31:27 +00:00
Benjamin Otte
13d3afa56e
Remove unused GDK_HINT_POS
2020-07-30 17:06:15 +02:00
Benjamin Otte
3dd0e6d0b1
Remove gravity from GdkGeometry
...
It's always northwest
2020-07-30 17:06:15 +02:00
Benjamin Otte
11db6ad574
Remove aspect ratio from GdkGeometry
...
It's unused.
2020-07-30 17:06:15 +02:00
Benjamin Otte
ebcef256ab
gdk: Remove unused flags
2020-07-30 17:06:15 +02:00
Benjamin Otte
b12b06e917
gdk: Remove base_size and increment from GdkGeometry
...
It's unused.
2020-07-30 16:55:45 +02:00
neyfag
a27c3039d0
Scroll to cursor after canceling a selection
2020-07-30 15:52:57 +02:00
Matthias Clasen
0ee3370afc
Merge branch 'wip/master.win.egl' into 'master'
...
Add an EGL (OpenGL/ES 3) renderer for GTK+-4.x (using Google's ANGLE project) for Windows
Closes #105
See merge request GNOME/gtk!215
2020-07-30 12:18:02 +00:00
Rico Tzschichholz
c2b5997437
Merge branch 'ricotz/for-master' into 'master'
...
a11y: Fix typo in GtkATContext::state-changed docs
See merge request GNOME/gtk!2320
2020-07-30 07:35:48 +00:00
Rico Tzschichholz
f02a17805e
a11y: Fix typo in GtkATContext::state-changed docs
2020-07-30 09:06:49 +02:00
Chun-wei Fan
a481733b40
GDK/Win32: Force GLES if running on ARM64
...
If GLES support is enabled on Windows, force GLES mode if we are running
on a ARM64 version of Windows (i.e. Windows 10 for ARM).
This is required as ARM64 versions of Windows only provide a software
implementation of OpenGL 1.1/1.2, which is not enough for our purposes.
Thus, we could make instead use the GLES support provided via Google's
libANGLE (which emulates OpenGL/ES 3 with Direct3D 9/11), so that we
can run GtkGLArea programs under OpenGL/ES in ARM64 versions of Windows.
Note that eventually we could update the libepoxy build files for Windows
to not check nor enable WGL when building for ARM64 Windows, as the WGL
items do not work, although they do build.
2020-07-30 14:30:13 +08:00
Chun-wei Fan
cf0175ffce
OpenGL/ES: Fix 'R' and 'B' bits inverted on Windows
...
We need to use GL_BGRA instead of GL_RGBA when doing glReadPixels() on
EGL on Windows (ANGLE) so that the red and blue bits won't be displayed
inverted.
Also fix the logic where we determine whether to bit blit or redraw
everything.
2020-07-30 14:30:13 +08:00
Chun-wei Fan
e5600ab99b
demos: Fix glarea demo on OpenGL/ES
...
Some implementations of the ES 1.00 shader (such as Google's ANGLE) do
not like the 'f' suffix for floats, so just drop it, as it should be
harmless to drop.
2020-07-30 14:26:33 +08:00
Chun-wei Fan
257fd990d1
Add a EGL renderer (via ANGLE) for Windows
...
This is for adding a EGL-based renderer which is done via the ANGLE
project, which translate EGL calls to Direct3D 9/11. This is done as a
possible solution to issue #105 , especially for cases where the needed
full GL extensions to map OpenGL to Direct3D is unavailable or
unreliable, or when the OpenGL implementation from the graphics drivers
are problematic.
To enable this, do the following:
-Build ANGLE and ensure the ANGLE libEGL.dll and libGLESv2.dll are
available. A sufficiently-recent ANGLE is needed for things to
work correctly--note that the copy of ANGLE that is included in
qtbase-5.10.1 is sufficient. ANGLE is licensed under a BSD 3-clause
license.
-Build libepoxy on Windows with EGL support enabled.
-Currently, prior to running GTK+ programs, the GDK_DEBUG envvar needs
to be set with gl-gles as at least one of the flags.
Known issues:
-Only OpenGL ES 3 is supported, ANGLE's ES 2 does not support the needed
extensions, notably GL_OES_vertex_array_object, but its ES 3 support is
sufficient.
-There is no autodetection or fallback mechanism to enable using
EGL/Angle automatically yet. There are no plans to do this in this
commit.
2020-07-30 14:26:33 +08:00
Chun-wei Fan
12a23162b3
build: Check for EGL support in libepoxy on Windows
...
...EGL support needs to be explicitly enabled during the build of
libepoxy on Windows as it is not enabled by default on Windows.
With this, we can add an EGL renderer for Windows that make use of
Google's libANGLE, which is a library that translates OpenGL/ES calls
to Direct3D 9/11, which will provide better hardware compatibility
on Windows and would act as one of the foundations to resolve issue #105 .
2020-07-30 14:26:33 +08:00
Matthias Clasen
0b11e78064
Merge branch 'display-cleanup' into 'master'
...
Display cleanup
See merge request GNOME/gtk!2319
2020-07-30 03:55:23 +00:00
Matthias Clasen
e8026e29b6
Merge branch 'surface-cleanup' into 'master'
...
Surface cleanup
See merge request GNOME/gtk!2317
2020-07-30 03:43:30 +00:00
Matthias Clasen
ee1a868913
Merge branch 'a11y-work' into 'master'
...
A11y work
See merge request GNOME/gtk!2318
2020-07-30 03:28:02 +00:00
Matthias Clasen
488722e7c4
docs: Don't refer to nonexisting functions
...
gdk_surface_input_shape_combine_mask() no longer
exists.
2020-07-29 23:00:57 -04:00
Matthias Clasen
7df070d681
gdk: Move default group api to the X11 backend
...
This is the only place where it is implemented.
2020-07-29 22:58:37 -04:00
Matthias Clasen
abf8cbeaea
a11y: Set an accessible role for GtkLevelBar
...
Use the 'meter' role for GtkLevelBar, and set the
appropriate properties.
Update the docs and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
c0de580d46
a11y: Set an accessible role for GtkExpander
...
Use the button accessible role for GtkExpander
and set attributes as appropriate.
Update the documentation and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
144114bf40
a11y: Set accessible role for GtkLinkButton
...
Set the accessible role for GtkLinkButton to button.
We don't use the 'link' role since ARIA says "if it
behaves like a button, use 'button'".
Update docs and add a test.
This changes should not be neccessary, since
GtkLinkButton derives from GtkButton, see #2965 .
2020-07-29 22:46:00 -04:00
Matthias Clasen
c68fe1053a
a11y: Set an accessible role for GtkTextView
...
Use the text-box accessible role for GtkTextView
and set properties as appropriate.
Update the documentation and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
4d012a6d95
Rename gdk_surface_queue_expose
...
We don't have expose events anymore; instead, there
is a ::render signal. So rename queue_expose to
queue_render to match.
Update all callers.
2020-07-29 22:40:01 -04:00
Matthias Clasen
c1eedf6845
gdk: Stop exporting gdk_surface_freeze_updates
...
The only legitimate use for freezing the frame clock
is in GDK backends. Exporting this function for
applications makes no sense.
2020-07-29 22:30:44 -04:00
Matthias Clasen
9722bb4d9e
iconbrowser: Add screenshots to appdata
...
appstream validation is picky and insists we have
at least on screenshot.
2020-07-29 20:23:46 -04:00
Matthias Clasen
ad3514216d
Update our appdata files
...
Mention the new release in all our appdata files.
2020-07-29 17:58:45 -04:00
Matthias Clasen
59fce30200
icon-browser: Install desktop file and appdata
...
That is needed to make the flatpak build in our
ci happy.
2020-07-29 17:42:49 -04:00
Matthias Clasen
2e80658251
testsuite: Skip the skipping
...
meson 0.55 considers a test failed if we skip any cases.
Until that is fixed, just skip them quietly.
See https://github.com/mesonbuild/meson/issues/7515
2020-07-29 16:35:36 -04:00
Matthias Clasen
53e74c365b
testsuite: Stop setting NO_AT_BRIDGE
...
We are not paying attention to that environment
variable anymore.
2020-07-29 14:57:07 -04:00
Matthias Clasen
047709e911
NEWS: Updates
2020-07-29 12:40:15 -04:00
Matthias Clasen
7e355cbe1e
docs: Mention workarea in the migration guide
2020-07-29 12:39:57 -04:00
Matthias Clasen
3eab58816b
Merge branch 'wip/ditch-workarea' into 'master'
...
gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area
See merge request GNOME/gtk!2316
2020-07-29 16:24:32 +00:00
Jonas Ådahl
c7c71137b2
gdk/monitor: Remove gdk_monitor_work_area and GdkMonitor::work-area
...
It's not a portable API, so remove it. The corresponding backend
specific functions are still available, if they were implemented, e.g.
gdk_macos_monitor_get_workarea() and gdk_x11_monitor_get_workarea().
2020-07-29 17:57:30 +02:00
Matthias Clasen
ec34675019
Merge branch 'better-doc-link-fix' into 'master'
...
docs: Fix links in markdown content differently
See merge request GNOME/gtk!2315
2020-07-29 12:16:55 +00:00
Matthias Clasen
85fb015b45
docs: Fix links in markdown content differently
...
pandoc insists on using the xlink namespace for hrefs,
and the namespace setup doesn't carry over xi:includes.
My first fix was to tell pandoc to generate standalone
docbook documents, which makes it insert the xlink
namespace. But it also makes it wrap all sections and
chapters in articles, and that messes up our toc structure.
So, patch things up differently by stripping the xlink:
from hrefs via regex.
Yay for XML!
2020-07-29 07:47:59 -04:00
Matthias Clasen
d40b1d31b5
Merge branch 'doc-fixes' into 'master'
...
Doc fixes
See merge request GNOME/gtk!2314
2020-07-29 11:24:48 +00:00
Matthias Clasen
5fd03f3297
Merge branch 'a11y-work' into 'master'
...
A11y work
See merge request GNOME/gtk!2312
2020-07-29 11:19:22 +00:00
Daniel Mustieles
a3a66be76e
Updated Spanish translation
2020-07-29 12:40:18 +02:00
Daniel Mustieles
3bb3bc2982
Updated Spanish translation
2020-07-29 12:40:17 +02:00
Florentina Mușat
a7ac16098a
Update Romanian translation
2020-07-29 10:33:19 +00:00
Matthias Clasen
3b35ae870c
docs: Add a missing symbol
2020-07-28 22:40:10 -04:00
Matthias Clasen
d0abe5a919
filter: Typo fix
2020-07-28 22:40:10 -04:00
Matthias Clasen
26200c0f7e
filechooser: Document the response.activate action
2020-07-28 22:40:10 -04:00
Matthias Clasen
07bf9045fb
a11y: Document GtkATContext::state-changed
2020-07-28 22:40:10 -04:00
Matthias Clasen
e4a3746755
docs: Update the symbols list
...
Make sure the sections file is in sync with what
we actually export.
2020-07-28 22:40:10 -04:00
Matthias Clasen
1772d23f8e
docs: Update private headers list
2020-07-28 22:40:10 -04:00
Matthias Clasen
e07b9605bc
a11y: Fix a few glitches in the role enum
...
When the enumeration was synced with the latest draft
of the ARIA spec, the math and note roles missed the boat.
2020-07-28 22:20:40 -04:00
Matthias Clasen
fc47e79cb6
Document gdk_device_tool_get_axes
2020-07-28 21:58:06 -04:00
Matthias Clasen
2a92ee22da
gdk: Small doc fixup
...
We no longer use <!-- --> for plurals, gtk-doc is smart
enough to detect them without that.
2020-07-28 21:53:56 -04:00
Matthias Clasen
23dcf36ec9
NEWS: Updates
2020-07-28 21:17:17 -04:00
Matthias Clasen
b5f256937f
Merge branch 'wip/carlosg/device-api-cleanup' into 'master'
...
Cleanups to device/event API
See merge request GNOME/gtk!2313
2020-07-28 23:49:35 +00:00
Carlos Garnacho
cab1dcb696
gdk: Conflate GDK devices
...
Make GdkEvents hold a single GdkDevice. This device is closer to
the logical device conceptually, although it must be sufficient for
device checks (i.e. GdkInputSource), which makes it similar to the
physical devices.
Make the logical devices have a more accurate GdkInputSource where
needed, and conflate the event devices altogether.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
25ea17a6fc
gdk: Drop source_device argument from _gdk_display_device_grab_update()
...
It's just passed around and used nowhere.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
4a2bbed157
gdk: Make events hold an axis array matching GdkAxisUse
...
Instead of doing device-specific translations of array positions,
use GdkAxisUse as an array index right away.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
7629f6d533
gdk: Make GdkDevice axis API internal
...
All outside interaction happens through gdk_event_get_axis(), no
device poking is necessary, nor axis to array index translations.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
230ce9bfde
gdk: Remove gdk_device_get_axes()
...
Besides the implicit x/y assumptions, devices don't have axes. Those
are actually provided by the GdkDeviceTool driving the device, and
different tools may have different axes.
It does not make sense to offer this API that can change beneath
someone's feet, we now have gdk_device_tool_get_axes() which is static
to the tool.
2020-07-29 01:27:51 +02:00
Carlos Garnacho
2736633a60
inspector: Show tool axes, instead of device axes
...
We are moving away from the latter as they are inconsistent with
Wayland. Make the inspector introspect known tools and their info,
instead.
2020-07-29 01:27:51 +02:00
Matthias Clasen
1755e07af7
a11y: Set an accessible role for GtkPasswordEntry
...
Use the text-box accessible role for GtkPasswordEntry.
And set properties as appropriate.
Update the documentation and add a test.
2020-07-28 18:23:57 -04:00
Matthias Clasen
a610bb89a0
a11y: Set an accessible role for GtkSearchEntry
...
Use the searchbox accessible role for GtkSearchEntry.
And set properties as appropriate.
Update the documentation and add a test.
2020-07-28 18:16:37 -04:00
Matthias Clasen
2040b7ecdf
a11y: Set an accessible role for GtkLabel
...
Use the label accessible role for GtkLabel. ARIA has some
ominous wording about it going way, but while we have it,
GtkLabel is the obvious candidate for carrying it.
Update the documentation and add a test.
2020-07-28 18:16:37 -04:00
Matthias Clasen
cc35cc6c4e
a11y: Add tests for mnemonics
...
We set up labelled-by accessible relations when
a label is set as mnemonic widget. Verify that that
happens as expected.
2020-07-28 18:16:37 -04:00
Matthias Clasen
9a82aadca7
a11y: Set an accessible role for GtkEntry
...
Use the text-box accessible role for GtkEntry and
set the placeholder and read-only accessible properties.
Update the documentation and add tests.
2020-07-28 18:16:37 -04:00
Matthias Clasen
23e185e674
a11y: Add a scrollbar relation test
...
Check that GtkScrolledWindow sets up the expected
relations between its scrollbars and child.
2020-07-28 18:16:37 -04:00
Matthias Clasen
971ee2d28a
a11y: Set up controls relations for scrollbars
...
GtkScrolledWindow knows what its scrollbars control,
so set up the accessible relations for this.
2020-07-28 18:16:37 -04:00
Matthias Clasen
efd4169fa2
a11y: Set accessible roles for GtkImage and GtkPicture
...
Use the img accessible role for these.
Also update the documentation and add tests.
2020-07-28 18:16:37 -04:00
Carlos Garnacho
b52ad33031
gdk: Add gdk_seat_get_tools() API call
...
There's GdkSeat::tool-added and ::tool-removed, but there's no
API to query the known tools. Add this call.
2020-07-29 00:11:34 +02:00
Matthias Clasen
5926008647
Merge branch 'wip/chergert/bump-sysprof-abi' into 'master'
...
build: bump to sysprof 4 ABI
See merge request GNOME/gtk!2192
2020-07-28 20:33:33 +00:00
Christian Hergert
459af3acab
build: bump to sysprof 4 ABI
...
Sysprof has moved to a new ABI which removes GLib from the capture library
so that GLib itself can link against sysprof-capture.
This bumps the library ABI so we can keep things coordinated between all
the new tracing layers in the stack.
2020-07-28 11:22:33 -07:00
Matthias Clasen
cc50be971d
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
See merge request GNOME/gtk!2311
2020-07-28 16:30:47 +00:00
Emmanuele Bassi
3294557717
a11y: Update the valuetext attribute of GtkProgressBar
...
Since progress bars can have a label, we should propagate that information
to ATs whenever it's set.
2020-07-28 16:59:08 +01:00
Emmanuele Bassi
470349c902
a11y: Add an explicit "reset to default" method
...
In some cases we explicitly want to unset an accessible attribute; for
instance, an accessible property is gated on a widget property, and if
the widget property gets unset, the accessible property should be reset.
2020-07-28 16:49:13 +01:00
Emmanuele Bassi
bf06cad5d9
a11y: Add proper error reporting to value collection
...
We're currently overloading NULL to mean both "this value is undefined,
and should be reset to its default" and "the value collection failed".
Let's do error reporting right, by using GError to mean "the collection
failed, for this specific reason"; then, we can use a NULL return value
to signal that the accessible attribute should be reset to its default
value.
This is only relevant for pointer-sized attribute values: strings,
references, and reference lists; numeric, boolean, tristate, and token
values either cannot be undefined, or have a specific "undefined" value.
2020-07-28 16:49:13 +01:00
Emmanuele Bassi
2e8de6bd88
a11y: Fix the error message for the attribute test macros
...
We're missing a closing parenthesis.
2020-07-28 16:49:13 +01:00
Emmanuele Bassi
7f04faf30d
a11y: Use undefined as default for string attributes
...
Instead of an empty string.
2020-07-28 16:49:13 +01:00
Emmanuele Bassi
4fa891b55d
Remove stray gtk-doc annotation
...
It confuses the g-i scanner, and gtk-doc.
2020-07-28 16:49:13 +01:00
Carlos Garnacho
254007a142
gdk: Add gdk_device_tool_get_axes()
...
Axes are actually a per-tool property, we just adapt devices to the
current tool.
2020-07-28 17:37:09 +02:00
Carlos Garnacho
1b846e29c7
docs: Correct migration note
...
A mentioned API call is now internal.
2020-07-28 17:36:18 +02:00
Carlos Garnacho
a2876b5cb4
gdkdevice: Remove gdk_device_get_state()
...
This is not needed nor recommended anymore, all reasons to maybe
need this were all kept within gdk.
2020-07-28 17:36:18 +02:00
Carlos Garnacho
5f8258109e
gtkwindow: Move away from gdk_device_get_state()
...
Use gdk_device_get_modifier_state() poking the keyboard and keymap,
instead of this function.
2020-07-28 17:36:18 +02:00
Carlos Garnacho
6a4277a9a9
gtkpopover: Move away from gdk_device_get_state()
...
Use gdk_device_get_modifier_state() poking the keyboard and keymap,
instead of this function.
2020-07-28 17:36:18 +02:00
Piotr Drąg
f4e001c91a
Update POTFILES.in and POTFILES.skip
2020-07-28 17:01:53 +02:00
Carlos Garnacho
3285f52dc8
gdk: Drop GDK_SOURCE_CURSOR
...
Looking at the xf86-input-wacom driver code, this is not even a thing
anymore. Drop this device type, in modern days there's
GDK_DEVICE_TOOL_TYPE_MOUSE for this.
2020-07-28 15:25:28 +02:00
Matthias Clasen
400a5b4e1f
Merge branch 'wip/a11y-inspector' into 'master'
...
inspector: Show a11y information
See merge request GNOME/gtk!2302
2020-07-28 13:08:28 +00:00
Matthias Clasen
42a4940671
inspector: Show a11y information
...
Show a tab for accessibility information.
This shows the role and the accessible attributes
(states, properties, relations).
For now, changing the values is not possible, and
we only show the explicitly set values. In the future,
we want to show the attributes that are relevant for
the role, regardless of whether they are set or not,
and allow changing some of the attributes (the ones
that are not fully managed by GTK itself).
2020-07-28 08:41:24 -04:00
Matthias Clasen
ecc329fa2a
a11y: Add change notification to GtkATContext
...
Emit a ::state-change signal when state changes;
this was already a vfunc, but we want to listen
to state changes from the inspector too.
2020-07-28 08:41:24 -04:00
Emmanuele Bassi
5fc5e52f52
Merge branch 'a11y-tests' into 'master'
...
Add more a11y tests
See merge request GNOME/gtk!2303
2020-07-28 11:47:14 +00:00
Matthias Clasen
1d8e62fb01
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2306
2020-07-28 11:44:05 +00:00
Matthias Clasen
09faa582e3
Merge branch 'ebassi/for-master' into 'master'
...
Split GtkProgressBar finalization
See merge request GNOME/gtk!2308
2020-07-28 11:37:45 +00:00
Emmanuele Bassi
a85ba95b20
Split GtkProgressBar finalization
...
We're stopping activity mode when finalizing, which will change
accessible state; this will create a GtkATContext, and since GtkWidget
drops its GtkATContext on dispose(), we're going to end up leaking it on
the floor:
```
2,007 (64 direct, 1,943 indirect) bytes in 1 blocks are definitely lost in loss record 36,242 of 36,944
at 0x483977F: malloc (vg_replace_malloc.c:307)
by 0x5222105: g_malloc (gmem.c:106)
by 0x523E222: g_slice_alloc (gslice.c:1025)
by 0x523E261: g_slice_alloc0 (gslice.c:1051)
by 0x534B398: g_type_create_instance (gtype.c:1849)
by 0x53302EE: g_object_new_internal (gobject.c:1937)
by 0x53312AF: g_object_new_valist (gobject.c:2262)
by 0x532FEE8: g_object_new (gobject.c:1780)
by 0x4B3F942: gtk_test_at_context_new (gtktestatcontext.c:107)
by 0x491CC50: gtk_at_context_create (gtkatcontext.c:380)
by 0x4BFEDA0: gtk_widget_accessible_get_at_context (gtkwidget.c:8127)
by 0x4906079: gtk_accessible_get_at_context (gtkaccessible.c:83)
by 0x490618F: gtk_accessible_update_state (gtkaccessible.c:137)
by 0x4ACBA6D: gtk_progress_bar_act_mode_leave (gtkprogressbar.c:690)
by 0x4ACB4F8: gtk_progress_bar_finalize (gtkprogressbar.c:564)
```
We're also unparenting widgets and changing styles, which is another
potential source of leaks and side effects.
2020-07-28 11:47:40 +01:00
Timm Bäder
2050120098
bitset: Fix typo
2020-07-28 08:10:43 +02:00
Timm Bäder
b213b01200
widget-factory: Remove useless separators
...
They don't serve a purpose and are not relevant for theming purposes.
2020-07-28 06:14:45 +02:00
Timm Bäder
ac1f242b6c
gl renderer: Throw inset shadows with all !send values away
2020-07-28 05:34:12 +02:00
Timm Bäder
ebbb729aea
gl renderer: Linear gradient state tracking
2020-07-28 05:34:12 +02:00
Timm Bäder
bbabec3f18
inspector: Avoid an uninitialized value
2020-07-28 05:34:12 +02:00
Timm Bäder
dded144313
gl renderer: Assert that we have program state
...
This is never a problem in reality, just for static analysis.
2020-07-28 05:34:12 +02:00
Timm Bäder
3f59566729
gl renderer: Repat node child bounds can't be NULL
2020-07-28 05:34:12 +02:00
Timm Bäder
e0420bae09
gl renderer: Remove dead code
...
We aren't using n_corners anyway
2020-07-28 05:34:12 +02:00
Timm Bäder
a3b452725b
render nodes: Simplify diffing of uniform border nodes
2020-07-28 05:34:12 +02:00
Timm Bäder
d5f0256f8b
listbox demo: Remove frames around labels
...
Having frames around those labels looks stupid
2020-07-28 05:34:12 +02:00
Timm Bäder
9cdf9847c2
gl: Add a gdk_gl_context_has_debug accessor
...
Check if the label_object_ etc. functions are gonna do anything at all.
The g_type_name_from_instance calls keep poppoing up in profiles.
2020-07-28 05:34:12 +02:00
Timm Bäder
fa85ec5cf5
GskTransform: Restructure _to_affine and _to_translation
...
Make the simple cases more explicit.
2020-07-28 05:34:12 +02:00
Timm Bäder
0ce32cd4b5
gl renderer: Save rectilinearity in clip stack
...
So we don't have to repeatedly call it in pop_clip()
2020-07-28 05:34:12 +02:00
Timm Bäder
756b84033a
GskTransform: Remove unused function from private header
...
We only use this in gsktransform.c
2020-07-28 05:34:12 +02:00
Timm Bäder
5a9b54df96
gl renderer: More color matrix state tracking
2020-07-28 05:34:12 +02:00
Timm Bäder
d7ba281c15
gl renderer: Add contains_rect helper
2020-07-28 05:34:12 +02:00
Timm Bäder
c6c87b97c2
gl renderer: Add own graphene_rect_intersects
2020-07-28 05:34:11 +02:00
Timm Bäder
2fa9dddea6
gsk: Remember border node uniformity
...
Lots of border nodes have all the same width and the same color.
Renderers might be able to simplifty that, so keep an extra bit per
border node.
2020-07-28 05:34:11 +02:00
Timm Bäder
72d4a83af8
gl renderer: Moar state tracking
...
Track what we really need to send for inset shadows, which are used
as a border replacement in many cases.
Fishbowl says I can draw around 200-300 more switches per frame like
this too.
2020-07-28 05:34:11 +02:00
Timm Bäder
f4d9e4032f
widget: Compare proper adjusted size to new size when allocating
...
We were comparing first but then still modifying the adjusted size later
on, leading to unnecessary resizes.
2020-07-28 05:34:11 +02:00
Timm Bäder
fcf502a686
gl renderer: Fix scrolledwindow undershoot rendering
2020-07-28 05:34:11 +02:00
Matthias Clasen
6e494b93ce
a11y: Add spinbutton tests
...
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
9458c1cc47
spinbutton: Update accessible state
...
Make sure to set value-max/min/now when the adjustment
changes.
2020-07-27 21:18:10 -04:00
Matthias Clasen
9190e95df9
a11y: Add scrollbar tests
...
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
e10aedccc6
widget: Update accessible state
...
The sensitive property corresponds to the accessible
property disabled, so update it when sensitivity
changes.
2020-07-27 21:18:10 -04:00
Matthias Clasen
a63d03810f
scrollbar: Update accessible state
...
We have the scrollbar role, and are therefore expected
to set value-min/max/now properties.
2020-07-27 21:18:10 -04:00
Matthias Clasen
d2c5e3f2b3
a11y: Add switch tests
...
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
2ef4be21c8
switch: Initialize accessible state
...
The checked state defaults to undefined, so we need
to set it to the desired false state.
2020-07-27 21:18:10 -04:00
Matthias Clasen
2cbaa568b5
a11y: Add separator tests
...
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
d8ac144923
separator: Initialize accessible state
...
The orientation property of separators should be
set ab initio.
2020-07-27 21:18:10 -04:00
Matthias Clasen
606daab475
a11y: Add progressbar tests
...
Test the changes in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
ec5829c401
progressbar: Fix up acessible state handling
...
We must initialize the properties in init, since they
are expected to be there ab initio, and we can't call
gtk_accessible_update_property from finalize - it causes
us to recreate an at context and badness follows.
2020-07-27 21:18:10 -04:00
Matthias Clasen
d3a8597a93
a11y: Add dialog and window tests
...
Tests the modal property changes in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
29cf11fb6e
a11y: Set an accessible role for GtkWindow
...
Use the window accessible role for GtkWindow, and
set the modal accessible property.
2020-07-27 21:18:10 -04:00
Matthias Clasen
6ca245306b
a11y: Add checkbutton tests
...
Tests the fix in the previous commit.
2020-07-27 21:18:09 -04:00
Matthias Clasen
4a9b4ad720
checkbutton: Initialize accessible state
...
The checked state of checkbuttons should be FALSE
initially, not UNDEFINED.
2020-07-27 21:18:09 -04:00
Matthias Clasen
36689d1884
Merge branch 'wip/chergert/fix-macos-time-conversion' into 'master'
...
macos: support ARM/PowerPC time conversion for DisplayLink times
See merge request GNOME/gtk!2301
2020-07-27 20:51:17 +00:00
Christian Hergert
0243736003
macos: support ARM/PowerPC time conversion for DisplayLink times
...
When converting DisplayLink frame presentation times, we need to take into
account the arch-specific types. This tracks changes in GNOME/GLib!1566 so
that precision is not lost.
2020-07-27 12:49:57 -07:00
Matthias Clasen
450899ef4c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2300
2020-07-27 18:50:45 +00:00
Yuri Chornoivan
c6c9ca6009
Update Ukrainian translation
2020-07-27 17:45:19 +00:00
Matthias Clasen
99ec400c2a
gtk-demo: Simplify colors demo
...
Make best use of our new constructors.
2020-07-27 13:30:00 -04:00
Matthias Clasen
da9b4d778b
NEWS: Tweak the wording
2020-07-27 13:30:00 -04:00
Matthias Clasen
252e29c373
Merge branch 'a11y-docs' into 'master'
...
a11y: Document roles of widgets
See merge request GNOME/gtk!2299
2020-07-27 15:45:51 +00:00
Matthias Clasen
6266bcafee
docs: Flesh out the role table in the a11y intro
...
Add cross-references for all the widgets currently
implementing non-default roles.
2020-07-27 11:10:58 -04:00
Matthias Clasen
d90f79de0e
a11y: Document roles of widgets
...
Add a section to the long description for each
widget that is using a non-default accessible role.
2020-07-27 10:48:08 -04:00
Piotr Drąg
790db8db53
Update POTFILES.in and POTFILES.skip
2020-07-27 16:45:40 +02:00
Matthias Clasen
38b1fbb261
Merge branch 'ebassi/a11y-fixes' into 'master'
...
Ebassi/a11y fixes
Closes #2955
See merge request GNOME/gtk!2298
2020-07-27 14:27:07 +00:00
Emmanuele Bassi
cd7bb0200a
a11y: Test unset relations
...
We use "NULL" in C to mean "undefined", when it comes to relations that
deal with references or reference lists.
2020-07-27 14:26:19 +01:00
Emmanuele Bassi
05d9e0c1c8
a11y: Allow unsetting the relations using NULL
...
Accessible values storing references and reference lists can be unset by
using NULL to mean "undefined"; since we cannot return the NULL value,
we need to intercept it when collecting a value, and replace it with an
undefined GtkAccessibleValue, which is also the value used as the
default for GtkAccessibleRelation values that store a reference or a
reference list.
Fixes : #2955
2020-07-27 14:26:19 +01:00
Emmanuele Bassi
b7be6ee00d
docs: Document a11y attributes
2020-07-27 14:26:19 +01:00
Matthias Clasen
604d4a1cb2
NEWS: Updates
2020-07-27 08:40:43 -04:00
Emmanuele Bassi
b68d54cdbc
Merge branch 'ebassi/ci-dags' into 'master'
...
ci: Use DAG attributes
See merge request GNOME/gtk!2297
2020-07-27 12:06:59 +00:00
Matthias Clasen
bc0182fa3e
Merge branch 'ebassi/new-a11y' into 'master'
...
Accessibility rework
See merge request GNOME/gtk!2239
2020-07-27 11:55:19 +00:00
Emmanuele Bassi
19bae10b45
ci: Use DAG attributes
...
Some jobs can run out of order, as they are entirely self-contained. If
we use the newly added DAG attributes, we can speed up the CI pipeline.
2020-07-27 12:44:36 +01:00
Emmanuele Bassi
4060febd7f
a11y: Make GtkATContext.create() public
...
Implementations of the GtkAccessible interface should have a way to
instantiate the appropriate GtkATContext.
2020-07-27 11:48:11 +01:00
Emmanuele Bassi
9a4458ba33
docs: Add missing GTK_ACCESSIBLE_VALUE_UNDEFINED
2020-07-27 11:46:07 +01:00
Matthias Clasen
40b65b2608
a11y: Add some more tests
...
Test that setting multiple states or properties
at the same time works as expected.
2020-07-27 01:21:05 -04:00
Matthias Clasen
6c4c93b8d0
Add some more a11y tests
...
Add some tests that exercise the accessible machinery
without any connection to widgets.
2020-07-27 01:13:16 -04:00
Matthias Clasen
4c5df54e39
a11y: Be a bit safer against crashes
...
We are collecting values from varargs and use them
as indices into static arrays. We should at least
do some bounds checking to prevent silly crashes.
2020-07-27 00:21:01 -04:00
Matthias Clasen
2ce6ac00cf
docs: Expand GtkAccessible documentation
...
Add some hints and examples.
2020-07-26 22:39:47 -04:00
Matthias Clasen
98f3112158
docs: Add documentation for accessible enumerations
...
This is largely taking text from the aria spec.
2020-07-26 22:39:47 -04:00
Matthias Clasen
9a27614b41
docs: Update GtkAccessibleRole docs
...
Sync up the docs with changed enum values, and document
all the roles that are used in GTK at the moment. All
others are left as "Unused".
2020-07-26 21:23:48 -04:00
Matthias Clasen
29abefbe61
docs: Fix up some issues in the a11y docs
...
Fix up syntax errors and links in the introductory
section about accessibility.
2020-07-26 21:23:48 -04:00
Matthias Clasen
81c8a2bb4b
docs: Update a11y docs
...
Add some missing functions.
2020-07-26 21:23:48 -04:00
Matthias Clasen
d187ff858c
Merge branch 'drop-down-constructor' into 'master'
...
GtkDropDown api revisions
See merge request GNOME/gtk!2286
2020-07-26 23:57:48 +00:00
Matthias Clasen
e57d6ec359
Merge branch 'list-constructors' into 'master'
...
List constructors
See merge request GNOME/gtk!2296
2020-07-26 23:56:21 +00:00
Matthias Clasen
eb5c76210e
gridview: Revise constructors
...
Make both gtk_grid_view_new and gtk_grid_view_new_with_factory
take a model as first argument, and make all arguments
allow-none and transfer full.
Update all callers.
2020-07-26 18:50:50 -04:00
Matthias Clasen
fc22b75a06
columnview: Revise the constructor
...
Make gtk_column_view_new take a model as first argument,
and make it allow-none and transfer full.
Update all callers.
2020-07-26 18:32:50 -04:00
Matthias Clasen
43000abeff
listview: Revise constructors
...
Make both gtk_list_view_new and gtk_list_view_new_with_factory
take a model as first argument, and make all arguments
allow-none and transfer full.
Update all callers.
2020-07-26 18:27:23 -04:00
Matthias Clasen
f7ab6f665d
dropdown: Revise constructors
...
A dropdown without a model is useless, so accept a model
and expression in the constructor. Allow them to be NULL,
but consume them if given. This makes chained constructors
convenient without breaking language bindings.
Drop gtk_drop_down_set_from_strings() and instead add
gtk_drop_down_new_from_strings().
Update all users.
2020-07-26 18:09:54 -04:00
Matthias Clasen
72bb7fc701
selectionfiltermodel: Make constructor allow-none
...
We don't pay attention to item-type anymore, so
drop the item-type property and the _for_item_type()
constructor, and allow passing NULL to the regular
constructor.
We don't make this constructor transfer-full, since
the selection filter model is not a wrapping model
like the others. It is more like fork than a wrap.
2020-07-26 18:04:40 -04:00
Matthias Clasen
cdc263f796
multiselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Also make the constructor return GtkMultiSelection *.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
ccb9dcc86b
singleselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
68d6671413
noselection: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
dd1c0c0b22
treelistmodel: Make constructor transfer full
...
Make gtk_tree_list_model_new() take the root model
as first argument, and make it transfer full, for
consistency with other wrapping list constructors.
Update all callers.
Still missing here: Make the model property writable,
and allow passing NULL in the constructor.
2020-07-26 18:04:40 -04:00
Matthias Clasen
a46cfd3ff4
sortlistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
706d464ae6
filterlistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
b6d9f3facb
slicelistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:04:40 -04:00
Matthias Clasen
06c6d62629
listlistmodel: Drop item_type
...
We are using G_TYPE_OBJECT throughout, so there
is no need for GtkListListModel to do anything else.
Update all callers.
2020-07-26 18:02:51 -04:00
Matthias Clasen
32b8fe40bb
maplistmodel: Make constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:02:51 -04:00
Matthias Clasen
1e8be87026
flattenlistmodel: Make the constructor transfer full
...
This is for consistency with other wrapping list constructors.
We want them all to be transfer full, allow-none.
Update all callers.
2020-07-26 18:02:44 -04:00
Emmanuele Bassi
cbc6244bc5
ci: Re-enable the accessibility test suite
...
Now that we have something that is both reliable and local.
2020-07-26 21:27:03 +01:00
Emmanuele Bassi
ac0fcc55a6
a11y: Add a simple test case for GtkButton's accessible state
2020-07-26 21:27:03 +01:00
Emmanuele Bassi
3d642460e7
a11y: Simplify the test API
...
We don't need as many functions to print out the property, relation, and
state of an accessible. Additionally, we should allow comparing the
accessible attributes with an expected value, and print out the real
accessible value if they do not match.
2020-07-26 21:27:03 +01:00
Emmanuele Bassi
82664003c0
a11y: Allow setting the role post-construction
...
Some widgets have different roles after they are constructed, so we need
to allow changing the role defined by the class. We should still avoid
setting a role after the GtkATContext has been created.
2020-07-26 21:27:03 +01:00
Emmanuele Bassi
b9a1cb74a1
a11y: Add API to retrieve accessible values
...
We are going to use this for implementing ATContext subclasses, but also
in the testing API.
2020-07-26 20:49:08 +01:00
Emmanuele Bassi
dc1c1e8af9
a11y: Add more test API
2020-07-26 20:49:08 +01:00
Emmanuele Bassi
83eac3f33a
a11y: Restart the accessibility test suite
2020-07-26 20:49:08 +01:00
Emmanuele Bassi
296f0844df
Fix build with debugging notes disabled
2020-07-26 20:31:15 +01:00
Matthias Clasen
e17b5f337d
a11y: Update GtkCheckButton
...
This is a bit unfortunate, since the aria modelling
doesn't quite agree with ours, so we have to listen
for the togglebutton property change, and we inherit
the pressed state from the togglebutton accessible.
2020-07-26 20:31:15 +01:00
Matthias Clasen
c36ad5f474
a11y: Update GtkSpinButton
...
Set the appropriate accessible role, and update
the value properties.
2020-07-26 20:31:15 +01:00
Matthias Clasen
b7777add36
a11y: Update GtkProgressBar
...
Update state and properties as appropriate.
2020-07-26 20:31:15 +01:00
Matthias Clasen
609383f93c
testatcontext: Print role nicks
...
This makes for easier reading.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
a9e0cf77a0
a11y: Update labelled-by when setting mnemonic labels
...
The ARIA labelled-by attribute behaves the same way as the mnemonic
labels in GTK.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
86b58529fd
a11y: Change the collection type for reflist attributes
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
2fee3793b4
a11y: Allow storing list of references in GtkAccessibleValue
...
It's one of the fundamental accessible value types in ARIA.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
03b773f45a
a11y: Change default accessible role
...
Only GtkWidget should use GTK_ACCESSIBLE_ROLE_WIDGET as its default
accessible role; the default for GtkAccessible and GtkATContext should
be GTK_ACCESSIBLE_ROLE_NONE, meaning "an element whose implicit native
role semantics will not be mapped to the accessibility API", according
to the WAI-ARIA specification.
2020-07-26 20:31:15 +01:00
Matthias Clasen
8adcf95300
inspector: Support the a11y debug flag
...
Add support for the GTK_DEBUG_A11Y debug flag in
the logs tab.
2020-07-26 20:31:15 +01:00
Matthias Clasen
0b6df9efe7
testatcontext: Use the new debug flag
...
Only dump a11y state if GTK_DEBUG=accessibility is set.
2020-07-26 20:31:15 +01:00
Matthias Clasen
01f31665b8
Add GTK_DEBUG=accessibility
...
Add a debug flag for accessibility-related debug spew.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
0d87f8cd62
a11y: Add testing API
...
We want to test the accessibility API, as well as the implementation
inside each widget. For that, we should expose an API that lets us
verify that a GtkAccessible has a given role, as well as a given
property.
The API follows the pattern of other GTest API:
- a macro to assert that a condition is respected
- a function that prints out the error message in case of failure
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
52c1fb8dfe
a11y: Implement role and state change in GtkSwitch
...
Set the "switch" role, and update the "checked" state when the :active
property is toggled.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
732578eb53
a11y: Consolidate the attributes container
...
While we have split the various attributes for convenience, there's no
reason why we should have specialised data types for the attributes
container object.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
1124f2507d
a11y: Add relations API
...
Since we split relation attributes from the generic properties, we need
to add API for setting and retrieving their values.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
d37511f76b
a11y: Simplify GtkAccessibleValue
...
Reduce the amount of subclassing, by handling collection of fundamental
types directly from the generic code paths. We now handle boolean,
tristate, integer, number, string, and relation values in the generic
code path; if an attribute supports the "undefined" value, we return the
undefined value singleton.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
55d29d08a1
a11y: Resync with the ARIA spec
...
Drop roles and properties that were deprecated in WAI-ARIA 1.1, and add
new roles and properties defined in WAI-ARIA 1.2 and later.
We also split the relationship properties into their own enumeration, so
we can keep the GtkAccessibleProperty type more compact.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
ae446e8f4a
Remove GTK_ACCESSIBLE_STATE_NONE
...
It's pointless, we can use an explicit value of `-1` everywhere.
Additionally, it complicates all code that uses the state enumeration as
an array index, since now we need to guard against a negative offset.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
c56e9b2031
a11y: Add binding-friendly accessible property setter
...
Matching the one for the accessible state.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
93978544c0
a11y: Collect reference value
...
Some properties that take a reference to an accessible haven't been
updated to collect the correct type.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
1b612cd5db
a11y: Update the accessible label for GtkButton
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
3a1d69ca29
a11y: Update GtkSeparator
...
Add an accessible role, and update the orientation state.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
9af74629f6
a11y: Set the role for GtkScale
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
59d85d42cf
a11y: Update the accessible state for GtkRange
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
2c75ba5509
a11y: Update the "pressed" state on toggle buttons
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
58628f9a9e
a11y: Add roles to various widgets
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
da1ce01a6f
Add accessible properties to GtkAccessible
...
We propagate the accessible state and properties to each ATContext in
the same virtual function, since they are functionally similar.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
654956223d
Add GtkAccessiblePropertySet
...
Like GtkAccessibleStateSet, the PropertySet is a set for accessible
properties.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
382fa01301
Plumb all the GtkAccessibleProperty values into GtkAccessibleValue
...
Similarly to how we deal with GtkAccessibleState.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
572861be27
Allow setting the accessible role at construction
...
Some widgets have different accessible roles depending on some
parameter, so we cannot set the role at class init time. For those
widgets, we add an "accessible-role" property to GtkAccessible, and we
allow setting it (only) at construction time.
2020-07-26 20:31:15 +01:00
Emmanuele Bassi
5a173df3da
Start documenting the Accessibility API
...
Add the introductory text from #2833 , and the various types to the API
reference.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
3ea069a8d3
Update the accessible state on widget visibility changes
...
The GTK_ACCESSIBLE_STATE_HIDDEN has the opposite meaning of the
GtkWidget:visible property.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
25f6da5e89
Have GtkWidget implement GtkAccessible
...
Each widget type has an accessible role associated to its class, as
roles cannot change during the life time of a widget instance.
Each widget is also responsible for creating an ATContext, to proxy
state changes to the underlying accessibility infrastructure.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
566f75af82
Plug GtkATContext into GtkAccessible
...
An Accessible implementation must create an ATContext object. UI
elements are supposed to interact with the GtkAccessible API, but we
expose GtkATContext to allow patterns like delegation.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
a382dfd3bd
Add GtkATContext
...
The ATContext type is meant to be used as the base class for
implementations of the assistive technology API—the actual mechanism
needed to communicate to components like the screen reader, or any other
AT.
Every time the widget state changes, the ATContext is meant to broadcast
the state change; and every time the AT queries the state of a UI
element, the ATContext is meant to provide that information.
We also have a "test" ATContext implementation, which is meant to be
used to write tests to verify that changes are propagated without
requiring a whole desktop session.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
823ee58332
Add GtkAccessibleStateSet
...
Since states can be set or unset, we need a container type that has all
the possible states, and a bitmask that tells us which ones are set.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
55120a25db
Add GtkAccessibleValue
...
All accessible properties and states may have one of the following
types:
- true/false
- true/false/undefined
- true/false/mixed/undefined
- reference (to another UI element)
- reference list
- integer
- number (real numerical value)
- string
- token (one of a limited set of allowed values)
- token list
See: https://www.w3.org/WAI/PF/aria/states_and_properties#propcharacteristic_value
The GtkAccessibleValue is a simple reference counted type that can be
"subclassed" to implement each value type.
This initial commit adds GtkAccessibleValue and the basic subclasses for
plain boolean, tristate (true/false/undefined), and token types,
including statically allocated values that can be shared instead of
allocated.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
14faec3ce2
Introduce GtkAccessible
...
GtkAccessible is an interface for accessible UI elements.
Currently, it doesn't do much except exist as a type; in the future, it
will be the entry point for all accessible state in GTK.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
82fe6fbc62
a11y: Add the supported accessibility roles
...
The list of roles is taken from the WAI-ARIA 1.2 specification:
https://w3c.github.io/aria/
Some of these roles do not make entirely sense from a GTK application
perspective, but we can remove them before finalizing the API.
2020-07-26 20:31:14 +01:00
Emmanuele Bassi
c63087a563
Remove ATK
...
To build a better world sometimes means having to tear the old one down.
-- Alexander Pierce, "Captain America: The Winter Soldier"
ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:
- it maps to a very specific implementation, AT-SPI, which is Linux and
Unix specific
- it requires implementing the same functionality in three different
layers of the stack: AT-SPI, ATK, and GTK
- only GTK uses it; every other Linux and Unix toolkit and application
talks to AT-SPI directly, including assistive technologies
Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:
- add an "accessible" interface, implemented by GTK objects directly,
which describe the accessible role and state changes for every UI
element
- add an "assistive technology context" to proxy a native accessibility
API, and assign it to every widget
- implement the AT context depending on the platform
For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Benjamin Otte
ea0fc7619d
Merge branch 'wip/otte/boolfilter' into 'master'
...
Add GtkBoolFilter
See merge request GNOME/gtk!2288
2020-07-26 19:24:25 +00:00
Jordi Mas
f2ed1656b4
Update Catalan translation
2020-07-26 21:13:16 +02:00
Benjamin Otte
2f27d29247
Add GtkBoolFilter
...
Takes a boolean GtkExpression (like a boolean object property) to run a
filter with.
2020-07-26 20:43:08 +02:00
Matthias Clasen
ef6babf896
Merge branch 'matthiasc/for-master' into 'master'
...
overlaylayout: Document minimally
See merge request GNOME/gtk!2285
2020-07-26 12:00:49 +00:00
Matthias Clasen
7f9570b95b
overlaylayout: Document minimally
...
This layout manager is not reusable, but we
still need to make its layout properties show
up in the docs.
2020-07-25 19:02:33 -04:00
Matthias Clasen
d8d8a71a7a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2284
2020-07-25 17:30:11 +00:00
Matthias Clasen
2ff3e3d1e4
gtk: Improve struct packing in places
...
Plug some holes in our structs by rearranging
a few fields. This is was done looking at
pahole output.
2020-07-25 11:57:37 -04:00
Matthias Clasen
73f4f518b8
gdk: Improve struct packing in places
...
Plug some holes in our structs by rearranging
a few fields. This is was done looking at
pahole output.
2020-07-25 11:57:37 -04:00
Matthias Clasen
6e9dbba130
colorswatch: Remove unused radius fields
...
The radius fields are never used.
2020-07-25 11:57:37 -04:00
Matthias Clasen
706aa93ab5
hsla: Just store floats
...
We are using floats for rgb, and we don't need more precision
for hsl colors either. We use hsl for computing color expressions
like shade(), lighter() and darker(), which are not precisely
specified anyway.
This commit updates the one test where the output changes a
tiny bit due to this.
2020-07-25 11:56:05 -04:00
Matthias Clasen
54deed9a5a
headerbar: Drop the Private struct
2020-07-25 07:41:05 -04:00
Matthias Clasen
0e70ddcab3
colorplane: Drop the Private struct and padding
2020-07-24 22:56:24 -04:00
Matthias Clasen
f2bdb1fb87
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2283
2020-07-25 00:05:28 +00:00
Matthias Clasen
ec9fd76c87
Merge branch 'wip/otte/types' into 'master'
...
Get rid of unneeded glib types
See merge request GNOME/gtk!2282
2020-07-24 23:54:01 +00:00
Matthias Clasen
bacaa5eb9a
Add another sortlistmodel test
...
This tests the crash fix in f7b73b2e01 .
2020-07-24 19:28:54 -04:00
Matthias Clasen
9a297516ba
testsuite: Add an incremental sort test
...
Add a test that makes changes to a model while it
is incrementally sorted.
2020-07-24 19:23:18 -04:00
Matthias Clasen
e9bff53015
timsort: Avoid a crash
...
We need to clear the pointer after freeing the data,
since the sortlistmodel keeps its timsort structure
around and reuses it.
2020-07-24 19:23:18 -04:00
Benjamin Otte
3078b180fe
Replace "gdouble" with "double"
2020-07-25 00:47:36 +02:00
Benjamin Otte
556997f9df
Replace "gfloat" with "float"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d375dce9f5
Replace "gchar" with "char"
2020-07-25 00:47:36 +02:00
Benjamin Otte
d7266b25ba
Replace "gint" with "int"
2020-07-25 00:47:36 +02:00
Matthias Clasen
2a43ce1705
testsuite: Use better names for sortlistmodel tests
...
Name the tests for what they do.
2020-07-24 15:37:49 -04:00
Matthias Clasen
3324a6e6b3
testsuite: Reenable tests for incremental sort
...
This was unintentionally disabled.
2020-07-24 15:22:14 -04:00
Matthias Clasen
46423e614d
Merge branch 'remove-align-widget' into 'master'
...
menubutton: Remove align-widget property
See merge request GNOME/gtk!2280
2020-07-24 18:17:30 +00:00
Matthias Clasen
f7b73b2e01
sortlistmodel: Fix a crash
2020-07-24 14:15:14 -04:00
Matthias Clasen
c85e424279
dropdown: Fix popup sizing
...
Setting a width request is not quite enough, since
gtk_widget_set_size_request() only queues a resize
when the widget is visible. Explicitly force one
here. Without this, the popup sometimes shows up
too small.
2020-07-24 14:15:04 -04:00
Florian Müllner
b146c48e23
menubutton: Remove align-widget property
...
The property has been unused since commit 8701e34f74 . That was four
years ago, so it's safe to say that nobody has been missing it terribly.
2020-07-24 13:55:06 +02:00
Timm Bäder
3176d69009
Merge branch 'fix-gdk-array-msvc' into 'master'
...
gdk/gdkarrayimpl.c: Fix build on Visual Studio
See merge request GNOME/gtk!2279
2020-07-24 09:28:21 +00:00
Chun-wei Fan
89f7d841ab
gdk/gdkarrayimpl.c: Fix build on Visual Studio
...
It seems like initializing something to an empty array using `{}` is a GCCism,
so just stuff a 0 within the braces to accomplish the same thing.
2020-07-24 16:25:24 +08:00
Matthias Clasen
7e2fceebca
Merge branch 'matthiasc/for-master' into 'master'
...
filechooser: Remove a leftover signal emission
Closes #2942
See merge request GNOME/gtk!2276
2020-07-24 02:58:51 +00:00
Matthias Clasen
1e00c887ec
docs: Work around escaping bugs
...
This is truly a russian doll of documentation formats:
a string containing <> inside an xml fragment in an |[ ]|
gtk-doc example in markdown in a doc comment.
Sadly, something gets escaping wrong, so the <> end up
literally in the docbook and mess up the last step of
our document formatting, even after turning them into
entities.
Work around this with an extra level of entities that
really shouldn't be necessary.
2020-07-23 18:24:18 -04:00
Matthias Clasen
561d3c68a0
docs: Pass --standalone to pandoc
...
This flag causes pandoc to emit a proper doctype
declaration and, crucially, namespace declarations
for the xlink namespace that it insists on using
for href attributes. Without this, putting external
links in md documents doesn't survive the journey
through xml.
2020-07-23 18:24:18 -04:00
Matthias Clasen
03601cb794
docs: Improve shortcut trigger docs
...
Point out the need to escape <> in xml.
2020-07-23 18:24:18 -04:00
Matthias Clasen
3108b8b4d3
docs: Explain the shortcutcontroller example a bit
...
Add a reference to the the syntax for shortcut actions
in builder files.
2020-07-23 18:24:18 -04:00
Matthias Clasen
d1afe32762
filechooser: Remove a leftover signal emission
...
Commit 0145809a94 replace the response-requested
signal with an action, but didn't actually remove the emission
of that no-longer-existing signal.
Fixes : #2942
2020-07-23 12:54:07 -04:00
Benjamin Otte
603dd72b09
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2277
2020-07-23 14:34:33 +00:00
Benjamin Otte
e81ba8924a
searchenginemodel: Remove unused code
2020-07-23 15:31:08 +02:00
Benjamin Otte
8832ab45d9
searchengine: Remove unused set_recursive() call
2020-07-23 15:31:08 +02:00
Florentina Mușat
87d6e17bc7
Update Romanian translation
2020-07-23 10:33:16 +00:00
Florentina Mușat
a5033cd79b
Update Romanian translation
2020-07-23 10:32:08 +00:00
Matthias Clasen
44cbf3d605
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2275
2020-07-23 00:19:15 +00:00
Matthias Clasen
fb6288791e
NEWS: Updates
2020-07-22 19:51:27 -04:00
Matthias Clasen
2160f52cbf
migration guide: Add some tables
...
Add a table mapping event signals to their event controller
replacements, and a table mapping former GtkContainer
subclasses to their gtk_container_add replacement.
2020-07-22 19:38:58 -04:00
Benjamin Otte
8825e621c9
Merge branch 'wip/otte/for-master' into 'master'
...
timsort: Actually 0-terminate the array in get_runs()
See merge request GNOME/gtk!2274
2020-07-22 18:08:24 +00:00
Benjamin Otte
e22abd73f2
timsort: Actually 0-terminate the array in get_runs()
...
This could cause SEGVs when changing the sort during an ongoing sort
operation.
2020-07-22 18:59:22 +02:00
Yuri Chornoivan
f77d4d7fc0
Update Ukrainian translation
2020-07-22 13:27:26 +00:00
Yuri Chornoivan
8243133ca7
Update Ukrainian translation
2020-07-22 13:22:09 +00:00
Matthias Clasen
63a4345d2c
Merge branch 'wip/otte/sortlistmodel2' into 'master'
...
Massively refactor and improve sortlistmodel
See merge request GNOME/gtk!2273
2020-07-22 13:15:45 +00:00
Piotr Drąg
56685a483d
Update POTFILES.in
2020-07-22 15:01:05 +02:00
Benjamin Otte
b23f793753
gtk-demo: Add a progress bar when the colors demo resorts
2020-07-22 14:30:49 +02:00
Benjamin Otte
2b19e2fc1f
sortlistmodel: Add progress estimation
2020-07-22 14:30:49 +02:00
Benjamin Otte
703f8b8136
timsort: Add progress estimation
2020-07-22 14:30:49 +02:00
Benjamin Otte
5b18968867
sortlistmodel: Make key generation part of the step function
...
SSave the missing keys as a bitset and iterate over that bitset in the
step function.
Solves the problem with a large UI block at the beginning of a sort
operation when all the keys were generated, in particular when key
generation was slow.
Benchmarks for maximum time taken by a single main loop callback:
initial sort with complex GFileInfo keys
old new
32,000 items 137ms 3ms
128,000 items 520ms 31ms
initial sort with string keys
old new
32,000 items 187ms 1ms
128,000 items 804ms 3ms
2020-07-22 14:30:49 +02:00
Benjamin Otte
e8c4e1205a
gtk-demo: Make colors demo do incremental sorting
2020-07-22 14:30:49 +02:00
Benjamin Otte
bf5c540357
sortlistmodel: Properly compute runs
...
When updating a (partially) sorted model, take the known runs for the
existing sort and apply them to the new sort. That way, we don't have to
check the whole model again.
Benchmarks:
appending half the items to a model of strings
old new
512,000 items 437ms 389ms
1,024,000 items 1006ms 914ms
appending 10% of the items to a model of strings
old new
512,000 items 206ms 132ms
1,024,000 items 438ms 301ms
appending 1 item to a model of strings
old new
64,000 items 1.8ms 0.00ms
512,000 items --- 0.01ms
2020-07-22 14:30:49 +02:00
Benjamin Otte
c03383d3e5
sortlistmodel: Make sort stable again
...
Previously, the sort was not stable when items were added/removed while
sorting or the sort algorithm was changed.
Now the sort looks at the item position (via the key's location in the
keys array) to make sure each comparison stays stable with respect to
this position.
2020-07-22 14:30:49 +02:00
Benjamin Otte
eaaa287078
multisorter: Implement GtkSortKeys
2020-07-22 14:30:49 +02:00
Benjamin Otte
554defaf1a
treelistrowsorter: Implement GtkSortKeys
2020-07-22 14:30:49 +02:00
Benjamin Otte
659fe52b7b
numericsorter: Implement GtkSortKeys
2020-07-22 14:30:49 +02:00
Benjamin Otte
0970077af9
stringsorter: Implement GtkSortKeys
2020-07-22 14:30:49 +02:00
Benjamin Otte
814c88fbc1
sortkeys: Add an equal sort keys
...
Compares every element as equal.
This is useful when sorters are in an invalid configuration.
2020-07-22 14:30:49 +02:00
Benjamin Otte
3b24c8a0a4
sortlistmodel: Use GtkSortKeys
...
This massively speeds up sorting with expensive sort functions that it's
the most worthwhile optimization of this whole branch.
It's slower for simple sort functions though.
It's also quite a lot slower when the model doesn't support sort keys
(like GtkCustomSorter), but all the other sorters do support keys.
Of course, this depends on the number of items in the model - the number
of comparisons scales O(N * log N) while the overhead for key handling
scales O(N).
So as the log N part grows, generating keys gets more and more
beneficial.
Benchmarks:
initial sort of a GFileInfo model with display-name keys
items keys
8,000 items 715ms 50ms
64,000 items --- 554ms
initial sort of a GFileInfo model with complex keys
items keys
64,000 items 340ms 295ms
128,000 items 641ms 605ms
removing half a GFileInfo model with display-name keys
(no comparisons, just key freeing overhead of a complex sorter)
items keys
512,000 items 14ms 21ms
2,048,000 items 40ms 62ms
removing half a GFileInfo model with complex keys
(no comparisons, just key freeing overhead of a complex sorter)
items keys
512,000 items 90ms 237ms
2,048,000 items 247ms 601ms
2020-07-22 14:30:49 +02:00
Benjamin Otte
e34c7e6796
sorter: Introduce GtkSortKeys
...
GtkSortKeys is an immutable struct that can be used to manage "sort
keys" for items.
Sort keys are memory that is created specifically for sorting. Because
sorting involves lots of comparisons, it's a good idea to prepare the
data relevant for sorting in advance and sort on that data.
In measurements with a PropertyExpression on a string sorter, it's about
??? faster
2020-07-22 14:30:49 +02:00
Benjamin Otte
8c608e9c1c
sortlistmodel: Split the SortItem into 2 arrays
...
Instead of one item keeping the item + its position and sorting that
list, keep the items in 1 array and put the positions into a 2nd array.
This is generally slower while sorting, but allows multiple improvements:
1. We can replace items with keys
This allows avoiding multiple slow lookups when using complex
comparisons
2. We can keep multiple position arrays
This allows doing a sorting in the background without actually
emitting items-changed() until the array is completely sorted.
3. The main list tracks the items in the original model
So only a single memmove() is necessary there, while the old version
had to upgrade the position in every item.
Benchmarks:
sorting a model of simple strings
old new
256,000 items 256ms 268ms
512,000 items 569ms 638ms
sorting a model of file trees, directories first, by size
old new
64,000 items 350ms 364ms
128,000 items 667ms 691ms
removing half the model
old new
512,000 items 24ms 15ms
1,024,000 items 49ms 25ms
2020-07-22 14:30:49 +02:00
Benjamin Otte
283c3b70dd
sortlistmodel: Add an incremental property
...
Also refactor a large part of the sortmodel to make this convenient.
A large amount of time has been spent on getting items-changed regions
minimized.
2020-07-22 14:30:49 +02:00
Benjamin Otte
93599c2c48
testsuite: Add exhaustive sortlistmodel test
...
This is basically a copy/paste from the filterlistmodel test, but
adapted for sorting.
2020-07-22 14:04:40 +02:00
Benjamin Otte
080e625090
sortlistmodel: Make the sort callback useful
...
1. Run step() for a while to avoid very short steps
This way, we batch items-changed() emissions.
2. Track the change region accurately
This way, we can avoid invalidating the whole list if our step just
touched a small part of a huge list.
As this is a merge sort, this is a common occurence when we're buys
merging chunks: The rest of the model outside those chunks isn't
changed.
Note that the tracking is accurate: It determines the minimum change
region in the model.
This will be important, because the testsuite is going to test this.
2020-07-22 14:04:40 +02:00
Benjamin Otte
26696a741e
timsort: Add change tracking to gtk_tim_sort_step()
2020-07-22 14:04:40 +02:00
Benjamin Otte
a209e54b8f
timsort: Add gtk_tim_sort_set_max_merge_size()
...
Makes the SOrtListModel responsive when incrementally sorting.
By making it configurable we can avoid losting performance in the
non-incremental case.
2020-07-22 14:04:40 +02:00
Benjamin Otte
8921dadaa1
timsort: Make sure merges don't take too long
...
Limit the size of the merged areas and thereby chunk larger merges into
smaller ones.
2020-07-22 14:04:40 +02:00
Benjamin Otte
47232acbd8
sortlistmodel: Make sorting incremental
...
This is just an experiment so far to see how long it takes to sort.
2020-07-22 14:04:40 +02:00
Benjamin Otte
cbad8ec2e4
timsort: Add gtk_tim_sort_set_runs()
...
... and use it in the SortListModel
Setting runs allows declaring already sorted regions so the sort does
not attempt to sort them again.
This massively speeds up partial inserts where we can reuse the sorted
model as a run and only resort the newly inserted parts.
Benchmarks:
appending half the model
qsort timsort
128,000 items 94ms 69ms
256,000 items 202ms 143ms
512,000 items 488ms 328ms
appending 1 item
qsort timsort
8,000 items 1.5ms 0.0ms
16,000 items 3.1ms 0.0ms
...
512,000 items --- 1.8ms
2020-07-22 14:04:40 +02:00
Benjamin Otte
800170b47d
sortlistmodel: Use timsort
...
Simply replace the old qsort() call with a timsort() call.
This is ultimately relevant because timsort is a LOT faster in merging
to already sorted lists (think items-chaged adding some items) or
reversing an existing list (think columnview sort order changes).
Benchmarks:
initially sorting the model
qsort timsort
128,000 items 124ms 111ms
256,000 items 264ms 250ms
2020-07-22 14:04:40 +02:00
Benjamin Otte
97c5cb3514
Add a timsort() implementation
2020-07-22 14:04:40 +02:00
Benjamin Otte
081afc0477
sortlistmodel: Track item positions
...
The model now tracks the original positions on top of just the items so that
it can remove items in an items-changed emission.
It now takes twice as much memory but removes items much faster.
Benchmarks:
Removing 50% of a model:
before after
250,000 items 135ms 10ms
500,000 items 300ms 25ms
Removing 1 item:
4,000 items 2.2ms 0ms
8,000 items 4.6ms 0ms
500,000 items --- 0.01ms
2020-07-22 14:04:40 +02:00
Benjamin Otte
e807fc3be0
sortlistmodel: Replace with an array-based model
...
This is the dumbest possible sortmodel using an array:
Just grab all the items, put them in the array, qsort() the array.
Some benchmarks (setting a new model):
125,000 items - old: 549ms
new: 115ms
250,000 items - new: 250ms
This performance can not be kept for simple additions and removals
though.
2020-07-22 14:04:40 +02:00
Boyuan Yang
a1bd3389ed
Update Chinese (China) translation
2020-07-22 02:58:46 +00:00
Boyuan Yang
03a3b5a0b1
Update Chinese (China) translation
2020-07-22 02:39:21 +00:00
Boyuan Yang
1ee2d9a5fa
Update Chinese (China) translation
2020-07-22 02:20:08 +00:00
Matthias Clasen
2e07fcd680
Merge branch 'wip/chergert/quartz4u' into 'master'
...
Merge GDK macOS branch
See merge request GNOME/gtk!2272
2020-07-21 22:22:41 +00:00
Matthias Clasen
d3365d5a60
Merge branch 'matthiasc/for-master' into 'master'
...
gdk: Update gdkkeysyms.h
See merge request GNOME/gtk!2271
2020-07-21 21:53:16 +00:00
Christian Hergert
9dbf99d91a
macos: prototype new GDK backend for macOS
...
This is fairly substantial rewrite of the GDK backend for quartz and
renamed to macOS to allow for a greenfield implementation.
Many things have come across from the quartz implementation fairly
intact such as the eventloop integration design and discovery of
event windows from the NSEvent.
However much has been changed to fit in with the new GDK design and
how removal of child GdkWindow have been completely eliminated.
Furthermore, the new GdkPopup allows for regular NSWindow to be used
to provide popovers unlike the previous implementation.
The object design more closely follows the ideal for a GDK backend.
Views have been broken out into subclasses so that we can support
multiple GSK renderer paths such as GL and Cairo (and Metal in the
future). However mixed mode GL and Cairo will not be supported. Currently
only the Cairo renderer has been implemented.
A new frame clock implementation using CVDisplayLink provides more
accurate information about when to draw drawing the next frame. Some
testing will need to be done here to understand the power implications
of this.
This implementation has also gained edge snapping for CSD windows. Some
work was also done to ensure that CSD windows have opaque regions
registered with the display server.
** This is still very much a work-in-progress **
Some outstanding work that needs to be done:
- Finish a GL context for macOS and alternate NSView for GL rendering
(possibly using speciailized CALayer for OpenGL).
- Input rework to ensure that we don't loose remapping of keys that was
dropped from GDK during GTK 4 development.
- Make sure input methods continue to work.
- Drag-n-Drop is still very much a work in progress
- High resolution input scrolling needs various work in GDK to land
first before we can plumb that to NSEvent.
- gtk/ has a number of things based on GDK_WINDOWING_QUARTZ that need
to be updated to use the macOS backend.
But this is good enough to start playing with and breaking things which
is what I'd like to see.
2020-07-21 14:45:12 -07:00
Christian Hergert
0154a7f528
gdk: disable file transfer portal on macOS
2020-07-21 14:45:12 -07:00
Christian Hergert
add47bebc6
build: add ATK fallback subproject wrapper
...
Very similar to the other fallbacks we use.
2020-07-21 14:45:12 -07:00
Christian Hergert
514b62223d
build: squash various warnings with Clang
...
Otherwise we have really chatty builds that make it difficult to catch
new issues when compiling.
2020-07-21 14:45:12 -07:00
Christian Hergert
7884ab6161
build: fix linking support on macOS with Clang
...
This was preventing any sort of building on macOS, even though the quartz
backend is currently non-functional. Fixing this is a pre-requisite to
getting a new macOS backend compiling.
2020-07-21 14:45:12 -07:00
Matthias Clasen
bc542c5304
gdk: Update gdkkeysyms.h
...
Run the gdkkeysyms-update.pl script to pick up several
new keysyms:
GDK_dead_lowline
GDK_dead_aboveverticalline
GDK_dead_belowverticalline
GDK_dead_longsolidusoverlay
GDK_Keyboard
GDK_WWAN
GDK_RFKill
GDK_AudioPreset
2020-07-21 16:55:28 -04:00
Matthias Clasen
d66ac4981e
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Make picking objects show them
Closes #1876
See merge request GNOME/gtk!2269
2020-07-20 22:06:42 +00:00
Matthias Clasen
9b647a47d1
inspector: Make picking objects show them
...
Changing the selection in the object tree is
not a useful action if we are already in the
object details. Most likely, a user who picks
an object wants to inspect its details, so
just always show them.
Fixes : #1876
2020-07-20 17:30:16 -04:00
Benjamin Otte
b67ffe9650
sortlistmodel: Test that the model is stable
...
Stability is measured relative to the child model, not relative to the
previous sorter.
2020-07-20 22:28:01 +02:00
Benjamin Otte
2c519b006d
testsuite: Fix a leak
2020-07-20 22:28:01 +02:00
Matthias Clasen
852429d163
Merge branch 'barthalion/asan-runner' into 'master'
...
ci: Switch ASAN tests to runners tagged so
See merge request GNOME/gtk!2267
2020-07-20 16:17:49 +00:00
Matthias Clasen
ee9c6bbf75
Merge branch 'action-muxer-speedup' into 'master'
...
Action muxer speedup
See merge request GNOME/gtk!1754
2020-07-20 16:17:17 +00:00
Bartłomiej Piotrowski
d9ece94377
ci: Switch ASAN tests to runners tagged so
2020-07-20 16:41:46 +02:00
Matthias Clasen
486fbce42b
actionmuxer: Update docs and clean up headers
...
Update the doc comment at the top to describe the
current functionality of GtkActionMuxer.
2020-07-20 08:24:54 -04:00
Matthias Clasen
ed92026632
actionmuxer: Use an array for accels
...
We have a lot of accels across all the muxers, but the vast
majority has just one or two, so an array is going to be
smaller and faster for this.
2020-07-20 08:24:54 -04:00
Matthias Clasen
05e614feb7
actionmuxer: Create observed_actions and groups on demand
...
The vast majority of action muxers don't have observers or
groups, so we can avoid the overhead of carrying all these
empty hash tables.
2020-07-20 08:24:54 -04:00
Matthias Clasen
14059afdf1
inspector: Make the actions tab work again
...
Bring back the actions tab; we don't receive
changes anymore, since GtkActionMuxer lost
the GActionGroup signals for this, and the
action observer machinery has no way to listen
for all changes.
2020-07-20 08:24:54 -04:00
Matthias Clasen
9b294eb94e
Add gtk_action_muxer_list_actions
...
This is needed to reinstate the actions support
in the inspector.
2020-07-20 08:24:53 -04:00
Matthias Clasen
96d42cf1cc
actionmuxer: Stop implementing GActionGroup
...
Instead of implementing the GActionGroup interface
and using its signals for propagating changes up
and down the muxer hierarchy, use the GtkActionObserver
mechanism. This cuts down on the signal emission
overhead.
2020-07-20 08:24:53 -04:00
Matthias Clasen
4786a16696
actionmuxer: Port internal users
...
Port all internal users of the action muxer
from the GActionGroup interface to the new
action muxer apis.
2020-07-20 08:24:52 -04:00
Matthias Clasen
14bb12125f
actionmuxer: Add some more api
...
We want to drop the GActionGroup interface from
GtkActionMuxer, so add the necessary api directly
to GtkActionMuxer itself.
2020-07-20 08:24:14 -04:00
Matthias Clasen
07e8dafcea
inspector: Remove action support temporarily
...
This is using the action muxer as a GActionGroup,
and we want to remove that interface from GtkActionMuxer.
The support will come back later.
2020-07-20 08:24:14 -04:00
Matthias Clasen
ab67a81f11
Speed up action muxer setup more
...
Don't emit signals for group insertion/removal
if nobody is listening.
2020-07-20 08:24:14 -04:00
Matthias Clasen
aa76f7e210
Speed up action muxer setup
...
We don't need to duplicate all these action names and
emit all these signals if nobody is listening.
2020-07-20 08:24:14 -04:00
Matthias Clasen
0c15463e41
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2266
2020-07-20 12:23:12 +00:00
Matthias Clasen
5df1356295
gsk: Remove an unused debug flag
...
GSK_DEBUG_DIFF was not used anywhere, so remove it.
2020-07-20 07:03:08 -04:00
Matthias Clasen
95fc81c565
inspector: Add a few more debug flags
...
Add check buttons for GTK_DEBUG=constraints and
GTK_DEBUG=layout in the logs page.
2020-07-20 07:03:08 -04:00
Matthias Clasen
378e594f75
Tweak the GTK_DEBUG=help output
...
I got the layout flag wrong when I added the
improved help output. It is about layout managers,
not about showing layout borders.
2020-07-20 07:03:08 -04:00
Matthias Clasen
86c7fceb09
Merge branch 'list-model-docs' into 'master'
...
List model docs
See merge request GNOME/gtk!2182
2020-07-19 23:50:09 +00:00
Matthias Clasen
b5e20a3e37
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2265
2020-07-19 19:14:04 +00:00
Matthias Clasen
75a30b1f98
windowhandle: Don't use an action muxer needlessly
...
The api that is meant to be used here is
gtk_widget_activate_action.
2020-07-19 13:50:23 -04:00
Matthias Clasen
c64a021af4
NEWS: Updates
2020-07-18 18:28:51 -04:00
Matthias Clasen
9b64635925
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2264
2020-07-18 17:31:31 +00:00
Matthias Clasen
7b76be5360
button: Add explicit key bindings for activation
...
We should not rely on GtkWindow to have global
"activate-default" key bindings that happen to
fall back to activating the focus widget. This is
unreliable, since the bubbling up from the button
to the toplevel may run across other widgets that
may want to use Enter for their own purpose, and
then the button loses out. By adding our own
key bindings, the button gets to handle it before
its ancestors.
This fixes check buttons in the inspector property
list not reacting to Enter despite having focus.
2020-07-18 12:53:10 -04:00
Matthias Clasen
2e2336ffce
text: Claim clicks when grabbing focus
...
If we don't, an ancestor (such a GtkListItemWidget)
may interpret the click as "I should grab focus!",
and still our focus away. This was causing hard-to-focus
entries in the property list in the inspector.
2020-07-18 12:47:47 -04:00
Matthias Clasen
76d80ef516
inspector: Add focus handling to the property editor
...
We want to focus the actual control here.
2020-07-18 11:55:19 -04:00
Matthias Clasen
287d80bd36
editablelabel: Stop editing on focus-out
...
This is the expected behavior for the main use case,
treeview-like 'edit one cell at a time'.
2020-07-18 10:45:27 -04:00
Matthias Clasen
77072b3eaa
fixup editing style class
2020-07-18 10:10:28 -04:00
Matthias Clasen
c7833bb090
editablelabel: Document css nodes
...
Just the usual.
2020-07-18 09:55:46 -04:00
Matthias Clasen
899024cef7
editablelabel: Add a style class while editing
...
Add the .editing style class to the editable label
while it is editing. The idea is that themes can
show a frame around the entry.
2020-07-18 09:54:55 -04:00
Rico Tzschichholz
4da3edd42e
Merge branch 'wip/ricotz/annotations' into 'master'
...
gtk: Improve g-i annotations for methods of GtkExpression subclasses
See merge request GNOME/gtk!2263
2020-07-18 11:06:47 +00:00
Rico Tzschichholz
6b59626817
gtk: Improve g-i annotations for methods of GtkExpression subclasses
2020-07-18 12:30:05 +02:00
Matthias Clasen
7c02ae00c2
inspector: Clean up GtkInspectorGeneral
...
Drop the Private struct.
2020-07-18 00:31:04 -04:00
Matthias Clasen
80e29a3627
inspector: Clean up GtkInspectorMiscInfo
...
Drop the Private struct.
2020-07-18 00:25:46 -04:00
Matthias Clasen
26163a4f30
inspector: Clean up GtkInspectorVisual
...
Drop the Private struct, and do all cleanup in dispose.
2020-07-18 00:17:42 -04:00
Matthias Clasen
dbd88fc210
inspector: Clean up GtkInspectorActions
...
Drop the Private struct, dispose properly,
and don't derive from GtkBox.
2020-07-17 23:59:49 -04:00
Matthias Clasen
2de31e4cac
inspector: Clean up GtkInspectorActionEditor
...
Drop the Private struct, dispose properly,
and don't derive from GtkBox.
2020-07-17 23:36:05 -04:00
Matthias Clasen
1bff328895
inspector: Clean up GtkInspectorLogs
...
Drop the Private struct, dispose properly,
and don't derive from GtkBox.
2020-07-17 23:24:14 -04:00
Matthias Clasen
facf78a5b6
inspector: Allow disposing the inspector
...
We were hiding the inspector when the window
is closed, but that has the side-effect of
keeping references to application windows,
so we would keep them artificially alive,
which can have side-effects.
So, make the inspector go away when closed.
2020-07-17 23:15:42 -04:00
Matthias Clasen
6b19fcd859
inspector: Properly dispose GtkInspectorWindow
2020-07-17 23:15:25 -04:00
Matthias Clasen
ca784e3e1a
inspector: Properly dispose GtkInspectorShortcuts
2020-07-17 23:13:29 -04:00
Matthias Clasen
314c8558d7
inspector: Properly dispose GtkInspectorListData
2020-07-17 23:13:07 -04:00
Matthias Clasen
af30a7fe06
inspector: Dispose tree data properly
...
Another place where we were leaking children.
2020-07-17 22:54:19 -04:00
Matthias Clasen
9ffd7d1970
inspector: Dispose the recorder properly
...
We were leaking children here.
2020-07-17 22:54:10 -04:00
Matthias Clasen
cb906c80eb
inspector: Drop the recorder Private struct
2020-07-17 22:37:24 -04:00
Matthias Clasen
96ce0eb600
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Don't use GtkColorSwatch
See merge request GNOME/gtk!2262
2020-07-18 01:17:43 +00:00
Matthias Clasen
0e476c1f28
gtk-demo: Don't use GtkColorSwatch
...
Making our own is 80 lines of code, so just do it.
2020-07-17 20:44:06 -04:00
Matthias Clasen
f2924988db
Merge branch 'ebassi/for-master' into 'master'
...
Fix typo in the GtkStrinFilter constructor declaration
See merge request GNOME/gtk!2261
2020-07-17 13:18:59 +00:00
Emmanuele Bassi
671435e07f
Fix typo in the GtkStrinFilter constructor declaration
2020-07-17 14:16:46 +01:00
Emmanuele Bassi
b17cfb9b65
Merge branch 'ebassi/for-master' into 'master'
...
Fix typo in the gtk-doc stanza for gtk_string_filter_new()
See merge request GNOME/gtk!2259
2020-07-17 13:09:55 +00:00
Emmanuele Bassi
0385f1aaf4
Fix typo in the gtk-doc stanza for gtk_string_filter_new()
2020-07-17 12:03:17 +01:00
Matthias Clasen
8611faf338
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #2776
See merge request GNOME/gtk!2258
2020-07-17 10:56:16 +00:00
Timm Bäder
7e19911d3f
testwidgettransforms: Fix GtkBox casts
2020-07-17 07:14:50 +02:00
Timm Bäder
c1f5153f6d
boxlayout: Remove unnecessary checks
...
The pointers passed to GtkLayoutManager::measure() are never NULL. The
ones passed to gtk_layout_manager_measure() can be, however.
2020-07-17 06:31:57 +02:00
Timm Bäder
2bd87ce771
boxlayout: Remove unused include
2020-07-17 06:27:50 +02:00
Timm Bäder
de0547ede7
migration guide: Remove a stray html tag
2020-07-17 06:27:23 +02:00
Timm Bäder
14589c2a59
widget: Save a gtk_css_node_get_style call
2020-07-17 05:49:12 +02:00
Timm Bäder
f678b3804d
widget: Remove useless if statement
...
filter_value is never NULL anyway.
2020-07-17 05:49:12 +02:00
Timm Bäder
720c298786
snapshot: Use collect_default directoy in push_debug()
...
Instead of going through collect_debug and then doing a collect_default
anyway if the message is NULL.
2020-07-17 05:49:12 +02:00
Timm Bäder
f721d2de15
debug: Remove resize highlighting
...
This has been broken ever since the debug highlighting moved to
inspector overlays.
2020-07-17 05:49:12 +02:00
Timm Bäder
11f07cb5ad
GdkRGBA: Fix typo in documentation
2020-07-17 05:49:11 +02:00
Timm Bäder
37d7ab88dc
gl renderer: Avoid 9-slicing things that can't be
...
The outline needs to be large enough so changing the size of the outline
does not affect the resulting blurred texture.
Fixes #2776
2020-07-17 05:49:11 +02:00
Timm Bäder
6cde64072d
gl renderer: Remove outdated comment
2020-07-17 05:49:11 +02:00
Timm Bäder
6a60b0f591
gl renderer: Try to intersect rounded clips more often
2020-07-17 05:49:11 +02:00
Timm Bäder
339d9f05e4
gl renderer: Remove unused flag
2020-07-17 05:49:11 +02:00
Timm Bäder
4e4207457f
adwaita: Remove header bar border radius
...
We get this from the window node these days.
2020-07-17 05:49:11 +02:00
Timm Bäder
46bb3e3046
icontheme: Indentation
2020-07-17 05:49:11 +02:00
Timm Bäder
34008e6aab
gl renderer: Ignore rounded clip that only increase the clip
...
This fixes the widget factory rendering too much.
In the widget-factory, we generally have a pretty small update area (two
spinners and a progressbar). We take the extents of that as a update
area and inital clip.
However, the first clip node we see is from the toplevel window, which
essentially increases the clip again to almost the entire window.
Fix that by ignoring such cases.
2020-07-17 05:49:11 +02:00
Timm Bäder
d6b3ac850d
testsuite: Fix test case indentation
2020-07-17 05:49:11 +02:00
Matthias Clasen
9742200ff6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2257
2020-07-17 03:20:20 +00:00
Matthias Clasen
ec10857b84
docs: Move columns below columnview
2020-07-16 22:14:39 -04:00
Matthias Clasen
353d4d161c
Cosmetic docs change
2020-07-16 22:08:15 -04:00
Matthias Clasen
bcd650f169
docs: Revise the filter docs a bit
2020-07-16 21:48:08 -04:00
Matthias Clasen
72d66dfcdd
docs: Revise sorter docs a bit
2020-07-16 21:45:11 -04:00
Matthias Clasen
5e97df5058
bitset: try again
2020-07-16 21:44:31 -04:00
Matthias Clasen
059d131e2b
Merge branch 'wip/chergert/subclass-treeview' into 'master'
...
treeview: allow subclassing GtkTreeView
Closes #2936
See merge request GNOME/gtk!2256
2020-07-17 01:05:07 +00:00
Matthias Clasen
8f7c207c7c
docs: Add more GtkExpression
...
Make GtkExpression show up in the object
hierarchy, and add the param spec and GValue
support to the docs.
2020-07-16 21:02:33 -04:00
Matthias Clasen
b9e8935037
docs: Document GtkBitsetIter
2020-07-16 20:28:21 -04:00
Matthias Clasen
5f33f4ae8e
docs: Add an example
...
Add a small example for setting up columnview sorting.
2020-07-16 20:21:21 -04:00
Matthias Clasen
adf0e8b1e6
docs: Fix examples
...
The formatting for examples in the GtkExpression
long description was messed up.
2020-07-16 20:21:21 -04:00
Christian Hergert
7500f9b255
treeview: allow subclassing GtkTreeView
...
Porting code from GTK 3 without the ability to subclass GtkTreeView
directly can cause an extreme amount of pain on application developers.
It can also complicate performance when it comes to dealing with
encapsulation as the outer widget would also encapsulate the GtkScrollable
implementation from GtkTreeView, typically through GtkViewport.
Fixes #2936
2020-07-16 17:06:15 -07:00
Matthias Clasen
a8d433dd26
docs: Link to GtkTreeRowReference
...
The list overview cross-reference table links
to all objects, except for this one.
2020-07-16 19:53:47 -04:00
Matthias Clasen
ecaf6fced0
docs: Add GtkTreeExpander
...
We want to link to it from various places, so it needs
to be present in the docs.
2020-07-16 19:53:47 -04:00
Matthias Clasen
31a7cac4a6
Merge branch 'matthiasc/arrays' into 'master'
...
Matthiasc/arrays
See merge request GNOME/gtk!2253
2020-07-16 23:31:31 +00:00
Matthias Clasen
5eec736b07
multifilter: Use GdkArray for the filters
2020-07-16 18:44:25 -04:00
Matthias Clasen
cf4a8e2152
multisorter: Use GdkArray for the sorters
2020-07-16 18:44:25 -04:00
Matthias Clasen
31bb969cce
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Use better api
See merge request GNOME/gtk!2254
2020-07-16 21:03:21 +00:00
Matthias Clasen
f4a7c7f6bf
gtk-demo: Use better api
...
We have a getter for the model, lets use it.
2020-07-16 16:26:41 -04:00
Benjamin Otte
495069c868
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2251
2020-07-16 19:43:45 +00:00
Matthias Clasen
dfe470475b
Merge branch 'missing-exports' into 'master'
...
Add missing exports for GtkColumnView methods.
See merge request GNOME/gtk!2252
2020-07-16 18:52:22 +00:00
Benjamin Otte
de56e892aa
listitemmanager: Do a better job on double items
...
Previously, we would unparent the existing item that we were about
to reuse, and not the duplicate one.
Change that.
2020-07-16 20:43:16 +02:00
Benjamin Otte
e518c1f2f3
stringfilter: Make the constructor take an expression
...
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
2020-07-16 20:43:16 +02:00
Benjamin Otte
c5ea59d7d1
gtk-demo: Don't make demos modal
...
That way, demo windows can be maximized and multiple demos can run at
once.
It's especially useful when using --run because the main window is
invisible then.
2020-07-16 20:43:16 +02:00
Benjamin Otte
22eccbdbb6
testsuite: Don't be too exhaustive
...
The test was taking over 60s on CI, that's a but much.
2020-07-16 20:43:16 +02:00
Benjamin Otte
58e85c85e4
testsuite: Add a case with escaped Latin-1 code
...
This came up in recent g_uri_escape() discussions.
2020-07-16 20:43:11 +02:00
Matthias Clasen
6b89148487
Merge branch 'wip/otte/vector' into 'master'
...
Arrays
See merge request GNOME/gtk!2197
2020-07-16 18:05:43 +00:00
Matthias Clasen
ddb9e428ec
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2250
2020-07-16 17:39:16 +00:00
Andreas Persson
b7fa353db2
Add missing exports for GtkColumnView methods.
...
GDK_AVAILABLE_IN_ALL was missing for one method in GtkColumnView and one
in GtkColumnViewColumn.
2020-07-16 18:58:41 +02:00
Matthias Clasen
87b5eadb7c
treesorter tests: Add a comment
...
This looks like a leak, but isn't one.
Add a comment to that effect.
2020-07-16 12:14:28 -04:00
Benjamin Otte
60a09e59e8
stringlist: Convert to array
...
Stringlists are usually built and then never modified, and accessing
items through an array is faster.
2020-07-16 18:09:58 +02:00
Benjamin Otte
6f8e9bf3a9
snapshot: Use GdkArray for the state stack
2020-07-16 18:09:58 +02:00
Benjamin Otte
90b7b84337
array: Add a bunch of new features
...
* GDK_ARRAY_BY_VALUE
#define this to get GArray-like behavior
* gdk_array_splice (v, 0, 0, NULL, 25)
Adding items but passing NULL as the items will zero() them.
* gdk_array_set_size()
A nicer way to call gdk_array_splice()
* constify getters
2020-07-16 18:09:58 +02:00
Benjamin Otte
088b5fc57f
icontheme: Use GdkArray
2020-07-16 18:09:58 +02:00
Benjamin Otte
a4cd974912
array: Add null-termination
2020-07-16 18:09:57 +02:00
Benjamin Otte
65359dcc59
snapshot: Port node list to GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
ac8b398c50
snapshot: Move structs into .c file
...
They aren't used anywhere else.
2020-07-16 18:09:57 +02:00
Benjamin Otte
aac2417893
Remove preallocated array code
...
Now with GdkArray, we can use that one instead.
2020-07-16 18:09:57 +02:00
Benjamin Otte
ad8892df10
main: Use a GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
edc7977c4e
cssselector: Use GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
8bf8ac5076
Add GdkArray
...
This is a scary idea where you #define a bunch of preprocessor values
and then #include "gdkarrayimpl.c" and end up with a dynamic array for
that data type.
See https://en.wikipedia.org/wiki/X_Macro for what's going on.
What are the advantages over using GArray or GPtrArray?
* It's typesafe
Because it works like C++ templates, we can use the actual type of
the object instead of having to use gpointer.
* It's one less indirection
instead of 2 indirections via self->array->data, this array is
embedded, so self->array is the actual data, and just one indirection
away. This is pretty irrelevant in general, but can be very noticable
in tight loops.
* It's all inline
Because the whole API is defined as static inline functions, the
compiler has full access to everything and can (and does) optimize
out unnecessary calls, thereby speeding up some operations quite
significantly, when full optimizations are enabled.
* It has more features
In particular preallocation allows for avoiding malloc() calls, which
can again speed up tight loops a lot.
But there's also splice(), which is very useful when used with
listmodels.
2020-07-16 18:09:57 +02:00
Benjamin Otte
c36cbd5140
sortlistmodel: Remove forgotten G_PARAM_CONSTRUCT_ONLY
2020-07-16 17:33:29 +02:00
Matthias Clasen
ee96bc7185
multiselection tests: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
f94f325636
filterlistmodel tests: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
6c1217dd93
filter tests: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
edb792503b
printunixdialog: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
3a43859286
Cosmetics
2020-07-16 08:54:36 -04:00
Matthias Clasen
c55dd104d4
placessidebar: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
497d137fb8
filechoosernativewin32: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
df01c5c7a4
columnlistitemfactory: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
2d1135fba6
applicationaccels: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
f54ed6f7dc
columviewsorter: Add an assertion
2020-07-16 08:54:36 -04:00
Matthias Clasen
b7efd896b6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2249
2020-07-16 12:52:46 +00:00
Matthias Clasen
46eb51bc30
inspector: Avoid losing a reference
...
This was copying the example in the treelistrowsorter
docs that the previous commit fixed, so we apply
the same fix here.
2020-07-16 07:14:01 -04:00
Matthias Clasen
500dbaabc3
treelistrowsorter: Fix a faulty example
...
gtk_tree_list_row_sorter_new() consumes the
sorter, so we can't pass gtk_column_view_get_sorter(),
since that is transfer none.
2020-07-16 07:14:01 -04:00
Matthias Clasen
594ec3d822
inspector: Don't derive from GtkBox
...
We don't do that anymore. A bin layout
is sufficient here.
2020-07-16 07:14:01 -04:00
Matthias Clasen
f280508209
inspector: Drop a Private struct
...
These are really not needed in the inspector.
2020-07-16 07:14:01 -04:00
Matthias Clasen
480b88c776
inspector: Drop an unused field
2020-07-16 07:14:01 -04:00
Efstathios Iosifidis
a4e63905b1
Update Greek translation
2020-07-15 18:12:26 +00:00
Matthias Clasen
5666127dbc
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Use substring matching in the property list
See merge request GNOME/gtk!2247
2020-07-15 16:52:05 +00:00
Matthias Clasen
c1c110ba65
inspector: Use substring matching in the property list
...
This is convenient for things like "set both hexpand and
vexpand", since you can then search for "expand"
2020-07-15 11:29:06 -04:00
Florentina Mușat
eb2a839892
Update Romanian translation
2020-07-15 08:58:58 +00:00
Matthias Clasen
1c537a6d2e
Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
...
Adwaita: sidebar color for file picker
See merge request GNOME/gtk!2242
2020-07-15 01:41:35 +00:00
Matthias Clasen
c12261a6ec
Merge branch 'wip/fix-picom-crasher' into 'master'
...
x11: Don't set up frame sync fence on unsupported compositors
Closes #2927
See merge request GNOME/gtk!2245
2020-07-15 01:40:49 +00:00
Matthias Clasen
5af7d6bff3
Merge branch 'idle-inhibit' into 'master'
...
Add support for idle inhibition on Wayland
Closes #2202
See merge request GNOME/gtk!2226
2020-07-15 01:38:55 +00:00
Matthias Clasen
de0f4b0f5b
Merge branch 'shortcuts-section-reflow-fix' into 'master'
...
Fix shortcuts section reflow
Closes #2928
See merge request GNOME/gtk!2246
2020-07-15 01:38:38 +00:00
Emmanuel Gil Peyrot
966ab1152d
gtk/wayland: Add support for idle inhibition in GtkApplication
...
This feature was previously only supported on DBus compositors, such as
Mutter, this adds support for other compositors such as all of those
based on wlroots.
This implementation prefers the idle-inhibit Wayland protocol to the
DBus version if it is available, since the inhibitor is per-surface
instead of global it allows a finer control over which displays get
dimmed for instance. For every case not supported by this protocol, a
fallback to the DBus version is used.
It can’t do anything if the GtkWindow isn’t passed, which might warrant
some documentation change to encourage users to not use NULL for this
argument.
This has been tested on Sway.
Fixes #2202 .
2020-07-14 21:47:22 +02:00
Emmanuel Gil Peyrot
74a4432688
gdk/wayland: Add an API to inhibit and uninhibit idle
...
This uses the idle-inhibit protocol from wayland-protocols, to attach an
inhibitor to the GdkSurface. The inhibit function can be called as many
times as the user wants, but the uninhibit function MUST be called as
many times to unset the idle inhibition.
This has been tested on Sway.
2020-07-14 21:47:22 +02:00
Matthias Clasen
115d0cdc07
Fix shortcuts section reflow
...
When this code was ported from gtk_container_get_children
to the dom api, we inadvertendly inverted the order of the
list in one place. With the dom api, we can just avoid
reversing lists altogether, so do that.
Fixes : #2928
2020-07-14 14:48:32 -04:00
Ray Strode
d0ec616fba
x11: Don't set up frame sync fence on unsupported compositors
...
Not all compositors support _NET_WM_FRAME_DRAWN. In cases
where the compositor doesn't support _NET_WM_FRAME_DRAWN we don't
need to do all the fancy damage tracking and fence watching.
Furthermore, if the compositor doesn't support _NET_WM_FRAME_DRAWN,
it's possible that one frame will start before the previous frame has
made it through the pipeline, leading to a blown assertion.
This commit side-steps the unnecessary code and associated assertion
when _NET_WM_FRAME_DRAWN isn't supported.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2927
2020-07-14 14:33:12 -04:00
Florentina Mușat
38cce2bb18
Update Romanian translation
2020-07-14 14:52:19 +00:00
Matthias Clasen
9cb7002b98
Merge branch 'wip/jimmac/large-title-letterspacing' into 'master'
...
Adwaita: revert letter-spacing for large-title
Closes #2932
See merge request GNOME/gtk!2243
2020-07-14 11:47:36 +00:00
Yuri Chornoivan
eb9c91c0a9
Update Ukrainian translation
2020-07-14 10:33:34 +00:00
Jakub Steiner
be07153efa
Adwaita: revert letter-spacing for large-title
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2932
2020-07-14 12:24:25 +02:00
Jakub Steiner
627ec82e60
Adwaita: sidebar color for file picker
...
- use menu like hovers and desaturated selected_bg_color
Partially addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
2020-07-14 11:37:29 +02:00
Matthias Clasen
ccc34ca06c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2241
2020-07-14 02:43:25 +00:00
Matthias Clasen
2b5dd0082d
inspector: Show some information about expressions
...
This is not too useful, but better than nothing.
2020-07-13 20:49:56 -04:00
Matthias Clasen
7b36b339aa
expression: Add some introspection
...
Add a few apis to peek inside expressions, mainly
for the benefit of GtkInspector and similar uses.
2020-07-13 20:19:07 -04:00
Matthias Clasen
b7eb663b82
gtk-demo: Make the words demo expand
...
We want to fill the window here.
2020-07-13 17:54:27 -04:00
Matthias Clasen
1b28353be5
inspector: Ellipsize in the object tree
...
We don't want a long label to blow up the width
of the inspector window.
2020-07-13 17:32:52 -04:00
Matthias Clasen
a07c030d02
inspector: Fix up input enum names
...
We've recently added and removed a few values in these
enumerations. Keep the names in sync, so we don't show
nonsense.
2020-07-13 17:13:43 -04:00
Matthias Clasen
339cccdf53
NEWS: Updates and fixes
2020-07-13 17:10:22 -04:00
Matthias Clasen
577126e99c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2240
2020-07-13 20:48:08 +00:00
Matthias Clasen
125ea5ee4a
treeexpander: Be focusable
...
We need to be focusable so that we can take focus
if the child doesn't.
2020-07-13 15:06:35 -04:00
Matthias Clasen
3c5afc06d1
searchbar: Set a focus vfunc
...
We don't want to take focus ourselves here.
2020-07-13 15:06:08 -04:00
Matthias Clasen
f87c15f4f9
Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
...
Adwaita: sidebar color for file picker
Closes #1586
See merge request GNOME/gtk!2238
2020-07-13 16:31:07 +00:00
Jakub Steiner
fe5c0e2fe3
Adwaita: sidebar color for file picker
...
- avoid using the selected blue for the sidebar
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
2020-07-13 17:03:55 +02:00
Matthias Clasen
c8421cfd82
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2236
2020-07-13 14:38:03 +00:00
Matthias Clasen
fbf99b8d65
Merge branch 'wip/carlosg/windowhandle-gesture-state' into 'master'
...
gtkwindowhandle: Only claim gesture on action
See merge request GNOME/gtk!2237
2020-07-13 14:32:06 +00:00
Yuri Chornoivan
57312c9b79
Update Ukrainian translation
2020-07-13 14:18:40 +00:00
Carlos Garnacho
35d2539ef8
gtkwindowhandle: Only claim gesture on action
...
The press gesture does not need to set claimed state just for n-press
tracking, it will however reset all other click gestures on each press
if the event gets propagated all the way up.
Fixes tracking of multi-press in gestures in widgets that are children
of the window handle. E.g. the headerbar listview in the "File browser"
gtk4-demo demo.
2020-07-13 15:48:12 +02:00
Matthias Clasen
08a4f4552c
Give the inspector a devel header too
...
Lets clearly communicate that we're unstable.
2020-07-13 08:28:02 -04:00
Matthias Clasen
6502d3669f
print-editor: Set the devel style class
...
Lets clearly communicate that we're unstable.
2020-07-13 08:27:51 -04:00
Matthias Clasen
53831e67a7
Integrate the new icons
...
Install and use the node-editor and print-editor icons.
2020-07-13 07:30:46 -04:00
Jakub Steiner
e742fc1206
demos: icons for Print and Node Editors
...
- probably needs meson build hooks
2020-07-13 07:30:46 -04:00
Piotr Drąg
4ef5ee23e6
Update POTFILES.in
2020-07-13 13:17:37 +02:00
Matthias Clasen
4a8330fda0
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Work harder to filter the tree
See merge request GNOME/gtk!2234
2020-07-12 23:16:35 +00:00
Matthias Clasen
b4096cee64
gtk-demo: Work harder to filter the tree
...
Arrange for an item to be visible if it either
matches the filter or has children that do.
2020-07-12 18:26:56 -04:00
Matthias Clasen
032302c358
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2233
2020-07-12 21:23:07 +00:00
Matthias Clasen
a888e1cb65
demo: Clear filter when search is stopped
...
When the search entry disappears on Escape,
reset the search string to "", so we don't
end up with a filtered list and no obvious
way to remove the filtering.
2020-07-12 16:47:51 -04:00
Matthias Clasen
c80b33b2ad
gtk-demo: Make the search bar appear for typing
...
Having the search bar present from the start is
a bit jarring. Make it appear when called for.
2020-07-12 16:26:17 -04:00
Matthias Clasen
f32239df1f
searchbar: Add a key-capture-widget property
...
This is handy to set up this relationship in ui files,
and also makes it accessible in the inspector.
2020-07-12 16:25:48 -04:00
Matthias Clasen
22c1b541df
Merge branch 'wip/sadiq/demo-filter' into 'master'
...
demo: Add a search filter
See merge request GNOME/gtk!2232
2020-07-12 19:04:00 +00:00
Matthias Clasen
78a59c95fe
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2231
2020-07-12 16:59:10 +00:00
Mohammed Sadiq
7583d48266
demo: Add a search filter
2020-07-12 22:19:40 +05:30
Matthias Clasen
f1188aaeac
Fix gtk_file_chooser_error_stack_set_custom_error
...
This never worked, due to a typo.
2020-07-12 12:15:08 -04:00
Matthias Clasen
4dac5c222f
Drop GtkFileChooserEmbed
...
This private interface is no longer used.
2020-07-12 12:15:08 -04:00
Matthias Clasen
0145809a94
filechooserdialog: Stop using ::response-requested
...
Replace the ::response-requested signal by an action.
2020-07-12 12:15:08 -04:00
Matthias Clasen
2e6b8810c0
filechooserdialog: Stop using the embed interface
...
Just call private GtkFileChooserWidget api. There
is no real justification for diverting this through
an extra interface.
2020-07-12 10:59:49 -04:00
Matthias Clasen
d8abcdb5a1
Remove unused includes
...
Only GtkFileChooserWidget and GtkFileChooserDialog
use the GtkFileChooserEmbed interface.
2020-07-12 10:59:31 -04:00
Matthias Clasen
65ecfa20dd
filechooserwidget: Use dropdown api better
...
We now have GtkStringList, so we can implement
the choice api a little cleaner with it.
2020-07-12 10:58:33 -04:00
Matthias Clasen
aa5ab02166
filechooserwidget: Remove homegrown profiling
...
We have sysprof support now, so we no longer have
to use this homegrown profiler.
2020-07-12 10:58:33 -04:00
Matthias Clasen
7ddbbb50ff
Merge branch 'drop-file-system' into 'master'
...
Drop file system
See merge request GNOME/gtk!2229
2020-07-12 14:41:01 +00:00
Matthias Clasen
f2eb036119
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Make style apply in the file browser
See merge request GNOME/gtk!2230
2020-07-12 13:58:30 +00:00
Matthias Clasen
8a8b96bf4b
Drop GtkFileSystem
...
It is no longer used.
2020-07-12 09:49:31 -04:00
Matthias Clasen
bdcda2d8f0
filechooserwidget: Stop using GtkFileSystem
...
Just use gio directly.
2020-07-12 09:49:31 -04:00
Matthias Clasen
ef3f997d55
filechooser: Drop get_file_system from the interface
...
This is no longer used.
2020-07-12 09:49:31 -04:00
Matthias Clasen
b41d380230
filechooserbutton: Stop using GtkFileSystem
...
Just use gio directly.
2020-07-12 09:49:31 -04:00
Matthias Clasen
0210850e86
Reduce includes of gtkfilesystem.h
...
Move a few non-filesystem helpers to gtkfileutils.h,
and drop the include in all the places where it isn't needed.
2020-07-12 09:12:43 -04:00
Matthias Clasen
053223bf65
pathbar: Stop using GtkFileSystem
...
This is just a thin wrapper around some gio functionality
these days, and we want to get rid of it.
2020-07-12 09:12:43 -04:00
Matthias Clasen
746b84cc0f
gtk-demo: Make style apply in the file browser
...
Commit 5afe6f7825 claims to make this demo
'look good', but it failed to actually make its
css apply. Now it really looks good.
2020-07-12 08:11:42 -04:00
Matthias Clasen
f1ad883e00
pathbar: Drop the Private struct
2020-07-11 17:23:55 -04:00
Matthias Clasen
191e0e8d5e
Merge branch 'matthiasc/for-master' into 'master'
...
Fix the build with clang
See merge request GNOME/gtk!2225
2020-07-10 19:29:18 +00:00
Matthias Clasen
55217e2181
Fix the build with clang
...
clang doesn't allow G_GNUC_FALLBACK in dead code.
Seems silly, but what can we do.
2020-07-10 13:21:23 -04:00
Emmanuele Bassi
7c8cd23c5f
Merge branch 'ebassi/ci-timeout' into 'master'
...
Ebassi/ci timeout
See merge request GNOME/gtk!2223
2020-07-10 17:01:56 +00:00
Matthias Clasen
6aafb81702
Merge branch 'ci-tweaks' into 'master'
...
ci: Use lsan again
See merge request GNOME/gtk!2224
2020-07-10 16:13:48 +00:00
Emmanuele Bassi
0578422612
build: Restructure the tests to use dictionaries
...
Instead of an array of arrays, let's use an array of dictionaries; it's
easier to add optional keys without requiring to remember where to put
empty arrays.
2020-07-10 16:32:15 +01:00
Emmanuele Bassi
ad04da84c9
Add the filtermodel-exhaustive test to the slow suite
...
This increases the default timeout.
2020-07-10 16:16:15 +01:00
Emmanuele Bassi
333b013f7f
Increase the default timeout for slow tests
...
If a test is part of the 'slow' test suite, we should increment the
default timeout to compensate.
2020-07-10 16:13:37 +01:00
Matthias Clasen
b3dc517565
ci: Use lsan again
...
Turning it off didn't fix the crashes; and we allow
the asan build to fail anyway now. And the leak reports
are useful whenever it doesn't crash.
2020-07-10 11:11:42 -04:00
Emmanuele Bassi
70e4dabe89
ci: Increase the timeout multiplier
...
We do have some slow tests.
2020-07-10 16:08:59 +01:00
Emmanuele Bassi
d3443d6f2a
ci: Use the timeout multiplier from the environment
...
When running our test suite on our CI infrastructure.
2020-07-10 16:08:14 +01:00
Matthias Clasen
a508f68044
Merge branch 'asan-ci' into 'master'
...
Asan ci
See merge request GNOME/gtk!2214
2020-07-10 13:04:34 +00:00
Matthias Clasen
f191b64bbc
Disable lsan for now
...
The leak sanitizer causes on average 3-4 tests
to segfault during a testsuite run. Disable it
for now to see if we can get a successful
testsuite run with asan alone.
2020-07-10 07:32:48 -04:00
Matthias Clasen
e9efe77839
Merge branch 'wip/Jehan/gio-querymodules-pkg-config-master' into 'master'
...
build-aux: search various Glib/GIO utilities in .pc file.
See merge request GNOME/gtk!2129
2020-07-09 23:53:25 +00:00
Matthias Clasen
d98c0d32f2
ci: Add a build with asan
...
Run our testsuite under asan. We do this in a
separate build, since we need to turn off
introspection to make the build succeed.
As Michael Catanzaro pointed out, this requires a
privileged runner in order to use kernel apis.
2020-07-09 19:43:06 -04:00
Matthias Clasen
dfa2dcceb8
Merge branch 'matthiasc/for-master' into 'master'
...
x11: Plug a memory leak
See merge request GNOME/gtk!2222
2020-07-09 23:06:37 +00:00
Matthias Clasen
d441e7106b
x11: Plug a memory leak
...
Don't leak atoms when we're storing the clipboard.
2020-07-09 18:19:32 -04:00
Benjamin Otte
4cd92f979c
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2221
2020-07-09 21:34:02 +00:00
Benjamin Otte
d1a068e5b1
sorter: Remove a return_if_fail()
...
It's too expsensive.
2020-07-09 22:29:36 +02:00
Benjamin Otte
4d90846182
testsuite: Be more exhaustive
...
Create larger source models in tests, so that we hit the incremental
batch size more often and have a higher chance to expose bugs there.
2020-07-09 22:29:36 +02:00
Benjamin Otte
986f721938
filterlistmodel: Don't filter out every 513th element
...
Incremental filtering would skip every 513th element due to an
off-by-one error.
Test included
2020-07-09 22:29:36 +02:00
Matthias Clasen
7903246355
Ignore more leaks in asan
...
These showed up in ci. The atk-bridge will
be gone before too long anyway. Since we
may not have debug symbols in ci, just at
the so's.
2020-07-09 16:18:07 -04:00
Matthias Clasen
0252ae2be3
Merge branch 'wip/carlosg/range-autoscroll' into 'master'
...
gtkrange: group gestures the right way around
See merge request GNOME/gtk!2220
2020-07-09 20:05:07 +00:00
Matthias Clasen
fa90e42a38
ci: Set LSAN_OPTIONS for tests
...
When running the testsuite with the address sanitizer,
many of our dependencies cause it to report cause it
to report memory leaks, causing tests to fail.
Therefore, point the leak sanitizer at a list of
suppressions. The list is kept in the lsan.supp
file in git.
2020-07-09 15:07:50 -04:00
Matthias Clasen
2d36109565
ci: Use the fedora:v20 image
...
This image includes libasan and libubsan.
2020-07-09 15:07:50 -04:00
Matthias Clasen
de8258171a
ci: Mention image layering in the README
2020-07-09 15:07:50 -04:00
Matthias Clasen
2ed6224778
ci: Add libasan and libubsan to the image
...
Add libasan and libubsan to fedora-base:v20,
and build fedora:20 on top of it.
This is so we can build and run the tests with
the address and undefined behavior sanitizers.
2020-07-09 15:07:50 -04:00
Carlos Garnacho
e1a0171094
gtkrange: group gestures the right way around
...
The gtk_gesture_group() call is not a commutative operation, it
takes two gestures, maybe detaches the first one from its current
group, and adds it to the same group than the second gesture.
With the flipped argument order here, GtkRange was actually detaching
the same gesture in order to group it with a second one two times, so
the desired effect to group all 3 gestures was not achieved.
Fixes autoscroll as the drag gesture is now actually grouped with the
click one, so drag offsets can be accessed from the autoscroll
timeout.
2020-07-09 20:49:25 +02:00
Matthias Clasen
395521f3d3
x11: Plug a memory leak
...
Don't leak atoms when we're storing the clipboard.
2020-07-09 13:52:53 -04:00
Matthias Clasen
8c95a84ea4
Merge branch 'matthiasc/for-master' into 'master'
...
css: Plug a memory leak
Closes #2921
See merge request GNOME/gtk!2219
2020-07-09 17:19:57 +00:00
Matthias Clasen
75db19c789
css: Plug a memory leak
...
When a rule has no styles, we don't add it
to our ruleset. Since we are not adopting
the selectors in this case, we must free them.
Fixes : #2921
2020-07-09 12:14:18 -04:00
Matthias Clasen
f00d2b30bb
Merge branch 'wip/carlosg/scrollbar-fixes' into 'master'
...
Scrollbar fixes
Closes #2879
See merge request GNOME/gtk!2216
2020-07-09 15:56:13 +00:00
Carlos Garnacho
c0c5ce2f9b
gdk/x11: Ignore regular crossing events while in implicit grabs
...
If we create an implicit grab on a surface, leave the surface, and
release the button, we would get 2 XI_Leave events, one with mode
XINotifyNormal when the pointer leaves the surface, and another with
mode XINotifyUngrab when the button is released.
Meanwhile, the upper layers rely on crossing events being paired,
and particularly in no crossing event being sent until the implicit
grab is dismissed (either by releasing it, or via more pervasive
grabs).
Ignoring the set of XINotifyNormal events while an implicit grab
is active adapts the X11 backend to this behavior. If the grab were
released or taken away by another grab, a crossing event with one
of the other XINotify*Grab/XINotify*Ungrab will be generated.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2879
2020-07-09 17:02:07 +02:00
Matthias Clasen
ee9f9ae05e
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2212
2020-07-09 14:49:42 +00:00
Matthias Clasen
387649ded4
Merge branch 'ebassi/subprojects-depth' into 'master'
...
Use depth=1 for cloning sub-projects
See merge request GNOME/gtk!2215
2020-07-09 14:39:01 +00:00
Matthias Clasen
be12131d74
Merge branch 'file-chooser-api-cleanup-2' into 'master'
...
File chooser api cleanup 2
See merge request GNOME/gtk!2213
2020-07-09 14:31:14 +00:00
Carlos Garnacho
896ebdc9d7
gtkscrolledwindow: Look up correctly target in captured motion events
...
Check correctly that the captured motion events are emitted towards the
content or one of the scrollbars, in order to have it set the expected
"over" state depending on whether the drag begins from the scrolledwindow
content or one of the scrollbars.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2879
2020-07-09 16:10:55 +02:00
Matthias Clasen
bc58bd0b83
NEWS: Updates
2020-07-09 09:29:09 -04:00
Matthias Clasen
8d4c87876b
Add a suppression file for asan
...
This can be used similar to valgrind suppressions:
LSAN_OPTIONS=suppressions=`pwd`/lsan.supp meson tests -Cbuild
2020-07-09 09:29:09 -04:00
Matthias Clasen
cebc99ddc7
tests: Plug some more memory leaks
...
These showed up under asan.
2020-07-09 09:29:09 -04:00
Matthias Clasen
1b62203f18
cups: Plug a memory leak
...
This showed up under asan.
2020-07-09 09:29:09 -04:00
Matthias Clasen
06dd8c2cfd
Merge branch 'wayland_surface_app_id_changing' into 'master'
...
add a way to change the application_id of a toplevel wayland GdkSurface
See merge request GNOME/gtk!2205
2020-07-09 13:28:07 +00:00
Emmanuele Bassi
5da21ca4dc
Use depth=1 for cloning sub-projects
...
We don't really need the full history and branches when building
sub-projects.
This should shave some bandwidth and time in our CI pipeline as well.
2020-07-09 14:07:14 +01:00
Matthias Clasen
3e16ef33b0
Merge branch 'fix-levelbar-layout' into 'master'
...
levelbar: Chainup to parent buildable when handling custom tags
See merge request GNOME/gtk!2200
2020-07-09 11:42:33 +00:00
Matthias Clasen
2746a2d929
filechooser: Drop the ::selection-changed signal
...
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 02:06:31 -04:00
Matthias Clasen
e31bacf7be
filechooser: Drop the ::current-folder-changed signal
...
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 01:48:33 -04:00
Matthias Clasen
911ae64931
filechoosernative: Update docs
...
Remove mention of things that are no longer
in the filechooser api.
2020-07-09 01:44:09 -04:00
Matthias Clasen
99a0b35705
filechooser: Drop the ::file-activated signal
...
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 01:40:08 -04:00
Matthias Clasen
89bf8af878
filechooser: Make get_files return a list model
...
Like the other list getters in this interface,
make gtk_file_chooser_get_files() return a
list model.
2020-07-09 01:29:20 -04:00
Matthias Clasen
f3744c991a
Cosmetics
2020-07-09 01:02:21 -04:00
Matthias Clasen
dcee15c0f1
filechooser: Drop gtk_file_chooser_[un]select_file
...
Most use cases for these apis can be handled with
gtk_file_chooser_set_file and/or
gtk_file_chooser_set_current_folder.
2020-07-09 00:50:03 -04:00
Matthias Clasen
2321e9de05
filechooser: Drop gtk_file_chooser_[un]_select_all
...
For now, we just remove them as public api, they are
still used internally.
2020-07-09 00:50:03 -04:00
Matthias Clasen
73dcda460f
tests: Stop using file chooser apis that are going away
...
gtk_file_chooser_[un]select_all are going away, stop
using them.
2020-07-09 00:50:03 -04:00
Matthias Clasen
0f8bc67a98
docs: Add gtk_file_chooser_get_shortcut_folders
2020-07-09 00:50:03 -04:00
Matthias Clasen
379d830123
Merge branch 'printing-portal-fix-master' into 'master'
...
Remember to call print_cb even if print operation is cancelled.
Closes #2917
See merge request GNOME/gtk!2211
2020-07-09 04:40:34 +00:00
Matthias Clasen
bc8bc68b80
Add a suppression file for asan
...
This can be used similar to valgrind suppressions:
LSAN_OPTIONS=suppressions=`pwd`/lsan.supp meson tests -Cbuild
2020-07-09 00:33:35 -04:00
Matthias Clasen
8c4df51a14
tests: Plug some more memory leaks
...
These showed up under asan.
2020-07-09 00:33:14 -04:00
Matthias Clasen
06d67d2384
cups: Plug a memory leak
...
This showed up under asan.
2020-07-09 00:32:17 -04:00
Casey Jao
cc8bb5fc54
Remember to call print_cb even if print operation is cancelled.
...
Closes #2917 .
2020-07-08 23:32:43 -04:00
Matthias Clasen
8fb1e33d0f
Merge branch 'matthiasc/for-master' into 'master'
...
directorylist: Fix file monitoring implementation
See merge request GNOME/gtk!2209
2020-07-09 02:08:53 +00:00
Matthias Clasen
0dc946da63
testsuite: Assorted leak fixes
...
All found by asan.
2020-07-08 17:44:49 -04:00
Matthias Clasen
26a23d3e56
shortcuttrigger: Fix some leaks in error paths
...
Found while running the testsuite under asan.
2020-07-08 17:44:42 -04:00
Matthias Clasen
766f4bc8fe
css: Fix some memory leaks in error paths
...
Found while running the testsuite under asan.
2020-07-08 17:44:36 -04:00
Matthias Clasen
3d008d5929
picture: Don't leak alternative-test
...
This leak showed up while running the testsuite
under asan.
2020-07-08 17:44:29 -04:00
Matthias Clasen
0546e26434
bookmarklist: Don't leak uris
...
This leak showed up in multiple places while
running the testsuite under asan.
2020-07-08 17:44:23 -04:00
Matthias Clasen
e6d8eedc00
testsuite: Fix a memory leak in the bitmask tests
...
This was showing up when running under asan.
2020-07-08 17:44:16 -04:00
Matthias Clasen
13b37b0ba4
gsk: Fix a transform leak
...
This was found by running our testsuite under asan.
2020-07-08 17:44:08 -04:00
Matthias Clasen
779c71b66d
testsuite: Fix some memory leaks reported by asan
2020-07-08 15:09:13 -04:00
Matthias Clasen
8e73d007f5
testsuite: Fix an asan error
...
asan complains that some of the memorytexture tests
read past limits. Avoid that.
2020-07-08 15:09:08 -04:00
Matthias Clasen
e376d638fb
directorylist: Fix file monitoring implementation
...
The while loops were never advancing the iterator.
Oops.
2020-07-08 15:08:53 -04:00
Yuri Chornoivan
52982a88aa
Update Ukrainian translation
2020-07-08 18:28:01 +00:00
Baurzhan Muftakhidinov
422c1d9c0d
Update Kazakh translation
2020-07-08 17:44:28 +00:00
Daniel Șerbănescu
ccc8ad8700
Update Romanian translation
2020-07-08 16:22:30 +00:00
Florentina Mușat
6b0eb970d8
Update Romanian translation
2020-07-08 16:17:12 +00:00
Florentina Mușat
775e35865c
Update Romanian translation
2020-07-08 08:33:20 +00:00
Matthias Clasen
49ce680d53
Merge branch 'directorylist-monitor' into 'master'
...
directorylist: Add monitoring
See merge request GNOME/gtk!2207
2020-07-08 02:25:46 +00:00
Matthias Clasen
463f3d3a52
directorylist: Add monitoring
...
Add a GtkDirectoryList:monitored property, and
keep a file monitor if it is set to TRUE. To ensure
that the list reflects reality, we reload the directory
when monitoring is turned on after the fact. This means
that turning monitoring is expensive, while turning it
off is cheap, so we default to monitoring being on.
2020-07-07 21:21:41 -04:00
Jordi Mas
f6347f18b0
Fixes to Catalan translations
2020-07-07 20:24:24 +02:00
Yuri Chornoivan
2e959fe300
Update Ukrainian translation
2020-07-07 18:03:32 +00:00
Yuri Chornoivan
56f771ba29
Update Ukrainian translation
2020-07-07 17:55:52 +00:00
Baurzhan Muftakhidinov
32e96215b4
Update Kazakh translation
2020-07-07 17:21:22 +00:00
Matthias Clasen
86f800e11d
Merge branch 'inspector-navigation' into 'master'
...
Inspector navigation
See merge request GNOME/gtk!2201
2020-07-07 17:04:51 +00:00
Matthias Clasen
4d371b2b16
inspector: Fix property list styling
...
We use dropdowns here now, so style them.
Also, avoid the swoosh when switching to the
property list, when everything shrinks.
2020-07-07 11:21:42 -04:00
Caolán McNamara
7e97c2513f
gtk#767 add a way to change the application_id of a toplevel wayland GdkSurface
...
so LibreOffice can reuse toplevels and get the right task icons
references;
https://gitlab.gnome.org/GNOME/gtk/-/issues/767
https://lists.freedesktop.org/archives/wayland-devel/2019-July/040704.html
e0d6ad1d5e
https://bugs.documentfoundation.org/show_bug.cgi?id=125934
https://bugzilla.redhat.com/show_bug.cgi?id=1334915
https://bugreports.qt.io/browse/QTBUG-77182
2020-07-07 15:56:12 +01:00
Emmanuele Bassi
2bf5a150e6
Merge branch 'issue-2915' into 'master'
...
Issue 2915
Closes #2915
See merge request GNOME/gtk!2204
2020-07-07 11:48:07 +00:00
Emmanuele Bassi
18c87faaa5
Annotate string array
...
Fixes : #2915
2020-07-07 12:06:28 +01:00
Emmanuele Bassi
fdeda388bf
Fix "not nullable" annotation
2020-07-07 12:03:44 +01:00
Stefano Facchini
ea2c27c640
levelbar: Chainup to parent buildable when handling custom tags
...
This is necessary to handle <layout> tags.
2020-07-07 09:34:00 +02:00
Matthias Clasen
dfc04a590d
inspector: Reshuffle the sidebar
...
Move the sidebar in the object page below the
object header, for a more logical hierarchy.
2020-07-07 02:05:18 -04:00
Matthias Clasen
fe5b364675
inspector: Drop unused properties
...
The individual pages no longer need the object tree
to show object details, this works with the window
now.
2020-07-07 01:25:21 -04:00
Matthias Clasen
9b73c55559
Merge branch 'patch-1' into 'master'
...
Fix typo: Filer -> Filter
See merge request GNOME/gtk!2203
2020-07-07 05:08:19 +00:00
Matthias Clasen
0b38a0663d
inspector: Add dom-like navigation controls
...
Maintain a stack of objects, and add ˂˅˄˃ buttons
that navigate this stack, as well as the widget
tree and list models.
2020-07-07 00:51:18 -04:00
Matthias Clasen
e5c0716293
inspector: Remove an unused field
2020-07-07 00:48:43 -04:00
Matthias Clasen
54a3293cad
stack: Fix handling of GtkStackPage:visible
...
The stack wasn't updating its visible-child when
the stack pages visible property changes. This
showed up in the inspector, when showing the details
for a list model item.
2020-07-07 00:48:43 -04:00
Yuri Chornoivan
818287a7ce
Update Ukrainian translation
2020-07-07 04:45:03 +00:00
Yuri Chornoivan
59119cd898
Fix typo: Filer -> Filter
2020-07-07 04:41:44 +00:00
Daniel Șerbănescu
817da34f7e
Update Romanian translation
2020-07-06 20:41:16 +00:00
Daniel Șerbănescu
8fa44fc3e6
Update Romanian translation
2020-07-06 20:38:44 +00:00
Jordi Mas
c7e94151b2
Update Catalan translation
2020-07-06 22:35:10 +02:00
Matthias Clasen
729ba44297
Merge branch 'wip/otte/filterlistmodel' into 'master'
...
Improve GtkFilterListModel
See merge request GNOME/gtk!2199
2020-07-06 15:42:44 +00:00
Matthias Clasen
2a2a6879c5
Merge branch 'file-chooser-api-cleanups' into 'master'
...
File chooser api cleanups
See merge request GNOME/gtk!2195
2020-07-06 15:41:56 +00:00
Matthias Clasen
e7b773b031
filechooser: Add a readonly :shortcut-folders property
...
This makes the shortcut folders list accessible in the
the inspector.
2020-07-06 11:03:48 -04:00
Matthias Clasen
57a225681c
filechooser: Add gtk_file_chooser_get_shortcuts
...
Replace gtk_file_chooser_list_shortcuts with a new
api that returns a list model.
Update all callers.
2020-07-06 11:03:48 -04:00
Matthias Clasen
ea07a92366
filechooser: Add a readonly :filters property
...
This makes the filters list accessible in the
the inspector.
2020-07-06 11:03:48 -04:00
Matthias Clasen
76290e8ddb
filechooser: Add gtk_file_chooser_get_filters
...
Replace gtk_file_chooser_list_filters with a new
api that returns a list model.
Update all callers.
2020-07-06 10:36:35 -04:00
Jordi Mas
26d83b1ab7
Update Catalan translation
2020-07-06 09:41:45 +02:00
Jordi Mas
2bba856206
Update Catalan translation
2020-07-06 08:54:41 +02:00
Benjamin Otte
bf3382a89e
testsuite: Add more filterlistmodel tests
...
These ones try to be exhaustive and randomly catch weird cases.
As such, the tests are more complicated and harder to grasp.
Sorry.
2020-07-06 03:42:43 +02:00
Benjamin Otte
3162e25671
bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice()
2020-07-06 03:42:43 +02:00
Benjamin Otte
3d931b4fe2
bitset: Don't overflow when splicing
...
Testcase added.
2020-07-06 03:42:43 +02:00
Matthias Clasen
fc770a383a
gtk-demo: Use a progressbar in the words demo
...
This looks better and a bit more polished.
2020-07-06 03:42:43 +02:00
Matthias Clasen
62c385a9dd
gtk-demo: No selection in the words demo
...
This demo is about filtering, not about selection,
so use a GtkNoSelection.
2020-07-06 03:42:43 +02:00
Matthias Clasen
7c4ad1a5c4
gtk-demo: Cosmetic fixes for the words demo
...
Set a window size, and don't put newlines in titles, left align and
ellipsize the label.
2020-07-06 03:42:43 +02:00
Benjamin Otte
ac524bb13a
demo: Make words listview load async
...
And add an "Open" button (why are filechooser buttons such a catastrophe
that I can't make them smaller?).
2020-07-06 03:42:43 +02:00
Benjamin Otte
66fa9380b5
filterlistmodel: Look at type of change
...
This way we can avoid refiltering most of an already filtered list when
the change becomes more strict.
2020-07-06 03:42:43 +02:00
Benjamin Otte
b64eb6ca13
gtk-demo: Add incremental filtering to words demo
2020-07-06 03:42:43 +02:00
Benjamin Otte
9b2d8ac362
filterlistmodel: Add gtk_filter_list_model_get_pending()
...
This allows tracking if the model is busy filtering.
2020-07-06 03:42:43 +02:00
Benjamin Otte
2a90bc1a9b
filterlistmodel: Add incremental filtering
2020-07-06 03:42:43 +02:00
Benjamin Otte
d4b868d9bc
filterlistmodel: Rewrite with bitset data structure
...
Bitsets are more powerful, less memory intensive and faster than the old
GtkRbTree version.
2020-07-06 03:42:43 +02:00
Benjamin Otte
b54f6710a7
gtk-demo: Add a listview demo for filtering strings
2020-07-06 03:42:42 +02:00
Matthias Clasen
6bb7caf155
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2198
2020-07-06 00:42:14 +00:00
Matthias Clasen
202348f9d0
filefilter: Cosmetics
...
Various cleanups to make this code look less ancient.
2020-07-05 19:54:57 -04:00
Matthias Clasen
1a613de2f6
filefilter: Cosmetics
2020-07-05 19:54:20 -04:00
Matthias Clasen
665df37703
filefilter: Header file cosmetics
2020-07-05 19:36:45 -04:00
Matthias Clasen
acad5e4e3d
filefilter: Fix an embarrassing oversight
...
I forgot to remove some dead code, and left the
pixbuf_formats list in the rule union. Oops.
2020-07-05 19:32:36 -04:00
Matthias Clasen
6267c8469b
Merge branch 'file-filter2' into 'master'
...
Make GtkFileFilter a GtkFilter
See merge request GNOME/gtk!2190
2020-07-05 20:32:05 +00:00
Matthias Clasen
5a2f791bdd
filefilter: Cleanups and optimizations
...
Make mime-type rules hold multiple types. Store the
content types, so we don't have to do mime-type -> content-type
conversion in the match function. Store content types for the
pixbuf-formats rule as well, so we can avoid memory allocation
in the match function altogether.
2020-07-05 15:12:07 -04:00
Matthias Clasen
286a00a1db
docs: Cleanups for the file filter docs
...
Now that GtkFileFilter is a GtkFilter, move it to the
filter section of the docs. While we are at it, touch
up the docs in some places.
2020-07-05 15:10:18 -04:00
Matthias Clasen
11dd602b28
Drop gtk_file_filter_filter
...
It has been superseded by gtk_filter_match.
2020-07-05 15:10:18 -04:00
Matthias Clasen
35988d659d
Stop using gtk_file_filter_filter
...
Make all users of GtkFileFilter use it via the
GtkFilter api. This is in preparation for dropping
gtk_filter_filter_filter.
2020-07-05 15:10:18 -04:00
Matthias Clasen
be3449b3ce
filefilter: Convert to a GtkFilter
...
Make GtkFileFilter implement GtkFilter.
2020-07-05 15:10:18 -04:00
Matthias Clasen
2d8fddc1e9
filefilter: Drop GtkFileFilterFlags
...
Replace gtk_file_filter_get_needed by gtk_file_filter_get_attributes,
which directly returns the attributes that are needed.
Update all callers.
2020-07-05 15:10:13 -04:00
Matthias Clasen
644d522d19
filefilter: Drop custom filters
...
These don't work with native file choosers.
2020-07-05 14:34:33 -04:00
Matthias Clasen
a8b0125da1
filefilter: Drop GtkFileFilterInfo
...
We can just make the filter operate on GFileInfo.
This is in preparation for making GtkFileFilter a
GtkFilter.
Update all users.
2020-07-05 13:55:42 -04:00
Matthias Clasen
acccac516e
filefiler: No more floating
...
Make GtkFileFilter not be initially unowned anymore.
This is in preparation for deriving GtkFileFilter
from GtkFilter. Update all callers.
2020-07-05 12:36:47 -04:00
Matthias Clasen
d65214fa4e
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2193
2020-07-05 16:06:16 +00:00
Baurzhan Muftakhidinov
1d96fc8237
Update Kazakh translation
2020-07-05 12:51:00 +00:00
Florentina Mușat
882a87ca19
Update Romanian translation
2020-07-05 10:42:46 +00:00
Benjamin Otte
1dbb8df95f
stringlist: Export gtk_string_object_new()
...
There are various use cases where it makes sense to construct these -
from our internal testing to using them in flatten- or mapmodels.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f6c2c2edbd
stringlist: Call splice() for adding items after construction
...
This has the benefit of actually allowing NULL to be passed.
2020-07-05 02:59:21 +02:00
Benjamin Otte
c4e4de36f6
stringlist: Remove n_additions argument from gtk_string_list_splice()
...
char ** arrays are null-terminated everywhere, so make sure they are in
splice(), too.
Also fix the argument to be a const char * const * like in the
constructor.
2020-07-05 02:59:21 +02:00
Benjamin Otte
67cbb2a7d3
stringlist: Clarify docs for gtk_string_list_get_string()
...
Make sure it's obvious that it behaves like g_list_model_get_item() and
returns NULL for pos >= n_items.
2020-07-05 02:59:21 +02:00
Benjamin Otte
a979daa8ea
stringlist: Make one constructor call the other
...
Simplifies code.
2020-07-05 02:59:21 +02:00
Benjamin Otte
fb14f50ec1
stringlist: Make property not construct-only
...
Massively speeds up creation of long stringlists.
2020-07-05 02:59:21 +02:00
Benjamin Otte
6099fbafc1
bitset: Add gtk_bitset_new_range()
...
It's a common use.
2020-07-05 02:59:21 +02:00
Benjamin Otte
6f2f828bce
tests: Make testlistview be a list again
...
The grid conversion was for testing and should never have been
committed.
2020-07-05 02:59:21 +02:00
Benjamin Otte
795d3122cc
selectionmodels: Add set_model() support
...
Now that we don't care about item types anymore, we can make the child
models settable.
We try to retain the selection, even when the model changes.
2020-07-05 02:59:21 +02:00
Benjamin Otte
5080730728
listmodels: Stop respecting item-type
...
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.
It turns out nobody uses item-type anyway.
So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.
All the models need to be able to deal with any type of object going
through anyway.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f75a3a0e95
stringlist: Take a const char const * argument
...
Sucks that we need to cast a char**, but otherwise we need to cast
{"foo", "bar", "baz" } arrays.
2020-07-05 02:34:42 +02:00
Benjamin Otte
b75db7d1c6
stringfilter: Don't crash if the expression returns ""
2020-07-05 00:34:21 +02:00
Benjamin Otte
b03069bdf6
a11y: Remove double initialization of variables
2020-07-05 00:34:21 +02:00
Yuri Chornoivan
1c71e56e75
Update Ukrainian translation
2020-07-04 17:02:55 +00:00
Matthias Clasen
9332d0dcc8
Merge branch 'typo' into 'master'
...
Fixes typos
See merge request GNOME/gtk!2188
2020-07-04 15:48:29 +00:00
Matthias Clasen
9ad37583e6
Merge branch 'matthiasc/for-master' into 'master'
...
filechooser: Make filtering work again
See merge request GNOME/gtk!2189
2020-07-04 15:46:19 +00:00
Matthias Clasen
69975627e9
filechooser: Make filtering work again
...
One too many lines were dropped when this filter combo
was converted to a dropdown. Bring it back, to make
filtering work again.
2020-07-04 10:28:10 -04:00
Piotr Drąg
b74a489aba
Update POTFILES.in and POTFILES.skip
2020-07-04 13:37:03 +02:00
Jordi Mas
599b807726
Fixes typos
2020-07-04 10:00:25 +02:00
Jordi Mas
6510ca8bdd
Update Catalan translation
2020-07-04 09:58:03 +02:00
Matthias Clasen
be20a04e04
Merge branch 'selection-filter-fixes' into 'master'
...
Selection filter fixes
See merge request GNOME/gtk!2186
2020-07-03 16:10:03 +00:00
Matthias Clasen
92e5536335
testsuite: Add selection filter model tests
...
Verify that the selection filter changes mirror
the selection changes of the underlying model,
as expected. These tests verify the fixes in
the previous commit.
2020-07-03 11:12:55 -04:00
Matthias Clasen
c2da2f7ecd
selectionfilter: Fix bugs in signal translation
...
When the position is 0, we can't check for unchanged
elements below with gtk_bitset_size_in_range. And
we don't need to, either.
And be careful when translating [start,length]
intervals to [first,last] ones. Off-by-one errors
lurk everywhere.
2020-07-03 11:12:55 -04:00
Matthias Clasen
130bd5937c
docs: Add guidance about list model performance
...
Add a section about the performance tradeoffs between
different list model implementations.
2020-07-03 09:29:19 -04:00
Boyuan Yang
54bfd380a8
Update Chinese (China) translation
2020-07-03 12:49:24 +00:00
Matthias Clasen
f01d695e6c
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Fix the monitor list width
Closes #2909
See merge request GNOME/gtk!2185
2020-07-03 05:51:29 +00:00
Matthias Clasen
619b2465c1
inspector: Fix the monitor list width
...
Fixes #2909
2020-07-03 01:07:13 -04:00
Matthias Clasen
cc18191a8e
Merge branch 'wip/exalm/show-title-buttons' into 'master'
...
headerbar: Show title buttons by default
See merge request GNOME/gtk!2175
2020-07-03 05:05:24 +00:00
Matthias Clasen
1f8e7c8aab
Merge branch 'selection-filter' into 'master'
...
Selection filter
See merge request GNOME/gtk!2184
2020-07-03 04:15:12 +00:00
Matthias Clasen
671daea262
gtk-demo: Track the selection
...
Use GtkSelectionFilterModel to track and display the
selection. Add some other selection information for
good measure.
2020-07-02 22:59:03 -04:00
Matthias Clasen
76533513c2
Add a selection filter model
...
This model presents the selection of a GtkSelectionModel
as its own list model.
2020-07-02 22:59:03 -04:00
Matthias Clasen
0d3988365b
filterlistmodel: Make model not construct-only
...
This property wasn't meant to be construct-only.
2020-07-02 22:59:03 -04:00
Benjamin Otte
0966636803
bitset: Add APIs needed for a filterlistmodel
2020-07-02 17:19:16 -04:00
Alexander Mikhaylenko
7c3b30036e
headerbar: Show title buttons by default
...
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
2020-07-02 23:51:16 +05:00
Matthias Clasen
988901294d
Merge branch 'matthiasc/for-master' into 'master'
...
Add gtk_multi_selection_get_model
See merge request GNOME/gtk!2179
2020-07-01 01:36:47 +00:00
Matthias Clasen
43b9fc6981
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!2162
2020-07-01 01:35:56 +00:00
Benjamin Otte
25f670faae
Merge branch 'wip/chergert/gtk4-remove-textlayout-vtable' into 'master'
...
textlayout: remove virtual table indirection
See merge request GNOME/gtk!2178
2020-07-01 01:19:12 +00:00
Matthias Clasen
d0068a036f
Add gtk_multi_selection_get_model
...
This getter was missing.
2020-06-30 20:47:03 -04:00
Christian Hergert
fae014eb45
textlayout: remove virtual table indirection
...
GtkTextLayout is private now and therefore we can drop all of
the indirection through the class vtable. Instead, just call the
implementations directly and remove the unused vtable entries
for default signal handlers.
2020-06-30 17:38:31 -07:00
Matthias Clasen
f0ea0be15d
Merge branch 'matthiasc/for-master' into 'master'
...
Drop unnecessary uses of gtk_style_context_add_class
See merge request GNOME/gtk!2177
2020-06-30 22:52:18 +00:00
Matthias Clasen
9650236b23
Merge branch 'inspector-list-model' into 'master'
...
Inspector list model support
See merge request GNOME/gtk!2176
2020-06-30 22:17:29 +00:00
Matthias Clasen
c0e2d7c62f
Drop unnecessary uses of gtk_style_context_add_class
...
We can use gtk_widget_add_css_class instead, most places.
2020-06-30 17:42:30 -04:00
Matthias Clasen
cc072eb7cd
inspector: Avoid a use of gtk_style_context_add_class
...
We have gtk_widget_add_css_class for this now.
2020-06-30 17:10:05 -04:00
Matthias Clasen
613213f597
inspector: proper list model support
...
Add a data tab for list models that allows exploring
the objects in the model.
2020-06-30 17:09:55 -04:00
Matthias Clasen
e25c25fcb5
Merge branch 'wip/on-the-surface-good-fences-can-make-bad-neighbors' into 'master'
...
x11: Handle window getting unmap while frame still pending
Closes #2902
See merge request GNOME/gtk!2168
2020-06-30 19:21:45 +00:00
Matthias Clasen
52666d6fe5
inspector: Rename DataList -> TreeData
...
Rename the DataList object to TreeData, in preparation
for adding a ListData object for list models. While
we are touching it, modernize it a bit (drop the Private
struct, use a layout manager, etc).
2020-06-30 15:18:37 -04:00
Ray Strode
56b3669411
x11: Avoid thawing surface until frame is drawn
...
Since commit 972134abe4 a frame getting
drawn has three states (with the vendor nvidia driver at least):
1. drawn by gtk waiting on the GPU
2. drawn by GPU waiting on the compositor
3. drawn by compositor
Those three states are encoded in two flags: frame_pending and
frame_still_painting.
frame_pending means step 1 is done, but step 2 and 3 are still
in progress. frame_still_painting means step 2 is still in progress.
After step 1 is finished the surface is frozen until step 3 is finished.
When the compositor notifies gtk it's done with step 3, with a
_NET_WM_FRAME_DRAWN client message, the toolkit thaws the surface to
allow the next frame to proceed.
The compositor sometimes sends gtk a _NET_WM_FRAME_DRAWN client message
between steps 1 and 2. This message should be ignored because it's not
a reply to the current frame.
Unfortunately, gtk currently assumes if it gets a _NET_WM_FRAME_DRAWN
client message while waiting for step 2 that it's actually at step 3,
and proceeds to draw a new frame while the existing frame is still
pending, leading to a blown assertion.
This commit addresses the problem by ignoring _NET_WM_FRAME_DRAWN
client messages from the compositor unless actually expecting one.
Fixes : #2902
2020-06-30 14:36:15 -04:00
Ray Strode
e3b5b76cdd
x11: Handle window getting unmapped while frame still pending
...
Since commit 972134abe4 we now call
glClientWaitSync for the vendor nvidia driver, to know when a frame
is ready for the compositor to process.
If a surface is hidden while a frame is still being rendered by the GPU,
the surface will never produce the damage event the code relies on to
trigger the call to glClientWaitSync. This leaves the fence dangling,
and the next time the surface is shown, it will start a fresh frame
and blow an assertion since the fence from the last frame is still
hanging around.
This commit ensures a frame gets fully wrapped up before hiding a
surface.
2020-06-30 14:36:07 -04:00
Matthias Clasen
bbb28196e5
inspector: Remove list model support from the property editor
...
This makes the inspector lock up when used with any production
size list model, and blocks access to properties of the model
itself. Instead, we'll make the model available as an object
and add a data tab for list model contents, like we already
do for tree models.
2020-06-30 14:22:01 -04:00
Matthias Clasen
72d3a9042c
Merge branch 'issue-2904' into 'master'
...
Add nullable annotations for gtk_cclosure_expression_new()
Closes #2904
See merge request GNOME/gtk!2172
2020-06-30 12:03:06 +00:00
Emmanuele Bassi
f2853ffa8e
Add nullable annotations for gtk_cclosure_expression_new()
...
Fixes : #2904
2020-06-30 12:11:21 +01:00
Matthias Clasen
fca2ba963d
gtklistitemfactory: Cosmetic documentation fixes
2020-06-29 22:11:44 -04:00
Matthias Clasen
806779769e
builderlistitemfactory: Documentation fixes
2020-06-29 22:11:36 -04:00
Matthias Clasen
82aa0d1f7c
expression: Add to the docs
...
Add some more long-form explanation of what expressions
are about and where they are used.
2020-06-29 22:10:34 -04:00
Matthias Clasen
72f1d34eca
Drop GtkFunctionsListItemFactory
...
It has been superseded by GtkSignalsListItemFactory.
2020-06-29 22:10:34 -04:00
Matthias Clasen
c267a75eef
Stop using GtkFunctionsListItemFactory
...
This was an early attempt at a factory, and has been
superseded by GtkSignalsListItemFactory. Port all users
the the newer one.
2020-06-29 22:10:34 -04:00
Carlos Garnacho
7170fdebb9
Merge branch 'wip/Jehan/GtkIMContextWayland-master' into 'master'
...
gtk: focus out the GtkIMContextWayland upon finalization.
See merge request GNOME/gtk!2170
2020-06-29 22:24:32 +00:00
Jehan
7ccf32db57
gtk: focus out the GtkIMContextWayland upon finalization.
...
In particular, it will NULL-ified the current global context if this is
the finalized one, avoiding dangling invalid pointers.
Would have been a cherry-pick from branch gtk-3-24 of commit
b592ded80a , but files moved.
2020-06-29 22:17:08 +02:00
Daniel Mustieles
520c2116a3
Updated Spanish translation
2020-06-29 16:03:40 +02:00
Emmanuele Bassi
e818685921
Merge branch 'ci-style' into 'master'
...
ci: Create new origin for forks
See merge request GNOME/gtk!2164
2020-06-29 13:45:03 +00:00
Matthias Clasen
6ddd9793f3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #1887
See merge request GNOME/gtk!2167
2020-06-29 12:30:41 +00:00
Emmanuele Bassi
6bdca276a2
ci: Create new origin for forks
...
We don't need to create a new remote and fetch its master if we're
checking a merge request done on the upstream repository.
2020-06-29 13:14:40 +01:00
Matthias Clasen
d4ff275002
node-editor: Add a help window
...
Add a Help item to the gear menu that opens the
node-format.md file in a new window. This could
be improved if we could parse markdown and apply
tags, similar to how we can load pango markup.
2020-06-29 07:36:55 -04:00
Matthias Clasen
2b6f243578
node-editor: Cosmetics
...
Use a title style class for the labels.
2020-06-29 07:36:55 -04:00
Matthias Clasen
8770584bfb
node-editor: Add a gear menu
...
Add a gear menu with Inspector and About menu items.
2020-06-29 07:36:55 -04:00
Matthias Clasen
4f7f15700c
node-editor: Document the node format
...
Add a markdown file with the documentation of the
node format.
Fixes : #1887
2020-06-29 07:36:55 -04:00
Matthias Clasen
cab6808673
gtk-demo: Fix binary name in --version
...
We are gtk4-demo, not gtk3-demo.
2020-06-28 23:36:35 -04:00
Matthias Clasen
b77110c35a
bitset: Fix documentation syntax
2020-06-28 22:38:23 -04:00
Matthias Clasen
c4e8218f49
bitset: Add more tests
...
Add some tests for rectangles, and for iters.
2020-06-28 22:38:23 -04:00
Matthias Clasen
c8b57154cb
bitset: Correct preconditions in gtk_bitset_add_rectangle
...
We want to make sure that the rectangle fits in the grid.
2020-06-28 22:38:22 -04:00
Matthias Clasen
c4b2112f16
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2743
See merge request GNOME/gtk!2161
2020-06-28 23:47:09 +00:00
Matthias Clasen
3132353ec5
ci: Drop one of the focus tests
...
One of the widget-factory focus tests is flaky in ci,
perhaps due to font changes causing size computations
to go slightly differently.
Drop this for now.
2020-06-28 18:59:48 -04:00
Matthias Clasen
3dc6267146
testsuite: Bump the per-test timeout to 60s
...
The bitset test has repeatedly run into the 30s timeout
in the ci, so give it some more time.
2020-06-28 17:02:01 -04:00
Matthias Clasen
6a6146a9e0
bitset: Fix the right-shift implementation
...
This was not doing the right thing at all.
This commit also adds tests for left- and
right-shift.
2020-06-28 16:37:30 -04:00
Matthias Clasen
01fbf8444b
Stop setting GTK_IM_MODULE_FILE
...
GTK no longer reads this environment variable, so
setting it can have no benefit for uninstalled demos
anymore.
2020-06-28 13:42:02 -04:00
Matthias Clasen
1f8c79eca1
Add g_intern_static_string to valgrind suppressions
...
That function can also trigger a quark table reallocation.
2020-06-28 13:42:02 -04:00
Matthias Clasen
5229069101
widget: Avoid uninitialized access
...
Initialize all field in the GtkCrossingData struct
when synthesizing crossing events.
Fixes : #2743
2020-06-28 13:42:02 -04:00
Matthias Clasen
a6752bd3e0
gtk: Better help for GTK_DEBUG
...
Reuse the newly introduced gdk_parse_debug_var for
GTK_DEBUG.
2020-06-28 13:42:02 -04:00
Matthias Clasen
93a51f77c4
gsk: Better help for GSK_DEBUG
...
Reuse the newly introduced gdk_parse_debug_var for
GSK_DEBUG.
2020-06-28 13:42:02 -04:00
Matthias Clasen
9f2926dde3
gdk: Better help for GDK_DEBUG
...
Include docstrings and format the list of supported
values better.
Also, add the same warning we have for GTK_DEBUG when
the environment variable is ignored.
2020-06-28 13:42:02 -04:00
Matthias Clasen
d31bb8b503
testsuite: Don't pass GDK_DEBUG for release builds
...
The debug env vars are ignored in release builds,
and may spew warnings about that fact that break
tests.
2020-06-28 13:42:02 -04:00
Matthias Clasen
d46b04631e
wayland: Respect GDK_DEBUG=default-settings
...
You can get this in other ways for Wayland (by
setting GSETTINGS_BACKEND=memory), but it is better
to be consistent across backends.
2020-06-28 13:42:02 -04:00
Matthias Clasen
30eca5a523
Drop GTK_DEBUG_SHORTCUTS
...
It is unused.
2020-06-28 13:42:02 -04:00
Matthias Clasen
4fa71fd82a
shortcuts: Use GTK_DEBUG_KEYBINDINGS
...
There was just a single message under GTK_DEBUG_SHORTCUTS.
Consolidate with GTK_DEBUG_KEYBINDINGS.
2020-06-28 13:42:02 -04:00
Matthias Clasen
6819c7c792
docs: Update environment sections
...
Fix links in markdown, and add details about
Wayland environment variables.
2020-06-28 13:42:01 -04:00
Matthias Clasen
0c9a0dfed1
Merge branch 'print-editor' into 'master'
...
Install the print editor
See merge request GNOME/gtk!2165
2020-06-28 16:44:32 +00:00
Matthias Clasen
5d9bcfb64a
stringlist: Cosmetic documentation fix
2020-06-28 12:43:16 -04:00
Matthias Clasen
7047d68404
gtk: Add some missing symbols to the docs
2020-06-28 12:43:16 -04:00
Matthias Clasen
334f95479b
sorter: Some doc corrections
...
The docs were referring to some non-existing enum value.
Fix things up to match the current code.
2020-06-28 12:43:11 -04:00
Matthias Clasen
9dff4d6ff3
stack: Remove nonexisting api from headers
...
The homogeneous property was dropped a while ago.
2020-06-28 12:43:11 -04:00
Matthias Clasen
4d7d031ee0
gdk: Small documentation fixes
...
Make sure gdk_event_get_seat shows up.
2020-06-28 12:24:03 -04:00
Matthias Clasen
7c98af6358
stack: Cosmetic documentation fixes
...
Fix parameter mismatches.
2020-06-28 12:23:52 -04:00
Matthias Clasen
ddcba4d33f
bitset: Cosmetic documentation changes
2020-06-28 12:23:52 -04:00
Matthias Clasen
59fe4a3a09
printeditor: Add desktop file and appdata
...
All our installed demos have this.
2020-06-28 10:51:16 -04:00
Matthias Clasen
6774f36636
print-editor: Allow opening files
...
Since it calls itself an editor, it should really
support opening files on the commandline.
2020-06-28 10:51:16 -04:00
Matthias Clasen
608cbc28af
printeditor: Cosmetics
...
Bring this up to our standards for an installable demo,
by touching up the about dialog and menus.
2020-06-28 10:51:16 -04:00
Emmanuele Bassi
117c71faeb
Merge branch 'issue-2900' into 'master'
...
Nullable this_ argument in gtk_expression_bind()
Closes #2900
See merge request GNOME/gtk!2163
2020-06-28 13:28:52 +00:00
Emmanuele Bassi
24d6a190af
Add pre-condition check on nullable argument
...
Even if `gtk_expression_watch()` will do the same, we're calling public
API, so we should perform a check at the point of use, to ensure that
warnings are easily debuggable.
2020-06-28 13:42:03 +01:00
Emmanuele Bassi
6a4b5ead86
Annotate nullable argument
...
The `this_` argument is passed to `gtk_expression_watch()`, which
accepts it as nullable.
Fixes : #2900
2020-06-28 13:41:54 +01:00
Jehan
2fb755e0c9
build-aux: fallback to default glib-compile-schemas & gio-querymodules.
...
The pkg-config variables have been added in GLib 2.62.0. Let's fallback
to default names for these tools in such case (`pkg-config` still
returns a 0 return value, but with empty output for absent variables).
2020-06-28 12:48:27 +02:00
Jehan
cd096819d8
build-aux: search various Glib/GIO utilities in .pc file.
...
Some distributions are renaming Glib/GIO utilities for multi-arch
reasons so pkg-config variables have been added to find the correct name
of a tool. GTK+ should use these variables instead of searching in PATH.
See glib#1796.
2020-06-28 12:46:32 +02:00
Matthias Clasen
674ede8665
docs: Remove ancient version information
...
We treat 4.0 as a new era.
2020-06-27 21:46:22 -04:00
Matthias Clasen
8a269de89a
multiselection: Update docs
...
Remove information that is no longer true. GtkMultiSelection
is persistent across sorting changes since 3d8b6f6b79 .
2020-06-27 21:40:26 -04:00
Matthias Clasen
ace4eac25a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2160
2020-06-27 22:19:27 +00:00
Matthias Clasen
66bce08d10
docs: Migration guide additions
2020-06-27 17:38:10 -04:00
Matthias Clasen
65902367c6
builder: Documentation tweaks
...
Don't use no-longer-existing enums as examples,
and drop the +.
2020-06-27 17:28:15 -04:00
Matthias Clasen
8f0b92e42d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2159
2020-06-27 19:43:18 +00:00
Baurzhan Muftakhidinov
f3d5f6628d
Update Kazakh translation
2020-06-27 19:11:12 +00:00
Baurzhan Muftakhidinov
4d687366ed
Update Kazakh translation
2020-06-27 18:52:16 +00:00
Matthias Clasen
3aa5019e70
gtk-demo: Drop an unused object
...
The main ui file was still creating a tree store,
but we've switched everything over to use list models.
2020-06-27 09:47:29 -04:00
Matthias Clasen
4fb495d0fe
builder: Warn about dropped objects
...
Use GTK_DEBUG=builder-objects to make GtkBuilder warn
if a named object from a ui files doesn't get claimed
by gtk_builder_get_object(). This is useful for finding
dead wood in .ui files.
2020-06-27 09:47:00 -04:00
Timm Bäder
83543423e2
widget: Don't get the frame clock if we don't use it
2020-06-27 11:47:42 +02:00
Timm Bäder
d0bb72a2aa
label: Only care about clipboard in unrealize of we need to
2020-06-27 11:47:39 +02:00
Timm Bäder
8cc2a44268
recorder: Don't select new row when adding recording
...
This is what makes the recorder slow. We might want to scroll down in
the list though.
2020-06-27 11:30:02 +02:00
Timm Bäder
4800dd3f95
rendernode: Trivial whitespace change
2020-06-27 11:22:54 +02:00
Timm Bäder
2534310ce9
recorder: Remove frame time from recording rows
...
We should bring this back in a different way, e.g. in a way that doesn't
just use the time of the previous recording.
2020-06-27 11:15:51 +02:00
Timm Bäder
3a4fbc5e50
recorder: Remove Full/Partial render distinction
...
It doesn't exist anymore these days
2020-06-27 11:08:09 +02:00
Timm Bäder
89a67ac719
recorder: s/gint/int/g
2020-06-27 11:04:03 +02:00
Timm Bäder
21b84b1890
recorder: Remove some debug spew
...
Stop printing the number of nodes we have
2020-06-27 11:01:28 +02:00
Timm Bäder
20935f678b
scale: Rearrange child widgets
...
Always keep the order:
- [value]
- [marks.top]
- [marks.bottom]
- trough
Which makes sense given the rendering order. Slider should be drawn
after the marks.
Makes it possible to simply remove the custom snapshot implementations
in scale and range. And Adwaita does not depend on the node order
anyway.
2020-06-27 10:51:06 +02:00
Timm Bäder
c41b4130c6
textview: Remove unused define
2020-06-27 10:51:06 +02:00
Timm Bäder
f1b010af66
Add .view to view widgets
2020-06-27 10:51:06 +02:00
Timm Bäder
ec1133d6e1
renderbackground: Only query number of layers once
...
We did it once in snapshot_background and then again in snapshot_color.
2020-06-27 10:51:06 +02:00
Timm Bäder
8fcf1b78a4
renderbackground: Only query h/vrepeat if we need to
2020-06-27 10:51:06 +02:00
Timm Bäder
21f9148155
gl renderer: Fix cross-fade nodes with invisible end child
...
Only loading the vertex data doesn't draw anything.
2020-06-27 10:51:06 +02:00
Timm Bäder
d4f0593b37
gl renderer: Handle 0/1 progress in crossfade nodes
2020-06-27 10:51:06 +02:00
Matthias Clasen
c447fa8442
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2897 and #2898
See merge request GNOME/gtk!2158
2020-06-27 03:51:21 +00:00
Matthias Clasen
3a70ca9d03
listitem: Correct the docs
2020-06-26 23:10:21 -04:00
Matthias Clasen
5d11e9812d
gtk-demo: Improve formatting in the color demo
...
Properly align and format the numbers in the size
dropdown.
2020-06-26 22:57:56 -04:00
Matthias Clasen
0d10982379
text: Support reverse selection
...
Take ordering of cursor_position and selection_bound
into account when copying text to the clipboard, and
ensure that both orders work the same.
Fixes : #2898
2020-06-26 22:22:47 -04:00
Matthias Clasen
c20a966f06
text: Update action enabled state correctly
...
Take the editable property into account when updating
the emoji.insert action state, and update the action
when it changes.
Fixes : #2897
2020-06-26 22:13:12 -04:00
Matthias Clasen
64db05d3dd
shortcutcontroller: Add some debug spew
...
This helps in debugging event routing and keyboard
shortcut issues.
2020-06-26 22:12:42 -04:00
Matthias Clasen
913cd91df0
widget: Fix an oversight
...
g_message comes with a builtin newline, don't add one
to the message.
2020-06-26 22:12:14 -04:00
Matthias Clasen
2c5533589d
Merge branch 'matthiasc/for-master' into 'master'
...
Adwaita: Fix block cursors in spinbuttons
Closes #2871
See merge request GNOME/gtk!2156
2020-06-27 00:35:51 +00:00
Matthias Clasen
cfdc81af02
Adwaita: Fix block cursors in spinbuttons
...
Fix block cursors in vertical spinbuttons with Adwaita.
Fixes : #2871
2020-06-26 19:56:10 -04:00
Matthias Clasen
7fa8a69fdc
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2869
See merge request GNOME/gtk!2155
2020-06-26 21:14:27 +00:00
Matthias Clasen
fd2861d683
docs: Add css docs to entries
...
The various entries were missing the semi-standard
"CSS Nodes" section in their long descriptions. Add
them.
2020-06-26 16:13:02 -04:00
Matthias Clasen
cd9f5733b3
text: Be more selective when selecting on focus-in
...
We don't want to select on focus-in when the focus
comes from a child. The case where this does harm
is when you activate copy or paste actions from the
context menu. We close the menu before triggering the
action, and if that causes the text in the entry to
be selected, unexpected things happen, since the action
applies to the current selection.
Fixes : #2869
2020-06-26 15:49:39 -04:00
Matthias Clasen
8b4560cbfb
Revert "text: Avoid creating a PangoAttrList we don't need"
...
This reverts commit 67c2665028 .
The splicing we do here has the important side-effect
of shifting the preedit attributes to the right position.
Without it, we end up always underlining the first chars
in the entry, regardless where the preedit happens.
2020-06-26 15:27:17 -04:00
Matthias Clasen
2d914d52be
text: Handle key events in the target phase
...
This makes sure that we do actual key input right
in the middle between all the capture and bubble
event controllers, and are not dependent on the
ordering of those controllers.
The bug that triggered this change was that the
shortcut for activation (Enter) was getting triggered
before the key input, causing Ctrl-Shift-u hex
to stop working, since it never received the enter
to commit the sequence.
2020-06-26 14:08:35 -04:00
Matthias Clasen
a26865e741
widget: Add a debug message for consumed key events
...
Run the application with GTK_DEBUG=keybindings to
get some hints where key events get lost.
2020-06-26 14:08:14 -04:00
Matthias Clasen
3558beaa61
text: Give names to event controllers
...
It helps with debugging.
2020-06-26 14:08:11 -04:00
Matthias Clasen
9b9a9f14e2
Merge branch 'wip/carlosg/sequence-state-fixups' into 'master'
...
Fixups to gesture sequence states
Closes #2895
See merge request GNOME/gtk!2154
2020-06-26 17:08:09 +00:00
Carlos Garnacho
0ce4f66976
gtktext: Don't accept (twice!) all press actions
...
The gesture should claim the sequence after triggering uncancellable
actions, like pasting, showing a menu or selecting words/lines. A
single first button press initiating a drag does not trigger
anything yet, so it should avoid claiming the sequence.
2020-06-26 17:48:10 +02:00
Carlos Garnacho
b81bbde7c8
gtkswitch: Don't be eager in accepting the gesture
...
The gesture should be accepted whenever it triggers uncancellable
actions in the widget. This means it should be accepted if the
click does result in toggling the switch.
This leaves the pan gesture room to handle dragging the handle.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2895
2020-06-26 17:48:10 +02:00
Matthias Clasen
3f55bfe2cb
Merge branch 'matthiasc/for-master' into 'master'
...
main: Avoid a warning
Closes #2894
See merge request GNOME/gtk!2153
2020-06-26 14:31:20 +00:00
Matthias Clasen
4185ba242b
docs: Some tweaks to the list widget overview
2020-06-26 09:05:56 -04:00
Matthias Clasen
e04191a5ea
Merge branch 'wip/otte/bitset' into 'master'
...
Improve selection handling API for rubberbanding
See merge request GNOME/gtk!2086
2020-06-26 12:43:49 +00:00
Matthias Clasen
f07d304f19
main: Avoid a warning
...
transient-for relationships only exist between
windows, so check that both candidates are such.
Fixes : #2894
2020-06-26 08:19:32 -04:00
Emmanuele Bassi
1d1f618a13
Merge branch 'tintou/dropdown-annotations' into 'master'
...
dropdown: Annotate the get_selected_item method
See merge request GNOME/gtk!2152
2020-06-26 08:48:51 +00:00
Emmanuele Bassi
e20610cdc6
Merge branch 'wip/ricotz/annotations' into 'master'
...
gtk: Add some g-i annotations to GtkStringList
See merge request GNOME/gtk!2150
2020-06-26 08:46:35 +00:00
Corentin Noël
721396b6d6
dropdown: Annotate the get_selected_item method
...
We need to specify the type as we already know that it is at least a GObject and in case of no selection, NULL is returned.
2020-06-26 10:00:59 +02:00
Benjamin Otte
dc1dbe6158
listbase: Make rubberbanding a threshold drag
2020-06-26 07:13:32 +02:00
Benjamin Otte
30488e60e2
listbase: Only compute the modifiers when releasing the rubberband
...
... and do the right things:
nothing: selection = rubberband
ctrl: selection = selection OR rubberband
shift: selection = selection AND (NOT rubberband)
ctrl+shift: selection = selection XOR rubberband
(not sure this one makes sense, but toggling is fun)
2020-06-26 07:13:32 +02:00
Benjamin Otte
a5949960bc
listbase: Compute rubberband region on-demand
...
Instead of storing the active items as we go, compute the affected items
whenever the rubberband changes and in particular when the rubberband
ends.
That way, the rubberband is guaranteed to select a rectangle even
after scrolling very far.
This is achieved by having a get_items_in_rect() vfunc that selects all
the items in the rubberbanded rectangle and returns them as a bitset.
2020-06-26 07:13:32 +02:00
Benjamin Otte
ec4a489093
listview: Allocate rubberband at end of size_allocate()
...
Otherwise the rubberband uses the wrong scroll offsets.
2020-06-26 07:13:32 +02:00
Benjamin Otte
7c52e03815
listbase: Flip autoscroll deltas if adjustments are flipped
...
Fixes autoscroll on RTL languages.
2020-06-26 07:13:32 +02:00
Benjamin Otte
724c9361f3
listbase: Allocate gridview items properly on RTL
...
We need to flip the items.
2020-06-26 07:13:32 +02:00
Benjamin Otte
147388e69a
multiselection: Implement get_selection_in_range()
2020-06-26 07:13:32 +02:00
Benjamin Otte
64aa281c97
listbase: Allocate rubberband according to list coords
...
The rubberband is now handled on the list coordinate system.
When starting the rubberband, we track the item under the pointer and
follow it when it is moving.
This may lead to the rubberband start position changing position and
while this may be confusing, it alerts users to the fact that something
crazy is going on.
2020-06-26 07:13:32 +02:00
Benjamin Otte
c2b0330c56
listbase: Move a common function from the children into GtkListBase
...
We want to use it for the rubberband later.
2020-06-26 07:13:32 +02:00
Benjamin Otte
de4803bb21
listbase: Don't do extra work
...
Scrolling causes a queue_resize() which will update the rubberband in
size_allocate() and queue a draw.
2020-06-26 07:13:32 +02:00
Benjamin Otte
e574dcb091
Fix indentation
2020-06-26 07:13:32 +02:00
Benjamin Otte
488b0cbb69
gtk: Remove GtkPropertySelection
...
GtkMultiSelection is so much faster than this that it isn't needed.
2020-06-26 07:13:32 +02:00
Benjamin Otte
6ceab55148
gtk-demo: Port listview-colors demo to multiselection again
2020-06-26 07:13:32 +02:00
Benjamin Otte
3d8b6f6b79
multiselection: Track items across resorts
...
In particular, track which items remain in ::items-changed
signal emissions.
But the main use case is sorting, which causes items-changed(0, n, n)
to be emitted.
2020-06-26 07:13:32 +02:00
Benjamin Otte
58d3213eef
Remove GtkSet
...
It's been superceded by GtkBitset.
2020-06-26 07:13:32 +02:00
Benjamin Otte
006dfdc55a
selectionmodel: Remove select_callback() functions
...
gtk_selection_model_set_selection() takes care of those now.
2020-06-26 07:13:32 +02:00
Benjamin Otte
a38c423ddb
listbase: Port rubberband to gtk_selection_model_set_selection()
2020-06-26 07:13:32 +02:00
Benjamin Otte
fa0295629b
selectionmodel: Add gtk_selection_model_set_selection()
...
Also port the testsuite.
2020-06-26 07:13:32 +02:00
Benjamin Otte
8395698090
selectionmodel: Replace query_range() with get_selection()
2020-06-26 07:13:32 +02:00
Benjamin Otte
277a91dbf8
multiselection: Port to GtkBitset
2020-06-26 07:13:32 +02:00
Benjamin Otte
ff36cfb5be
testsuite: Add tests for GtkBitset
2020-06-26 07:13:32 +02:00
Benjamin Otte
db452f0c45
Add GtkBitset
2020-06-26 07:13:32 +02:00
Rico Tzschichholz
5b1195f874
gtk: Add some g-i annotations to GtkStringList
2020-06-26 06:36:23 +02:00
Benjamin Otte
d830724d4f
Add amalgamated roaring bitmaps source code
...
Taken from https://github.com/RoaringBitmap/CRoaring and fixed to
not spew warnings.
2020-06-26 06:19:56 +02:00
Matthias Clasen
0ef0edfa9a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2149
2020-06-25 22:28:07 +00:00
Matthias Clasen
0ec868bd69
inspector: Adapt to dropdown api change
...
The suppported syntax for dropdowns in ui files
has changed. Get with the program.
2020-06-25 16:42:30 -04:00
Matthias Clasen
30e79e8412
docs: Fix a typo
2020-06-25 14:29:24 -04:00
Matthias Clasen
c9b032acab
gtk-demo: Fix a typo in the listbox demo
2020-06-25 14:28:29 -04:00
Matthias Clasen
1f410faccb
searchentry: Update the docs slightly
...
Update the docs to get closer to describing reality.
2020-06-25 14:27:44 -04:00
Matthias Clasen
d0e56106fe
Drop unused includes
...
Don't include gtkfilechooserentry.h where it
isn't used.
2020-06-25 14:27:31 -04:00
Matthias Clasen
3d3d7dbc59
stringfilter: Fix a typo
2020-06-25 14:27:23 -04:00
Emin Tufan Çetin
c0cbf9db5f
Update Turkish translation
2020-06-25 01:05:12 +00:00
Matthias Clasen
db82eaec0a
Merge branch 'wip/carlosg/input-cleanups' into 'master'
...
Some input cleanups
Closes #2851
See merge request GNOME/gtk!2147
2020-06-24 21:32:30 +00:00
Matthias Clasen
f4e200708d
Merge branch 'scrolled-window-api' into 'master'
...
scrolledwindow: Don't take adjustments in new()
See merge request GNOME/gtk!2146
2020-06-24 19:58:03 +00:00
Matthias Clasen
ba1944ded2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2145
2020-06-24 19:50:37 +00:00
Carlos Garnacho
8eeef54b2e
gtktextview: Remove child textview items last
...
The function tries to go through every child, so it's convenient
to remove all internal ones first.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
8e549d73a0
gtkwidget: Drop _gtk_widget_[gs]et_shadowed()
...
This API is meaningless now, with grab-notify being handled internally.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
102d2a36f3
gtkwidget: Avoid use of shadowed flag
...
This is going away, look up whether there is a grab, and whether
the widget is within it, instead.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
f046e27bb4
gtkwidget: Drop gtk_widget_device_is_shadowed()
...
A widget no longer needs updating on GTK grabs on itself, drop
this miscellaneous and no longer used API.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
1c5cf17f1c
gtkwidget: Drop internal checks in grab-notify
...
There's no need to check if the widget is already shadowed, we
implicitly have that from the signal argument.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
ddb3a4be3e
gtkmain: Make grab-notify notifications more targeted
...
We only want to send grab-notify to widgets that might have been
interacting with devices via events. Instead of going through all
widgets in all toplevels, we have the window/pointer focus information,
so we can just traverse the widget stacks for every involved foci.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
994f32704b
gtkwidget: Drop ::grab-notify signal and vfunc
...
We don't expect widgets to react directly to these anymore.
Internally we still reset the controllers.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
1f798643c8
gtkprintoperation-win32: Don't track grab-notify
...
Further grabs could presumably only come from events handled within
the dialog itself. It seems overeager to do this.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
2f8d5e2dcd
gtkvideo: Track child focus to determine whether controls should autohide
...
Move away from grab_notify, and use the set_child_focus() vfunc to track
child widgets being set the keyboard focus. This is not 1:1, but seems
good enough at the moment.
2020-06-24 20:35:22 +02:00
Carlos Garnacho
df30741535
gtkbutton: Drop grab_notify handler
...
The click gesture already has a ::cancel handler, and does almost
everything it should. Move the last bits and remove the grab_notify
handler.
2020-06-24 20:35:22 +02:00
Carlos Garnacho
762748028a
gtkspinbutton: Drop grab_notify handler
...
The press gesture on the buttons already has a ::cancel handler,
this is redundant.
2020-06-24 20:35:22 +02:00
Carlos Garnacho
f7c5cf137c
gtknotebook: Move away from grab_notify
...
Connect to ::cancel on the relevant gesture instead.
2020-06-24 20:35:22 +02:00
Matthias Clasen
455d91b0fc
testgtk: Update list of cursor names
...
Use the standard names, since that is what we want
everybody else to use too.
2020-06-24 14:06:50 -04:00
Matthias Clasen
e834e51c0f
Install gtkstringlist.h
2020-06-24 13:02:50 -04:00
Matthias Clasen
bce518b214
entrycompletion: Various fixes
...
Fix various issues that prevented inline completion
and inline selection from working reliably. We were
passing byte counts to gtk_editable_select_region in
one place, but that function expects char counts.
We were listening for GtkEditable::insert-text on
the GtkText widget, but that does not emit those signals,
so listen for GtkEntryBuffer::inserted-text instead.
Finally, we were not clearing the stored completion_prefix
enough, leading to situations where the stored prefix
does not match the text in the entry anymore.
2020-06-24 13:02:50 -04:00
Matthias Clasen
3656994f82
gtk-demo: Enable inline completion
...
Enable inline completion in the entry completion
demo, to have some code exercising this feature.
It is broken.
2020-06-24 13:02:50 -04:00
Matthias Clasen
fd5f6ef57f
gtk-demo: Improve the entry completion demo
...
Add more strings.
2020-06-24 13:02:50 -04:00
Matthias Clasen
386b63b85d
scrolledwindow: Don't take adjustments in new()
...
In 99.9% of all cases, these are just NULL, NULL.
So just do away with these arguments, people can
use the setters for the rare cases where they want
the scrolled window to use a different adjustment.
2020-06-24 11:25:09 -04:00
Carlos Garnacho
803103640a
gtkwindowhandle: Drop has-grab checks
...
While it's worth thinking about bringing the "windows can be dragged
with open popovers" behavior back, this does not kick in anymore, nor
should be the way to handle this given all the autoclose surface
semantic changes.
2020-06-24 13:41:28 +02:00
Carlos Garnacho
469a4a73f9
gdk: Drop gdk_device_get_last_event_surface()
...
This kind of transient state sets the expectative that events update
devices, while it's more accurate to say that devices generate events.
It does not make to expose this function anymore.
2020-06-24 11:24:04 +02:00
Carlos Garnacho
f401b05e7b
gtkwidget: Avoid poking surfaces and events in gtk_widget_list_devices()
...
This got stuck in ancient times when widgets were windowed, so the devices
in a window to know the devices in that widget would pan out. We do only
want here the devices that are inside the widget, not spread over the
surface, so rewrite this helper function to poke the toplevel foci, and
look they are contained inside the widget.
2020-06-24 11:14:52 +02:00
Carlos Garnacho
42ed8a2748
gtkwidget: Drop _gtk_widget_get_device_surface()
...
A widget cannot have multiple surfaces anymore, nor needs to
fetch the last event surface as it ought to handle its own.
2020-06-24 10:47:15 +02:00
Carlos Garnacho
f872eb64b5
gtkmain: Drop unused struct field
...
Grabs are, ironically, not about devices anymore. This struct field
is never set.
2020-06-24 10:47:15 +02:00
Carlos Garnacho
29d054c421
gtkwidget: Remove dead code
...
This variable got unused over time.
2020-06-24 10:47:15 +02:00
Carlos Garnacho
7be6afe84d
gdk: Depend less on gdk_event_get_device()
...
For the most part, we are interested in seats here.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
cf1fbdf8b5
gdk: Add gdk_event_get_seat()
...
It currently fetches the seat from the event device, will be changed
in future commits.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
6d2860efb7
gdk: Drop gdk_seat_get_logical_pointers()
...
Events come from hardware devices and are handled by controllers,
there's no need to use logical pointers, nor to peek them. Drop this
unused API.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
5f29b8fcec
gdk: Drop GdkGrabOwnership
...
We no longer expose such low level tweaks, this is essentially
unused.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
59a8106373
gdk: Drop supports_multidevice API
...
Crossing events are now detached from widget state, all tricky consequences
from getting multiple crossing events are now somewhat moot. Resort to sending
all generated crossing events, and drop this barely (ever?) used API.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
c1d90273ca
gdk: Drop GDK_SOURCE_ERASER
...
All tools come from devices with GDK_SOURCE_PEN.
2020-06-23 23:42:53 +02:00
Carlos Garnacho
31b95ce47f
gtkmain: Look up transient-for hierarchies to determine modality
...
Windows that are not modal, but are transient-for a modal window should
still be able to receive and handle events. Inspect the window hierarchy
in those cases, so these windows are handled just like widgets within
the modal dialog.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2851
Related: https://gitlab.gnome.org/GNOME/gtk/-/issues/2850
2020-06-23 23:42:53 +02:00
Carlos Garnacho
4fe608e423
gtkwidget: Cancel all gestures in other groups
...
When a gesture (group) claims a sequence, all other gesture groups
in the same widget should get cancelled. Not just previously claimed
ones, that shouldn't happen actually.
2020-06-23 23:42:53 +02:00
Matthias Clasen
2cfeb1048c
Merge branch 'stringlist' into 'master'
...
add a public stringlist api
See merge request GNOME/gtk!2134
2020-06-23 20:43:49 +00:00
Matthias Clasen
e8210d5865
Add GtkStringList as public api
...
This is a list model holding strings, initialized
from a char **. String lists are buildable as well,
and that replaces the buildable support in GktDropDowns.
2020-06-23 16:11:46 -04:00
Matthias Clasen
fff981b220
Merge branch 'wip/jimmac/notebook-legibility' into 'master'
...
Adwaita: notebook legibility fixes
Closes #2652
See merge request GNOME/gtk!2142
2020-06-23 19:12:52 +00:00
Matthias Clasen
a3f4caa291
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2141
2020-06-23 19:10:54 +00:00
Jakub Steiner
ec54399d89
Adwaita: notebook legibility fixes
...
- make inactive tabs more legible
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2652
2020-06-23 19:54:54 +02:00
Matthias Clasen
83f22fcce2
Add a few missing includes
...
These sources are using GtkListStore apis,
but were replying on indirect includes to
get the header. Make this explicit, to prepare
for GtkEntryCompletion losing its tree view
dependencies.
2020-06-23 07:55:53 -04:00
Matthias Clasen
34a12f47f1
entry completion: Drop the Private struct
...
This is in preparation for porting GtkEntryCompletion
to use GtkListView.
2020-06-23 07:55:38 -04:00
Ray Strode
518462d882
Merge branch 'wip/fencing-without-context-is-discouraged' into 'master'
...
x11: Ensure bound context is compatible with sync fence
See merge request GNOME/gtk!2139
2020-06-23 09:53:35 +00:00
Ray Strode
1912513d7a
x11: Ensure bound context is compatible with sync fence
...
Commit a0f6ff101e made sure that a
context was bound before calling glClientWaitSync, but it doesn't
check that the context shares objects with the context that created
the fence.
This commit does a little more validation before deciding the current
context is good enough.
2020-06-22 19:09:43 -04:00
Matthias Clasen
1643e81c47
Merge branch 'wip/fencing-without-context-is-discouraged' into 'master'
...
x11: ensure some context is bound before calling glClientWaitSync
See merge request GNOME/gtk!2138
2020-06-22 23:01:11 +00:00
Matthias Clasen
7ff427b456
Merge branch 'drop-entry-completion-actions' into 'master'
...
entrycompletion: Drop action support
See merge request GNOME/gtk!2136
2020-06-22 22:59:17 +00:00
Matthias Clasen
91a96d27f1
Merge branch 'matthiasc/for-master' into 'master'
...
Add a basic clipboard test
See merge request GNOME/gtk!2137
2020-06-22 22:13:30 +00:00
Ray Strode
a0f6ff101e
x11: ensure some context is bound before calling glClientWaitSync
...
Since commit 972134abe4 we now call
glClientWaitSync for the vendor nvidia driver, to know when a frame
is ready for the compositor to process.
glClientWaitSync can be called regardless of which context is currently
bound, but if no context is bound at all, it returns 0 without
doing anything.
This commit checks for that edge case, and ensures a context gets
made current in the event no context is already current, before calling
glClientWaitSync.
2020-06-22 17:13:54 -04:00
Matthias Clasen
9bcf401ef7
Add a basic clipboard test
...
This is not reproducing the failure I'm after, unfortunately.
2020-06-22 16:55:01 -04:00
Matthias Clasen
67a7ad069f
entrycompletion: Drop action support
...
This api has not really been kept up with current
user experiences in popups, and we're better off
just dropping it and letting people do their own
popups if they need custom UI.
2020-06-22 14:43:36 -04:00
Matthias Clasen
367d24be7f
Merge branch 'keyval-to-uni-fix' into 'master'
...
gdk: Make gdk_keyval_to_unicode platform-independent
See merge request GNOME/gtk!2132
2020-06-22 18:13:25 +00:00
Matthias Clasen
1791c637d0
Merge branch 'fix-entry-completion' into 'master'
...
Fix entry completion
See merge request GNOME/gtk!2135
2020-06-22 17:56:43 +00:00
Matthias Clasen
c6fe8818ed
gdk: Clarify the docs of gdk_keyval_to_unicode
...
Explicitly state that the conversion does not
take locale into account, and point out GDK_KEY_KP_Decimal
as a candidate for special-casing.
2020-06-22 13:24:34 -04:00
Matthias Clasen
53a30eaa12
entry completion: Make keynav work again
...
Use gtk_widget_prepend_controller to supersede entry keynav
while the popup is open. This fixes selecting completions
with the keyboard - the Enter keypress was ending up
triggering GtkText::activate instead of inserting the
selected completion into the entry.
2020-06-22 12:48:42 -04:00
Matthias Clasen
692cc42e10
Add gtk_widget_prepend_controller
...
Add a variant of gtk_widget_add_controller that
inserts the controller at the beginning, instead
of the end. This will be used in entry completion
to make sure the entry completion key event handling
supersedes the entry one while the popup is open.
Keep this private for now, until we determine if
it needs to be public api.
2020-06-22 12:47:27 -04:00
Matthias Clasen
9faaa5e8be
Fix change notification for event controllers
...
We were adding event controllers at the end, but
announcing a change at the beginning, in
gtk_widget_add_controller. Fix that by emitting
::items-changed for the position where we actually
inserted the controller.
2020-06-22 12:46:12 -04:00
Matthias Clasen
418bbb2685
entrycompletion: Name the controllers
...
This helps with debugging.
2020-06-22 12:31:15 -04:00
Matthias Clasen
fb148027d9
Merge branch 'wip/dont-assert-without-evidence' into 'master'
...
x11: be more verbose when glClientWaitSync behaves unexpectedtly
See merge request GNOME/gtk!2133
2020-06-22 15:47:27 +00:00
Ray Strode
05736afaf8
x11: be more verbose when glClientWaitSync behaves unexpectedtly
...
When given a 0 timeout, glClientWaitSync is only supposed to return one
of three possible values:
- GL_ALREADY_SIGNALED - fence fired
- GL_WAIT_FAILED - there was an error
- GL_TIMEOUT_EXPIRED - fence hasn't fired yet
In addition, it can also return GL_CONDITION_SATISFIED if a non-zero
timeout is passed, and the fence fires while waiting on the timeout.
Since commit 972134abe4 we now call
glClientWaitSync (with a 0 timeout), but one user is reporting it's
returning some value that's not one of the above four.
This commit changes the g_assert to a g_error so we can see what
value is getting returned.
May help with https://gitlab.gnome.org/GNOME/gtk/-/issues/2858
2020-06-22 11:16:32 -04:00
Matthias Clasen
8a91d1d1ce
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Add a warning to the colors demo
See merge request GNOME/gtk!2131
2020-06-22 13:11:13 +00:00
Matthias Clasen
2df139cf40
gdk: Make gdk_keyval_to_unicode platform-independent
...
The result of gdk_keyval_to_unicode should not depend
on the platform.
2020-06-22 08:31:10 -04:00
Timm Bäder
9f1208b595
Merge branch 'master.msvc' into 'master'
...
demos: Fix builds against Visual Studio headers
See merge request GNOME/gtk!2130
2020-06-22 12:02:26 +00:00
Matthias Clasen
9fd3212241
gtk-demo: Add a warning to the colors demo
...
Explain that the big sizes cause lockups.
2020-06-22 07:43:47 -04:00
Chun-wei Fan
293f2e6b1c
demos: Fix builds against Visual Studio headers
...
According to [1], '_timezone' is already used for a global variable in the
time.h system header that is supplied by Microsoft, so using that for our
variable name when we are including time.h either directly or indirectly
will cause trouble.
This renames such variables to '_tz' to avoid that
[1]: https://docs.microsoft.com/en-us/cpp/c-runtime-library/daylight-dstbias-timezone-and-tzname
2020-06-22 17:04:18 +08:00
Matthias Clasen
f83aa16f59
Merge branch 'port-icon-browser' into 'master'
...
Port icon browser
See merge request GNOME/gtk!2127
2020-06-22 00:09:00 +00:00
Matthias Clasen
c73dd9ecaf
Merge branch 'matthiasc/for-master' into 'master'
...
filter: Make GtkEveryFilter buildable
See merge request GNOME/gtk!2125
2020-06-21 17:57:31 +00:00
Matthias Clasen
607f08e79b
Port the icon browser to GtkGridView
2020-06-21 13:36:57 -04:00
Matthias Clasen
511e5f39fa
filter: Make GtkEveryFilter buildable
...
Due to an oversight, when multi filters were split into
any and every, any ended up with the listmodel and buildable
implementations, and every didn't get any.
Move the implementations up.
2020-06-21 13:10:18 -04:00
Matthias Clasen
7d409dd2e0
Merge branch 'wip/otte/listview-colors' into 'master'
...
Improve listview-colors demo
See merge request GNOME/gtk!2123
2020-06-21 12:49:49 +00:00
Matthias Clasen
9b8c0f3c7f
gtk-demo: Cosmetic improvement to the colors demo
...
Make the count label not jump around, as the model
is refilled.
2020-06-21 14:17:47 +02:00
Benjamin Otte
727a78a74f
gtk-demo: Add an "Unsorted" option (and default to it)
...
Tests the previous commit and ensures that selecting 16M colors actually
works quickly (it does).
2020-06-21 14:17:47 +02:00
Benjamin Otte
a928ea6c57
sortlistmodel: Look at order
...
For now, we just look at SORT_ORDER_NONE to bypass any sorting.
2020-06-21 14:17:47 +02:00
Benjamin Otte
d3f7dea624
gtk-demo: Reinstate incremental filling
...
Do it via the new size setting on the color list.
Also add an option to set the maximum size of the color list that it'll
be filled to so rudimentary performance testing is possible.
Hint: Do not select 16777216.
This reinstates commit c16848c2bb683f7ddf51571aa5951f8a4a1ea622.
2020-06-21 14:17:47 +02:00
Benjamin Otte
456b7628ee
gtk-demo: Allow color list to have any size
...
For now, limit it to 1<<12 so the sorters don't explode.
2020-06-21 14:17:47 +02:00
Benjamin Otte
f149beb474
gtk-demo: Add a permutation to compute colors from the position
...
This way, the colors are furthest apart at the start and fill up the
remaining spots towards the end.
2020-06-21 14:17:47 +02:00
Benjamin Otte
1b0451761a
gtk-demo: Add custom listmodel for all true colors.
2020-06-21 14:17:47 +02:00
Benjamin Otte
1d26341b03
gtk-demo: Make colors demo contain all 16,777,216 colors
...
This makes it slightly slow, so not sure it should stay like this.
2020-06-21 14:17:47 +02:00
Benjamin Otte
8348a113c6
gtk-demo: Compute HSV values directly
2020-06-21 14:17:47 +02:00
Benjamin Otte
bfdede7acc
Revert "gtk-demo: Make the colors demo populate incrementally"
...
This eases adding a bunch of follow-up features. After those features
have landed, this functionality will be readded.
This reverts commit a10340859d .
2020-06-21 14:17:47 +02:00
Benjamin Otte
70894b48af
gtk-demo: Embed the RGBA value
2020-06-21 14:17:47 +02:00
Aurimas Černius
b0c6b282fd
Updated Lithuanian translation
2020-06-21 14:47:05 +03:00
Piotr Drąg
393054dd3f
Update Polish translation
2020-06-21 11:37:46 +02:00
Matthias Clasen
97b10df723
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2122
2020-06-21 05:58:15 +00:00
Matthias Clasen
62b214ffdf
filechooserwidget: Use gtk_drop_down_get_selected_item
...
This showed up as a test failure when we get NULL as
selected item and then try to unref it. Luckily
get_selected_item is transfer none, so we don't have
to worry about it.
2020-06-21 01:20:05 -04:00
Benjamin Otte
3549f43902
demo: Use GtkDropDown::selected-item
2020-06-21 02:23:46 +02:00
Benjamin Otte
45167d5c0d
dropdown: emit notify for selected from the changed callback
...
Otherwise we don't emit it when the selection itself changes it - for
exaple because the model changed.
2020-06-21 02:23:46 +02:00
Matthias Clasen
0214b98c5e
Merge branch 'matthiasc/for-master' into 'master'
...
misc listview scrolling fixes
See merge request GNOME/gtk!2119
2020-06-20 21:21:29 +00:00
Matthias Clasen
19c38158fc
Merge branch 'incremental-colors' into 'master'
...
Incremental colors demo
See merge request GNOME/gtk!2121
2020-06-20 20:35:23 +00:00
Matthias Clasen
7ff35340ca
Merge branch 'drop-down-selected-item' into 'master'
...
dropdown: Add GtkDropDown:selected-item
Closes #2861
See merge request GNOME/gtk!2120
2020-06-20 18:51:18 +00:00
Matthias Clasen
a10340859d
gtk-demo: Make the colors demo populate incrementally
...
Add a refill button that incrementally refills the color
demo. This is useful to test how the grid view operates
when the model is frequently changed.
2020-06-20 14:47:57 -04:00
Matthias Clasen
8475d88af0
gtk-demo: Clean up initial selection handling
...
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in 10bcbae68c .
2020-06-20 14:47:39 -04:00
Matthias Clasen
79b1d24128
Merge branch 'gtk4-arb_fbo' into 'master'
...
Switch to GL_ARB_framebuffer_object
See merge request GNOME/gtk!2079
2020-06-20 17:12:52 +00:00
Matthias Clasen
ad98e72884
dropdown: Add GtkDropDown:selected-item
...
This is the same readonly property we have in
GtkSingleSelection.
Fixes : #2861
2020-06-20 13:11:48 -04:00
Matthias Clasen
3fab2b55cc
gtk-demo: Clean up memory handling in the weather demo
...
gtk_weather_info_new was consuming the info, but not
the timestamp, which confused me. Make it not consume
either, and be more explicit about where the unrefs
happen.
2020-06-20 12:18:17 -04:00
Matthias Clasen
2842030e59
gridview: Don't assert on a condition that can happen
...
We are currently not robust against model changes or
widget invalidations, so we can actually end up in
situations where we run out of items here. Handle
the failure a bit more gracefully, by returning NULL.
This is good enough to make scrolling work okish most
of the time. We still need a proper fix to handle
other situations.
2020-06-20 12:11:59 -04:00
Benjamin Otte
7c2d21892f
gridview: Compute right amount of items to skip
...
We only want to skip the remaining items in the current row, not since
the start of the widget.
2020-06-20 12:08:46 -04:00
Matthias Clasen
677bfe6857
gtk-demo: Clean up initial selection handling
...
We call selection_cb now, so we don't need to manually
do part of what that call does ahead of time.
This should have been noticed in 10bcbae68c .
2020-06-20 08:48:29 -04:00
Matthias Clasen
b7ddf0b2e5
Merge branch 'dnd-demo-animation' into 'master'
...
gtk-demo: Add animated icons to the dnd demo
See merge request GNOME/gtk!2117
2020-06-19 23:57:47 +00:00
Matthias Clasen
eb25fc1d5a
gtk-demo: Add animated icons to the dnd demo
...
This is to test animated drag icons.
2020-06-19 19:26:43 -04:00
Matthias Clasen
395d40485d
Merge branch 'listview-dnd' into 'master'
...
Listview dnd
See merge request GNOME/gtk!2116
2020-06-19 22:24:36 +00:00
Matthias Clasen
17af979b24
testlistdnd: Use editable labels
...
Use editable labels instead of entries, and write
changes back to the model.
2020-06-19 16:30:25 -04:00
Matthias Clasen
8511f25b97
editablelabel: Allow to drag text
...
If we allow editing, we should allow direct drags too.
2020-06-19 15:26:53 -04:00
Matthias Clasen
290611f9ce
editablelabel: Accept text drops
...
This seems natural. If we allow editing, we should
allow drops too.
2020-06-19 15:26:53 -04:00
Matthias Clasen
6280066207
testlistdnd: Add a tree
...
This lets us test auto-expand of tree expanders.
2020-06-19 15:26:47 -04:00
Matthias Clasen
f054c317ee
expander: Remove a pointless return
...
GtkDropControllerMotion::enter does not expect
a boolean return value, so don't provide one.
2020-06-19 15:26:47 -04:00
Matthias Clasen
9555e611e1
treeexpander: Auto-expand during DND
...
When hovering over a tree expander during DND,
expand the tree after a timeout. This matches
the behavior of GtkTreeView and GtkExpander.
2020-06-19 15:26:47 -04:00
Matthias Clasen
5629ac3c63
Add a list dnd example
...
Add a test for dnd with listview, gridview and columnview.
2020-06-19 15:26:10 -04:00
Matthias Clasen
110c316810
columnview: Increase the autoscroll threshold
...
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
2020-06-19 15:26:10 -04:00
Matthias Clasen
470a1aabdd
columnview: Autoscroll during DND
...
Use a drop motion controller to autoscroll horizontally
while a drag operation is hovering over the list. The
vertical scrolling is handled by the listview.
2020-06-19 15:26:10 -04:00
Matthias Clasen
b299d62a73
columnview: separate autoscroll from headers
...
Break out an update_autoscroll() function that can
be used for other things than header DND. It will
be used for autoscroll during DND in the future.
2020-06-19 15:26:10 -04:00
Matthias Clasen
02b293b59c
listbase: Don't use adjustments for autoscrolling
...
Don't consult the adjustments when determining
scroll deltas. It isn't necessary.
2020-06-19 15:26:10 -04:00
Matthias Clasen
c659a231d6
listbase: Increase the autoscroll threshold
...
With autoscroll during DND, we stop when you hit the edge
of the widget, so a larger threshold makes sense to avoid
hitting the edge by accident.
2020-06-19 15:26:10 -04:00
Matthias Clasen
4e56581222
listbase: Autoscroll during DND
...
Use a drop motion controller to autoscroll while
a drag operation is hovering over the list.
2020-06-19 15:26:10 -04:00
Matthias Clasen
e8ba16d9c2
listbase: separate autoscroll from rubberband
...
Break out an update_autoscroll() function that can
be used for other things than rubberbanding. It will
be used for autoscroll during DND in the future.
2020-06-19 15:26:10 -04:00
Matthias Clasen
4a43c77f66
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2115
2020-06-19 16:17:27 +00:00
Matthias Clasen
55936087e0
columview: Fix cell creation
...
We were getting lost in the columnview internal
structure here. The rows are children of the listview,
not of the columnview itself.
2020-06-19 11:42:58 -04:00
Matthias Clasen
3141eaecd0
gtk-demo: Modernize the tag entry demo
...
Use a layout manager, and reduce boilerplate.
2020-06-19 11:42:47 -04:00
Matthias Clasen
69e14ba02f
Revert "notebook: Don't capture clicks"
...
This reverts commit 37eb0496b6 .
This change broke notebook scroll arrows.
2020-06-19 11:42:47 -04:00
Benjamin Otte
dffbcd8fdf
Merge branch 'wip/otte/for-master' into 'master'
...
listbase: Fix copy/paste error
See merge request GNOME/gtk!2114
2020-06-19 15:20:32 +00:00
Benjamin Otte
ff3b03c5e2
listbase: Fix copy/paste error
...
This could lead to "flickering" scroll behavior when scrolling
horizontally.
2020-06-19 15:51:52 +02:00
Florentina Mușat
32f4aa12cd
Update Romanian translation
2020-06-19 06:17:36 +00:00
Timm Bäder
fbb7948c13
stack: Avoid using an uninitialized value
...
This was showing up as criticals since for_size != >= -1.
2020-06-19 05:58:52 +02:00
Timm Bäder
d81a5a8338
stack: Add missing accessors for GtkStackPage properties
2020-06-19 05:26:25 +02:00
Timm Bäder
652323a4bf
stack: Fix some documentation mishaps
2020-06-19 05:26:25 +02:00
Timm Bäder
e45518fb5f
stack: Fix :needs-attention docs
...
This is a property on GtkStackPage these days.
2020-06-19 05:26:25 +02:00
Timm Bäder
424e46849a
widget: Don't leak css transform
2020-06-19 05:26:25 +02:00
Timm Bäder
68886ba847
treeview: Remove identical if branches
...
Fixes #2725
2020-06-19 05:26:25 +02:00
Timm Bäder
da85815399
transform: Fix docs to use "transform" instead of "matrix"
2020-06-19 05:26:25 +02:00
Timm Bäder
3bd648e72e
stack: stop keeping a cached child render node around
...
All widgets cache their render node already. Just allocate the
last_visible_child always at 0/0 and then move its rendernode around
during snapshot.
Fixes #2678
2020-06-19 05:26:25 +02:00
Timm Bäder
2ae8ace784
cssselector: Only copy max_selector once
2020-06-19 05:26:25 +02:00
Timm Bäder
1f89f21ca9
numbervalue: Remove some leftover debugging code
2020-06-19 05:26:25 +02:00
Timm Bäder
c6921cdc9d
builder: Use default size of 8 for the ObjectProperty arrays
2020-06-19 05:26:25 +02:00
Timm Bäder
7c9f2949ce
builder: Avoid allocating things we don't use
...
We pretty often have no parameters at all, so avoid allocating
ObjectProperties+GArray+GPtrArray in that case.
2020-06-19 05:26:25 +02:00
Timm Bäder
0b13e68bca
Avoid calling g_list_model_get_n_items() all the time
...
These are used in hot paths, e.g. widget construction.
2020-06-19 05:26:25 +02:00
Timm Bäder
5dde4c0a39
transform: Fix equal() docs
...
This has nothing to do with matrices.
2020-06-19 05:26:25 +02:00
Timm Bäder
b2875d7b19
window: Add automatic titlebar before content widget
...
Just like we do with explicitly set titlebars
2020-06-19 05:26:24 +02:00
Timm Bäder
0c1cfbbad1
transform: Compare 3d points directly
2020-06-19 05:26:24 +02:00
Timm Bäder
ddacf8cc43
window: Don't add class to css node directly
...
Use gtk_widget_add_css_class instead
2020-06-19 05:26:24 +02:00
Timm Bäder
395d13d5f1
window: Stop adding css nodes manually
...
No decoration node, no need to do this.
2020-06-19 05:26:24 +02:00
Timm Bäder
1e6e522a93
window: Remove dead code
...
There is no decoration node anymore.
2020-06-19 05:26:24 +02:00
Timm Bäder
f49a02e5b5
adwaita: Use proper transform for spinners
2020-06-19 05:26:24 +02:00
Timm Bäder
1e4dc90d62
widget: don't queue a redraw on css transform changes
2020-06-19 05:26:24 +02:00
Timm Bäder
2c3a41a81a
csstransformvalue: Make no-transform case explicit
2020-06-19 05:26:24 +02:00
Timm Bäder
203bb42cc1
widget: Re-shuffle preconditions in snapshot_child()
...
The GtkNative type check is more expensive than the mapped one, so avoid
the former for unmapped widgets
2020-06-19 05:26:24 +02:00
Timm Bäder
461497e8d4
widget: Avoid doing GtkSnapshot work just to append one node
...
We already know that a widget will have literally 1 node, not more.
Avoid doing the GtkSnapshot state stack dance and just append a new
transform node instead.
Seems to give me around 400 more icons in the fishbowl
2020-06-19 05:26:24 +02:00
Timm Bäder
a974c83423
gsktransform: Make next == NULL case explicit
...
This is handled with the is_identity() check as well but this way it's
much more obvious what's happening
2020-06-19 05:26:24 +02:00
Timm Bäder
5eb181281a
fishbowl: Remove visibility handling
...
First, almost all widgets are either visible and mapped, or visible and
unmapped because they are !child_visible. In both cases, we do care
about the size. If they are indeed invisible, gtk_widget_measure() will
take care of that by returning all 0.
And gtk_widget_unparent() already queues a resize on the parent if
necessary, so that is unneeded as well.
2020-06-19 05:26:24 +02:00
Timm Bäder
9eaeb04863
Fix print dialog node name
2020-06-19 05:25:52 +02:00
Matthias Clasen
5e6c316603
Merge branch 'better-naming' into 'master'
...
Stop using loaded terms
See merge request GNOME/gtk!2109
2020-06-19 00:09:03 +00:00
Matthias Clasen
77b4f6d68e
Merge branch 'quartz-openfile-fix' into 'master'
...
quartz: gtk-application - inhibit openFiles events from cmdline
See merge request GNOME/gtk!2112
2020-06-18 21:43:59 +00:00
Friedrich Beckmann
a614716d0f
quartz: gtk-application - inhibit openFiles events from cmdline
...
When an application is started via cmdline, then openFiles events
from MacOS are generated although gtkapplication already interprets
the cmdline arguments and opens suitable arguments as files. So they
would be opened twice. Depending on the exact situation the
openFiles event can also be issued before the startup signal
is given. Depending on the application this can result in a crash
due to unexpected behaviour. I took this idea from the
gedit-app-osx.m file. Also from Jesse van den Kieboom.
See:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2098#note_842975
https://gitlab.gnome.org/GNOME/gtk/-/commit/a3ad7fa80f764fb7bcbe
https://gitlab.gnome.org/GNOME/gedit/-/blob/master/gedit/gedit-app-osx.m#L592
2020-06-18 16:42:54 -04:00
Emmanuele Bassi
1c856a208f
Rename master and slave device
...
We already use the "logical/virtual" and "physical" names in the
documentation, there's no reason to use loaded terms just because X11
uses them.
2020-06-18 19:22:20 +01:00
Emmanuele Bassi
c7916c8e48
Use the appropriate name for Juneteenth
...
Juneteenth (a portmanteau of June and nineteenth)[2] (also known as
Freedom Day,[3] Jubilee Day,[4] and Liberation Day,[5]) is an unofficial
American holiday celebrated annually on the 19th of June in the United
States.
-- https://en.wikipedia.org/wiki/Juneteenth
2020-06-18 17:43:46 +01:00
Emmanuele Bassi
0c023bb5bb
Clarify document
...
We don't use the branch name to determine whether we should enable or
disable deprecation warnings coming from our dependencies.
2020-06-18 17:36:44 +01:00
Emmanuele Bassi
df73bf38c2
Rename internal object for the Quartz input method context
...
Like GtkIMMultiContext, the Quartz input method object uses a delegate
object internally. Let's not use loaded terms like "slave".
2020-06-18 17:33:30 +01:00
Emmanuele Bassi
7a1df3f914
Rename delegate input method context
...
The GtkIMMultiContext uses a delegate pattern to proxy an existing input
method context. Let's not use loaded terms like "slave" when we have
perfectly fungible terms like "delegate".
2020-06-18 17:32:05 +01:00
Emmanuele Bassi
3f78199cd5
Rename (unused) argument
2020-06-18 17:31:48 +01:00
Emmanuele Bassi
0a55d4c981
docs: Clean up the GtkBuilder description
...
Drop the reference to a long since removed RNC schema file and to
GtkUIManager; clean up the typography for code elements.
2020-06-18 17:21:09 +01:00
Emmanuele Bassi
7e03288724
Fix typo in a comment
2020-06-18 17:20:56 +01:00
Emmanuele Bassi
979bf5c6fb
cups: Use allow/ignore list
...
Don't use loaded terms like "whitelist" and "blacklist".
2020-06-18 16:58:43 +01:00
Emmanuele Bassi
a7f5b2e8fc
Update a comment
...
Drop the use of "blacklist" from the comment, since everything else
refers to "ignored" properties.
2020-06-18 16:57:27 +01:00
Yuri Chornoivan
94f246240d
Update Ukrainian translation
2020-06-18 15:29:05 +00:00
Matthias Clasen
bd5fcf2998
Merge branch 'typo_fix' into 'master'
...
Fix minor typos
See merge request GNOME/gtk!2108
2020-06-18 15:22:53 +00:00
Yuri Chornoivan
c0cf839729
Fix minor typos
2020-06-18 10:47:16 +03:00
Matthias Clasen
2a51d4fba8
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2107
2020-06-18 03:21:18 +00:00
Matthias Clasen
cd1078563d
gtk-demo: Fix the settings demo
...
This was not updated to the latest api of GtkEditableLabel.
2020-06-17 18:21:28 -04:00
Matthias Clasen
a9943922d5
gtk-demo: Cosmetic changes
...
Reword the titles and texts for several demos.
2020-06-17 18:12:01 -04:00
Matthias Clasen
b46bfcafd1
gtk-demo: Cosmetic changes to the tagged entry demo
2020-06-17 18:06:28 -04:00
Matthias Clasen
6141c139e6
gtk-demo: Fix the tagged entry demo
...
We were using gtk_box_append on a button. Fallout
from the container removal.
2020-06-17 17:53:40 -04:00
Matthias Clasen
0fb83d7619
gtk4-demo: Cosmetic fixes to the dialog demo
...
Make this look a bit less ancient.
2020-06-17 17:46:40 -04:00
Matthias Clasen
f64d0d8cbf
Merge branch 'matthiasc/cloudprovider-ci' into 'master'
...
Matthiasc/cloudprovider ci
See merge request GNOME/gtk!2106
2020-06-17 21:16:17 +00:00
Matthias Clasen
e5d6bb68ce
Fix another cloudprovider include
2020-06-17 16:19:55 -04:00
Matthias Clasen
74899599a6
gtk-demo: Add a missing source file
2020-06-17 16:06:37 -04:00
Emmanuele Bassi
12c38c1d57
Use the appropriate include for libcloudproviders
...
Libcloudproviders has a single header entry point, so we shouldn't
include a sub-header.
Additionally, the include path provided by the pkg-config file is:
-I${includedir}/cloudproviders
So the include directive should be:
#include <cloudproviders.h>
The fact that it worked until now was an accident caused by the blanket:
-I${includedir}
we get for free; it broke the build when using libcloudproviders as a
subproject.
2020-06-17 20:49:57 +01:00
Emmanuele Bassi
d243c6d7f9
ci: Enable libcloudproviders support
...
We ended up breaking the build when it's enabled, so we should test the
feature in our CI pipeline.
2020-06-17 14:06:20 -04:00
Emmanuele Bassi
c5481a125e
Add libcloudproviders as a fallback subproject
...
We require a new version of libcloudproviders so that we can enable it
in our CI pipeline.
2020-06-17 14:06:20 -04:00
Matthias Clasen
68d80babce
Merge branch 'fix-initial-demo-selection' into 'master'
...
gtk-demo: Select the initial demo properly
See merge request GNOME/gtk!2105
2020-06-17 17:37:12 +00:00
Emmanuele Bassi
981c71c497
Merge branch 'no-more-testdbus' into 'master'
...
Stop using GTestDBus
See merge request GNOME/gtk!2104
2020-06-17 16:54:06 +00:00
Matthias Clasen
10bcbae68c
gtk-demo: Select the initial demo properly
...
GtkSingleSelection does not give us a notification when
autoselect kicks in to select the first item. This was
barely noticeable, since the notebook ends up correctly
populated anyway, but the window title is not.
2020-06-17 12:25:28 -04:00
Matthias Clasen
1b265a7971
Stop using GTestDBus
...
It is causing tests to timeout when libraries we are using
leak bus connections, and it turns out our tests run fine
without a session bus.
2020-06-17 12:06:09 -04:00
Florentina Mușat
29c0dfb1d2
Update Romanian translation
2020-06-17 15:38:14 +00:00
Florentina Mușat
dbec5a8ce5
Update Romanian translation
2020-06-17 15:31:22 +00:00
Matthias Clasen
53eb85ba64
Merge branch 'ebassi/ci-cleanup-master' into 'master'
...
Small clean ups for the CI file
See merge request GNOME/gtk!2102
2020-06-17 15:06:44 +00:00
Emmanuele Bassi
73fdefd65c
ci: Move backend Meson flags into a variable
...
So we don't have to copy them around.
2020-06-17 13:29:14 +01:00
Emmanuele Bassi
86562a6c5a
ci: Move images into environment variables
...
Currently we have to hunt all the `image` keys when updating the image
in use for a job. We should centralise them all at the top of the file,
so they are easy to update in one simple change.
2020-06-17 13:28:07 +01:00
Daniel Mustieles
ceb63b83f2
Updated Spanish translation
2020-06-17 13:54:04 +02:00
Yuri Chornoivan
7373e73067
Update Ukrainian translation
2020-06-17 08:28:31 +00:00
Matthias Clasen
985ba832fb
Merge branch 'page-setup-combos' into 'master'
...
Page setup combos
See merge request GNOME/gtk!2100
2020-06-16 20:00:13 +00:00
Matthias Clasen
de729e936d
Merge branch 'wip/jimmac/dropdown-styling' into 'master'
...
Adwaita: dropdown styling
Closes #2846
See merge request GNOME/gtk!2101
2020-06-16 19:52:51 +00:00
Jakub Steiner
019f4b6b34
Adwaita: dropdown styling
...
- selected item color
- offset dropdown form the parent control
- special styling for the top search entry
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2846
2020-06-16 21:11:28 +02:00
Matthias Clasen
5bcb01e182
pagesetupdialog: Convert the printer combo
...
Turn the printer combo into a dropdown.
2020-06-16 14:44:30 -04:00
Matthias Clasen
25c2059abb
pagesetupdialog: Port the papersize combo
...
Turn the papersize combo into a dropdown.
2020-06-16 14:34:54 -04:00
Matthias Clasen
2a9c92f8e2
Drop unused includes
...
This is just cleanup to help tracking down
remaining GtkComboBox uses.
2020-06-16 14:34:54 -04:00
Friedrich Beckmann
d468ea3efa
quartz: added open capability to gtk_application
...
This patch implements the openFiles delegate which is required
to open files which are associated with an application via the
Finder or via open on the command line. The patch has been
proposed by jessevdk@gmail.com .
See: https://gitlab.gnome.org/GNOME/gtk/-/issues/463
I tested the patch with the GNU pspp application on MacOS with
the quartz backend.
2020-06-16 12:42:48 -04:00
Piotr Drąg
d2cfe9f69a
Update POTFILES.in
2020-06-16 18:16:43 +02:00
Emmanuele Bassi
8dbe9e975b
Merge branch 'wip/ricotz/cleanup' into 'master'
...
gdk: Drop gdk_device_get_axis_value leftovers
See merge request GNOME/gtk!2097
2020-06-16 15:05:25 +00:00
Benjamin Otte
dd6174c496
Merge branch 'cherry-pick-947c3e9f' into 'master'
...
Merge branch 'benzea/fix-css-update' into 'gtk-3-24'
See merge request GNOME/gtk!2096
2020-06-16 13:57:49 +00:00
Rico Tzschichholz
7c1cf7781b
gdk: Drop gdk_device_get_axis_value leftovers
2020-06-16 15:31:29 +02:00
Benjamin Otte
9b363a62fe
Merge branch 'benzea/fix-css-update' into 'gtk-3-24'
...
Fix CSS update loop
See merge request GNOME/gtk!2093
(cherry picked from commit 947c3e9f72 )
7a5caf1b cssnode: Don't queue_validate/deque_validate invisible nodes
2020-06-16 13:10:15 +00:00
Daniel Mustieles
2cc39fe282
Updated Spanish translation
2020-06-16 09:47:37 +02:00
Daniel Mustieles
6255bd6c08
Updated Spanish translation
2020-06-16 09:46:49 +02:00
Matthias Clasen
ab50d2090d
Merge branch 'printer-combo-conversion' into 'master'
...
Printer combo conversion
See merge request GNOME/gtk!2095
2020-06-16 05:02:44 +00:00
Matthias Clasen
c8843d0730
fontchooser: Drop unused includes
2020-06-15 23:10:40 -04:00
Matthias Clasen
687da2ca6b
text: Drop unused includes
2020-06-15 23:10:32 -04:00
Matthias Clasen
990a87fd79
printdialog: Convert some leftover code
...
There was still some code expecting to deal with tree
models. Convert it to work with list models.
2020-06-15 23:10:23 -04:00
Matthias Clasen
c4215a2bec
pagesetupdialog: Drop the Private struct
...
We don't need it here.
2020-06-15 23:10:12 -04:00
Matthias Clasen
342400d155
paperdialog: Convert the printer combo
...
Use a GtkDropDown for the printer combo.
2020-06-15 22:42:03 -04:00
Matthias Clasen
1ca308a5fd
Merge branch 'fix-notebook-tabs' into 'master'
...
Fix notebook tabs
Closes #2842 and #2841
See merge request GNOME/gtk!2092
2020-06-15 20:42:53 +00:00
Matthias Clasen
37eb0496b6
notebook: Don't capture clicks
...
Using the bubble works just fine here, and keeps buttons
in notebook tabs working without side-effects.
Fixes : #2841
2020-06-15 14:16:45 -04:00
Matthias Clasen
6a13bbbfef
Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernativeportal_get_filter' into 'master'
...
Make gtk_file_chooser_get_filter work for portal case (issue #1820 , master)
Closes #1820
See merge request GNOME/gtk!2070
2020-06-15 17:49:17 +00:00
Matthias Clasen
c175a7a470
searchentry: Fix keynav
...
Shift-Tabbing was getting stuck in GtkSearchEntry and
GtkPasswordEntry, since they grab the focus to a child
of theirs. Copy the same fix that we are already using
in GtkEntry.
Fixes : #2842
2020-06-15 13:48:03 -04:00
Matthias Clasen
937317e674
docs: Cosmetics
...
Remove a few instances of GTK+ in the docs.
2020-06-15 13:48:03 -04:00
Matthias Clasen
4248835ba1
Merge branch 'matthiasc/for-master' into 'master'
...
button: Center images
See merge request GNOME/gtk!2090
2020-06-15 17:01:25 +00:00
Matthias Clasen
180f7e4861
Merge branch 'editable-label' into 'master'
...
Editable label
See merge request GNOME/gtk!2081
2020-06-15 16:47:57 +00:00
Matthias Clasen
b526722000
button: Center images
...
If we leave the valign to be the default fill, then
the images pick up baseline alignment from the environment,
which can occasionally lead to misplaced -/+ icons in
spinbuttons, for example in the "Page Setup" tab of
the print dialog.
2020-06-15 12:24:48 -04:00
Matthias Clasen
b25bba4862
paperdialog: Port to use GtkListView
...
Use GtkListView and GtkEditableLabel here.
2020-06-15 12:08:54 -04:00
Matthias Clasen
02ce417279
gtk-demo: Use editable labels in the settings demo
...
This is more in line with the expected behavior for
editable lists.
2020-06-15 12:08:54 -04:00
Matthias Clasen
b0d2ae612f
Add a GtkEditableLabel widget
2020-06-15 12:08:54 -04:00
Matthias Clasen
23e3d48eb9
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Don't set style classes on app widgets
See merge request GNOME/gtk!2089
2020-06-15 16:01:22 +00:00
Matthias Clasen
14f26d2345
inspector: Don't set style classes on app widgets
...
Due to a mixup, the inspector was setting .dim-label on
widgets that get unmapped, instead of the labels representing
them in the object tree.
2020-06-15 11:22:32 -04:00
Matthias Clasen
7c357423a3
Merge branch 'matthiasc/for-master' into 'master'
...
dropdown: Style fixups
See merge request GNOME/gtk!2088
2020-06-15 15:05:14 +00:00
Matthias Clasen
cf2d6f6ec5
dropdown: Style fixups
...
Make the dropdown popover have a .menu style class,
and add padding to the rows in the popover. Also,
make the popover left-aligned with the button.
2020-06-15 10:25:31 -04:00
Alexander Larsson
1443ef85be
Merge branch 'final-frame-clock-work' into 'master'
...
Final frame clock work
See merge request GNOME/gtk!2087
2020-06-15 10:27:02 +00:00
Yariv Barkan
887aa2abdd
frame clock: fix scheduling
...
Fix scheduling of the frame clock when we don't receive "frame drawn"
messages from the compositor.
If we received "frame drawn" events recently, then the "smooth frame
time" would be in sync with the vsync time. When we don't receive frame
drawn events, the "smooth frame time" is simply incremented by constant
multiples of the refresh interval. In both cases we can use this smooth
time as the basis for scheduling the next clock cycle.
By only using the "smooth frame time" as a basis we also benefit from
more consistent scheduling cadence. If, for example, we got "frame
drawn" events, then didn't receive them for a few frames, we would still
be in sync when we start receiving these events again.
2020-06-15 08:54:18 +02:00
Yariv Barkan
9c5d6eaa71
frame clock: adjust reported frame time
...
When an animation is started while the application is idle, that often
happens as a result of some external event. This can be an input event,
an expired timer, data arriving over the network etc. The result is that
the first animation clock cycle could be scheduled at some random time,
as opposed to follow up cycles which are usually scheduled right after a
vsync.
Since the frame time we report to the application is correlated to the
time when the frame clock was scheduled to run, this can result in
uneven times reported in the first few animation frames. In order to fix
that, we measure the phase of the first clock cycle - i.e. the offset
between the first cycle and the preceding vsync. Once we start receiving
"frame drawn" signals, the cadence of the frame clock scheduling becomes
tied to the vsync. In order to maintain the regularity of the reported
frame times, we adjust subsequent reported frame times with the
aforementioned phase.
2020-06-15 08:54:17 +02:00
Yuri Chornoivan
c49318e973
Update Ukrainian translation
2020-06-15 06:33:54 +00:00
Matthias Clasen
131cc6497a
Merge branch 'mingw-x64-compiler-warnings' into 'master'
...
Fix various compiler warnings with the 64bit mingw build
See merge request GNOME/gtk!2020
2020-06-15 01:26:45 +00:00
Matthias Clasen
d9d591ff7a
Merge branch 'fix-spin-button-auto-sizing' into 'master'
...
spinbutton: Bring back auto-sizing
See merge request GNOME/gtk!2085
2020-06-14 22:06:16 +00:00
Christoph Reiter
f16b34f286
CI: Switch to 64bit mingw for the MSYS2 job
...
64 bit is more common now and also tests more things because
sizeof(glong) != sizeof(gpointer)
2020-06-14 20:02:46 +02:00
Christoph Reiter
85d822b2e8
Fix various compiler warnings with the 64bit mingw build
...
Use better matching format modifiers/specifiers, initialise some things
which in theory wont be written to because of getters using g_return_if_fail(),
a cast, and gsize as input for malloc because gsize!=glong on 64bit Windows.
2020-06-14 20:02:36 +02:00
Matthias Clasen
4e5689abeb
Merge branch 'tchaik/fix-lpr-build' into 'master'
...
Fix the lpr print backend build (redundant-decls)
See merge request GNOME/gtk!2084
2020-06-14 14:57:42 +00:00
Matthias Clasen
b046c8d4ad
spinbutton: Bring back auto-sizing
...
We lost this when GtkSpinButton was first ported
to the new editable regime, and then the GtkBoxLayout.
Bring it back, but without text measurement, by overriding
width-chars for the GtkText inside, and only do it if
GtkSpinButton::width-chars is unset (ie -1).
Also adjust the documentation slightly to point out
how auto-sizing can be turned off.
2020-06-14 10:55:30 -04:00
Martin Blanchard
72c72d0b37
Fix the lpr print backend build (redundant-decls)
...
Class and instance _init() functions are already declared by
G_DEFINE_DYNAMIC_TYPE ().
2020-06-14 16:14:24 +02:00
Asier Sarasua Garmendia
5e69181d8d
Update Basque translation
2020-06-13 20:19:00 +00:00
Asier Sarasua Garmendia
9c5a9fb100
Update Basque translation
2020-06-13 19:40:17 +00:00
Matthias Clasen
ceb2349823
Merge branch 'matthiasc/for-master' into 'master'
...
widget-factory: Make the print dialog more functional
See merge request GNOME/gtk!2083
2020-06-13 16:17:49 +00:00
Matthias Clasen
818b7c44be
widget-factory: Make the print dialog more functional
...
Allow opening the papersize dialog.
2020-06-13 08:59:21 -04:00
Yuri Chornoivan
044026d330
Update Ukrainian translation
2020-06-13 11:45:35 +00:00
Piotr Drąg
66882f3825
Update POTFILES.in and POTFILES.skip
2020-06-13 12:48:27 +02:00
Matthias Clasen
1d0235780c
Merge branch 'matthiasc/for-master' into 'master'
...
paperdialog: Drop the private struct
See merge request GNOME/gtk!2082
2020-06-12 21:53:48 +00:00
Matthias Clasen
770d6cb2bd
paperdialog: Drop the private struct
...
Not needed here.
2020-06-12 12:54:21 -04:00
Matthias Clasen
106e1080ae
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2080
2020-06-12 16:39:46 +00:00
Matthias Clasen
07ecb3cb78
Merge branch 'fix-custom-paper-dialog' into 'master'
...
Fix the custom paper dialog
See merge request GNOME/gtk!2078
2020-06-12 14:01:17 +00:00
Matthias Clasen
74ac435ae6
printdialog: Replace the papersize combo with a dropdown
...
This one is more complicated, since it involves
separators and a custom item.
2020-06-12 09:22:36 -04:00
Matthias Clasen
c80ba49a60
Adwaita: Allow separators on individual list items
...
Allow setting a .separator style class on list items
to put a separator before the item.
2020-06-12 09:22:36 -04:00
Emmanuel Gil Peyrot
404d79153e
Switch to GL_ARB_framebuffer_object
...
GTK 4.0 was currently using GL_EXT_framebuffer_object, which is
deprecated as the ARB version has been merged into OpenGL 3.0 as well as
OpenGL ES 2.0, and provides laxer requirements.
This is a port of !2076 for 4.x.
2020-06-12 15:08:44 +02:00
Matthias Clasen
ed9941ec2c
printdialog: Replace some combo boxes with drop downs
...
These are just the simple cases.
2020-06-12 08:49:01 -04:00
Matthias Clasen
c3b43f2ad2
printeroptionwidget: Port to GtkDropDown
...
Use GtkDropDown instead of GtkComboBox in the print dialog.
2020-06-12 08:49:01 -04:00
Matthias Clasen
86718439be
testdropdown: Add some more tests
...
Add a homegrown combobox entry replacement that
combines a dropdown with a plain entry.
2020-06-12 08:49:01 -04:00
Matthias Clasen
933e373b07
dropdown: Make the stack nonhomogeneous
...
Without this, the (None) in the empty page forces
the button to have a large minimum width, even when
we don't put a widget in it.
2020-06-12 08:49:01 -04:00
Matthias Clasen
e6dcd55480
Fix the custom paper dialog
...
This broke during the container removal.
2020-06-12 08:46:18 -04:00
Yuri Chornoivan
0d901ef174
Update Ukrainian translation
2020-06-12 06:40:07 +00:00
Matthias Clasen
716e0db690
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2077
2020-06-11 23:44:48 +00:00
Matthias Clasen
90b78132d4
dropdown: Make the popup as wide as the button
...
Having narrow popups on a wide button looks awkward.
Do the same as the combo box, and ensure the popup
is at least as wide as the button.
2020-06-11 18:29:58 -04:00
Matthias Clasen
c2285d923d
iconbrowser: Drop app menu leftovers
...
We don't use menus.ui anymore, so don't put it in a resource.
2020-06-11 18:16:36 -04:00
Matthias Clasen
4a79ac4473
Adwaita: bring dropdown arrows back
...
These got lost when the css name changed from combobox
to dropdown.
2020-06-11 18:09:12 -04:00
Matthias Clasen
2a3e5422ad
docs: Cosmetics
...
Remove a few instances of GTK+ from the docs, and
remove references to ancient versions.
2020-06-11 17:25:57 -04:00
Matthias Clasen
e0c39dbf7e
Merge branch 'recent-model' into 'master'
...
Add a list model for recent files
See merge request GNOME/gtk!2073
2020-06-11 20:58:52 +00:00
Matthias Clasen
8c670b3b5d
testcolumnview: Add recent file support
...
Use testcolumnview --recent to see recent files.
2020-06-11 16:14:47 -04:00
Matthias Clasen
5dddec4dd9
Add GtkBookmarkList
...
This is a listmodel similar to GtkDirectoryList,
for tracking recent files.
2020-06-11 16:14:47 -04:00
Matthias Clasen
93017bb8db
Merge branch 'property-selection-getters' into 'master'
...
propertyselection: Add getters
See merge request GNOME/gtk!2075
2020-06-11 13:08:47 +00:00
Matthias Clasen
059c45a85b
propertyselection: Add getters
...
These were missing.
2020-06-11 07:35:20 -04:00
Matthias Clasen
63692a491d
Merge branch 'michaelweghorn/master_issue1820_gtkfilechoosernative_get_filter' into 'master'
...
filechoosernative: Make get_filter work for (non-portal) native chooser (master, issue #1820 )
Closes #1820
See merge request GNOME/gtk!2069
2020-06-10 14:47:36 +00:00
Emmanuele Bassi
bbe79c1ef9
Merge branch 'wip/carlosg/zoom-no-touchpad-warnings' into 'master'
...
gtkgesturezoom: Do not check touchpad phase on generic events
Closes #2825
See merge request GNOME/gtk!2071
2020-06-10 14:35:10 +00:00
Matthias Clasen
4b241f8da2
Merge branch 'scroll-compression' into 'master'
...
gdk: Compress scroll events
Closes #2800
See merge request GNOME/gtk!2066
2020-06-10 14:35:01 +00:00
Matthias Clasen
bdd6ae3252
Merge branch 'device-cleanup' into 'master'
...
Device cleanup
See merge request GNOME/gtk!2068
2020-06-10 13:06:13 +00:00
sicklylife
24a3ff3aef
Update Japanese translation
2020-06-10 12:34:42 +00:00
Carlos Garnacho
ba988cd899
gtkgesturezoom: Do not check touchpad phase on generic events
...
This gesture handles both individual touch events and touchpad gesture
events, and was checking the touchpad phase in generic code paths. This
is dubious since event methods error out on the wrong GdkEventTypes.
Check the touchpad gesture phase within the branch handling touchpad
events, and make it clear which is the gesture phase of all that we are
ignoring.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2825
2020-06-10 14:30:58 +02:00
sicklylife
1bf1646d25
Update Japanese translation
2020-06-10 12:18:55 +00:00
Matthias Clasen
2c82151d65
gdk: Drop axis labels
...
This was only ever implemented on X11, and the labels
here were atom names, so unlikely to be useful for
anything interesting.
2020-06-10 07:36:30 -04:00
Alexander Larsson
d2235b71f3
Merge branch 'win32-use-g-stat' into 'master'
...
gtkiconcache: Use g_stat instead of fstat
See merge request GNOME/gtk!2019
2020-06-10 07:19:22 +00:00
Michael Weghorn
ecc6c255ef
Make gtk_file_chooser_get_filter work for portal case
...
This makes 'gtk_file_chooser_get_filter' work for the
portal native file chooser by handling the corresponding
'current_filter' argument in the response retrieved via
D-Bus.
In order to try to map the retrieved 'current_filter' to one
of the existing list of filters, use the retrieved filter's name,
similar to how xdg-desktop-portal-gtk does it when evaluating the
'current_filter' input parameter in 'options'.)
Note: This depends on the following merge/pull requests
which fix the filter handling in gtk for native file choosers
and introduce the 'current_filter' handling for FileChooser portal.
* https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1959
* https://github.com/flatpak/xdg-desktop-portal/pull/493
* https://github.com/flatpak/xdg-desktop-portal-gtk/pull/311
This fixes #1820 for desktop portal case.
Fixes : #1820
2020-06-09 22:59:54 +02:00
Michael Weghorn
57135acd2d
filechoosernative: Make get_filter work for (non-portal) native chooser
...
'gtk_file_chooser_get_filter' did not work for GtkFileChooserNative,
since the previous way did not properly handle the delegate dialog,
s.a. commit a136cbae8f
("filechoosernative: forward current_filter to delegate dialog",
2018-11-29) for details, wich basiscally fixed the same thing for
the 'gtk_file_chooser_set_filter' case.
This fixes #1820 for the fallback dialog. A solution for the portal
one (which also requires changes to xdg-desktop-portal and
xdg-desktop-portal-gtk as well) will be suggested in a subsequent step.
Bug: #1820
2020-06-09 22:59:34 +02:00
Matthias Clasen
54c098761f
gdk: Drop gdk_device_set_axis_use
...
If you need some axes changed, you can just flip
the values when you receive them.
2020-06-09 15:27:34 -04:00
Matthias Clasen
2f98400b80
gdk: Drop gdk_device_get/set_keys
...
This functionality was only ever half-implemented
on X11, and is not useful enough to keep around.
2020-06-09 15:27:33 -04:00
Matthias Clasen
ea7c9b93ea
x11: Stop setting device keys
...
This is very vestigial functionality, and basically
unused.
2020-06-09 15:05:55 -04:00
Matthias Clasen
4317c008f0
Address review comments
...
We were casting scroll events to motion events
rather carelessly. Don't do that.
2020-06-09 14:13:22 -04:00
Matthias Clasen
d605d9ae73
gdk: Add documentation
...
Add some useful information about event history.
2020-06-09 13:59:26 -04:00
Matthias Clasen
c9fad25131
gdk: Rename gdk_motion_event_get_history
...
Scroll events can have history too, so make a
getter that works for both. This drops the
gdk_scroll_event_get_history getter that was
added a few commits earlier, since we now
store scroll history in the same way as
motion history.
Update the docs, and all callers.
2020-06-09 13:43:12 -04:00
Matthias Clasen
693200f1eb
gdk: Shrink GdkTimeCoord
...
There is really no need to store 128 doubles as axes,
ever. We can do just fine with 10. At the same time,
add a GdkAxisFlags member, so we can interpret the
values without having to go chasing the right device
for this information.
2020-06-09 13:43:03 -04:00
Matthias Clasen
5f087a9dff
gdk: Add scroll delta x/y as device axes
...
They really are axes, and having them present
in these enums lets use store delta values in
GdkTimeCoord for keeping history.
2020-06-09 13:43:03 -04:00
Matthias Clasen
b9cde6f8ea
Keep scroll history
...
Similar to how we keep motion history for compressed
events, keep scroll history for compressed scroll
events.
2020-06-09 13:43:03 -04:00
Matthias Clasen
86eece78b1
gdk: Compress scroll events
...
Only return one accumulated scroll event per frame.
Compress them by adding up the deltas.
Still missing: a way to capture history, like
we do for motion events.
Fixes : #2800
2020-06-09 13:43:03 -04:00
Daniel Mustieles
8cb50ac6e9
Updated Spanish translation
2020-06-09 17:19:50 +02:00
Matthias Clasen
997fbbde8f
Merge branch 'drop-device-history' into 'master'
...
Drop device history
See merge request GNOME/gtk!2065
2020-06-08 23:56:30 +00:00
Matthias Clasen
805ddc3c3a
gdk: Drop gdk_device_get_history
...
This function is not implemented anywhere.
2020-06-08 18:24:20 -04:00
Matthias Clasen
da9b3a9256
win32: Drop pointless vfuncs
...
These are not useful.
2020-06-08 18:24:20 -04:00
Matthias Clasen
876560924f
wayland: Drop a pointless vfunc
...
A vfunc that just returns FALSE is not useful.
2020-06-08 18:24:20 -04:00
Matthias Clasen
ca1c89c5bd
broadway: Drop a pointless vfunc
...
A vfunc that just returns FALSE is not useful.
2020-06-08 18:24:20 -04:00
Jordi Mas
7875e28d9f
Update Catalan translation
2020-06-08 22:50:03 +02:00
Benjamin Otte
bd2f2a6f65
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2064
2020-06-08 18:43:31 +00:00
Benjamin Otte
541aaa2392
selectionmodel: Add unselect_rest argument to select_callback
...
This is not just about consistency with other functions.
It is about avoiding reentrancy problems.
GtkListBase first doing an unselect_all() will then force the
SelectionModel to consider a state where all items are unselected
(and potentially deciding to autoselect one) and then cause a
"selection-changed" emission that unselects all items and potentially
updates all the list item widgets in the GtkListBase to the unselected
state.
After this, GtkListBase selects new items, but to the SelectionModel and
the list item widgets this looks like an enitrely new operation and
there is no way to associate it with the previous state, so the
SelectionModel cannot undo any previous actions it took when
unselecting.
And all listitem widgets will now think they were just selected and
start running animations about selecting.
2020-06-08 19:06:56 +02:00
Benjamin Otte
d294b01cee
selectionmodel: Rename "exclusive" to "unselect_rest"
...
The name is better at explaining what this boolean is meant to do.
2020-06-08 18:26:48 +02:00
Benjamin Otte
5d9dc25115
listitemmanager: Update selections properly
...
Replace a previous fix with a more correct one: Update the
selected state from the model instead of reusing the old state, the
model might have updated the selected state.
2020-06-08 18:14:24 +02:00
Daniel Mustieles
c8988ec784
Updated Spanish translation
2020-06-08 17:21:58 +02:00
Daniel Mustieles
071dbc1115
Updated Spanish translation
2020-06-08 16:11:28 +02:00
Matthias Clasen
80c5e4a156
Merge branch 'matthiasc/for-master' into 'master'
...
dropdown: Use our own CSS name
See merge request GNOME/gtk!2061
2020-06-08 11:15:28 +00:00
Emmanuele Bassi
6eac3063fa
Merge branch 'tintou/places-sidebar-cloudproviders' into 'master'
...
placessidebar: Fix build with libcloudproviders
See merge request GNOME/gtk!2062
2020-06-08 09:35:23 +00:00
Corentin Noël
27925fcb0e
placessidebar: Fix build with libcloudproviders
...
Make it build with cloudproviders=true as the GtkPopover API for menus is now in GtkPopoverMenu.
Fix some leaks while looking at the code.
2020-06-08 10:40:46 +02:00
Matthias Clasen
5f4d21422a
Merge branch 'fix-cell-editing' into 'master'
...
Fix cell editing
Closes #2831
See merge request GNOME/gtk!2060
2020-06-07 14:54:37 +00:00
Matthias Clasen
b0bb413faa
dropdown: Use our own CSS name
...
Use the name dropdown for the css node, and document it.
2020-06-07 09:01:20 -04:00
Matthias Clasen
37633985bd
Drop gtknativeprivate.h
...
No need to ship empty headers.
2020-06-07 08:52:45 -04:00
Matthias Clasen
6ff8f1b2fd
Merge branch 'gtk-demo-tweaks' into 'master'
...
Gtk demo tweaks
See merge request GNOME/gtk!2059
2020-06-07 12:51:34 +00:00
Matthias Clasen
d13a3c7540
Fix cell editing
...
When translating coordinates from an event, we need to
take the surface transform into account. This makes
double-clicking on editable cells in treeviews work
again.
Fixes : #2831
2020-06-07 08:46:31 -04:00
Yuri Chornoivan
0a469d7bd6
Update Ukrainian translation
2020-06-07 08:51:44 +00:00
Piotr Drąg
115edc5fd1
Update POTFILES.in
2020-06-07 09:27:34 +02:00
Matthias Clasen
a28c75f215
gtk-demo: Expand the sidebar by default
...
Seems better to show what we have. Plus, clicking
those arrows is a little fiddly.
2020-06-06 22:12:12 -04:00
Matthias Clasen
b9d7dab329
gtk-demo: Improve display of image sources
...
Make the images expand to fill the space.
2020-06-06 22:12:12 -04:00
Matthias Clasen
bb7500e984
gtk-demo: Cosmetics
...
Tweak the formatting of the descriptions of
various demos.
2020-06-06 22:05:52 -04:00
Matthias Clasen
e94268944b
gtk-demo: Cosmetics
...
Make the titles of some demos match between sidebar
and window.
2020-06-06 21:42:42 -04:00
Emmanuele Bassi
3225b487e8
Merge branch 'ebassi/for-master' into 'master'
...
Annotate the GtkSelectionModel callbacks
See merge request GNOME/gtk!2057
2020-06-07 01:42:21 +00:00
Matthias Clasen
e35c0e043e
gtk-demo: Add overline to the markup demo
...
This is a new-ish Pango feature.
2020-06-06 21:38:31 -04:00
Matthias Clasen
b251893030
Drop pango version checks
...
We are requiring pango 1.45.0 now, so no need to
Keep these ifdefs in the code any longer.
2020-06-06 21:32:55 -04:00
Matthias Clasen
15257e3922
gtk-demo: Fix a leak
...
The themes demo was leaking its builder, and
therefore couldn't be closed.
2020-06-06 20:09:42 -04:00
Matthias Clasen
180a5a1ad7
gtk-demo: Cosmetic changes to the dropdown demo
...
Match the window title and the sidebar.
2020-06-06 20:08:50 -04:00
Matthias Clasen
11f971d870
gtk-demo: Cosmetic improvements to clocks demo
...
Reformat the code comments, and add a 10th clock.
2020-06-06 19:43:21 -04:00
Emmanuele Bassi
7c382c6b47
Annotate the GtkSelectionModel callbacks
...
We need a scope for the select and unselect callback arguments.
2020-06-07 00:39:33 +01:00
Jordi Mas
087f42d998
Update Catalan translation
2020-06-06 23:13:17 +02:00
Matthias Clasen
2abb5b6419
3.98.5
2020-06-06 16:03:38 -04:00
Matthias Clasen
f2259adcdc
Disable a failing test
...
For some reason, empty-linear-gradient is failing here,
with the broadway and opengl renderers, and I don't
know why. Disable it for now.
2020-06-06 15:32:26 -04:00
Matthias Clasen
a73457237d
Skip broken a11y tests
2020-06-06 14:18:44 -04:00
Matthias Clasen
9f335d3ee6
docs: Regroup the tree support parts
...
Give the chapter a title, and put some things in sections.
2020-06-06 13:54:58 -04:00
Matthias Clasen
856c8950ff
docs: Put selection models into a section
...
This makes the documentation structure a bit clearer.
2020-06-06 13:54:58 -04:00
Matthias Clasen
61ccf4e719
docs: Fix up the GtkNativeDialog section
...
Without GtkNativeDialog in the section list,
links are not generated from the object hierarchy.
2020-06-06 13:54:58 -04:00
Matthias Clasen
1567db1f02
Merge branch 'misc-multiselection' into 'master'
...
Misc multiselection
See merge request GNOME/gtk!2055
2020-06-06 17:54:42 +00:00
Matthias Clasen
8316d5e366
Merge branch 'list-arrows' into 'master'
...
listbase: Make up/down arrows work
See merge request GNOME/gtk!2056
2020-06-06 17:47:05 +00:00
Matthias Clasen
8fca040163
Merge branch 'property-selection' into 'master'
...
Property selection
Closes #2826
See merge request GNOME/gtk!2054
2020-06-06 17:35:05 +00:00
Matthias Clasen
c0fe1a7ffe
listbase: Make up/down arrows work
...
We were missing a binding for up/down without modifiers.
2020-06-06 12:33:12 -04:00
Matthias Clasen
e72c243aca
singleselection: Clarify docs
...
Mention persistence and sorting.
2020-06-06 11:53:33 -04:00
Matthias Clasen
14605d4b92
gtk-demo: Use a property selection in the colors demo
...
This makes the property persist across sort changes.
2020-06-06 11:41:51 -04:00
Matthias Clasen
d1509971d8
Add GtkPropertySelection
...
This is a selection model that stores the selection
state in a boolean property of the items, and thus
persists across reordering and similar changes.
Fixes : #2826
2020-06-06 11:41:51 -04:00
Matthias Clasen
951c9c5d73
Merge branch 'listitemmanager-selection' into 'master'
...
listitemmanager: Handle selection-changes properly
Closes #2827
See merge request GNOME/gtk!2053
2020-06-06 15:23:40 +00:00
Matthias Clasen
3e6e247e56
multiselection: Rewrite the select_callback implementation
...
Use a for loop to make this more obvious, and add some
assertions that the callback is behaving properly.
2020-06-06 11:22:48 -04:00
Matthias Clasen
27ce68b74a
Add tests for select_callback
2020-06-06 11:22:48 -04:00
Matthias Clasen
b0cf7a95b0
Add a forgotten export
...
gtk_selection_model_unselect_callback needs to be exported.
2020-06-06 11:22:48 -04:00
Matthias Clasen
fd7f19c934
selectionmodel: Document the callback apis
2020-06-06 10:36:57 -04:00
Matthias Clasen
8090e213de
Add a test for multiselection persistence
...
Add a test that verifies that newly added items
are always unselected.
2020-06-06 10:24:14 -04:00
Matthias Clasen
de6327a885
multiselection: Clarify docs
...
Make it clear that GtkMultiSelection is not persistent
across resorting.
2020-06-06 10:24:14 -04:00
Yuri Chornoivan
8699c0f340
Update Ukrainian translation
2020-06-06 13:46:40 +00:00
Yuri Chornoivan
bda5454549
Update Ukrainian translation
2020-06-06 13:44:29 +00:00
Matthias Clasen
c3a6e35070
Drop an unnecessary include
2020-06-06 09:39:36 -04:00
Matthias Clasen
71c29bfcff
listitemmanager: Handle selection-changes properly
...
The selection model will only emit one of items-changed
or selection-changed, so when we handle an items-changed,
we must assume that selection state may have changed for
any of the newly added items.
This fixes lingering selection state in the visible range
if you change the sorting of the colors demo.
Fixes : #2827
2020-06-06 08:36:11 -04:00
Piotr Drąg
647ed59d11
Update POTFILES.in and POTFILES.skip
2020-06-06 14:00:43 +02:00
Matthias Clasen
a0c489048a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2052
2020-06-06 05:30:30 +00:00
Benjamin Otte
0f9def660d
Merge branch 'wip/otte/for-master' into 'master'
...
multiselection: Remove unused code
See merge request GNOME/gtk!2051
2020-06-06 05:16:47 +00:00
Matthias Clasen
9fa65eadae
listitemwidget: Don't look at rubberbanding
...
Move the selection changes to button release, to
avoid conflict with the drag gesture for rubberbanding.
This avoids peeking at the parent, and is generally
nicer.
Among other things, you can now shift-click to select
a range in the colors demo in gtk4-demo.
2020-06-06 00:23:04 -04:00
Matthias Clasen
facfff0022
listbase: Fix an off-by-one error
...
We were accidentally cutting off the set one-too-early,
which showed up as single clicks not selecting an item
anymore.
2020-06-06 00:15:50 -04:00
Matthias Clasen
f8b4083f47
listbase: Fix a problem with rubberbands
...
When I changed things to only collect the set
in the stop() function, I overlooked that this
has the side-effect of only handling items which
are backed by a widget at the time stop() is called.
If we make a big rubberband and autoscroll down too
far, we loose the items that go out the visible range
at the top. Fix that by maintaining the set as we go.
2020-06-05 23:18:00 -04:00
Matthias Clasen
b047b7838d
multiselection: Don't emit nonsensical signals
...
I forgot to add a check here. We only want to emit
a ::selection-changed if we actually changed it.
2020-06-05 23:15:20 -04:00
Benjamin Otte
b1c00ecee6
multiselection: Remove unused code
...
This is leftover code from an earlier SelectionModel API.
2020-06-06 05:02:37 +02:00
Matthias Clasen
93abd8da59
NEWS: Updates
2020-06-05 22:50:30 -04:00
Matthias Clasen
3412f0554f
gtk: Documentation fixups
...
Document missing symbols, and other cleanups.
2020-06-05 22:50:30 -04:00
Matthias Clasen
61c83f9ffe
gdk: Documentation fixups
...
Document some missing symbols.
2020-06-05 20:59:51 -04:00
Matthias Clasen
3d7c1f8950
gsk: Documentation fixups
...
Document a few missing symbols.
2020-06-05 20:19:45 -04:00
Matthias Clasen
b0e81acc12
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2050
2020-06-05 23:55:12 +00:00
Matthias Clasen
a682d97663
Merge branch 'wip/ebassi/a11y-2' into 'master'
...
Accessibility cleanup
See merge request GNOME/gtk!2049
2020-06-05 23:04:21 +00:00
Matthias Clasen
0e5137ae61
NEWS: Updates
2020-06-05 18:40:53 -04:00
Matthias Clasen
005a3da18f
gtk-demo: Another way to trigger theme benchmark
...
The click on the headerbar seems broken atm, so add
an explicit button to trigger the cycling among the
themes.
2020-06-05 18:40:24 -04:00
Matthias Clasen
be6bcf882d
spinbuttonaccessible: Fix an oversight
...
We need to pass the accessible to the signal handler.
2020-06-05 17:21:26 -04:00
Matthias Clasen
fb344e8108
Trivial typo fix
2020-06-05 17:08:43 -04:00
Emmanuele Bassi
b99389bcb8
a11y: Drop GtkWidgetAccessibleClass.notify_gtk
...
It's finally unused.
Accessible types should either watch properties they are interested in
directly, or should have (private) API to allow widgets to update the
accessible state directly.
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
0fefdc99b2
a11y: Simplify GtkEntryAccessible
...
Now that we don't have any additional subclasses of GtkEntryAccessible
in GTK, we can drop all the conditional fluff in the base class.
We still need to subscribe to the global notify signal, because of the
sheer amount of properties watched by GtkEntryAccessible.
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
e63419fbf4
a11y: Implement GtkPasswordEntryAccessible properly
...
GtkPasswordEntryAccessible is not a GtkEntryAccessible any more, so it
will need a proper implementation of various interfaces and
functionality in order to work like any other entry.
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
428bb09a35
a11y: Make GtkSearchEntryAccessible a full GtkWidgetAccessible
...
We should not inherit from GtkEntryAccessible, given that GtkSearchEntry
is *not* a GtkEntry.
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
7c2c795681
a11y: Simplify GtkScrollbarAccessible
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
165f352c58
a11y: Simplify GtkScaleButtonAccessible
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
3d6e702f63
a11y: Simplify GtkSpinButtonAccessible
...
We're already listening to the adjustment property on the spin button,
there's no need to reset the adjustment on widget set/unset, since the
accessible instance is always tied to the same widget.
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
597e9a96b4
a11y: Simplify GtkTextAccessible
2020-06-05 20:35:11 +01:00
Emmanuele Bassi
6f4ed6c105
a11y: Simplify GtkTextViewAccessible
...
Drop the GtkWidgetAccessible.notify_gtk override.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
c3eafed472
a11y: Simplify GtkColorSwatchAccessible
...
Drop the GtkWidgetAccessible.notify_gtk override.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
7480fb703e
a11y: Simplify GtkNotebookAccessible
...
Let the GtkNotebook explicitly update the accessible object that the
current page has changed, instead of overriding
GtkWidgetAccessible.notify_gtk.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
24e8b484e0
a11y: Simplify GtkWindowAccessible
...
Have GtkWindow notify of title changes, instead of overriding
GtkWidgetAccessible.notify_gtk.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
d60f7f2e7a
a11y: Simplify GtkExpanderAccessible
...
Drop the GtkWidgetAccessible.notify_gtk and AtkObject.initialize
overrides, and have GtkExpander update the state of the accessible
object directly.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
0dcffe7c33
a11y: Simplify GtkLevelBarAccessible
...
Drop the GtkWidgetAccessible.notify_gtk and AtkObject.initialize
overrides, and have GtkLevelBar notify the accessible object of value
changes.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
9f09cfcfbd
a11y: Split GtkSearchEntryAccessible from GtkEntryAccessible
...
Use a separate accessible object for the GtkSearchEntry, just like we
did for GtkPasswordEntry.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
7373cd962c
a11y: Split password entry accessible from GtkEntryAccessible
...
Use a separate accessible object.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
ac3f0df083
a11y: Simplify GtkProgressBarAccessible
...
Drop the GtkWidgetAccessibleClass.notify_gtk and the
AtkObjectClass.initialize overrides: they don't do anything relevant.
Instead, have GtkProgressBar update the accessible state when the
fraction changes.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
f95d54a13d
a11y: Use G_DECLARE macro for GtkWidgetAccessible
...
Allows us to drop the Private structure typedef.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
fc512f0b9f
a11y: Update the accessible state when GtkIconView:model changes
...
Do not use a generic "notify" signal handler.
Additionally, clean up the GtkIconViewAccessible implementation to bring
it up with modern idiomatic GObject.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
f5ed59b7f2
a11y: Drop notify_gtk() from GtkRangeAccessible
...
Let the GtkRange notify the accessible instance when the adjustment
changes.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
9d51aa1443
a11y: Drop notify_gtk() from GtkButtonAccessible
...
Make GtkButton notify the accessible state directly when updating the
label.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
f0bdc865b9
a11y: Remove GtkToggleButtonAccessible notify_gtk implementation
...
The base GtkWidgetAccessible class does the right thing by default.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
eda1703f9d
a11y: Update accessible state for GtkTreeView directly
...
Do not use GtkWidgetAccessibleClass.notify_gtk().
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
51fc382582
Notify accessibility state changes from GtkWidget
...
Piggybacking on blanket GObject::notify is not very efficient.
2020-06-05 20:35:10 +01:00
Emmanuele Bassi
6e52ef96a4
Move orientable style classes into GtkWidget
...
It feels slightly wrong to have GtkOrientable operate on widgets, but at
least what happens when an orientable widget changes orientation should
be part of GtkWidget.
This will allow to add more state changes without accessing widget state
from the outside of gtkwidget.c.
2020-06-05 20:35:09 +01:00
Emmanuele Bassi
9606c1eee9
Notify mapped state to the accessible object directly
...
Do not use signal connections: if we have an accessible object, notify
it directly when getting mapped and unmapped.
2020-06-05 20:32:27 +01:00
Emmanuele Bassi
959c101400
Drop unused AtkRegistry path
...
We expect widgets to use their own derived GtkWidgetAccessible type,
these days, and given that we hard code the default accessible type of a
GtkWidget to GtkWidgetAccessible, and that we enforce the dependency of
the type passed to gtk_widget_class_set_accessible_type(), the registry
code path is clearly unused.
2020-06-05 20:32:27 +01:00
Emmanuele Bassi
6b096e5c5b
Make tooltip properties idiomatic
...
The tooltip handling in GtkWidget is "special":
- the string is stored inside the qdata instead of the private
instance data
- the accessors call g_object_set() and g_object_get(), and the
logic is all inside the property implementation, instead of
being the other way around
- the getters return a copy of the string
- the setters don't really notify all the involved properties
The GtkWidgetAccessible uses the (escaped) tooltip text as a source for
the accessible object description, which means it has to store the
tooltip inside the object qdata, and update its copy at construction and
property notification time.
We can simplify this whole circus by making the tooltip properties (text
and markup) more idiomatic:
- notify all side-effect properties
- return a constant string from the getter
- if tooltip-text is set:
- store the text as is
- escape the markup and store it separately for the markup getter
- if tooltip-markup is set:
- store the markup as is
- parse the markup and store it separately for the text getter
The part of the testtooltips interactive test that checks that the
getters are doing the right thing is now part of the gtk testsuite, so
we ensure we don't regress in behaviour.
2020-06-05 20:32:26 +01:00
Emmanuele Bassi
9ac1eacdc8
Use modern GObject macros for GtkAccessible
2020-06-05 20:32:26 +01:00
Matthias Clasen
8e7395a7e3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2048
2020-06-05 19:25:46 +00:00
Matthias Clasen
80fbc1b72d
multiselection: Fix the select_range implementation
...
When exclusive is TRUE, we would not always emit a
::selection-changed signal that covers all the items
that were unselected.
This commit includes a test.
2020-06-05 14:57:59 -04:00
Matthias Clasen
17ea03eee2
set: Fix gtk_set_get_max
...
This function had an off-by-one error. Thankfully,
our selection tests are thorough enough to catch it.
2020-06-05 14:57:32 -04:00
Matthias Clasen
985b5a052e
dropdown: Connect a forgotten signal handler
...
The code was exporting a search_stop function, but
the ui file didn't connect it to the ::stop-search
signal. Fix that.
2020-06-05 14:34:38 -04:00
Matthias Clasen
ed1872f0a8
Merge branch 'frame-clock-start-time' into 'master'
...
Tweaks to frame clock for better ties to vsync
See merge request GNOME/gtk!2043
2020-06-05 18:33:48 +00:00
Matthias Clasen
34841c3a5f
Merge branch 'master.msvc' into 'master'
...
Fix latest GTK master on Visual Studio
See merge request GNOME/gtk!2028
2020-06-05 18:31:08 +00:00
Matthias Clasen
185f0181ac
Merge branch 'columnview-reorder-cells' into 'master'
...
Columnview reorder cells
See merge request GNOME/gtk!2047
2020-06-05 18:29:26 +00:00
Matthias Clasen
60d6a0f2d5
Merge branch 'rubberband-again' into 'master'
...
Rubberband again
See merge request GNOME/gtk!2041
2020-06-05 17:59:15 +00:00
Matthias Clasen
99a1d10bf1
multiselection: Fix the select_range implementation
...
When exclusive is TRUE, we would not always emit a
::selection-changed signal that covers all the items
that were unselected.
This commit includes a test.
2020-06-05 13:50:30 -04:00
Matthias Clasen
2f1028ed79
set: Add a few useful functions
...
Allow to find out if a set is empty, and its
min and max.
2020-06-05 13:49:23 -04:00
Matthias Clasen
f631e0e1e0
columnview: Update column positions on reordering
...
Tell reordered columns to reorder their cells to
the new position. This is necessary to get things
like separators right. The visible symptom of this
problem was the lack of the right border when the
last column is reorder to another position, since
the title widget was still the last in its container,
so :last-child applied.
2020-06-05 13:28:44 -04:00
Matthias Clasen
6df489d5a9
columnviewcolumn: Add private api to set the position
...
This is needed to make columns reorder their cells when
their position in the column views list of columns
changes.
2020-06-05 13:28:44 -04:00
Matthias Clasen
15c6ad88c0
listitemwidget: Add api to reorder children
...
We need this to keep the rows in sync with the columns
when they are reordered.
2020-06-05 13:28:44 -04:00
Matthias Clasen
40f6a9d830
columnviewlayout: Handle for_size propertly
...
When we are given a for_size as width for the whole
column view, we need to distribute it over the columns
as gtk_column_view_allocate_columns would, in order
to find out which for_size to give to each cell.
This is a bit recursive, but works. Since we are
doing this recursion for every row, we should consider
adding a cache for those distributed widths.
2020-06-05 13:27:50 -04:00
Ray Strode
bd06c00f3a
Merge branch 'wip/damaged-but-no-frost-bite' into 'master'
...
x11: defer _NET_WM_FRAME_DRAWN update until frame usable by compositor
See merge request GNOME/gtk!1982
2020-06-05 15:58:37 +00:00
Matthias Clasen
f6d23f0c29
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Bring back the applauncher demo
See merge request GNOME/gtk!2040
2020-06-05 15:38:03 +00:00
Emmanuele Bassi
2a24459b92
Merge branch 'ebassi/for-master' into 'master'
...
Add missing annotation
See merge request GNOME/gtk!2046
2020-06-05 15:29:41 +00:00
Matthias Clasen
f6da324670
columnview: Split gtk_column_view_allocate_columns
...
Split off a helper function that just distributes
the widths, without actually allocating the columns.
This will be used in measuring in the future.
2020-06-05 11:27:40 -04:00
Matthias Clasen
11a18bd61a
columnview: Take column width into account for measuring
...
When measuring the height of a cell, we need to give
it it the width of its column, if we expect realistic
results.
2020-06-05 10:42:20 -04:00
Ray Strode
972134abe4
x11: Defer _NET_WM_FRAME_DRAWN update until frame usable by compositor
...
With the vendor provided Nvidia driver there is a small window of time
after drawing to a GL surface before the updates to that surface
can be used by the compositor.
Drawing is already coordinated with the compositor through the frame
synchronization protocol detailed here:
https://fishsoup.net/misc/wm-spec-synchronization.html
Unfortunately, at the moment, GdkX11Surface tells the compositor the
frame is ready immediately after drawing to the surface, not later,
when it's consumable by the compositor.
This commit defers announcing the frame as ready until it's consumable
by the compositor. It does this by listening for the X server to announce
damage events associated with the frame drawing. It tries to find the
right damage event by waiting until fence placed at buffer swap time
signals.
2020-06-05 10:01:13 -04:00
Ray Strode
f8770b78ea
x11: Factor out some of frame sync code into subroutines
...
This commit moves some of the end frame sync counter handling
code to subroutines.
It's a minor readability win, but the main motivation is to
make it easier in a subsequent commit to defer updating the
sync counter until a more appropriate time.
2020-06-05 10:01:13 -04:00
Ray Strode
10f2b11fda
x11: Add back support for the damage extension
...
commit 14bf58ec5d dropped support
for using the DAMAGE extension since there was no code that
needed it.
We're going to need it again, however, to address an NVidia
vendor driver issue.
This commit does the plumbing to add it back.
2020-06-05 10:01:13 -04:00
Timm Bäder
ea1cc4b991
filechooserwidget: Avoid an uninitialised value
...
For NULL filters, we were never calling g_list_store_find, so leaving
filter_index undefined.
2020-06-05 15:38:55 +02:00
Timm Bäder
8bee3e2fe0
demos: Avoid shadowing a global from time.h
...
Sad but true.
2020-06-05 15:38:55 +02:00
Timm Bäder
1f7adfd9ff
filterlistmodel: Fix fallthrough annotations in unreachable code
...
They are only unreachable in debug builds but still break the build on
clang.
2020-06-05 15:38:55 +02:00
Matthias Clasen
9e55cd68e4
columview: Make cells propagate request mode
...
I think this is necessary to make wrapping
labels work.
2020-06-05 09:37:21 -04:00
Matthias Clasen
2a6dc67fd7
gtk-demo: Improve wrapping in settings demo
...
The columnview overrides the width of its content,
so if a label is not willing to wrap its content
below a certain width, it will just get cut off.
Avoid that by not setting width-chars on the wrapping
content.
2020-06-05 09:35:56 -04:00
Emmanuele Bassi
1061ad289a
Add missing annotation
2020-06-05 14:33:17 +01:00
Matthias Clasen
0f81b58545
columviewlayout: Skip children when we should
...
Every layout manager should call gtk_widget_should_layout
on their children before measuring or allocating them.
So do it here too.
2020-06-05 08:44:23 -04:00
Matthias Clasen
2437c5a0ae
listview: Add an example to the docs
...
The example is an excerpt from the applauncher
demo in gtk4-demo.
2020-06-05 08:22:48 -04:00
Matthias Clasen
669a6ddeaa
gtk-demo: Bring back the applauncher demo
...
Just without the coverflow. It was a well-documented
demo, so it is useful to keep around.
2020-06-05 08:22:48 -04:00
Yariv Barkan
f5de46670b
frame clock: schedule in refresh intervals
...
When the application does not receive "frame drawn" signals we schedule
the clock to run more or less at intervals equal to the last known
refresh interval. In order to minimize clock skew we have to aim for
exact intervals.
2020-06-05 11:57:49 +02:00
Alexander Larsson
91af8a705b
frame clock: Better handle non-regular clock cycles
...
We try to step the frame clock in whole refresh_interval steps, but to
avoid drift and rounding issues we additionally try to converge it to
be synced to the physical vblank (actually the time we get the
frame-drawn message from the compositor, but these are tied together).
However, the convergence to vsync only really makes sense if the new
frame_time actually is tied to the vsync. It may very well be that
some other kind of event (say a network or mouse event) triggered
the redraw, and not a vsync presentation.
We used to assume that all frames that are close in time (< 4 frames
apart) were regular and thus tied to the vsync, but there is really no
guarantee of that. Even non regular times could be rapid.
This commit changes the code to only do the convergence-to-real-time
if the cause of the clock cycle was a thaw (i.e. last frame drawn and
animating). Paint cycles for any other kind of reason are always
scheduled an integer number of frames after the last cycle that was
caused by a thaw.
2020-06-05 11:30:47 +02:00
Alexander Larsson
82c314f1af
frame clock: Track if paint is caused by thaw or not
...
When we get to a paint cycle we now know if this was caused by a
thaw, which typically means last frame was drawn, or some other event.
In the first case the time of the cycle is tied to the vblank in some
sense, and in the others it is essentially random. We can use this
information to compute better frame times. (Will be done in later
commits.)
2020-06-05 11:16:57 +02:00
Benjamin Otte
672413f1f6
Merge branch 'cleanup-snapshot-inhibit' into 'master'
...
reftest: Clean up reftest_inhibit_snapshot()
See merge request GNOME/gtk!2034
2020-06-05 07:38:52 +00:00
Matthias Clasen
843bf23f84
Drop gtk_multi_selection-copy
...
It is not used anymore.
2020-06-05 00:51:35 -04:00
Matthias Clasen
eeb2d2cc38
listbase: Redo rubberbanding
...
Make it so that the selection is only updated in the end.
2020-06-05 00:51:35 -04:00
Chun-wei Fan
c370b8f309
demos/gtk-demo/listview*.c: Include stdlib.h
...
atoi() and qsort() both require this header for them to be defined
2020-06-05 11:16:45 +08:00
Chun-wei Fan
acd9c12667
modules: Fix build on Visual Studio
...
Visual Studio does not allow decorating functions with '__declspec (dllexport)'
if a prototype exists and is not decorated with '__declspec (dllexport)' as
well, so we cannot just decorate g_io_module_[load|unload|query] in the various
module sources with G_MODULE_EXPORT because the prototypes of these functions
have been marked with _GLIB_EXTERN, which equates to 'extern' unless overridden
Fix this by overriding _GLIB_EXTERN with the appropriate visibility flag, as we
have used to define _GDK_EXTERN. Unfortunately, we can't just use _GDK_EXTERN
G_MODULE_EXPORT as they may have not been defined yet for our use
Do this across the board for all modules, even if they are not buildable on
Visual Studio nor Windows, for consistency's sake.
2020-06-05 11:16:45 +08:00
Timm Bäder
5535b26395
Merge branch 'fix-quadratic-add' into 'master'
...
Avoid quadratic slowdown in gtk_widget_add()
See merge request GNOME/gtk!2027
2020-06-05 02:57:38 +00:00
Matthias Clasen
20611cf68c
Add gtk_selection_model_[un]select_callback
...
Add a methods to add or remove a whole set
(specified via a query-range style callback).
2020-06-04 22:28:54 -04:00
Matthias Clasen
06c34ce02f
set: Add a few useful functions
...
Allow to find out if a set is empty, and its
min and max.
2020-06-04 21:36:23 -04:00
Matthias Clasen
4fb50c7408
Merge branch 'matthiasc/for-master' into 'master'
...
more documentation for list widgets
See merge request GNOME/gtk!2039
2020-06-04 21:17:21 +00:00
Matthias Clasen
c37bea1676
Merge branch 'fribidi-include' into 'master'
...
wayland: Remove unused fribidi include
See merge request GNOME/gtk!2037
2020-06-04 20:03:13 +00:00
Matthias Clasen
ed985640e8
docs: Expand list widget docs
...
Begin to flesh out the long descriptions for GtkListView,
GtkGridView and GtkColumnView.
2020-06-04 15:33:53 -04:00
Sebastian Keller
2bd938952d
wayland: Remove unused fribidi include
...
The included fribidi header is not used in gdkkeys-wayland.c and already
included in gdk.c which causes linker issues due to the header defining
a global variable.
2020-06-04 20:44:55 +02:00
Matthias Clasen
623a56391c
gtk-demo: Cosmetics
...
Remove a few instances of double semicolon.
2020-06-04 13:30:13 -04:00
Matthias Clasen
1b7fb10361
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Allow editing in the settings demo
See merge request GNOME/gtk!2033
2020-06-04 16:32:21 +00:00
Matthias Clasen
f6b6688186
Merge branch 'list-widget-styles' into 'master'
...
List widget styles
Closes #2818
See merge request GNOME/gtk!2035
2020-06-04 16:27:37 +00:00
Matthias Clasen
99453e937c
Merge branch 'demo-drop-awards' into 'master'
...
gtk-demo: Drop the awards
See merge request GNOME/gtk!2036
2020-06-04 15:27:23 +00:00
Alexander Larsson
d3e0a1f68c
Avoid quadratic slowdown in gtk_widget_add()
...
If you add a widget to a parent, this will invalidate the css nodes
for parent/siblings. Afterwards, if the parent is mapped, we will
realize the new child. This calls gtk_widget_update_alpha() which
needs the css opacity, so it revalidates the css.
Thus, for each widget_add (while visible) will trigger a full
revalidation of each sibling. If you add N children to a parent that
leads to O(N^2) revalidations.
To demo this I changed gtk-demo to always double the count
(independent of the fps) and print the time it took. Here is the
results (after a bit):
Setting fishbowl count=256 took 3,4 msec
Setting fishbowl count=512 took 10,1 msec
Setting fishbowl count=1024 took 34,1 msec
Setting fishbowl count=2048 took 126,3 msec
Setting fishbowl count=4096 took 480,3 msec
Setting fishbowl count=8192 took 1892,7 msec
Setting fishbowl count=16384 took 7751,0 msec
Setting fishbowl count=32768 took 38097,7 msec
Setting fishbowl count=65536 took 191987,7 msec
To fix this we drop gtk_widget_update_alpha() and just
calculate it when needed (which is only in a single place).
It was really only necessary because we previously set
the alpha on the surface.
With this fix the above becomes:
Setting fishbowl count=256 took 1,0 msec
Setting fishbowl count=512 took 1,9 msec
Setting fishbowl count=1024 took 3,7 msec
Setting fishbowl count=2048 took 7,4 msec
Setting fishbowl count=4096 took 18,1 msec
Setting fishbowl count=8192 took 31,0 msec
Setting fishbowl count=16384 took 66,3 msec
Setting fishbowl count=32768 took 126,7 msec
Setting fishbowl count=65536 took 244,6 msec
Setting fishbowl count=131072 took 492,2 msec
Setting fishbowl count=262144 took 984,3 msec
2020-06-04 16:42:59 +02:00
Matthias Clasen
76ff1a2a49
gtk-demo: Drop the awards
...
This was a neat idea, but maintaining it at a sufficient
level is too much work.
2020-06-04 10:19:44 -04:00
Matthias Clasen
51c6ce1734
list widgets: Document css structure
...
We didn't fill in this expected part of the widget
documentation yet.
2020-06-04 10:05:17 -04:00
Benjamin Otte
1998b673f4
Merge branch 'ensure-style-no-recurse' into 'master'
...
Avoid recursion in gtk_css_node_ensure_style()
See merge request GNOME/gtk!2031
2020-06-04 14:04:55 +00:00
Matthias Clasen
627497f942
docs: Fix a parameter name mismatch
2020-06-04 09:52:17 -04:00
Matthias Clasen
f9287941b4
Change css names of list widget
...
The new names are
GtkListView - listview row
GtkGridView - gridview child
GtkColumView - columnview header
columnview listview row
Adwaita css has been updated to preserve
existing styles.
Fixes : #2818
2020-06-04 09:51:49 -04:00
Alexander Larsson
5059854a2e
reftest: Clean up reftest_inhibit_snapshot()
...
This was done in a weird way where we always call reftest_uninhibit_snapshot()
on paint, and then re-inhibited it if it wasn't inhibited. To make this
work it also started with an extra inhibit.
This is very contorted and based on how this historically worked. This
changes it to just do:
if (inhibit_count > 0)
return;
And keep inhibit_count at its initial zero value unless it is actually
inhibited.
2020-06-04 15:45:29 +02:00
Benjamin Otte
aa8a061a83
Merge branch 'fix-snapshot' into 'master'
...
snapshot: Fix assert if paint gets scheduled immediately
See merge request GNOME/gtk!2032
2020-06-04 13:43:44 +00:00
Matthias Clasen
3f2d44d517
gtk-demo: Allow editing in the settings demo
...
This gives us an example of a columnview with editable
content, which we didn't have so far.
2020-06-04 08:45:47 -04:00
Alexander Larsson
b4af23be23
snapshot: Fix assert in inhibition
...
In https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2027 i was getting
Bail out! ERROR:../testsuite/reftests/reftest-snapshot.c:212:reftest_uninhibit_snapshot: assertion failed: (inhibit_count > 0)
In (for example the box-shadow-changes-modify-clip reftest. I can reproduce this (on master) with:
```
$ xvfb-run -a -s "-screen 0 1024x768x24" meson test --suite gtk:reftest "reftest box-shadow-changes-modify-clip.ui"
...
1/1 gtk:reftest / reftest box-shadow-changes-modify-clip.ui ERROR 0.77s
``
Fix this by re-inhibiting if we didn't draw anything, or we will get an assert the next paint.
2020-06-04 14:22:27 +02:00
Matthias Clasen
8ddf1f1ea5
Merge branch 'kjellahl/flowboxremove' into 'master'
...
flowbox: Don't use a removed and destroyed child
See merge request GNOME/gtk!2029
2020-06-04 12:13:57 +00:00
Matthias Clasen
475d8c4c11
Merge branch 'fishbowl-children' into 'master'
...
gtk-demo: Avoid list for children in GtkFishBowl
See merge request GNOME/gtk!2030
2020-06-04 12:10:51 +00:00
Alexander Larsson
fc823eb610
Avoid recursion in gtk_css_node_ensure_style()
...
gtk_css_node_ensure_style() recurses over previous siblings to ensure
these have a style before its following sibling. As seen in
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2027 this can
cause us to stack overflow and crash if we have a lot of children.
And even if we don't have *that* many children its still somewhat
bad to have stack depths of the same magnitude as the number of
children, both for performance reasons and debuggability.
2020-06-04 12:10:31 +02:00
Alexander Larsson
8707bab450
gtk-demo: Avoid list for children in GtkFishBowl
...
This is a demo that measures performance, so keep the child
info in a hashtable instead of a list. This means adding or removing
a child is not O(n-children).
2020-06-04 12:06:42 +02:00
Kjell Ahlstedt
612955f2b7
flowbox: Don't use a removed child after it has been unparented
...
In gtk_flow_box_remove(), call g_sequence_remove() before the child is unparented.
See MR !2029
2020-06-04 11:23:46 +02:00
Timm Bäder
36314c3ff7
Merge branch 'santo/gtk4_spelling_fix' into 'master'
...
docs: Fix spelling of GDK_VERSION_MIN_REQUIRED.
See merge request GNOME/gtk!2026
2020-06-04 07:38:58 +00:00
Daniel Mustieles
33fb38d8de
Updated Spanish translation
2020-06-04 09:18:01 +02:00
Daniel Mustieles
38e2a910df
Updated Spanish translation
2020-06-04 09:17:16 +02:00
Santosh Mahto
ef32df77be
docs: Fix spelling of GDK_VERSION_MIN_REQUIRED.
2020-06-04 12:12:36 +05:30
Matthias Clasen
5154693ea4
Merge branch 'columnview-separators' into 'master'
...
Columnview separators
See merge request GNOME/gtk!2025
2020-06-03 23:34:48 +00:00
Matthias Clasen
4b68362981
columnview: Add a property for column separators
...
Rename the show-separators property to show-row-separators,
and add a matching show-column-separators property. It is
implemented by setting the .column-separators style class
on the column view.
2020-06-03 17:57:23 -04:00
Matthias Clasen
658e4c5357
listview: Use gtk_widget_add_css_class
...
No need to use the style context api for this anymore.
2020-06-03 17:51:22 -04:00
Matthias Clasen
ce0dd650d7
settings demo: Don't select rows
...
We want no selection here, so use GtkNoSelection.
2020-06-03 17:51:22 -04:00
Matthias Clasen
77b65ada4f
Merge branch 'columnview-printdialog' into 'master'
...
Port the printdialog to column view
See merge request GNOME/gtk!2010
2020-06-03 21:47:58 +00:00
Matthias Clasen
fa37225a42
Merge branch 'columnview-rubberbanding' into 'master'
...
columnview: Implement rubberbanding
See merge request GNOME/gtk!2008
2020-06-03 21:46:13 +00:00
Matthias Clasen
78a06859b9
Merge branch 'columnview-expand' into 'master'
...
columnview: Implement expanding columns
See merge request GNOME/gtk!2007
2020-06-03 21:39:33 +00:00
Matthias Clasen
3ec8f4e84e
Merge branch 'columnview-reordering' into 'master'
...
columnview: Implement interactive reordering
See merge request GNOME/gtk!2006
2020-06-03 21:38:59 +00:00
Matthias Clasen
f13a596d15
Merge branch 'columnview-resizing' into 'master'
...
columnview: Implement interactive resizing
See merge request GNOME/gtk!2004
2020-06-03 20:04:17 +00:00
Matthias Clasen
94f14778a3
Merge branch 'columnview-scrolling' into 'master'
...
columnview: Implement horizontal scrolling
See merge request GNOME/gtk!1998
2020-06-03 19:50:59 +00:00
Benjamin Otte
7312284e4f
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2024
2020-06-03 17:40:26 +00:00
Matthias Clasen
ebc07d1458
printdialog: Port to column view
2020-06-03 13:35:09 -04:00
Matthias Clasen
510f719975
gtk-demo: Make gridview demo use rubberbanding
2020-06-03 13:34:28 -04:00
Matthias Clasen
03c2202942
Add rubberband api
...
Add an ::enable-rubberband property to GtkListView,
GtkGridView and GtkColumnView.
2020-06-03 13:34:27 -04:00
Matthias Clasen
b3a97cb755
listbase: Simplify rubberbanding
...
The new approach is:
- plain: clear and start a new selection
- extend: add to the existing selection
- modify: subtract from the existing selection
2020-06-03 13:32:57 -04:00
Matthias Clasen
a9273e1c73
listbase: Split off rubberband data
2020-06-03 13:32:57 -04:00
Matthias Clasen
14d11ebcab
listbase: Use a widget for the rubberband
...
We no longer need to juggle manual css nodes. Just create
a widget for the rubberband, and update its allocation
as we rubberband.
2020-06-03 13:32:57 -04:00
Matthias Clasen
7dc458d925
Add autoscroll
...
This is an expected feature with rubberband selection:
as you get close to the edge while doing rubberband
selection, the list scrolls to extend your selection.
2020-06-03 13:32:57 -04:00
Matthias Clasen
a0f04bdcf3
listbase: Add rubberband selection
...
Implement the typical rubberband selection, including
autoscroll. This is only useful with multiselection,
and not very compatible with single-click-activate.
Therefore, it is not enabled by default, and needs
to be turned on explicitly.
2020-06-03 13:32:57 -04:00
Matthias Clasen
28f6e27276
Add GtkMultiSelection
...
This is implemented using a private GtkSet helper.
Includes tests.
2020-06-03 13:32:57 -04:00
Matthias Clasen
5ef427bd65
gtk-demo: Expand columns in the settings demo
...
Expand the columns that are likely to appear
at the end.
2020-06-03 13:32:15 -04:00
Matthias Clasen
03c1fa43f4
inspector: Expand the actions list
2020-06-03 13:32:15 -04:00
Matthias Clasen
3b9f0ab866
inspector: Expand the resource list
...
This is an experiment with adding a filler column.
2020-06-03 13:32:15 -04:00
Matthias Clasen
9617a00ae3
inspector: Expand the property list
...
It looks better this way.
2020-06-03 13:32:15 -04:00
Matthias Clasen
1408199957
inspector: Expand the object tree
...
This is how it used to look, and it looks better that way.
2020-06-03 13:32:15 -04:00
Matthias Clasen
067df8d4dd
columnview: Take expand into account
...
When allocating columns, distribute extra space
to columns that have expand set to TRUE.
2020-06-03 13:32:15 -04:00
Matthias Clasen
2ab1b13092
columnview: Add a GtkColumnViewColumn:expand property
...
This will be used to determine how to distribute
available extra space in a column view.
2020-06-03 13:32:15 -04:00
Matthias Clasen
964d0c219a
columnview: Add autoscroll
...
Autoscroll when the pointer gets close to the
edge during column resizing or reordering. This
is similar to what the treeview does, but it is
implemented using a tick callback, and has
variable speed.
2020-06-03 13:31:39 -04:00
Matthias Clasen
c58eb9c276
columnview: Allow to cancel reorder with Escape
...
The treeview does this too.
2020-06-03 13:31:39 -04:00
Matthias Clasen
5d4893b3f0
columnview: Interactive column reordering
...
Allow rearranging columns by dragging, in the same
way the treeview does.
We add the "dnd" style class to the header while
it is dragged, and we move the header of the dragged
column to the end of its parents children, so that
it gets drawn on top.
2020-06-03 13:31:39 -04:00
Matthias Clasen
11b4e0d4c0
columnview: Add a GtkColumnView:reorderable property
...
This property controls if users can reorder columns
by drag-and-drop. It defaults to TRUE.
2020-06-03 13:31:39 -04:00
Matthias Clasen
e637693131
columnviewlayout: Use header allocation for titles
...
Normally, this will be identical to the column
allocation, but we will temporarily change it
during column reordering.
2020-06-03 13:31:39 -04:00
Matthias Clasen
c9d5b77403
columnviewcolumn: Add reordering helpers
...
Add helper functions that let us temporarily give
a different allocation to headers. These will be
used to implement interactive column reordering
in GtkColumnView.
2020-06-03 13:31:39 -04:00
Matthias Clasen
574595993c
columnviewtitle: Trigger action on release
...
This is necessary to make drag-to-reorder work
without triggering resorting.
2020-06-03 13:31:31 -04:00
Matthias Clasen
50f4e53aef
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Add a dropdown demo
See merge request GNOME/gtk!2023
2020-06-03 17:30:19 +00:00
Matthias Clasen
ac082e5504
gtk-demo: Make some columns resizable
...
Make the columns in the List > Settings demo
resizable, to demonstrate this functionality.
2020-06-03 12:49:40 -04:00
Matthias Clasen
f65f9591a1
columnview: Interactive column resizing
...
This copies just enough of the treeview code to
get columns moving.
2020-06-03 12:49:40 -04:00
Matthias Clasen
a1eadde25b
columnviewcolumn: Add a helper
...
We need to check whether clicks are in the headers
of columns, so let the column view get at the the
header widget.
2020-06-03 12:49:40 -04:00
Matthias Clasen
66e5027756
columnview: Add a GtkColumnViewColumn:resizable property
...
This will be used for interactive column resizing
in the future.
2020-06-03 12:49:38 -04:00
Matthias Clasen
aa2d339508
columnview: Add a helper
...
The column code needs to get access to the
listitem widgets that are children of the listview,
so add a getter.
2020-06-03 12:48:56 -04:00
Matthias Clasen
d43aacefc9
columnview: Add GtkColumnViewColumn:fixed-width
...
Add a fixed-width property similar to the same property
of GtkTreeViewColumn.
2020-06-03 12:48:39 -04:00
Matthias Clasen
f0a0e20b2f
columnview: Implement horizontal scrolling
...
The listview inside always thinks it gets its full size,
and updates its horizontal adjustment accordingly.
So keep our own adjustment, and update it when allocating.
2020-06-03 12:48:20 -04:00
Matthias Clasen
befdd8bb66
columnview: Revise scroll-minimum handling
...
Tweak the behavior slightly. We don't show
a scrollbar as long as we have at least
min-size available, but we still give the
entire size to the child, up to nat-size.
This matches how viewports handle scroll-minimum.
2020-06-03 12:48:20 -04:00
Benjamin Otte
27ed2cc009
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2022
2020-06-03 16:33:54 +00:00
Benjamin Otte
a60c866a12
listbase: Don't grab_focus() when moving focus
...
We want to call gtk_widget_child_focus() to have Tab focus the right
widget.
2020-06-03 18:12:49 +02:00
Benjamin Otte
a84f6228ca
listitemwidget: Fix focus handling for columnview
...
ListItemWidget needs to be aware of potentially having multiple
children, so make it aware.
2020-06-03 18:12:00 +02:00
Matthias Clasen
19da93b675
Merge branch 'columnview-menu' into 'master'
...
columnview: Add header menus
See merge request GNOME/gtk!2001
2020-06-03 15:51:26 +00:00
Benjamin Otte
aa38fc712f
listbase: Fix leak
...
We were leaking the temporary tracker here.
2020-06-03 17:49:04 +02:00
Matthias Clasen
0b1c91dc7c
gtk-demo: Add a dropdown demo
...
This shows a few examples of GtkDropDown.
Mostly taken from tests/testdropdown.c.
2020-06-03 11:34:06 -04:00
Matthias Clasen
ab2c8de4de
Merge branch 'matthiasc/for-master' into 'master'
...
selection model: Further documentation tweaks
See merge request GNOME/gtk!2021
2020-06-03 15:11:59 +00:00
Benjamin Otte
00f2b134e3
columnview: Make sure focus can move into cells
...
The cells themselves should never be focusable though.
2020-06-03 16:55:39 +02:00
Benjamin Otte
0b8cebd6ef
ffmediafile: Add fixes for recent cflags changes
...
Related: #2771
2020-06-03 16:23:49 +02:00
Matthias Clasen
53a9b7f6c0
selection model: Further documentation tweaks
...
Reword this to use plain language instead of throwing
arond reentrancy and ordering.
2020-06-03 07:51:29 -04:00
Matthias Clasen
667fd927ee
Merge branch 'selection-model-docs' into 'master'
...
selectionmodel: Clarify docs
Closes #2806
See merge request GNOME/gtk!2017
2020-06-03 05:27:46 +00:00
Matthias Clasen
a8956838d3
selectionmodel: Clarify docs
...
Clarify some things that were not clear to me before
discussing them.
Fixes : #2806
2020-06-02 15:09:16 -04:00
Christoph Reiter
e7c9e2060c
gtkiconcache: Use g_stat instead of fstat
...
stat/fstat aren't compatible with GStatBuf on Windows in all cases.
Since we don't really need the file descriptor anyway here replace it with
a g_stat call.
This fixes a compiler warning with 64bit mingw.
And lets us remove this scary ifdeffery.
2020-06-02 20:35:56 +02:00
Matthias Clasen
f6be407e33
Merge branch 'carlosgc/emoji-chooser-fixes' into 'master'
...
Fix emoji chooser warnings on destroy
See merge request GNOME/gtk!2016
2020-06-02 16:06:47 +00:00
Carlos Garcia Campos
2bf9b37e59
emojichooser: Unparent the variations popup on dispose and before adding a new one
...
This was causing warnings when destroying the emoji chooser because it
had children left.
2020-06-02 16:47:56 +02:00
Carlos Garcia Campos
d2e0ada794
textview: Unparent the emoji chooser on dispose
...
This was causing the warning "GtkEmojiChooser is not a child of
GtkTextView" when destroying a GtkTextView if the emoji chooser was
shown.
2020-06-02 16:47:56 +02:00
Matthias Clasen
c07ae5806e
Merge branch 'matthiasc/for-master' into 'master'
...
Cosmetic improvements to the filebrowser demo
See merge request GNOME/gtk!2015
2020-06-02 04:30:29 +00:00
Matthias Clasen
5afe6f7825
Cosmetic improvements to the filebrowser demo
...
Make it look good.
2020-06-01 23:13:20 -04:00
Matthias Clasen
d02c48f987
Add more columns to the settings demo
...
Flesh out this demo more, so we can have a
non-trivial column editor here at some point.
2020-06-01 22:10:53 -04:00
Matthias Clasen
c835214540
Add a header menu to settings demo
...
Allow toggling column visibility from here.
2020-06-01 22:10:53 -04:00
Matthias Clasen
cb2901ec40
columnviewtitle: Display a context menu
...
When the ::header-menu property is set on the
column, use the menu model to create and show
a context menu.
2020-06-01 22:10:53 -04:00
Matthias Clasen
f27bd061fb
columnviewcolumn: Add a menu property
...
Add a ::header-menu property that will be used
to create a context menu for the header of the
column.
2020-06-01 22:10:53 -04:00
Matthias Clasen
572386e4ce
Merge branch 'matthiasc/for-master' into 'master'
...
print backend: Fix list model handling in dispose
See merge request GNOME/gtk!2013
2020-06-02 00:07:45 +00:00
Matthias Clasen
67a972182e
Merge branch 'ebassi/expression-type' into 'master'
...
Ebassi/expression type
See merge request GNOME/gtk!2014
2020-06-01 22:48:26 +00:00
Matej Urbančič
5955e11a5a
Added Slovenian translation
2020-06-01 22:19:55 +02:00
Emmanuele Bassi
8daaafc864
Document how to define properties using GtkExpression
...
Use the GtkParamSpecExpression type to describe the property, and the
GValue API to set and get the expression instance.
2020-06-01 21:17:34 +01:00
Emmanuele Bassi
ebaa96c0fa
Turn GtkExpression into a GTypeInstance
...
Since it's a type with sub-classes, we need to use GTypeInstance (at the
very least), otherwise we won't be able to address each sub-class as
such.
This is similar to how GskRenderNode and GdkEvent are handled, with the
added difficulty that GtkExpression is meant to be used in properties,
in order to be deserialised by GtkBuilder. This requires adding a
GParamSpec sub-class that we can match on from within GtkBuilder,
alongside some convenience API for storing a GtkExpression inside a
GValue.
2020-06-01 21:07:53 +01:00
Emmanuele Bassi
fb3d08c651
Print out the file name we're testing
...
We're printing out the file we're testing once we succeed, but it's hard
to know which file caused a failure. Let's add a g_test_message()
directive so we can look in our logs.
2020-06-01 21:06:04 +01:00
Matthias Clasen
9d15e64f0b
gtk-demo: Plug a leak
...
We were leaking a reference to the settings demo.
This showed up as gtk4-demo --run listview_settings
not exiting when the window is closed.
2020-06-01 15:17:21 -04:00
Matthias Clasen
b62564fd98
columnviewcolumn: Fix visibility implementation
...
We were not properly syncing initial visibility
with widgets.
2020-06-01 14:47:12 -04:00
Matthias Clasen
0266bcab7a
Add a test for the previous fix
...
This checks that action muxer hierarchy is properly
updated when muxers appear in the middle.
2020-06-01 13:52:50 -04:00
Matthias Clasen
6652e14662
Update action muxer hierarchy propertly
...
When a new muxer appears, we must not only make it
inherit from the parent, we also have to update all
children to inherit from it.
2020-06-01 13:52:42 -04:00
Matthias Clasen
7a50f86f3f
print backend: Fix list model handling in dispose
...
The print backends do some complicated dispose handling
where the implementations call gtk_print_backend_destroy().
Our tests (in particular, the templates test) trigger
situations where we use print backends after dispose,
and they can't handle the printers listmodel being
NULL at that time. So just remove the printers in
dispose, keep the empty liststore until finalize.
2020-06-01 13:52:21 -04:00
Kukuh Syafaat
59218d02c8
Update Indonesian translation
2020-06-01 13:29:20 +00:00
Matthias Clasen
fe73730d21
Merge branch 'gtk-demo-run-no-main-window' into 'master'
...
gtk-demo: Don't show main window if --run is passed in
See merge request GNOME/gtk!1979
2020-06-01 12:26:15 +00:00
Matthias Clasen
b814970bdd
Merge branch 'fix-frameclock-going-backwards' into 'master'
...
Fix frameclock going backwards
See merge request GNOME/gtk!2011
2020-06-01 12:25:20 +00:00
Matthias Clasen
8dfbef5e6f
Merge branch 'matthiasc/for-master' into 'master'
...
columnview: Add column reordering
See merge request GNOME/gtk!2005
2020-06-01 11:28:28 +00:00
Emmanuele Bassi
0b9a3fc160
Merge branch 'ebassi/scroll-position' into 'master'
...
Remove position from GdkScrollEvent
See merge request GNOME/gtk!2012
2020-06-01 10:32:55 +00:00
Emmanuele Bassi
79105962a7
Remove position from GdkScrollEvent
...
Scroll events do not have a position, so they shouldn't implement the
GdkEventClass.get_position() virtual function; nor they should have an x
and y fields that never get updated.
2020-06-01 10:49:33 +01:00
Alexander Larsson
a36e2bc764
Fix frameclock going backwards
...
When we run the frameclock RUN_FLUSH_IDLE idle before the paint,
then gdk_frame_clock_flush_idle() sets
```
priv->phase = GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT
```
at the end if there is a paint comming.
But, before doing the paint cycle it may handle other X events, and
during that time the phase is set to BEFORE_PAINT. This means that the
current check on whether we're inside a paint is wrong:
```
if (priv->phase != GDK_FRAME_CLOCK_PHASE_NONE &&
priv->phase != GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS)
return priv->smoothed_frame_time_base;
```
This caused us to sometimes use this smoothed_frame_time_base even
though we previously reported a later value during PHASE_NONE, thus
being non-monotonic.
We can't just additionally check for the BEGIN_PAINT phase though,
becasue if we are in the paint loop actually doing that phase we
should use the time base. Instead we check for `!(BEFORE_PAINT &&
in_paint_idle)`.
2020-06-01 10:53:24 +02:00
Matthias Clasen
cc878160bd
gtk-demo: Fix a crash in the puzzle
...
Avoid a crash when clicking the refresh button
after solving the puzzle.
2020-06-01 00:11:50 -04:00
Matthias Clasen
382153e82d
gtk-demo: Fix keynav in the puzzle
...
We need to make shortcut controller have global
scope, otherwise the shortcuts lose against the
window keybindings.
2020-06-01 00:11:43 -04:00
Matthias Clasen
e195341e30
gtk-demo: Flesh out the settings demo
...
Add columns for type and default value.
2020-05-31 23:43:58 -04:00
Matthias Clasen
c6c8263704
columnview: Add column reordering
...
Add an API to allow reordering columns.
2020-05-31 21:56:30 -04:00
Matthias Clasen
ed02bea20d
Merge branch 'action-tests' into 'master'
...
Action tests
See merge request GNOME/gtk!2003
2020-05-31 23:32:44 +00:00
Matthias Clasen
f89a1b05fe
Merge branch 'matthiasc/for-master' into 'master'
...
Add a forgotten export
See merge request GNOME/gtk!2002
2020-05-31 22:54:38 +00:00
Matthias Clasen
af65b7e6d7
More action tests
...
Test actions under hierarchy changes.
2020-05-31 18:13:50 -04:00
Matthias Clasen
1995ad6d63
Add a forgotten export
...
gtk_column_view_sort_by was missing a GDK_AVAILABLE_IN_ALL
annotation, causing it to not be exported.
2020-05-31 16:47:53 -04:00
Matthias Clasen
83c0937a46
testsuite: Beef up action tests
...
Check return values from gtk_widget_activate.
2020-05-31 16:40:50 -04:00
Matthias Clasen
f5cc2c0d20
Merge branch 'column-visible' into 'master'
...
columnview: Add a GtkColumnViewColumn:visible property
See merge request GNOME/gtk!1997
2020-05-31 20:39:06 +00:00
Emmanuele Bassi
931d68bc92
Merge branch 'drop-coverflow' into 'master'
...
Drop GtkCoverFlow for now
See merge request GNOME/gtk!2000
2020-05-31 19:12:32 +00:00
Yuri Chornoivan
06946c35d3
Update Ukrainian translation
2020-05-31 19:05:20 +00:00
Matthias Clasen
cbe81fd443
Merge branch 'drop-fallback-c89' into 'master'
...
Drop fallback-c89.c
See merge request GNOME/gtk!1999
2020-05-31 18:14:14 +00:00
Matthias Clasen
173e919d2a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1995
2020-05-31 18:13:36 +00:00
Matthias Clasen
73fdb8f7b0
Drop GtkCoverFlow for now
...
There is no agreement that a coverflow widget is
appropriate for GTK 4.
It would be ok as a demo if it could live in gtk-demo,
but that requires us to make GtkListBase public first.
The demo is also somewhat rough and needs more work
to look plausible.
Drop GtkCoverFlow and the related demo for now.
2020-05-31 13:15:51 -04:00
Matthias Clasen
8e0ba37866
gtk-demo: Fixes for the sliding puzzle
...
We were calling check_solved only for key presses,
meaning you could never solve the puzzle with the
mouse.
2020-05-31 13:01:17 -04:00
Matthias Clasen
8780f50e7e
gtk-demo: Some fixes to awards
...
Fix things up enough to make the list show up.
Still not a working example, but closer.
2020-05-31 13:01:17 -04:00
Matthias Clasen
06dc357ea0
printer: Fix the default value of icon-name
...
Just set this to "printer", so we don't have
to fix it up in the print dialog.
2020-05-31 13:01:17 -04:00
Matthias Clasen
fb587cb529
printbackend: Add a list model getter
...
Now that we have a list model for printers,
we can start using it.
2020-05-31 13:01:17 -04:00
Matthias Clasen
a026677849
printbackend: Use a list store
2020-05-31 13:01:17 -04:00
Matthias Clasen
1c389b1f24
gtk-demo: Add more scrolling benchmarks
...
Add a listview and gridview to the scrolling
benchmarks.
2020-05-31 13:01:17 -04:00
Emmanuele Bassi
55b9aa0309
Merge branch 'ebassi/annotations' into 'master'
...
Ebassi/annotations
See merge request GNOME/gtk!1996
2020-05-31 15:18:36 +00:00
Christoph Reiter
2d5cf2b4c4
Drop fallback-c89.c
...
We require a C compiler supporting C99 now. The main purpose of
these fallbacks was for MSVC. From what I can see this is now all supported
by MSVC 2015+ anyway.
The only other change this includes is to replace isnanf() with the
(type infering) C99 isnan() macro, because MSVC doesn't provide isnanf().
2020-05-31 17:09:23 +02:00
Matthias Clasen
4877bb5b5c
columnviewcolumn: Add a visible property
...
This lets us hide columns, which is an expected
feature of columned lists.
2020-05-31 10:47:48 -04:00
Emmanuele Bassi
b9269d5644
Annotate the GtkFunctionListItemFactory constructor
...
But skip it, since it cannot really be used by language bindings, as it
binds the same user data to two separate functions.
2020-05-31 15:14:26 +01:00
Emmanuele Bassi
1a4723988e
Fix annotations for gtk_cclosure_expression_new()
...
Missing scope annotations for the various functions.
2020-05-31 15:10:27 +01:00
Matthias Clasen
93353888ca
Merge branch 'columnview-1' into 'master'
...
Convert the inspector to column views
See merge request GNOME/gtk!1994
2020-05-31 14:06:31 +00:00
Emmanuele Bassi
c3a90b76d0
Add missing separator
...
An annotation is separated from the description by a ':'.
2020-05-31 15:05:59 +01:00
Emmanuele Bassi
43e5ca9a1b
docs: Fix annotations
...
- Use the same name for the argument in the declaration, definition,
and documentation
- Use "optional" instead of the deprecated "allow-none"
2020-05-31 15:04:51 +01:00
Christoph Reiter
c5829bd0e2
fallback-c89: Try to make isnanf work
2020-05-31 15:50:09 +02:00
Matthias Clasen
2a9d2cc7e9
inspector: Touch up list styling
...
This is just the minimal amount of work to make
headers recognizable.
2020-05-31 09:24:19 -04:00
Matthias Clasen
0d9873d8bc
inspector: Use a column view for actions
...
A straight conversion from list box to column view.
2020-05-31 09:24:12 -04:00
Matthias Clasen
23bc38ed06
inspector: Make the resource list sortable
...
This is using a GtkTreeListRowSorter to keep expanded
state of the tree while changing the sorting.
2020-05-31 09:24:04 -04:00
Matthias Clasen
42d26b4b05
inspector: Use a column view for the resource list
...
A conversion from tree view to column view.
2020-05-31 09:23:51 -04:00
Matthias Clasen
04700789e1
inspector: Use a column view for properties
...
Just a straight conversion from list box to column view.
2020-05-31 09:23:45 -04:00
Matthias Clasen
e23baa59f0
inspector: Add columns to the object tree
...
Add columnview columns in the object tree.
We do the same for treeview columns.
2020-05-31 09:23:37 -04:00
Matthias Clasen
e8e28b61db
Merge branch 'fix-mnemonic-zero' into 'master'
...
label: Fix mnemonic zero
Closes #2805
See merge request GNOME/gtk!1993
2020-05-31 13:02:51 +00:00
Yuri Chornoivan
b766707f28
Update Ukrainian translation
2020-05-31 06:12:49 +00:00
Yuri Chornoivan
0787f262a0
Update Ukrainian translation
2020-05-31 06:09:05 +00:00
Matthias Clasen
d833f4a632
Merge branch 'dropdown-for-merge' into 'master'
...
Dropdown for merge
Closes #2214
See merge request GNOME/gtk!1992
2020-05-31 05:34:18 +00:00
Matthias Clasen
ce1e364ab8
Merge branch 'listview-for-merge' into 'master'
...
Listview for merge
Closes #2214
See merge request GNOME/gtk!1991
2020-05-31 05:32:37 +00:00
Matthias Clasen
adb5b299c9
label: Fix mnemonic zero
...
We were confusing '\0' and '0' when parsing the label
for mnemonics.
Fixes : #2805
2020-05-30 21:42:54 -04:00
Matthias Clasen
fc9462d49e
Add some tests for new GtkBuilder syntax
...
Some valid and invalid examples for <closure>,
<lookup> and <constant>.
2020-05-30 19:31:38 -04:00
Matthias Clasen
9c849d2084
docs: Update the list widget overview
...
Fill in the GtkComboBox and GtkCellView replacements
in the quick reference table.
2020-05-30 19:31:38 -04:00
Matthias Clasen
336b30c532
gtk-demo: Add a large grid demo
...
This is similar to the flowbox demo, but much bigger.
2020-05-30 19:31:38 -04:00
Matthias Clasen
b331e29e43
inspector: Use dropdowns in the visual page
...
Convert everything in the visual page to dropdowns.
2020-05-30 19:31:38 -04:00
Matthias Clasen
54cdafdd67
inspector: Use a dropdown for size groups
...
Use a GtkDropDown for the modes of size groups.
2020-05-30 19:31:38 -04:00
Matthias Clasen
30541201b6
inspector: Use a dropdown for controllers
...
Use a GtkDropDown for the phases of event controllers.
2020-05-30 19:31:38 -04:00
Matthias Clasen
6346fa960c
inspector: Use a dropdown for attribute mapping
...
Use a GtkDropDown for the attribute mapping editor.
2020-05-30 19:31:38 -04:00
Matthias Clasen
99c98d0736
inspector: Use dropdowns in property editor
...
Replace combo boxes by dropdowns in the property editor.
2020-05-30 19:31:38 -04:00
Matthias Clasen
496e673d77
filechooser: Use a dropdown for choices
2020-05-30 19:31:38 -04:00
Matthias Clasen
d3aad3b574
filechooser: Use a dropdown for the filter combo
...
Replace an internal use of GtkComboBox with GtkDropDown.
2020-05-30 19:31:38 -04:00
Matthias Clasen
371dab51bb
Add GtkDropDown
...
This is a simple drop down control using list models.
2020-05-30 19:31:38 -04:00
Benjamin Otte
3ea2258ce9
xxx: isnanf() is some wtf
2020-05-30 19:30:14 -04:00
Matthias Clasen
c7feae65f1
builderlistitemfactory: Precompile the xml
...
This is the one place where we can really take advantage
of precompiling, since we instantiate this template
over and over.
2020-05-30 19:30:14 -04:00
Matthias Clasen
b087948933
gtk-demo: Use single-click-activate for minesweeper
...
The explanation say we do, so do it.
2020-05-30 19:30:14 -04:00
Matthias Clasen
f611d55f16
Spread single-click-activate api
...
This makes sense to have in all the views,
not just GtkListView.
2020-05-30 19:30:14 -04:00
Matthias Clasen
12b1007046
docs: Add a listview overview section
...
Add a conceptual overview for all the listmodel-based
widgets.
Fixes : #2214
2020-05-30 19:30:14 -04:00
Matthias Clasen
4a4c15b2ac
gtk-demo: Add filtering to the settings demo
...
A demo of filtering with lists was missing so far.
2020-05-30 19:30:14 -04:00
Matthias Clasen
8804427677
gtk-demo: Demo columnview sorting
...
Enhance the settings demo to have a sortable column.
2020-05-30 19:30:14 -04:00
Matthias Clasen
d717971f41
gtk-demo: Cosmetic improvements to the listview demos
...
Set default sizes, window titles and add more
detail to the descriptions.
2020-05-30 19:30:14 -04:00
Matthias Clasen
f33df84eff
gtk-builder-tool: Minimally validate <binding>
...
Check that the toplevel property name is legit.
2020-05-30 19:30:14 -04:00
Benjamin Otte
7910271b6c
testsuite: Add tests for GtkTreeListSorter
2020-05-30 19:30:14 -04:00
Matthias Clasen
e3ce99988f
Add GtkTreeListRowSorter
...
This is a special-purpose sorter that can
apply the sorting of another sorter to the
levels of a GtkTreeListModel.
2020-05-30 19:30:14 -04:00
Benjamin Otte
fb78f1ef8e
testcolumnview: Add sorters
2020-05-30 19:28:30 -04:00
Matthias Clasen
1ba1eda8ab
column view title: Show sort indicators
2020-05-30 19:28:30 -04:00
Matthias Clasen
2945430ad7
columnview: Add a sort-by api
2020-05-30 19:28:28 -04:00
Matthias Clasen
66500a6882
columnview: Add sorting
...
This is a somewhat large commit that:
- Adds GtkColumnViewSorter
This is a special-purpose, private sorter implementation which sorts
according to multiple sorters, allowing each individual sorter to be
inverted. This will be used with clickable column view headers.
- Adds a read-only GtkColumnView::sorter property
The GtkColumnView creates a GtkColumnViewSorter at startup that it uses
for this property.
- Adds a writable GtkColumnViewColumn::sorter property
This allows defining per-column sorters. Whenever an application sets a
sorter for a column, the header becomes clickable and whenever
a header is clicked, that column's sorter is prepended to the list of
sorters, unless it is already the first sorter, in which case we invert
its order. No column can be in the list more than once.
2020-05-30 19:26:46 -04:00
Matthias Clasen
2c4c07c96d
listview: Add single-click-activate
...
Add a single-click-activate property to GtkListView.
2020-05-30 19:26:46 -04:00
Matthias Clasen
69c86ae385
listitemwidget: Add single-click-activate
...
Add a mode to GtkListItemWidget that activates on
single click and selects on hover. Make
GtkListItemManager set this on its items
when its own 'property' of the same name is set.
2020-05-30 19:26:46 -04:00
Matthias Clasen
21eac434c3
builder-tool: Pass through CDATA where it makes sense
...
This avoids a ton of escaping for
GtkBuilderListItemFactory::bytes.
2020-05-30 19:26:46 -04:00
Matthias Clasen
2f21003064
docs: Reorganize list widgets in their own chapter
2020-05-30 19:26:46 -04:00
Benjamin Otte
58b65d1bf6
fontchooserwidget: Port to listmodels
...
The port is kind of evil, in that it stores either a PangoFontFamily or a
PangoFontFace in the list, depending on if the fontchooser is configured
to select fonts or faces.
It also does not cache the font description anymore, so more calls to
pango_font_describe() may happen.
If both of these issues turn out problematic, the fontchooser would need
to resurrect GtkDelayedFontDescription again and put objects of that
type through the model.
These changes depend on Pango 1.46's introduction of listmodels and
various new getters, so the dependency has been upgraded.
2020-05-30 19:26:46 -04:00
Matthias Clasen
542829ee81
Add some tests for expression binding
...
In particular, test that expressios can deal with object == this.
2020-05-30 19:26:46 -04:00
Benjamin Otte
b43c8ae646
expression: Allow passing a this object to bind()
...
This gives a bit more control over the arguments passed to expressions.
2020-05-30 19:26:46 -04:00
Benjamin Otte
22e6fa3a64
gtk-demo: Add a Clocks demo
...
This demo is meant to showcase expressions.
It also needs the fixes in glib 2.64 to work properly.
2020-05-30 19:26:46 -04:00
Benjamin Otte
c337887e29
xxx: Add a hack to make paintables transform to/from objects
...
See also: https://gitlab.gnome.org/GNOME/glib/merge_requests/1251
2020-05-30 19:26:46 -04:00
Benjamin Otte
650688c635
inspector: Remove private struct for prop editor
2020-05-30 19:26:46 -04:00
Benjamin Otte
2787e916b2
inspector: Make Controller page a GtkWidget
2020-05-30 19:26:46 -04:00
Benjamin Otte
e72119e9bb
inspector: Remove private struct from controllers
2020-05-30 19:26:46 -04:00
Benjamin Otte
efcb3a9d67
columnview: Add header
...
This uses a custom GtkColumnViewTitle widget. So far that widget is
pretty boring, but that will change once we added
resizing, reordering, dnd, sorting, hiding/showing of columns or
whatever UIs we want.
2020-05-30 19:26:46 -04:00
Benjamin Otte
9f19699806
tests: Add testcolumnview
2020-05-30 19:26:46 -04:00
Benjamin Otte
326cb1148b
columnview: Add a custom LayoutManager
...
The ColumnView now allocates column widths first and then the individual
rows use the new layout manager which looks at the column allocations to
allocate their children.
2020-05-30 19:26:46 -04:00
Benjamin Otte
767e7cb06f
constraint-editor: Don't poke around in widget internals
2020-05-30 19:26:46 -04:00
Benjamin Otte
084725e280
columnview: Fix styling with Adwaita
...
- Use "treeview" as the node name
- Add .view style class
2020-05-30 19:26:46 -04:00
Benjamin Otte
6e3b6980de
inspector: Port object tree to GtkColumnView
2020-05-30 19:26:46 -04:00
Benjamin Otte
9927d9bda2
columnview: Add GtkColumnViewCell
...
It's a GtkListItemWidget subclass that tracks the column it belongs to
and allows the column to track it.
We also use this subclass to implement sizing support so columns share
the same size and get resized in sync.
2020-05-30 19:26:46 -04:00
Benjamin Otte
34c6ef5332
widget: Add a hook for resizes
...
It's private, no APIs, we don't talk about it. But we will start using
it very soon, so we can do size request caching in columns and avoid
sizegroups...
2020-05-30 19:26:46 -04:00
Benjamin Otte
8af3e407c2
columnview: Implement GtkScrollable
...
Just forward it to the listview for now.
2020-05-30 19:26:46 -04:00
Benjamin Otte
8736343544
columnview: Add listitems for the columns
...
They are not aligned in columns yet, but they do exist.
2020-05-30 19:26:46 -04:00
Benjamin Otte
9caca0b127
listitemwidget: Lazily create listitems
...
We only create them in root/unroot (they should be created in
appear/disappear, but that vfunc doesn't exist yet), that way we can
avoid expensive work while the widget isn't used for anything.
2020-05-30 19:26:46 -04:00
Benjamin Otte
9d86020d4c
listitem: Move position/item/selected tracking to widget
...
This way, we can ensure it's always there when we need it (before the
item gets created) and gone when we don't (if some GC language holds on
to the item after we've destroyed the widget).
2020-05-30 19:26:46 -04:00
Benjamin Otte
32eedec565
listitemwidget: Add a private struct
...
I had to rename the item property to list_item anyway, so I could just
do the next step with it.
2020-05-30 19:26:46 -04:00
Benjamin Otte
1af004361c
listitemfactory: Simplify
...
Instead of 6 vfuncs, we now have 3 and rely on the factory keeping track
of what it needs to do.
We're doing lots of dancing from one object to another here, but this
will hopefully get simpler with further commits.
2020-05-30 19:26:46 -04:00
Benjamin Otte
b33c56819b
listitemfactory: Reorganize vfuncs
...
Instead of bind/rebind/update/unbind, we now just have update, and the
factories get to interpret that in the way they want.
2020-05-30 19:26:46 -04:00
Benjamin Otte
30f09ea10b
listitem: Make this a GObject
...
This splits GtkListItem into 2 parts:
1. GtkListItem
This is purely a GObject with public API for developers who want to
populate lists. There is no chance to cause conflict with GtkWidget
properties that the list implementation assumed control over and
defines a clear boundary.
2. GtkListItemWidget
The widget part of the listitem. This is not only fully in control of
the list machinery, the machinery can also use different widget
implementations for different list widgets like I inted to for
GtkColumnView.
2020-05-30 19:26:46 -04:00
Benjamin Otte
db3e225f09
builder: Make gtk_builder_extend_with_template() work with objects
...
This will be relevant later when we introduce GtkListItem which is not a
GtkWidget.
2020-05-30 19:26:46 -04:00
Benjamin Otte
a44c06b264
gtk-demo: Add a Coverflow application launcher
...
This is roughly the simplest demo I could come up with.
But I documented it, so there's your tutorial.
Related: #2214
2020-05-30 19:26:46 -04:00
Benjamin Otte
f5f9f70dd0
Add GtkSignalListItemFactory
...
So the poor Rust users can actually use this.
I would totally not use this ever!
2020-05-30 19:26:46 -04:00
Benjamin Otte
03e5c6e32d
columnview: Allow adding/removing columns
...
... and make that work in UI files via <child>, too.
2020-05-30 19:26:46 -04:00
Benjamin Otte
ca9e0c0e68
gtk-demo: Add a minesweeper demo
...
The demo shows creating ones own listmodel and using it to fill a grid.
I am totally getting the hang of React btw:
500 lines of logic with no UI code and 100 lines of GtkBuilder XML and
I get a sweet UI.
2020-05-30 19:26:46 -04:00
Benjamin Otte
0e1632d002
Add GtkColumnView skeleton
...
It's just a copy/paste of the listview code with all the internals
gutted. The code doesn't do anything.
2020-05-30 19:26:46 -04:00
Benjamin Otte
f4eb026c86
wip: Add GtkCoverFlow
...
The widget mostly works out of the box, but some tweaking may be
necessary (in particular in the theme) and the gtk-demo changes might
require removing before this is production-ready.
2020-05-30 19:26:46 -04:00
Benjamin Otte
e46fa81927
listbase: Take over anchor handling
...
With that, pretty much all code but allocating the widgets is gone from
the gridview and listview.
2020-05-30 19:26:46 -04:00
Benjamin Otte
33c6b428f7
listbase: Add vfuncs to convert positions to/from coordinates
...
... and use that to implement PageUp/PageDown.
With that, all keyboard handling has been moved to GtkListBase.
2020-05-30 19:26:46 -04:00
Benjamin Otte
12331e3376
listbase: Move focus moving keybindings here
...
The focus tracker is not yet moved because that depends on scroll_to()
support and we don't have that yet.
Whoops.
So we use a hack.
2020-05-30 19:26:46 -04:00
Benjamin Otte
dd5e6d47db
Remove gtk_selection_model_user_select_item() again
...
This reverts commit 6a164ab306dad9096bde736c907494c71086d3c4.
The function was awkward and we now have only one caller again, so we
can fold it back into it.
2020-05-30 19:26:46 -04:00
Benjamin Otte
2541037ec2
listbase: Move orientable implementation here
2020-05-30 19:26:46 -04:00
Benjamin Otte
9d6aa7d88e
listbase: Move selection handling here
2020-05-30 19:26:46 -04:00
Benjamin Otte
0bd16308d6
listbase: Move item manager here
...
Nothing really changes, because both ListView and GridView still keep
self->item_manager around, but it's set up to point at the base's item
manager.
This way we can slowly move things to GtkListBase that need the item
manager (like trackers).
2020-05-30 19:26:46 -04:00
Benjamin Otte
0011ce949c
listbase: Move GtkScrollable implementation
...
Shared code between GtkGridView and GtkListView.
2020-05-30 19:26:46 -04:00
Benjamin Otte
cc987b31ae
Add GtkListBase
...
This is a base item for GTK's list widgets so they can share some (read:
hopefully a lot of) code.
2020-05-30 19:26:46 -04:00
Benjamin Otte
c092d0a616
gridview: Simplify allocation code
...
It doesn't fix the bug I'm after, but it looks a lot better.
2020-05-30 19:26:46 -04:00
Benjamin Otte
ea390a4a73
listview: Port various gridview improvements
...
- Handle anchor as align + top/bottom
This fixes behavior for cells that are higher than the view
- Add gtk_list_view_adjustment_is_flipped()
This should fix RTL handling of horizontal lists
- Fix scrolling
This should make scrolling more reliable, particularly on short lists
that are only a few pages long.
2020-05-30 19:26:46 -04:00
Benjamin Otte
6b98948f9a
demo: Add a file browser demo
2020-05-30 19:26:46 -04:00
Benjamin Otte
f57afe51af
gridview: Add move keybindings
2020-05-30 19:26:46 -04:00
Benjamin Otte
bc22d04737
gridview: Implement (un)select all
...
Adds listitem.select-all and listitem.unselect-all actions and installs
the same keybindings as the treeview for those actions.
2020-05-30 19:26:46 -04:00
Benjamin Otte
093677b0f8
gridview: Add a focus tracker
...
... and use that to properly update selections when moving around with
the arrow keys.
2020-05-30 19:26:46 -04:00
Benjamin Otte
c38e050cc7
gridview: Implement list.scroll-to action
2020-05-30 19:26:46 -04:00
Benjamin Otte
ba0122fd02
gridview: Add activation
2020-05-30 19:26:46 -04:00
Benjamin Otte
affd2737d5
gridview: Implement minimum row height
...
We only allocate a certain amount of widgets - and we don't want to run
out of them. So we make all widgets high enough for this to never
happen.
2020-05-30 19:26:46 -04:00
Benjamin Otte
cc68073af0
gridview: Implement the list.select-item action
2020-05-30 19:26:46 -04:00
Benjamin Otte
cb2948eda6
selectionmodel: Add gtk_selection_model_user_select_item()
...
I'm not sure this should be public API because it's incredibly awkward.
But it should definitely be shared between list widget implementations.
2020-05-30 19:26:46 -04:00
Benjamin Otte
1b105cdbef
gridview: Implement anchors and scrolling
2020-05-30 19:26:45 -04:00
Benjamin Otte
dd436e8fe6
listitemmanager: Handle NULL factory
...
Just don't call it and create empty listitems.
2020-05-30 19:26:45 -04:00
Timm Bäder
a8d2bb6b22
demo: Use a listview as sidebar
2020-05-30 19:26:45 -04:00
Benjamin Otte
fcdc5030bd
gtk-demo: Introduce awards
...
We need a way to get a useful listbox, so here we go!
2020-05-30 19:26:45 -04:00
Benjamin Otte
aad9adf8c3
builder: Autofill scope property of listitemfactory
...
I couldn't come up with a better way to automatically inherit the scope
in the builder list item factory that didn't involve a magic
incantation in the XML file. And I do not want developers to know magic
incantations to do a thing that should pretty much always be done.
2020-05-30 19:26:45 -04:00
Benjamin Otte
48a223abdf
builderlistitemfactory: Add scope argument
...
This way, the scope used when creating builder instances can be
influenced. This way, callbacks can be passed into the factory.
2020-05-30 19:26:45 -04:00
Benjamin Otte
12e720fb23
listitemfactory: Make the builder factory properly buildable
...
Turn the construct arguments into construct properties so that they can
be set from ui files.
2020-05-30 19:26:45 -04:00
Benjamin Otte
042e13a932
listview: Add move keybindings
...
My god, these are a lot.
And my god, these are complicated to get right.
2020-05-30 19:26:45 -04:00
Benjamin Otte
2b9481ecdc
listview: Add gtk_list_view_get_position_at_y()
2020-05-30 19:26:45 -04:00
Benjamin Otte
933c0c678a
listitem: Add "listitem.select" action and keybindings for it
...
In fact, grab space with all modifiers to toggle selection of the
current item.
2020-05-30 19:26:45 -04:00
Benjamin Otte
2539828eac
listview: Add a focus tracker
...
This ensures that the row with the input focus always stays available,
even when scrolled out of view.
2020-05-30 19:26:45 -04:00
Benjamin Otte
4b6f3e0f2c
listview: Implement (un)select all
...
Adds listitem.select-all and listitem.unselect-all actions and installs
the same keybindings as the treeview for those actions.
2020-05-30 19:26:45 -04:00
Benjamin Otte
b9eb818b57
listview: Track focus movements and update selection
...
When focus moves via tab/arrow, we need to select the new item.
2020-05-30 19:26:45 -04:00
Benjamin Otte
eda547fc4e
listview: Implement activation
...
- a GtkListview::activate signal
- a GtkListItem::activatable property
- activate list items on double clicks and <Enter> presses
2020-05-30 19:26:45 -04:00
Benjamin Otte
1dbd017766
treeexpander: Implement input support
...
This implements all the keybindings from GtkTreeView that can be
supported.
It does not implement expand-all, because supporting that means
causing the TreeListModel to emit lots of create_model vfuncs which in
turn would cause many items-changed signal which in turn would cause
many signal handlers to run which in turn would make "expand-all" very
reentrant, and I'm uneasy about supporting that.
For the mouse, just add a click gesture to the expander icon that toggles
expanded state.
2020-05-30 19:26:45 -04:00
Benjamin Otte
08d9a57c6e
listitem: Change focus handling
...
Focus in the listitem now works like this:
1. If any child can take focus, do not ever attempt
to take focus.
2. Otherwise, if this item is selectable or activatable,
allow focusing this widget.
This makes sure every item in a list is focusable for
activation and selection handling, but no useless widgets
get focused and moving focus is as fast as possible.
2020-05-30 19:26:45 -04:00
Benjamin Otte
d7b5966fa7
inspector: Make the recorder node list use a ListView
...
It's quite a bit faster now, but the code is also a bit more awkward.
Pain points:
- GtkTreeListModel cannot be created in UI files because it needs
a CreateModelFunc.
Using a signal for this doesn't work because autoexpand wants to
expand the model before the signal handler is connected.
- The list item factory usage is still awkward. It's bearable here
because the list items are very simple, but still.
2020-05-30 19:26:45 -04:00
Benjamin Otte
bb44120ae3
inspector: Use a GtkTreeExpander in the object tree
2020-05-30 19:26:45 -04:00
Benjamin Otte
8b1f034242
inspector: Use a treeexpander in the recorder
2020-05-30 19:26:45 -04:00
Benjamin Otte
bb7968ba77
demo: Add a GSettings tree demo
...
It is meant to look somewhat like dconf-editor when it is done.
So far, it's just a list.
2020-05-30 19:26:45 -04:00
Benjamin Otte
7451e51619
Add GtkTreeExpander
...
This is a container widget that takes over all the duties of tree
expanding and collapsing.
It has to be a container so it can capture keybindings while focus is
inside the listitem.
So far, this widget does not allow interacting with it, but it shows the
expander arrow in its correct state.
Also, testlistview uses this widget now instead of implementing
expanding itself.
2020-05-30 19:26:45 -04:00
Benjamin Otte
ea93e18081
gridview: Actually do something
...
Implement measuring and allocating items - which makes the items appear
when drawing and allows interacting with the items.
However, the gridview still does not allow any user interaction
(including scrolling).
2020-05-30 19:26:45 -04:00
Benjamin Otte
443e44853a
listview: Pass the CSS name of listitems to the manager
...
... instead of hardcoding "row".
2020-05-30 19:26:45 -04:00
Benjamin Otte
b73e95655d
gridview: Implement GtkOrientable
...
Again, this is just the skeleton, because the Gridview does nothing yet.
2020-05-30 19:26:45 -04:00
Benjamin Otte
e8bb84e0e2
gridview: Add factory handling
...
Just copy the listview APIs.
Code still doesn't do anything with it.
2020-05-30 19:26:45 -04:00
Benjamin Otte
626c525706
listview: Expose GtkListItemFactory APIs
...
Due to the many different ways to set factories, it makes sense to
expose them as custom objects.
This makes the actual APIs for the list widgets simpler, because they
can just have a regular "factory" property.
As a convenience function, gtk_list_view_new_with_factory() was added
to make this whole approach easy to use from C.
2020-05-30 19:26:45 -04:00
Benjamin Otte
2ef2148fb5
gtk-demo: Add a rough start at a Weather demo
...
This demos a horizontal listview.
2020-05-30 19:26:45 -04:00
Benjamin Otte
86ad1bec16
listview: Implement GtkOrientable
2020-05-30 19:26:45 -04:00
Benjamin Otte
360a728d77
tests: Add a rough form of multiselection
...
Just store a "filechooser::selected" attribute in the GFileInfo if
the file is meant to be selected.
2020-05-30 19:26:45 -04:00
Benjamin Otte
cfcf0a7a8a
listview: Implement extending selections
...
Shift-clicking to extend selections now also works, imitating the
behavior of normal clicking and Windows Explorer (but not treeview):
1. We track the last selected item (normally, not via extend-clicking).
2. When shift-selecting, we modify the range from the last selected item
to this item the same way we modify the regular item when not using
shift:
2a. If Ctrl is not pressed, we select the range and unselect everything
else.
2b. If Ctrl is pressed, we make the range have the same selection state
as the last selected item:
- If the last selected item is selected, select the range.
- If the last selected item is not selected, unselect the range.
2020-05-30 19:26:45 -04:00
Benjamin Otte
f57fca7a00
listview: Add list.scroll_to_item action
...
The action scrolls the given item into view.
Listitems activate this action when they gain focus.
2020-05-30 19:26:45 -04:00
Benjamin Otte
7c38ac1954
testlistview: Load icons async
...
Speeds up loading by 4x, because out of view icons aren't loaded
anymore.
2020-05-30 19:26:45 -04:00
Benjamin Otte
dbe802f685
testlistview: Port to directory list
2020-05-30 19:26:45 -04:00
Benjamin Otte
cfb293d396
listitemfactory: Add a factory for ui files
...
Reuse <template> magic to initialize GtkListItems. This feels
amazingly hacky, but it also amazingly worked on the first try.
2020-05-30 19:26:45 -04:00
Benjamin Otte
2227fb957f
listitemfactory: Split implementation out
...
.. into gtkfunctionslistitemfactory.c
Now we can add a different implmenetation.
2020-05-30 19:26:45 -04:00
Benjamin Otte
824326a029
listitemfactory: vfuncify
...
No functional changes other than a new indirection.
2020-05-30 19:26:45 -04:00
Benjamin Otte
10b967ae1f
listitemfactory: Sanitize APIs
...
Make sure the APIs follow a predictable path:
setup
bind
rebind/update (0-N times)
unbind
teardown
This is the first step towards providing multiple different factories.
2020-05-30 19:26:45 -04:00
Benjamin Otte
0174bf4345
listview: Add gtk_list_view_set_show_separators()
...
Do the same thing that GtkListBox does in commit
0249bd4f8a
2020-05-30 19:26:45 -04:00
Benjamin Otte
1acfae8df2
listitemmanager: Add trackers
...
... and replace the anchor tracking with a tracker.
Trackers track an item through the list across changes and ensure that
this item (and potentially siblings before/after it) are always backed
by a GtkListItem and that if the item gets removed a replacement gets
chosen.
This is now used for tracking the anchor but can also be used to add
trackers for the cursor later.
2020-05-30 19:26:45 -04:00
Benjamin Otte
ce489f21fb
listitemmanager: Simplify
...
Remove a bunch of API from the headers that isn't used anymore and then
refactor code to not call it anymore.
In particular, get rid of GtkListItemManagerChange and replace it with a
GHashTable.
2020-05-30 19:26:45 -04:00
Benjamin Otte
368f04e06b
gridview: Implement GtkScrollable
...
We can now scroll all the nothing we display.
We also clip it properly.
2020-05-30 19:26:45 -04:00
Benjamin Otte
dc91782165
listitemmanager: Move list of listitems here
...
All the listview infrastructure moved with it, so the next step is
moving that back...
2020-05-30 19:26:45 -04:00
Benjamin Otte
86a75abe51
gridview: Add API for setting number of columns
...
The API isn't used yet.
2020-05-30 19:26:45 -04:00
Benjamin Otte
70aaecc937
gtk: Add a GtkGridView skeleton
2020-05-30 19:26:45 -04:00
Benjamin Otte
057effc5d6
listitem: Add a press gesture to select the item
...
This is implemented by using actions, which are a neat trick to get to
allow the ListItem to call functions on the ListView without actually
needing to be aware of it.
2020-05-30 19:26:45 -04:00
Benjamin Otte
d8c116f20a
listview: Add initial support for displaying selections
2020-05-30 19:26:45 -04:00
Benjamin Otte
01386aef29
listview: Reset listitems' CSS animations when rebinding
...
This way, newly displayed rows don't play an unselect animation (text
fading in) when they are unselected, but the row was previously used for
a selected item.
2020-05-30 19:26:45 -04:00
Benjamin Otte
b3fb80c608
listview: Add selection properties to ListItem
...
This just brings the infrastructure into place, we're not using the
properties yet.
2020-05-30 19:26:45 -04:00
Benjamin Otte
5b69fd535d
listview: Try to keep the list items in order when scrolling
...
Instead of just destroying all items and then recreating them (or even
hide()ing and then show()ing them again (or even even repositioning
them in the widget tree)), just try to reust them in the order they are.
This works surprisingly well when scrolling and most/all widgets
just moved.
2020-05-30 19:26:45 -04:00
Benjamin Otte
7831980c1d
listlistmodel: Add gtk_list_list_model_item_moved()
...
Use it to fix a case that just said g_warning ("oops").
Apparently I had forgotten the case where a container moved a child
in the widget tree.
2020-05-30 19:26:45 -04:00
Benjamin Otte
fbfc7dc690
listitemmanager: Switch from "insert_before" to "insert_after" argumnet
...
We reorder widgets start to end, so when reusing a list item, we
correctly know the previous sibling for that list item, but not the
next sibling yet. We just know the widget it should ultimately be in
front of.
So we can do a more correct guess of the list item's place in the widget
tree if we think about where to place an item like this.
Actually using this change will come in the next commit.
2020-05-30 19:26:45 -04:00
Benjamin Otte
d8eec549f0
testlistview: Create widgets only once
...
Previously, we were recreating all widgets every time the list item was
rebound, which caused a lot of extra work every time we scrolled.
Now we keep the widgets around and only set their properties again when
the item changes.
2020-05-30 19:26:45 -04:00
Benjamin Otte
7389e704dc
testlistview: Show the row number
...
Always show the current row. This is mostly useful for debugging, not
for beauty.
2020-05-30 19:26:45 -04:00
Benjamin Otte
b64da6d268
listview: Only allocate necesary rows
...
This is the big one.
The listview only allocates 200 rows around the visible row now.
Everything else is kept in ListRow instances with row->widget == NULL.
For rows without a widget, we assign the median height of the child
widgets as the row's height and then do all calculations as if there
were widgets that had requested that height (like setting adjustment
values or reacting to adjustment value changes).
When the view is scrolled, we bind the 200 rows to the new visible area,
so that the part of the listview that can be seen is always allocated.
2020-05-30 19:26:45 -04:00
Benjamin Otte
2ba2a216ca
listview: Change anchor handling again
...
The anchor is now a tuple of { listitem, align }.
Using the actual list item allows keeping the anchor across changes
in position (ie when lists get resorted) while still being able to fall
back to positions (list items store their position) when an item gets
removed.
The align value is in the range [0..1] and defines where in the visible
area to do the alignment.
0.0 means to align the top of the row with the top of the visible area,
1.0 aligns the bottom of the widget with the visible area and 0.5 keeps
the center of the widget at the center of the visible area.
It works conceptually the same as percentages in CSS background-position
(where the background area and the background image's size are matched
the same way) or CSS transform-origin.
2020-05-30 19:26:45 -04:00
Benjamin Otte
e5add36a17
listview: Change how binding is done
...
We now don't let the functions create widgets for the item from the
listmodel, instead we hand out a GtkListItem for them to add a widget
to.
GtkListItems are created in advance and can only be filled in by the
binding code by gtk_container_add()ing a widget.
However, they are GObjects, so they can provide properties that the
binding code can make use of - either via notify signals or GBinding.
2020-05-30 19:26:45 -04:00
Benjamin Otte
fe14181d4e
listitem: Add gtk_list_item_get_position()
...
Also refactor the whole list item management yet again.
Now, list item APIs doesn't have bind/unbind functions anymore, but only
property setters.
The item factory is the only one doing the binding.
As before, the item manager manages when items need to be bound.
2020-05-30 19:26:45 -04:00
Benjamin Otte
378a573cf4
tests: Make animating listview do random resorts
2020-05-30 19:26:45 -04:00
Benjamin Otte
ec8684e87d
listview: Change change management
...
Add a GtkListItemManagerChange object that tracks all removed list
rows during an item-changed signal so they can be added back later.
2020-05-30 19:26:45 -04:00
Benjamin Otte
54042029d3
listview: Make the listitemmanager stricter
...
Require that items created with the manager get destroyed via the
manager.
To that purpose, renamed create_list_item() to acquire_list_item() and
add a matching release_list_item() function.
This way, the manager can in the future keep track of all items and
cache information about them.
2020-05-30 19:26:45 -04:00
Benjamin Otte
e1fa627158
listview: Add GtkListItem
...
GtkListItem is a generic row widget that is supposed to replace
GtkListBoxRow and GtkFlowBoxChild.
2020-05-30 19:26:45 -04:00
Benjamin Otte
9d5bb875b1
listview: Add GtkListItemManager
...
It's all stubs for now, but here's the basic ideas about what
this object is supposed to do:
(1) It's supposed to be handling all the child GtkWidgets that are
used by the listview, so that the listview can concern
itself with how many items it needs and where to put them.
(2) It's meant to do the caching of widgets that are not (currently)
used.
(3) It's meant to track items that remain in the model across
items-changed emissions and just change position.
(2) It's code that can be shared between listview and potential
other widgets like a GridView.
It's also free to assume that the number of items it's supposed to
manage doesn't grow too much, so it's free to use O(N) algorithms.
2020-05-30 19:26:44 -04:00
Benjamin Otte
b3c150e929
listview: Implement an anchor
...
The anchor selection is very basic: just anchor the top row.
That's vastly better than any other widget already though.
2020-05-30 19:26:44 -04:00
Benjamin Otte
d03a55599b
tests: Add a test for a permanently changing listview
...
This is mostly for dealing with proper anchoring and can be used to
check that things don't scroll or that selection and focus handling
properly works.
For comparison purposes, a ListBox is provided next to it.
2020-05-30 19:26:44 -04:00
Benjamin Otte
ed8fe6c219
listview: Implement GtkScrollable
...
Scrolling in a very basic form is also supported
2020-05-30 19:26:44 -04:00
Benjamin Otte
c835ae2a02
listview: Make widget actually do something
...
The thing we're actually doing is create and maintain a widget for every
row. That's it.
Also add a testcase using this. The testcase quickly allocates too many
rows though and then becomes unresponsive though. You have been warned.
2020-05-30 19:26:44 -04:00
Benjamin Otte
e20c207a22
listview: Introduce GtkListItemFactory
...
Thisis the abstraction I intend to use for creating widgets and binding
them to the item out of the listview.
For now this is a very dumb wrapper around the functions that exist in
the API.
But it leaves the freedom to turn this into public API, make an
interface out of it and most of all write different implementations, in
particular one that uses GtkBuilder.
2020-05-30 19:26:44 -04:00
Benjamin Otte
e19c4a3372
gtk: Add a GtkListView skeleton
2020-05-30 19:26:44 -04:00
Benjamin Otte
934bfc8887
builder: Add <binding> tag
...
The tag contains an expression that it then gtk_expression_bind()s to
the object it is contained in.
2020-05-30 19:26:44 -04:00
Benjamin Otte
713a6676ff
builder: Allow text content in <lookup>
...
<lookup>foo</lookup>
is now short for
<lookup>
<constant>foo</constant>
</lookup>
ie it looks up the object with the given name so it can then do a
property lookup with it.
This is the most common operation, so it's a nice shortcut.
2020-05-30 19:26:44 -04:00
Benjamin Otte
448a88e4f5
builder: Allow <constant> without a type
...
A constant without a type is assumed to be an object. This is the most
common case and allows
<constant>foo</constant>
without requiring updates to the type whenever the foo object changes.
2020-05-30 19:26:44 -04:00
Benjamin Otte
ed22af50bc
builder: Make <lookup> type optional
...
If no type is set, use the type of the expression.
2020-05-30 19:26:44 -04:00
Benjamin Otte
d3dc9c41b4
gtk-demo: Make fishbowl info text use bindings
...
It's a good demo for how bindings can format multiple properties into an
informative string with 1 line of code (and 5 lines of XML).
2020-05-30 19:26:44 -04:00
Matthias Clasen
d1b2ded7e2
sorter: Add tests
...
Some basic tests for GtkSorter.
2020-05-30 19:26:44 -04:00
Benjamin Otte
ee3faf24b9
sortlistmodel: Make sort stable
...
The sort of the sortlistmodel is now stable with respect to the original
list model.
That means that if the sorter compares items as equal, the model
will make sure those items keep the order they were in in the original
model.
Or in other words: The model guarantees a total order based on the
item's position in the original model.
2020-05-30 19:26:44 -04:00
Benjamin Otte
16ab648093
sortlistmodel: Redo the way we store the items
...
We need to keep this data around for changes in future commits where we
make the sorting stable.
An important part of the new data handling is that the unsorted list
needs to always be dealt with before the sorted list - upon creation we
rely on the unsorted iter and upon destruction, the sorted sequence
frees the entry leaving the unsorted sequence pointer invalid.
This change does not do any behavioral changes.
2020-05-30 19:26:44 -04:00
Matthias Clasen
11a1f8f36a
Redo sort list model with GtkSorter
...
Reshuffle the api to take full advantage
of GtkSorter. Update all callers.
2020-05-30 19:26:44 -04:00
Matthias Clasen
1eda9884a0
Add GtkNumericSorter
...
This sorter compares numbers obtained from items
by evaluating an expression.
2020-05-30 19:26:44 -04:00
Matthias Clasen
ae4bb2d914
Add GtkMultiSorter
...
This is a sorter that tries multiple sorters in turn.
2020-05-30 19:26:44 -04:00
Matthias Clasen
6d68c536f3
Add GtkStringSorter
...
This is a GtkSorter implementation collating strings
2020-05-30 19:26:44 -04:00
Matthias Clasen
e74a9d09e6
Add GtkCustomSorter
...
This is a GtkSorter implementation which uses a GCompareDataFunc.
2020-05-30 17:48:44 -04:00
Matthias Clasen
b2b847f365
Add GtkSorter
...
This is a helper object for sorting, similar to GtkFilter.
2020-05-30 17:48:44 -04:00
Benjamin Otte
cb15ec0257
Add GtkOrdering
...
This is an enum that we're gonna use soon and it's worth introducing as a
separate commit.
The intention is to have meaningful names for return values in
comparison functions.
2020-05-30 17:48:44 -04:00
Matthias Clasen
115923b2d9
More expression tests
...
Test type mismatches, and the this pointer
during evaluation.
2020-05-30 17:48:44 -04:00
Benjamin Otte
ad60efb5d7
expression: Invalidate bindings before destroying them
...
Use a weak ref to invalidate bindings. Make sure that this happens
before creating any watches, so that notifies from the
watched expression about changes will not trigger set_property() calls
during dispose()/finalize().
Invalidating also ensures that the watches aren't removed, which can
trigger warnings if the watches are watching the object itself, and the
weak refs cannot be removed anymore.
2020-05-30 17:48:44 -04:00
Benjamin Otte
b7efe4eb4f
expression: Add gtk_expression_bind()
...
Add a simple way to bind expressions to object properties. This is
essentially the thing to replace g_object_bind_property().
2020-05-30 17:48:44 -04:00
Benjamin Otte
92c359ca09
testsuite: Add expression tests
2020-05-30 17:48:44 -04:00
Benjamin Otte
ec742f9373
expression: Add the ability to watch an expression
2020-05-30 17:48:44 -04:00
Benjamin Otte
fde75aa9f6
builder: Add support for parsing expressions
2020-05-30 17:47:47 -04:00
Benjamin Otte
2df3c39e50
filter: Add tests
...
Some basic tests for GtkFilter
2020-05-30 17:42:09 -04:00
Benjamin Otte
22659afd00
Add GtkMultiFilter, GtkAnyFilter, GtkEveryFilter
...
GtkMultiFilter is the abstract base class for managing multiple child
filter.
GtkAnyFilter and GtkEveryFilter are the actual implementations.
2020-05-30 17:42:09 -04:00
Benjamin Otte
410e7dcf5d
filter: Add GtkStringFilter
...
Users provide a search filter and an expression that evaluates the items
to a string and then the filter goes and matches those strings to the
search term.
2020-05-30 17:42:09 -04:00
Benjamin Otte
bd8655fdee
expression: Add GtkObjectExpression
...
Weak refs break cycles...
2020-05-30 17:42:09 -04:00
Benjamin Otte
e9f1ee5aab
Add GtkExpression
...
GtkExpressions allow looking up values from objects.
There are a few simple expressions, but the main one is the closure
expression that just calls a user-provided closure.
2020-05-30 17:42:08 -04:00
Benjamin Otte
4abdf695e3
filterlistmodel: Rewrite to use GtkFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
b1090ac8e2
tests: Remove testtreemodel test
...
testlistview does everything this test does.
2020-05-30 12:30:23 -04:00
Benjamin Otte
1ab081b584
Add GtkCustomFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
1df17f2fea
Add GtkFilter
2020-05-30 12:30:23 -04:00
Benjamin Otte
682e97826c
Add GtkDirectoryList
...
Adds a new listmodel called GtkDirectoryList that lists the children of
a GFile as GFileInfos.
This is supposed to be used by the filechooser.
2020-05-30 12:30:23 -04:00
Benjamin Otte
805fea20cb
eventcontrollermotion: Remove mode argument
...
It's not used and nobody has documented how it's meant to work anyway.
2020-05-30 12:30:23 -04:00
Matthias Clasen
415bfeb950
Merge branch 'fix-pango-deps' into 'master'
...
Fix inconsistencies in our pango deps
See merge request GNOME/gtk!1989
2020-05-30 16:29:12 +00:00
Matthias Clasen
2f20a40922
Merge branch 'matthiasc/for-master' into 'master'
...
Some listview preparations
See merge request GNOME/gtk!1988
2020-05-30 15:51:21 +00:00
Matthias Clasen
5235a4c48a
Fix inconsistencies in our pango deps
...
We were applying the pango version requirements inconsistently,
leading to different pango variables being taking from system
pango vs the subproject at times. Thankfully, meson detects
this and complains, so we can fix it.
2020-05-30 11:13:55 -04:00
Matthias Clasen
bb7f6ed544
Merge branch 'fix-gesture-leak' into 'master'
...
gesture: Don't leak target widgets
Closes #2801
See merge request GNOME/gtk!1986
2020-05-30 15:12:05 +00:00
Benjamin Otte
f1d6a0a4ed
widget: Add gtk_widget_get_size()
...
A little bit of convenience.
2020-05-30 10:48:02 -04:00
Benjamin Otte
3c1cca13b7
wayland: Remove function declaration for nonexisting function
2020-05-30 10:46:49 -04:00
Benjamin Otte
1ef805328f
builder: Allow <property bind /> for objects
...
Previously, object properties had to always be set to a value.
This now works without it.
2020-05-30 10:46:27 -04:00
Matthias Clasen
fd73f8d972
Merge branch 'pango-bump-v2' into 'master'
...
pango version bump v2
See merge request GNOME/gtk!1987
2020-05-30 14:45:47 +00:00
Matthias Clasen
3a8ebf4c9f
Merge branch 'wip/jimmac/backdrop-assasination' into 'master'
...
Adwaita: limit scope of :backdrop
Closes #2694
See merge request GNOME/gtk!1978
2020-05-30 14:41:52 +00:00
Matthias Clasen
b482b7d8af
Bump the pango dependency
...
We soon want to rely on the list model apis in
pango 1.45. This commit also fixes a mixup where
using pango as a submodule would break the build
when pangoft2 is required.
2020-05-30 15:47:56 +02:00
Matthias Clasen
0d69c42320
gesture: Don't leak target widgets
...
This was broken when we started tracking event targets
in dcbecdac31 .
Fixes : #2801
2020-05-30 09:47:24 -04:00
Christoph Reiter
011f5afe4e
CI: install a newer pango for MSYS2
...
Uses a build from git master from today
2020-05-30 15:47:02 +02:00
Matthias Clasen
8bab7b237c
Merge branch 'matthiasc/for-master' into 'master'
...
eventcontroller: Fix crossing event scopes
See merge request GNOME/gtk!1983
2020-05-30 13:41:42 +00:00
Matthias Clasen
821a458393
Revert "Bump the pango dependency"
...
This reverts commit 98df0be43d .
It broke the win32 build.
2020-05-30 08:55:21 -04:00
Matthias Clasen
66120cff4b
eventcontroller: Fix crossing event scopes
...
We want to deliver crossing events to controllers
with scope same-native as long as at least one of
the targets is on the same native. As a new approach,
treat out-of-scope targets like NULL, and deliver
crossing events as long as one of the targets is
not NULL.
2020-05-29 19:41:39 -04:00
Matthias Clasen
8ce1034e87
Add GTK_DEBUG=shortcuts
...
If the shortcuts debug flag is set, print out
shortcut activations.
2020-05-29 17:59:58 -04:00
Matthias Clasen
a39d708859
meson: Cosmetics
...
Treat the display backend list like other lists in the summary.
2020-05-29 15:40:34 -04:00
Matthias Clasen
98df0be43d
Bump the pango dependency
...
We soon want to rely on the list model apis in
pango 1.45. This commit also fixes a mixup where
using pango as a submodule would break the build
when pangoft2 is required.
2020-05-29 10:53:39 -04:00
Matthias Clasen
4125eb01ba
Merge branch 'matthiasc/for-master' into 'master'
...
Bring back gdk_display_put_event
See merge request GNOME/gtk!1980
2020-05-29 14:14:02 +00:00
Matthias Clasen
346bba6592
Bring back gdk_display_put_event
...
It is still needed in WebKit.
2020-05-29 09:26:50 -04:00
Alexander Larsson
0bd039a524
gtk-demo: Don't show main window if --run is passed in
...
Also, in that case, exit when the demo window is closed.
2020-05-29 13:51:31 +02:00
Jakub Steiner
f4705bab1e
Adwaita: limit scope of :backdrop
...
- most controls don't have:backdrop state
- different :backdrop state reserved for windows, headebars and toolbars
and some buttons
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2694
2020-05-29 12:43:13 +02:00
Matthias Clasen
c7a9d7b56b
Merge branch 'im-context-key-forward' into 'master'
...
Add back keyboard related apis
See merge request GNOME/gtk!1977
2020-05-29 00:10:39 +00:00
Matthias Clasen
4d4b836976
Merge branch 'display-api' into 'master'
...
gdk: Make event-related apis private
See merge request GNOME/gtk!1929
2020-05-28 21:11:54 +00:00
Matthias Clasen
506d73cf32
Add gtk_im_context_filter_key
...
An event-less variant of the filtering api.
2020-05-28 17:08:33 -04:00
Jordi Mas
d71ad3539e
Update Catalan translation
2020-05-28 21:43:02 +02:00
Matthias Clasen
266a3a5267
Export keymap translation again
...
This is needed in WebKit webdriver test environment.
2020-05-28 15:15:53 -04:00
Matthias Clasen
48f8affb2c
gdk: Make event-related apis private
...
Without a way to create events, there is no point
in allowing gdk_display_put_event to be used from
the outside. And little good can come out of using
the other apis, so just make them all private.
2020-05-28 14:53:08 -04:00
Alexander Larsson
2503251576
Merge branch 'frame-clock-alternative-approach-gtk4' into 'master'
...
Frame clock alternative approach for gtk4
See merge request GNOME/gtk!1932
2020-05-28 16:22:53 +00:00
Alexander Larsson
a27fed47e0
frame-clock: Ensure we're always monotonic
...
A call to frame gdk_frame_clock_get_frame_time() outside of the paint
cycle could report an un-error-corrected frame time, and later a
corrected value could be earlier than the previously reported value.
We now always store the latest reported time so we can ensure
monotonicity.
2020-05-28 17:44:51 +02:00
Matthias Clasen
56030a7a81
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1976
2020-05-28 13:43:22 +00:00
Alexander Larsson
fee3aaae94
tests: Disable idle locking in headless weston
...
In my local testing i was burned by the default 300sec value here.
I'm not sure if we actually hit this in the CI, but lets not
take any chances.
2020-05-28 15:15:04 +02:00
Alexander Larsson
20f15f5111
reftests: Fix frame inhibiting
...
Actually inhibit snapshotting of frames from reftest_inhibit_snapshot.
We were not ignoring the case where inhibit_count > 0, and then disconnected
the callback meaning we only ever got the first snapshot.
2020-05-28 15:13:13 +02:00
Alexander Larsson
9ef3e70040
frame-clock: New approach in smoothing frame clock
...
In commit c6901a8b , the frame clock reported time was changed from
simply reporting the time we ran the frame clock cycle to reporting a
smoothed value that increased by the frame interval each time it was
called.
However, this change caused some problems, such as:
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1415
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1416
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1482
I think a lot of this is caused by the fact that we just overwrote the
old frame time with the smoothed, monotonous timestamp, breaking
some things that relied on knowing the actual time something happened.
This is a new approach to doing the smoothing that is more explicit.
The "frame_time" we store is the actual time we ran the update cycle,
and then we separately compute and store the derived smoothed time and
its period, allowing us to easily return a smoothed time at any time
by rounding the time difference to an integer number of frames.
The initial frame_time can be somewhat arbitrary, as it depends on the
first cycle which is not driven by the frame clock. But follow-up
cycles are typically tied to the the compositor sending the drawn
signal. It may happen that the initial frame is exactly in the middle
between two frames where jitter causes us to randomly round in
different directions when rounding to nearest frame. To fix this we
additionally do a quadratic convergence towards the "real" time,
during presentation driven clock cycles (i.e. when the frame times are
small).
2020-05-28 15:13:07 +02:00
Alexander Larsson
f1215d2d77
frame clock: Use compositor refresh rate info even if presentation time not set
...
On my X11 + nvidia setup gnome-shell doesn't report presentation times.
However it does report refresh rate. We were mostly using this in our
calculation except when computing predicted presentation time, were
it fell back on the default 60Hz.
2020-05-28 15:12:32 +02:00
Alexander Larsson
0ad73da68a
frame clock: Used drawn_time (as well as presentation time) in profiler marks.
2020-05-28 15:12:32 +02:00
Alexander Larsson
e2a4be0243
FrameClock debug: Log drawn_time if set
2020-05-28 15:12:32 +02:00
Matthias Clasen
2d80b105ce
shortcut controller: Fix mnemonic cycling
...
Iterate the shortcuts we found in order, not in
reverse. Otherwise, we always end up activating
the last_selected one, since it is last in the
list.
This broke in fb9b54d4b2 when a list was
turned into an array.
2020-05-28 08:52:55 -04:00
Matthias Clasen
1f4130b927
widget-factory: Add a mnemonic conflict
...
Make Alt-e the mnemionic for both the Edit menu
and the Select button on page 2. This shows that
mnemonic cycling doesn't currently work, we always
open the menu.
2020-05-28 08:34:06 -04:00
Yuri Chornoivan
bdf40943db
Update Ukrainian translation
2020-05-28 10:05:11 +00:00
Emmanuele Bassi
4c9357aaef
Merge branch 'fix_typos' into 'master'
...
Fix minor typos
See merge request GNOME/gtk!1974
2020-05-28 09:11:43 +00:00
Yuri Chornoivan
01bd4cc4e1
Fix minor typos
2020-05-28 11:00:03 +03:00
Matthias Clasen
92bc78c12f
Merge branch 'matthiasc/for-master' into 'master'
...
a11y: Widgets have children
See merge request GNOME/gtk!1973
2020-05-28 03:58:02 +00:00
Matthias Clasen
8e427b7d69
a11y: Widgets have children
...
This brings back some of what we lost when
GtkContainerAccessible went away.
2020-05-27 22:56:33 -04:00
Matthias Clasen
2ad127d290
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1972
2020-05-28 00:55:42 +00:00
Matthias Clasen
2c80691be6
aboutdialog: Stop overriding show()
...
This is entirely unnecessary.
2020-05-27 20:05:26 -04:00
Matthias Clasen
1cd71203b8
volumebutton: Enable the tooltips
...
Little point in having a query-tooltip handler if
we don't make sure ::query-tooltip is emitted.
2020-05-27 19:02:30 -04:00
Matthias Clasen
9c5fc0fb7a
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-27 19:02:19 -04:00
Matthias Clasen
1927a8af71
tooltips: Fix a line wrap mishap
...
We don't want wrapping labels to cause tooltips to
have excessive height, so we need to set a reasonable
value for width-chars, without forcing short tooltips
into a full line length. Also be careful to respect
preexisting line breaks (we have such examples in
widget factory).
2020-05-27 19:01:46 -04:00
Emmanuele Bassi
fe40e674c5
Merge branch 'ebassi/overlay-docs' into 'master'
...
Ebassi/overlay docs
See merge request GNOME/gtk!1970
2020-05-27 16:50:55 +00:00
Matthias Clasen
194b0be8bf
Merge branch 'matthiasc/for-master' into 'master'
...
Add to the docs README
See merge request GNOME/gtk!1971
2020-05-27 16:36:18 +00:00
Matthias Clasen
c42219cd5b
Add to the docs README
...
Mention markdown syntax and gtk-doc additions.
2020-05-27 11:11:30 -04:00
Emmanuele Bassi
637186976c
Remove spurious annotations
...
Boolean values are not nullable, and have no ownership to transfer.
2020-05-27 15:49:24 +01:00
Emmanuele Bassi
175d4ef03e
Add missing documentation for GtkOverlayLayout
...
We're missing the documentation for the constructor, and for the child
properties.
2020-05-27 15:49:24 +01:00
Emmanuele Bassi
85af410b8b
Merge branch 'ebassi/howto-docs' into 'master'
...
Ebassi/howto docs
See merge request GNOME/gtk!1969
2020-05-27 14:10:40 +00:00
Emmanuele Bassi
347cb94c43
docs: Link the documentation guidelines
...
From the coding style.
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
c5485cd6b1
Add the beginnings of a docs contribution guide
...
We have one for the whole project, but the documentation should have a
proper introduction and a proper style guide.
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
e30c974646
Add myself to more sections
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
6b6c76e3a2
docs: Remove last two steps from the release howto
...
Drop the GTK list announcements, as we don't have lists any more.
The GTK website updates itself automatically, these days.
2020-05-27 13:44:50 +01:00
Emmanuele Bassi
25a8fa73f8
docs: Turn coding style into a markdown document
...
It was mostly one already, just needed some minor fixes.
2020-05-27 13:44:50 +01:00
Timm Bäder
7f2e3c44b3
Merge branch 'carlosgc/fix-build' into 'master'
...
build: add gtkoverlaylayout.h to the list of public headers
See merge request GNOME/gtk!1968
2020-05-27 10:06:53 +00:00
Carlos Garcia Campos
a2aa25d28e
build: add gtkoverlaylayout.h to the list of public headers
...
GtkOverlayLayout is now public but the header is not installed.
2020-05-27 11:13:02 +02:00
Matthias Clasen
9f4da7dfd1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1967
2020-05-27 03:54:59 +00:00
Matthias Clasen
646a1c2b88
win32: Drop an unsed variable
2020-05-26 22:23:43 -04:00
Matthias Clasen
c47553e319
gdk: Drop no-longer-used documentation
...
Thread support is gone, and we don't have that
section in the docs anymore.
2020-05-26 20:52:41 -04:00
Matthias Clasen
45f162fc50
gdk: Remove an unused texture api
...
gdk_gl_texture_from_surface wasn't used anywhere,
so lets drop it.
2020-05-26 20:43:47 -04:00
Matthias Clasen
a20291f235
gdk: Drop some unused event queue functions
2020-05-26 20:43:47 -04:00
Matthias Clasen
3468b2fc44
gdk: Clean up gdkinternals.h
...
Remove definitions that are just leftovers with
nothing behind them anymore.
2020-05-26 20:43:47 -04:00
Matthias Clasen
aa0d0dc510
gdk: Drop _gdk_windowing_args
...
We are no longer parsing commandline args, so this
was a useless leftover that was still defined in
the win32 backend.
2020-05-26 20:13:13 -04:00
Matthias Clasen
9c82946e45
docs: Drop a mention of gdk_window_move()
...
We don't have windows anymore, and they don't move
anymore either.
2020-05-26 20:05:34 -04:00
Matthias Clasen
e5a9255555
gdk: Move the GdkGeometry typedef to gdkinternals.h
...
The struct was already there, so this is just a leftover.
2020-05-26 20:04:40 -04:00
Matthias Clasen
e14322137f
gdk: Drop the GdkByteOrder enum
...
Move it to the private gdkvisual-x11.h header, which
is the only place where its used.
2020-05-26 19:45:01 -04:00
Matthias Clasen
f27d855c68
gdk: Drop the GdkEventMask enum
...
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:39:31 -04:00
Matthias Clasen
0553b10214
gdk: Drop the GdkSurfaceTypeHint enum
...
This is not used in public api anymore.
Some of the backends still use it internally,
so keep it in gdkinternals.h for now.
2020-05-26 19:34:59 -04:00
Matthias Clasen
105fc16a9a
testsuite: Drop the type-hint property from tests
...
No point in excluding a property that no longer
exists.
2020-05-26 19:31:12 -04:00
Matthias Clasen
efbc661620
window: Drop an unused field
...
The type-hint property is gone, and nothing reads
or writes the type_hint field anymore.
2020-05-26 19:30:26 -04:00
Matthias Clasen
7fb5b970f5
gdk: Drop GDK_PARENT_RELATIVE
...
This define is not used anywhere.
2020-05-26 19:21:55 -04:00
Matthias Clasen
5f9bcd0409
accelgroup: Expand translator comment
...
Add details about the use of KP.
2020-05-25 22:50:03 -04:00
Matthias Clasen
bd3f4599ed
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2778
See merge request GNOME/gtk!1966
2020-05-26 02:41:37 +00:00
Matthias Clasen
ddf6138d07
Merge branch 'ebassi/for-master' into 'master'
...
Ebassi/for master
Closes #2783
See merge request GNOME/gtk!1962
2020-05-26 01:35:11 +00:00
Matthias Clasen
8c6bbcdc2e
docs: Mention shortcuts in the migration guide
...
Add a few paragraphs about GtkAccelGroup, GtkBindingSet
and GtkAccelMap to the migration guide.
Fixes : #2778
2020-05-25 21:27:58 -04:00
Matthias Clasen
a55d179215
accelgroup: Drop some unused code
2020-05-25 20:56:09 -04:00
Matthias Clasen
ec39ddee63
Help static analysis with an assertion
...
It is hard for clang to see that layouts will
always be smaller than num_layouts, so just assert
that.
2020-05-25 20:56:09 -04:00
Matthias Clasen
0f096d6ad9
bitmask: add an assertion
...
The static analysis in ci is complaining about
this, since it doesn't know that start is always
smaller than end.
2020-05-25 20:56:09 -04:00
Matthias Clasen
92d42d4b67
printing: Drop a redundant assignment
...
This showed up as a warning in static analysis in ci.
2020-05-25 20:56:09 -04:00
Matthias Clasen
17b5cfc924
docs: Mention pandoc as build dependency
2020-05-25 20:56:09 -04:00
Matthias Clasen
5590e2f6f2
Merge branch 'doc-chapters-markdown' into 'master'
...
Include markdown content, via pandoc
See merge request GNOME/gtk!1961
2020-05-26 00:55:10 +00:00
Matthias Clasen
ae2e548b4b
docs: Use the right python
2020-05-25 18:40:09 -04:00
Matthias Clasen
4dbf73d9aa
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1965
2020-05-25 20:23:06 +00:00
Matthias Clasen
86f8be41d0
ci: Use fedora-docs for the doc build
...
Our doc build now uses pandoc, so use an image
that has it.
2020-05-25 16:11:18 -04:00
Matthias Clasen
f60149cd9e
ci: Add a fedora-docs image
...
Split the fedora image into fedora-base (containing just
the packages) and fedora (adding the user setup), and add
a fedora-docs image that is adding pandoc on top of the
fedora-base image.
2020-05-25 16:11:18 -04:00
Matthias Clasen
aca8090a09
docs: Convert question index to markdown
...
With this, the expand_content_files list has been
completely converted to markdown files. Whats left
in content_files is man pages, and a few special
cases.
2020-05-25 16:11:18 -04:00
Matthias Clasen
84437ee0e0
docs: Allow interrupted lists
...
We use such an interrupted, numbered list in the
q&a section, so tell pandoc to pay attention to
start numbers.
2020-05-25 16:11:18 -04:00
Matthias Clasen
dc858c9686
docs: Convert treeview and textview overview to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
581b39a38d
docs: Allow influencing pandoc divisons
...
Arrange for files named section-foo.md to be turned
into docbook sections, while others get turned into
chapters. This is necessary to allow including such
content in chapters, since chapters in docbook don't
nest.
2020-05-25 16:11:18 -04:00
Matthias Clasen
a37b9d7578
docs: Drop the glossary
...
It is very incomplete, somewhat outdated, and
we lack the resources to maintain it properly.
2020-05-25 16:11:18 -04:00
Matthias Clasen
5a3fe9e5f5
docs: Convert resources section to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
f44d611f77
docs: Drop a long-stale file
...
The other_software.xml section has not been included in
the docs since 2.x, as far as I can tell. It was clearly
written before GIO existed.
2020-05-25 16:11:18 -04:00
Matthias Clasen
29fb9ae2d6
docs: Convert platform sections to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
2595cd5a93
docs: Convert getting_started to markdown
...
As part of the conversion, give up on including
sources files from the examples directory, and
instead include the content directly. All include
mechanisms add complications. They were already
complicated with xml, and markdown is not making
things easier.
We already did that for fragments, and if you
make changes to these example sources, you
probably need to revise the surrounding text
anyway.
2020-05-25 16:11:18 -04:00
Matthias Clasen
bf14d75cad
docs: Refresh the inspector screenshot
2020-05-25 16:11:18 -04:00
Matthias Clasen
b99511ee55
docs: Convert building, compiling, running to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
3bf90b4218
doc: Check for pandoc
...
Add an explicit check for pandoc, so we get a clear
error message if it is missing.
2020-05-25 16:11:18 -04:00
Matthias Clasen
9873d983ed
docs: Convert css overview to markdown
2020-05-25 16:11:18 -04:00
Matthias Clasen
3338d24da4
docs: Be more careful when expanding abbreviations
...
We must not expand #symbol in the middle of a url,
where it is probably a fragment identifier. Restrict
problem.
2020-05-25 16:11:18 -04:00
Matthias Clasen
10cd539104
wip: Include markdown content, via pandoc
...
Use pandoc to convert freestanding markdown files to docbook for
inclusion in the generated docs, and use bits and pieces of
gtk-doc code to continue expanding typical gtk-doc abbreviations.
The new tool for markdown -> docbook is a python script called
gtk-markdown-to-docbook.
The markdown dialect is specified via a list of pandoc extension
in gtk-markdown-to-docbook. It includes header annocations,
definition lists and tables, among other things.
This commit converts the 3 overview chapters (drawing, input
handling and actions) and the migration guide to markdown
syntax. Other files that are still listed in content_files
can be converted later.
This commit adds a pandoc dependency.
2020-05-25 16:11:18 -04:00
Matthias Clasen
e4623fd0c4
Add GtkOverlayLayout to the docs
2020-05-25 15:18:14 -04:00
Matthias Clasen
9fa3742c09
Make GtkOverlayLayout public
...
Keeping the layout manager type private does not
really work when it has layout child properties
that need to be usable in ui files.
2020-05-25 14:22:10 -04:00
Matthias Clasen
5317e4bc07
constraint-editor: Don't use g_type_ensure
...
This isn't necessary if we export the get_type function.
2020-05-25 14:14:28 -04:00
Timm Bäder
2127cc1943
adwaita: move backdrop box shadows to .csd
...
Fixes #2781
2020-05-25 10:36:29 +02:00
Timm Bäder
04b7dd802a
compare-render: Fix some memory leaks
2020-05-24 17:14:18 +02:00
Emmanuele Bassi
7de9eb005e
Add a comment for translators
...
"KP" refers to the numeric keypad, in this context.
Fixes : #2783
2020-05-24 15:20:13 +01:00
Emmanuele Bassi
d68e312c2b
Use the private GdkKeyEvent.translated_key getter
...
We can avoid poking directly at the GdkKeyEvent structure, now.
2020-05-24 15:19:01 +01:00
Emmanuele Bassi
0cf5b66e7b
Add private accessor for GdkKeyEvent.translated
...
Avoid accessing the event structure directly, even from within GTK.
2020-05-24 15:19:01 +01:00
Timm Bäder
d5bf3c2cd1
gl renderer: Improve clipping code
...
don't render a clip to a texture if the new clip does not intersect with
any of the corners of the currently rounded clip.
Fixes #2770
2020-05-24 15:59:05 +02:00
Timm Bäder
094788f1a3
gl renderer: Refactor render_clipped_child
2020-05-24 15:59:05 +02:00
Timm Bäder
23e68c0988
gl renderer: Cache whether clips is rectilinear
2020-05-24 15:59:05 +02:00
Timm Bäder
60902484fd
applicationwindow: Simplify measure implementation
...
We already chain up first thing in this function, so no need to do it
again.
2020-05-24 15:59:05 +02:00
Timm Bäder
48c9c86626
window: Remove private _get_shadow_width()
...
Unused now.
2020-05-24 15:59:05 +02:00
Timm Bäder
2e27a76edd
applicationwindow: Stop querying shadow width
...
don't need to do this anymore.
2020-05-24 15:59:05 +02:00
Piotr Drąg
be8fc8f26b
Update Polish translation
2020-05-24 15:07:03 +02:00
Florentina Mușat
f1e3581347
Update Romanian translation
2020-05-24 10:48:29 +00:00
Florentina Mușat
0606dd511a
Update Romanian translation
2020-05-24 10:37:15 +00:00
Emin Tufan Çetin
3e68c694b9
Update Turkish translation
2020-05-23 08:50:36 +00:00
Matthias Clasen
ffa5334a2d
Merge branch 'matthiasc/for-master' into 'master'
...
gtk-demo: Fix the dnd demo drop highlight
See merge request GNOME/gtk!1958
2020-05-23 00:05:16 +00:00
Matthias Clasen
5e25ba6c5a
Merge branch 'no-app-menu' into 'master'
...
Drop the app menu
Closes #2731
See merge request GNOME/gtk!1951
2020-05-22 23:46:56 +00:00
Matthias Clasen
5f6d072459
gtk-demo: Fix the dnd demo drop highlight
...
We want the drop highlight to be around the label,
not around the item containing it, so move the drop
target gesture to the right widget.
2020-05-22 18:52:56 -04:00
Matthias Clasen
1038b9b8a1
docs: Mention app menus in the migration guide
2020-05-22 18:46:51 -04:00
Matthias Clasen
0dc384265c
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1957
2020-05-22 22:19:59 +00:00
Matthias Clasen
133461581f
Merge branch 'BUG_filechooserbutton_remote_GTK4' into 'master'
...
FileChooserButton: query 'display name' also for unbookmarked files
Closes #1966
See merge request GNOME/gtk!1725
2020-05-22 21:37:40 +00:00
Matthias Clasen
79d6a77d58
gtkapplication: Drop app menu support
...
Drop apis and code related to appmenus from
both GtkApplication and GtkApplicationWindow.
We still keep the menubar support, since it
is needed for system integration on OS X.
Fixes : #2731
2020-05-22 17:31:05 -04:00
Matthias Clasen
d5da3b9199
print-editor: Stop using appmenu apis
...
The appmenu-related GtkApplication apis are going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
a8df81b27c
inspector: Drop app-menu support
...
Don't add app menu to the object tree anymore;
this property is going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
6c31092c69
examples: Stop using appmenu apis
...
The appmenu-related GtkApplication apis are going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
ca1c570c21
gtk-demo: Stop using appmenu apis
...
The appmenu-related GtkApplication apis are going away.
2020-05-22 17:31:05 -04:00
Matthias Clasen
33b836af7f
fixed: Change coordinate apis to doubles
...
We are using floating point for coordinates
everywhere now, so be consistent here.
This commit also changes the implementation of
gtk_fixed_get_child_position to work with
non-translation child transforms.
2020-05-22 17:26:08 -04:00
Matthias Clasen
e7a420c40e
testsuite: Re-add the sizegroups-evolution reftest
...
It doesn't seem to cause problems in ci anymore.
2020-05-22 17:10:28 -04:00
Matthias Clasen
962c4d6a69
Merge branch 'matthiasc/for-master' into 'master'
...
text: Avoid clash of preedit and placeholder
See merge request GNOME/gtk!1955
2020-05-22 20:59:44 +00:00
Matthias Clasen
0f053d1804
gtk-demo: Improve rotation in the dnd demo
...
Make the drag icon preserve the rotation, and improve
placement for the editor and for dnd to take the offset
into account.
2020-05-22 15:38:02 -04:00
Timm Bäder
930d779eb3
gl renderer: don't pretend all transform nodes support being transformed
...
It doesn't work in the general case. The transform handling could use a
general overhaul though.
Fixes #2773
2020-05-22 21:29:10 +02:00
Timm Bäder
f3ca814f3d
gl renderer: Fix some off-by-one and rounding errors in the shadow code
...
Take 24
Fixes #2759
2020-05-22 21:29:10 +02:00
Matthias Clasen
7fac6b37db
gtk-demo: Improve editing in the dnd demo
...
Add a scale for the angle, make the edits apply immediately,
and keep the item visible.
2020-05-22 14:06:00 -04:00
Matthias Clasen
d2f979ffaf
gtk-demo: Improve drag icon handling in dnd example
...
Make the opacity change only apply to the 'ghost' of
the item, not the drag icon.
2020-05-22 13:25:17 -04:00
Matthias Clasen
e54060bac2
gtk-demo: Fix entry position in dnd demo
...
gtk_fixed_get_child_position does not work if children
have transforms that are not just 2D translations.
Use gtk_widget_translate_coordinates instead.
2020-05-22 13:17:59 -04:00
Matthias Clasen
965483eb67
gtk-demo: Reorganize the dnd demo
...
Introduce a CanvasItem widget to make things a
bit less ad hoc.
2020-05-22 12:35:18 -04:00
Matthias Clasen
dff5986ec2
main: Keep the target widget alive
...
We are passing the event to the tooltip handle_event
function at the very end. Unfortunately, the target_widget
may have already died at that point. We prevent that
by taking a ref during propagage_event, but the tooltip
code was outside of that. Keep a ref until the very
end ot prevent crashes.
2020-05-22 12:25:23 -04:00
Matthias Clasen
028bccc188
gtk-demo: Use proper drag icons in the dnd demo
...
Use a widget paintable to make the drag icon appear
in two places at once.
2020-05-22 10:50:09 -04:00
Matthias Clasen
78b427c99d
dragsource: Actually use the paintable
...
We were just ignoring a paintable provided by
gtk_drag_source_set_icon().
2020-05-22 10:49:57 -04:00
Matthias Clasen
aec0a49e91
colorswatch: Remove a redundant include
2020-05-22 10:48:49 -04:00
Matthias Clasen
e60ea00e8b
reftests: Fix the background-origin test
...
This was broken when I accidentally removed
one of the buttons.
2020-05-22 10:48:33 -04:00
Matthias Clasen
01df133401
text: Avoid clash of preedit and placeholder
...
Take preedit into account when determining the
visibility of placeholder text.
2020-05-22 10:48:33 -04:00
Matthias Clasen
56a6120136
Merge branch 'fix-printbackend' into 'master'
...
Build media backends with common_cflags and export the symbol
Closes #2771
See merge request GNOME/gtk!1956
2020-05-22 14:20:35 +00:00
Qiu Wenbo
340a8e11b0
Build media backends with common_cflags and export the symbol
...
Fixes : #2771
2020-05-22 17:00:06 +08:00
Yuri Chornoivan
2da14da32c
Update Ukrainian translation
2020-05-22 05:47:20 +00:00
Matthias Clasen
641f2f72cd
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #227 , #328 , and #1010
See merge request GNOME/gtk!1954
2020-05-22 01:59:34 +00:00
Ondrej Holy
e8a120e5af
trash-monitor: Rate limit updates
...
Trash monitor queries info from gvfsd-trash after each file monitor
change which can be problematic when too many changes happen in
a short time. Let's rate limit the number of queries...
Fixes : #1010
2020-05-21 21:15:12 -04:00
Matthias Clasen
e9872d52d8
range: Treat lower and upper limit the same
...
When clamping values to be within the range of
the adjustment, treat the lower and upper limit
the same.
Fixes : #328
2020-05-21 20:37:54 -04:00
Matthias Clasen
3b8bd265a3
windowhandle: Drop Move and Resize from the fallback menu
...
The expected behavior is that we trigger a keyboard-driven
interactive move or resize operation. But that doesn't work
with common compositors like mutter or weston, so lets not
expose non-working menuitems.
2020-05-21 19:38:36 -04:00
Matthias Clasen
af162b70c5
tooltip: Avoid criticals
...
It is possible that the target widget is already
unparented at the time that we call the tooltips
handle_event function. Quietly return in that case,
no need to emit a critical.
2020-05-21 19:38:36 -04:00
Matthias Clasen
061f257e83
accelgroup: Use Unicode in string literals
...
Its 2020, non-ASCII characters are not taboo anymore.
2020-05-21 19:38:36 -04:00
Matthias Clasen
c58d9446f4
Differentiate keypad keysyms in accelerators
...
When displaying accelerators, differentiate keypad
symbols with a 'KP' prefix. Fixing a 17 year old bug.
Update expected output in accelerator tests.
Fixes : #227
2020-05-21 19:38:19 -04:00
Matthias Clasen
e4d684b116
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1953
2020-05-21 21:31:17 +00:00
Matthias Clasen
8f5444c75b
gtk-demo: Fix breakage in a css demo
...
This is fallout from container api changes. We
were treating a GtkOverlay like a GtkBox, which
it isn't.
2020-05-21 16:24:56 -04:00
Matthias Clasen
96c0fbf209
gtk-demo: Plug another leak
...
We were leaking the builder in the css blendmodes demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 16:24:20 -04:00
Matthias Clasen
98178d8823
gtk-demo: Plug another leak
...
We were leaking the builder in the revealers demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 16:23:42 -04:00
Matthias Clasen
3f6dd34b18
gtk-demo: Plug another leak
...
We were leaking the builder in the cursors demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 15:41:54 -04:00
Matthias Clasen
aaed61de66
gtk-demo: Plug a leak
...
We were leaking the builder in the builder demo,
by creating a ref cycle. This was showing up as
the list entry not going back to upright after
closing the window.
2020-05-21 15:41:48 -04:00
Timm Bäder
1aa86d23f4
gl renderer: Fix blurred outset shadow slicing
...
Take 23.
Fixes #2759
2020-05-21 15:32:12 +02:00
Matthias Clasen
c4607f72d1
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1950
2020-05-20 20:57:34 +00:00
Matthias Clasen
f5f4c3cdfc
Merge branch 'wip/exalm/window-polish' into 'master'
...
window: Fix tiled style class names
See merge request GNOME/gtk!1949
2020-05-20 20:13:30 +00:00
Matthias Clasen
9a1b4a766f
mediastream: Volume is a double
...
Another obvious copy-paste error in the property
declarations of GtkMediaStream. Volume should be
a double, with range [0, 1], not a boolean.
2020-05-20 16:07:50 -04:00
Matthias Clasen
87d2e86429
mediastream: Some properties were meant to be readonly
...
These properties aren't covered by set_property(), and
it doesn't make sense to do so. They were just declared
as read-write by mistake.
2020-05-20 16:07:50 -04:00
Matthias Clasen
ee2c55379c
mediacontrols: Make volume control react to has-audio
2020-05-20 16:07:50 -04:00
Matthias Clasen
be8a831496
Merge branch 'matthiasc/for-master' into 'master'
...
gdk: Short-circuit some surface setters
See merge request GNOME/gtk!1947
2020-05-20 18:01:07 +00:00
Alexander Mikhaylenko
2ce8c82846
window: Fix tiled style class names
...
This should fix the round corners on tiled windows.
2020-05-20 22:10:32 +05:00
Timm Bäder
7d57f978c5
Merge branch 'wip/baedert/single-node-window' into 'master'
...
single node GtkWindow
See merge request GNOME/gtk!1863
2020-05-20 17:06:37 +00:00
Timm Bäder
22e7d11583
window: Use GtkNative's check_resize everywhere
2020-05-20 18:12:22 +02:00
Timm Bäder
9cc6ddf80d
window: Create default titlebar directly in realize
...
Instead of having two functions that are only called from one place but
look like they can be called from anywhere.
2020-05-20 18:12:22 +02:00
Timm Bäder
ee9d99cba3
update documentation for new style classes and node names
2020-05-20 18:12:22 +02:00
Timm Bäder
5c458e3061
Adwaita: style updates for new window node hierarchy
2020-05-20 18:12:20 +02:00
Timm Bäder
dfbcd475f3
window: Fix the surface coordinates everywhere
2020-05-20 17:08:24 +02:00
Timm Bäder
018efdb8eb
window: Inline gtk_window_configure() into only caller
...
And remove the prototype from gtkwindowprivate.h
2020-05-20 17:08:24 +02:00
Timm Bäder
ec594f80dc
window: Rewrite edge region detection
2020-05-20 17:08:24 +02:00
Timm Bäder
131837087b
window: Fix computing the opaque region
...
We need to look at the surface transform here as well now.
2020-05-20 17:08:21 +02:00
Timm Bäder
7eec162502
window: Avoid using GtkStyleContext in subtract_decoration_corners
...
We can do this by just using the GtkCssStyle these days.
2020-05-20 17:06:54 +02:00
Timm Bäder
8c884e94c2
window: Fix get_surface_transform()
...
Look at the shadow here.
2020-05-20 17:06:54 +02:00
Timm Bäder
7659d8af3d
window: Set overflow to HIDDEN
...
It really doesn't make sense for the general window to allow drawing
outside of it.
2020-05-20 17:06:54 +02:00
Timm Bäder
a5e7e72dd8
inspector: Fix overlay coordinates
...
Get the native transform only once, for all overlays. Unfortunately we
have to undo this for the updates overlay since that one gets values
in surface coordinates.
2020-05-20 17:06:54 +02:00
Timm Bäder
8e8e869853
inspector: Don't offset layout overlay too much
...
We already do this earlier.
2020-05-20 17:06:54 +02:00
Timm Bäder
b41838a7fd
Window: Remove extra_input_region API
...
This is unused.
2020-05-20 17:06:54 +02:00
Timm Bäder
5ebabd7cf6
Call all window subclasses "window"
...
And add style classes to differentiate them
2020-05-20 17:06:54 +02:00
Timm Bäder
388733fe77
testsuite: Remove window decoration nodes from reference results
2020-05-20 17:06:54 +02:00
Timm Bäder
e1007e6c2b
window: Remove decoration node
2020-05-20 17:06:54 +02:00
Timm Bäder
2c2092e7b8
window: Don't care about shadow in measure()
2020-05-20 17:06:54 +02:00
Timm Bäder
2579f66150
window: Don't care about shadow in size_allocate()
2020-05-20 17:06:54 +02:00
Timm Bäder
077692a8e1
window: Remove custom snapshot() implementation
2020-05-20 17:06:54 +02:00
Timm Bäder
5b77d3fde3
widget: Remove GtkWindow special case in create_render_node()
2020-05-20 17:06:54 +02:00
Matthias Clasen
6d8153d8fd
gdk: Short-circuit some surface setters
...
Don't call into the backends when the input region
or shadow width don't actually change. This avoid
distracting calls in debug logs, and just generally
is the right thing to do.
2020-05-20 10:55:27 -04:00
Timm Bäder
ae711d8301
gdkdisplay-wayland: only remove one monitor
...
Ids here are unique, so break out of the loop once we found the monitor
with the given ID.
2020-05-20 15:51:11 +02:00
Emmanuele Bassi
00d889b4b6
Merge branch 'wip/ricotz/annotations' into 'master'
...
gdk: Preserve typed event parameter of GdkSurface:event signal for gir
See merge request GNOME/gtk!1946
2020-05-20 11:57:00 +00:00
Daniel Mustieles
401e2d16a8
Updated Spanish translation
2020-05-20 12:08:17 +02:00
Timm Bäder
4b5a8c45b4
gtk4-demo: Fix css_basics demo
2020-05-20 10:29:50 +02:00
Timm Bäder
ae54517b33
gtk4-demo: Fix sliding puzzle demo
2020-05-20 10:29:50 +02:00
Rico Tzschichholz
ebaeb9f3b8
gdk: Preserve typed event parameter of GdkSurface:event signal for gir
...
In conjunction to https://gitlab.gnome.org/GNOME/gtk/merge_requests/1936
2020-05-20 08:48:34 +02:00
Christian Hergert
a21d97db2e
Merge branch 'wip/chergert/remove-get_toplevel' into 'master'
...
device: remove get_toplevel from surface_at_position vfunc
Closes #2765
See merge request GNOME/gtk!1941
2020-05-19 22:59:41 +00:00
Matthias Clasen
ebc8b01718
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!1935
2020-05-19 22:40:57 +00:00
Matthias Clasen
cf5e923d84
Merge branch 'wip/carlosg/tracker3' into 'master'
...
Move to tracker3 search engine
See merge request GNOME/gtk!1944
2020-05-19 22:37:34 +00:00
Christian Hergert
fa08d848ca
device: remove get_toplevel from surface_at_position vfunc
...
This is not used anymore now that surfaces are always toplevel in the
semantics of GdkWindow where child windows were available. We can drop
that and simplify the vfunc just a bit more.
Fixes #2765
2020-05-19 13:07:38 -07:00
Carlos Garnacho
d29d59d1f9
gtksearchengine: Drop tracker 2.x search engine
...
This is being superseded by 3.x
2020-05-19 22:05:07 +02:00
Carlos Garnacho
edf6f9e108
gtksearchenginetracker3: Pre-fill GFileInfo from query
...
Provide the minimal info necessary. Improves apparent responsiveness
(since we don't visibly clear and repopulate the list) and saves doing
file stat/reads on every file in the result set.
2020-05-19 22:05:07 +02:00
Carlos Garnacho
98f376a19e
gtksearchengine: Add tracker3 search engine
...
Make this dependency optional at build time, and prefer it over
the old tracker <= 2.x implementation.
2020-05-19 22:05:07 +02:00
Carlos Garnacho
de68925f0c
gtksearchengine: Add autoptr handler for this type
...
So subclasses can just use G_DECLARE_*_TYPE.
2020-05-19 22:04:25 +02:00
Carlos Garnacho
b890e87818
gtksearchengine: Add "got_results" argument to ::finished
...
The filechooser tries to figure out whether it got results by poking
the model, but all files might go through the async GFileInfo querying
state.
Make all search engines (and the composite one) just notify about this
fact, so the file chooser can behave appropriately without waiting for
the async operations to finish.
2020-05-19 22:04:25 +02:00
Matthias Clasen
e0f4e44044
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Refresh the build and backend sections
See merge request GNOME/gtk!1942
2020-05-19 19:59:46 +00:00
Matthias Clasen
edf85cb1b3
docs: Refresh the build and backend sections
...
Remove some outdated information from the sections
about building and about particular backends.
2020-05-19 15:19:53 -04:00
Matthias Clasen
841e9b3f0e
Merge branch 'x11-shortcuts-inhibit-fix' into 'master'
...
x11: update inhibit shortcuts on grab broken
See merge request GNOME/gtk!1590
2020-05-19 14:06:25 +00:00
Olivier Fourdan
93f9138c9b
x11: update inhibit shortcuts on grab broken
...
On X11, shortcuts inhibition is emulated using a grab on the keyboard.
So if another widget ungrabs the keyboard behind our back (for example
when a popup window is dismissed) that effectively disables the effects
of the shortcut inhibition on the surface and we need to update the
shortcut inhibition status accordingly.
Check for "grab-broken" events on the surface and clear existing
shortcuts inhibition for the matching seat, so that the client can be
notified and may decide to re-enable shortcut inhibition if desired.
2020-05-19 14:51:25 +02:00
Emmanuele Bassi
1ace77b923
Merge branch 'ebassi/surface-event' into 'master'
...
Use the right types for the GdkSurface::event arguments
See merge request GNOME/gtk!1936
2020-05-19 12:14:17 +00:00
Emmanuele Bassi
dd4d6930b5
Use the right types for the GdkSurface::event arguments
...
We pass the GdkEvent as a pointer, because the autogenerated marshallers
don't know how to handle GTypeInstance-derived classes.
Since the GValue box that we use in the marshaller passes the GdkEvent
instance as is, we also need to acquire a reference before invoking the
closure, and release it afterwards, to ensure that the GdkEvent instance
survices the invocation.
2020-05-19 12:21:22 +01:00
Timm Bäder
db76b52744
treeview: Remove animate parameters
...
Nothing ever reads them.
2020-05-19 08:32:33 +02:00
Timm Bäder
7235472a58
text: Assert that we have ranges before using them
...
We never hit this code path otherwise but let's make sure.
2020-05-19 08:32:33 +02:00
Timm Bäder
99871639fe
unsetvalue: Add G_GNUC_NORETURN annotation
2020-05-19 08:32:33 +02:00
Timm Bäder
eebc2f20fa
testgtk: Add G_GNUC_NORETURN to usage()
2020-05-19 08:32:33 +02:00
Timm Bäder
b92f4177aa
builder-tool Make preview closeable
2020-05-19 08:32:33 +02:00
Timm Bäder
20b906cee8
Build print backends with common_cflags
2020-05-19 08:32:33 +02:00
Timm Bäder
7a768a2581
build: Pass common_cflags to focus-chain test
2020-05-19 08:32:33 +02:00
Timm Bäder
17c7662a6c
bloatpad: Pass common_cflags to the build
2020-05-19 08:32:33 +02:00
Timm Bäder
14c3bc542d
tetsuite/a11y: Pass common_cflags to build
2020-05-19 08:32:33 +02:00
Timm Bäder
dd370db62a
reftests: Pass common_cflags
2020-05-19 08:32:33 +02:00
Timm Bäder
43ba86b7af
tools: Pass common_cflags to executables
2020-05-19 08:32:33 +02:00
Timm Bäder
2425d61516
Pass common_cflags to testuite/gsk executables
2020-05-19 08:32:33 +02:00
Timm Bäder
3bf4c5687c
Pass common_cflags to print backends
2020-05-19 08:32:33 +02:00
Matthias Clasen
7fc2d9adc0
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2739 and #2760
See merge request GNOME/gtk!1934
2020-05-19 02:47:03 +00:00
Matthias Clasen
17dd32da88
testsuite: Remove obsolete test from list
...
The test was removed in 97d0e8c6e0 , but I neglected
to remove the test files from meson.build.
Fixes : #2760
2020-05-18 21:49:34 -04:00
Matthias Clasen
ec2aac5b61
gsk: Document blend modes
...
Add some information about blend modes, mostly taken
from the css compositing spec.
Fixes : #2739
2020-05-18 18:21:39 -04:00
Matthias Clasen
15f7d2a27d
3.98.4
2020-05-18 16:38:11 -04:00
Matthias Clasen
3dafdcbab0
testsuite: Remove GDK_DEBUG=misc
...
This snuck in by accident in recent ci setup
changes, and breaks the test runs by adding
stray output.
2020-05-18 16:38:11 -04:00
Matthias Clasen
383fa6b0b0
Merge branch 'matthiasc/for-master' into 'master'
...
colorscale: Bring back the right-click on slider
See merge request GNOME/gtk!1933
2020-05-18 16:46:12 +00:00
Matthias Clasen
f637ab57f1
colorscale: Bring back the right-click on slider
...
This was lost when we converted the color editor to actions.
2020-05-18 11:31:42 -04:00
Emmanuele Bassi
615b4d8c65
Merge branch 'ebassi/ci-fix' into 'master'
...
docs: Fix the argument name to match
See merge request GNOME/gtk!1930
2020-05-18 15:10:38 +00:00
Jakub Steiner
9be5c7b0c8
Merge branch 'theme-aligned-combo-labels' into 'master'
...
Adwaita: Align combo menu labels with the combo button label
See merge request GNOME/gtk!1928
2020-05-18 14:04:19 +00:00
Yuri Chornoivan
670b102553
Update Ukrainian translation
2020-05-18 14:03:41 +00:00
Emmanuele Bassi
9bd9a11de4
docs: Fix the argument name to match
...
Both gtk-doc and g-i require the name of the argument of a function to
match in the declaration, definition, and gtk-doc stanza.
2020-05-18 14:55:25 +01:00
Jakub Steiner
ec26e4f6b4
Merge branch 'theme-checkbutton-padding' into 'master'
...
Adwaita: Tweak padding in checkbutton & radiobutton
Closes #2697
See merge request GNOME/gtk!1927
2020-05-18 13:12:15 +00:00
nana-4
538ab75002
Adwaita: Align combo menu labels with the combo button label
...
Apply the same left and right padding to the combo menu items as the
combo button.
2020-05-18 21:52:00 +09:00
nana-4
1c99dbc70e
Adwaita: Tweak padding in checkbutton & radiobutton
...
Since we can now use border-spacing in checkbutton and radiobutton,
we don't need the margin in check and radio for spacing anymore.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2697
2020-05-18 20:29:23 +09:00
Timm Bäder
afd56517d1
bloatpad: Avoid a few theoretical compiler warnings
2020-05-18 11:30:08 +02:00
Timm Bäder
3c7ba21a6a
Add G_GNUC_NORETURN to functions that never return
2020-05-18 11:30:08 +02:00
Timm Bäder
4b655ecd36
examples: Add common_cflags to executables
2020-05-18 11:30:08 +02:00
Daniel Mustieles
028942c8c3
Updated Spanish translation
2020-05-18 10:15:03 +02:00
Matthias Clasen
55b171c986
Merge branch 'shape-apis' into 'master'
...
Shape apis
See merge request GNOME/gtk!1925
2020-05-18 04:26:01 +00:00
Chun-wei Fan
a4416e389a
print-editor demo: Fix linking on Visual Studio
...
We need to pass in '/entry:mainCRTStartup' as we did for the other demo
programs that have 'gui_app: true' in their Meson build settings.
2020-05-18 11:35:52 +08:00
Matthias Clasen
d6818475d7
gdk: Simplify gdk_display_supports_input_shapes
...
Make this a display property, and do away with
the vfunc in favor of a private setter, to match
how we handle other display characteristics.
2020-05-17 22:05:24 -04:00
Matthias Clasen
287c40276a
gdk: Drop gdk_display_supports_shapes
...
The apis to set shapes on surfaces are gone,
so there is no point in providing this information
on GdkDisplay.
2020-05-17 21:52:15 -04:00
Matthias Clasen
5916ae5ec4
x11: Avoid some frontend api use
...
We can just use our backend information directly.
2020-05-17 21:47:22 -04:00
Matthias Clasen
03829e191e
docs: Tweak docs for gdk_surface_set_input_region
2020-05-17 21:46:54 -04:00
Matthias Clasen
f958a6ecf7
Merge branch 'coordinate-api' into 'master'
...
Coordinate api
See merge request GNOME/gtk!1924
2020-05-18 00:08:44 +00:00
Matthias Clasen
71bad81aff
gdk: Make gdk_drag_begin take doubles
...
This is a better fit to the way we treat coordinates
everywhere else.
2020-05-17 17:51:03 -04:00
Matthias Clasen
75d9310986
Change coordinate translation apis to take doubles
...
Change gtk_widget_translate_coordinates and
gtk_native_get_surface_transform to operate
on doubles. Update all callers.
2020-05-17 17:17:31 -04:00
Matthias Clasen
93d4253c93
native: Make gtk_native_get_surface_transform public
...
This api is needed to translate between surface
and widget coordinates.
2020-05-17 16:01:08 -04:00
Matthias Clasen
c0faf0c6b6
Merge branch 'toplevel-move-resize' into 'master'
...
Toplevel move resize
See merge request GNOME/gtk!1923
2020-05-17 19:15:46 +00:00
Matthias Clasen
b63690aa6b
docs: Mention begin_resize_drag in the migration guide
2020-05-17 14:38:10 -04:00
Matthias Clasen
1e8a58e367
gdk: Move the begin_move/resize_drag vfuncs around
...
Move these from GdkSurface to GdkToplevel, where they
belong. Update all backends.
2020-05-17 14:15:06 -04:00
Benjamin Otte
34d7e25a1f
x11: Fix up for last merge
2020-05-17 19:21:28 +02:00
Benjamin Otte
b353221185
Merge branch 'wip/otte/monitors' into 'master'
...
various GDK cleanups
See merge request GNOME/gtk!1920
2020-05-17 16:57:52 +00:00
Matthias Clasen
eb6edac4bd
gdk: Drop gdk_surface_begin_move/resize_drag
...
These have been replaced by GdkToplevel api.
2020-05-17 12:49:29 -04:00
Matthias Clasen
f316fe0f58
window: Use toplevel begin_move/resize api
...
The GdkSurface api for this is going away.
2020-05-17 12:49:26 -04:00
Emmanuele Bassi
12854f1428
Merge branch 'ebassi/ci-extends' into 'master'
...
ci: Use extends instead of YAML anchors
See merge request GNOME/gtk!1908
2020-05-17 16:43:24 +00:00
Matthias Clasen
309a7aa253
gdk: Add gdk_toplevel_begin_move/resize
...
For now, these are wrappers around the surface apis,
but they are going to replace them, since this operation
is only available on toplevels.
2020-05-17 12:41:16 -04:00
Benjamin Otte
363c88cef7
migration guide: Update paragraph about monitors
...
Clarify the new handling of monitors via a listmodel of GdkMonitor
instead of int monitor_num.
2020-05-17 18:05:07 +02:00
Timm Bäder
74a1c60dd4
windowhandle: Apply surface transform before passing coords to GDK
...
Otherwise coordinates are incorrect and the window can jump around after
starting a drag.
2020-05-17 15:30:50 +02:00
Timm Bäder
a4bb81b61c
inspector: Apply toplevel transform before snapshotting overlays
2020-05-17 15:30:44 +02:00
Timm Bäder
01c0acb707
gl renderer: Apply scaled clip when rendering offscreen clipped child
2020-05-17 15:30:28 +02:00
Timm Bäder
afbc1d5b66
shortcutmanager: Fix private header include guard
2020-05-17 15:30:03 +02:00
Timm Bäder
1d9e68245a
shortcutcontroller: Don't return a shortcut stope as GdkModifierType
2020-05-17 15:30:03 +02:00
Timm Bäder
9b98641ddd
window: Use TRUE/FALSE for boolean values
2020-05-17 15:30:03 +02:00
Timm Bäder
2c1d218749
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #1619
See merge request GNOME/gtk!1921
2020-05-17 13:08:26 +00:00
Emin Tufan Çetin
716485113a
Update Turkish translation
2020-05-17 11:42:10 +00:00
Matthias Clasen
d70feb9165
Apply surface transform in more places
...
With these fixes, GtkSwitch now works in the presence
of surface transforms.
2020-05-17 02:23:23 -04:00
Matthias Clasen
38af49d4fd
inspector: Take surface transform into account
2020-05-17 02:10:56 -04:00
Timm Bäder
007de568c9
gl renderer: Fix an uninitialized value
2020-05-17 08:07:11 +02:00
Matthias Clasen
d2913b81cb
windowhandle: Take surface transform into account
2020-05-17 02:05:32 -04:00
Matthias Clasen
c90078fd4a
widget: Fix gtk_widget_get_surface_allocation
...
As the name implies, this should be surface-relative
coordinates, so it needs to take the surface transform
into account.
2020-05-17 02:04:22 -04:00
Matthias Clasen
428e647238
textview: Fix context menu placement
...
Take the surface transform into account for
positioning the context menu.
2020-05-17 02:03:41 -04:00
Benjamin Otte
4c7914dc49
display: Remove unneeded getters
...
Applications can use the listmodel instead.
2020-05-17 07:32:37 +02:00
Matthias Clasen
5e35a4b69a
tooltip: Fix positioning
...
There are a few more places where we were forgetting
to apply the surface->native transform. With these
changes, tooltips are positioned correctly when
the toplevel has padding applied.
Fixes : #1619
2020-05-17 01:22:02 -04:00
Benjamin Otte
9a30019268
display: Remove the monitor signals
...
Applications can listen to GdkDisplay:monitors::items-changed if they
want to track monitor changes.
2020-05-17 07:10:34 +02:00
Benjamin Otte
972276436f
x11: Directly notify surfaces of monitor changes
...
Do not use signals.
2020-05-17 07:10:34 +02:00
Benjamin Otte
e81a1db48c
monitor: Add gdk_monitor_set_geometry()
...
Make it replace gdk_monitor_set_size() and gdk_monitor_set_position()
which used to be called in pairs anyway.
2020-05-17 07:10:34 +02:00
Benjamin Otte
33a4442988
x11: Remove unused change tracking
...
Change tracking now works automatically via GdkMonitor.
2020-05-17 05:14:24 +02:00
Matthias Clasen
3035bf1e39
widget-factory: Cosmetics
...
Add a frame around the white background in the background
selection dialog. Otherwise, it is not really visible.
2020-05-16 21:54:14 -04:00
Benjamin Otte
14bf58ec5d
x11: Remove XDamage dependency
...
It's not used.
2020-05-17 02:14:58 +02:00
Matthias Clasen
a2a3aab94d
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #2601
See merge request GNOME/gtk!1918
2020-05-16 23:35:51 +00:00
Emmanuele Bassi
7ff9a3f3a0
ci: Allow using "latest" as the image version
...
Just like the documentation says.
2020-05-17 00:32:22 +01:00
Emmanuele Bassi
8070bac06c
ci: Use extends instead of YAML anchors
...
The `extends` keyword is more readable than YAML's weird anchor syntax,
and we don't have too many anchors in our job definitions anyway.
2020-05-17 00:30:07 +01:00
Benjamin Otte
d4731a4ab4
x11: Remove gdk_x11_register_standard_event_type()
...
It's not used anymore since GdkX11Display::xevent exists.
2020-05-17 01:02:17 +02:00
Benjamin Otte
0c6266fd1a
surface: Remove gdk_surface_is_viewable()
...
It returns the same value as gdk_surface_get_mapped(), so use that
instead.
2020-05-17 00:41:44 +02:00
Timm Bäder
5b0e91844b
popover: Fix input shape rendering
...
Once again, calling gtk_widget_get_allocation() is wrong.
Fixes #2601
2020-05-16 22:34:38 +02:00
Timm Bäder
c4363e2706
showrendernode: Set widget overflow
2020-05-16 22:04:00 +02:00
Timm Bäder
ccaacfc8c3
texthandle: Remove min-width/height handling
...
We do that automatically for all widgets.
2020-05-16 22:04:00 +02:00
Timm Bäder
2e9d772e66
natives: Use GtkCssBoxes in get_surface_transform
2020-05-16 22:04:00 +02:00
Timm Bäder
bac6e79614
native: Add documenation for get_surface_transform
2020-05-16 22:03:58 +02:00
Timm Bäder
2fd86ef80c
popover: Return correct values from get_surface_transform()
...
We do not (yet) care about the box shadow here, so it's sufficient to
return the css values.
2020-05-16 22:03:58 +02:00
Timm Bäder
f9370d7e83
main: Translate coordinates from surface to native before picking
...
gtk_widget_pick() needs them to be in @self coordinates.
2020-05-16 22:03:55 +02:00
Matthias Clasen
bc75965053
Merge branch 'matthiasc/for-master' into 'master'
...
broadway: Be careful about destroyed surfaces
See merge request GNOME/gtk!1917
2020-05-16 18:27:19 +00:00
Matthias Clasen
77107f70c4
broadway: Be careful about destroyed surfaces
...
Just because we take a ref on a surface does not
guarantee that it is still usable a second later.
Check if its been destroyed in the meantime.
This is breaking the template tests in ci, since
there is no client behind the Broadway server.
2020-05-16 13:47:18 -04:00
Matthias Clasen
b41aeabbec
Merge branch 'matthiasc/for-master' into 'master'
...
broadway: Don't create overlarge images
See merge request GNOME/gtk!1916
2020-05-16 17:01:30 +00:00
Matthias Clasen
c0ae36e943
broadway: Create slave devices
...
The assumption is that the source device in events
is a slave device, so create pointer and keyboard
devices and use them in events.
This fixes the seat test on Broadway.
2020-05-16 12:27:22 -04:00
Matthias Clasen
5851415fca
broadway: Don't create overlarge images
...
Respect that cairo won't create image surfaces larger
than 32767 x 32767.
This makes the one reftest pass that specifically checks
this condition, treeview-crash-too-wide.
2020-05-16 11:27:21 -04:00
Matthias Clasen
36b4b39619
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1915
2020-05-16 15:03:10 +00:00
Yuri Chornoivan
d7bf3605b9
Update Ukrainian translation
2020-05-16 14:52:15 +00:00
Matthias Clasen
15211556df
Merge branch 'broadway-surface-destroy' into 'master'
...
Broadway surface destroy
See merge request GNOME/gtk!1914
2020-05-16 14:16:52 +00:00
Matthias Clasen
13f8583934
ci: Don't run opengl renderer tests on Broadway
...
The test setup mechanism in meson is not flexible
enough to let us run different suites depending
on setup, so just pass in explicitly which suites
we want to skip, depending on the backend.
2020-05-16 10:14:10 -04:00
Matthias Clasen
350110ad9d
testsuite: Add a gsk-compare-broadway suite
...
We have a Broadway renderer, might as well spell
that out in the tests, and make the suite exclude the
3d tests it can't handle.
2020-05-16 10:14:10 -04:00
Matthias Clasen
d771aa6fee
testsuite: Destroy surfaces
...
If we don't destroy the surface, it leaks.
GDK backends keep an extra reference on the
surface for the external resources associated
with it, and only drop it in destroy().
2020-05-16 09:12:18 -04:00
Matthias Clasen
4acb56d8c5
broadway: Keep an reference on surfaces
...
GDK backends are expected to keep a references on
their surfaces as long as they are associated with
external resources, and drop it in destroy().
This showed up as criticals in the shortcuts test
which manually creates and destroys surfaces.
2020-05-16 09:12:07 -04:00
Matthias Clasen
afaa9810d1
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Use tabular numbers in the fps overlay
See merge request GNOME/gtk!1912
2020-05-16 11:21:00 +00:00
Piotr Drąg
6aa68fcfee
Update POTFILES.in and POTFILES.skip
2020-05-16 12:37:01 +02:00
Timm Bäder
b2b2070415
Implement diff() for color matrix nodes
...
This way we don't redraw color matrix nodes all the time.
2020-05-16 08:22:55 +02:00
Matthias Clasen
c5b2bbf01b
inspector: Use tabular numbers in the fps overlay
...
It is a lot more readable if it doesn't constantly jitter.
2020-05-15 21:30:14 -04:00
Matthias Clasen
f4d3d8e27c
Merge branch 'better-ci-reports' into 'master'
...
ci: Add the backend to the reports
See merge request GNOME/gtk!1911
2020-05-16 00:52:56 +00:00
Matthias Clasen
4f6fa87f00
Merge branch 'wip/carlosg/tablet-disconnects-master' into 'master'
...
gdk/wayland: Handle disorderly tablet/pad disconnects
See merge request GNOME/gtk!1910
2020-05-15 23:50:54 +00:00
Matthias Clasen
01bd6cfd17
ci: Add the backend to the reports
...
We want the test names in the junit xml to be
unique across all the tests in a job, so we need
to include the backend in the test name.
And we also want to see the used backend in
the html report.
2020-05-15 19:49:18 -04:00
Carlos Garnacho
000487c36c
gdk/wayland: Handle disorderly tablet/pad disconnects
...
If the tablet gets removed/freed while there are pad events in flight,
we leave a dangling pointer from the pad to the tablet, which may
lead to invalid reads/writes when handling the pad event(s).
2020-05-15 23:40:18 +02:00
Matthias Clasen
5870f1c90a
Merge branch 'headless-seatless' into 'master'
...
gtk: Handle seatless displays
See merge request GNOME/gtk!1905
2020-05-15 21:13:01 +00:00
Matthias Clasen
30ef48143f
ci: Ignore Broadway failures
...
These need some more work, so ignore them for now,
to get the initial multi-backend testsuite into
production.
2020-05-15 15:24:04 -04:00
Matthias Clasen
0232218100
displayclose: Quietly skip if no X available
2020-05-15 14:58:58 -04:00
Matthias Clasen
31cf894092
ci: Run tests with different backends
...
Run the testsuite under x11, wayland and broadway
in the fedora-x86_64 job. This requires us to use
the v17 image which includes weston.
2020-05-15 14:11:53 -04:00
Matthias Clasen
509db01319
tests: Centralize our test setup a bit
...
Put all of the constant environment into the
toplevel meson.build file, to reduce repetition
and copy-paste errors.
2020-05-15 14:11:53 -04:00
Matthias Clasen
ff4552c842
testsuite: Add test setups for backends
...
Add test setups that set the GDK_BACKEND and
TEST_OUTPUT_SUBDIR environment variables.
This lets use run
meson test --setup x11 --suite reftest
meson test --setup wayland --suite reftest
and the output will be nicely separated.
We still need to do compositor / display server
setup from the outside.
2020-05-15 14:11:53 -04:00
Matthias Clasen
c22af88235
tests: Allow setting a subdir for output
...
meson seems somewhat weak when it comes to handling
test output. We need to get the output from different
test runs into different locations, and the only
way to communicate from a test setup with the actual
test code seems the environment, so use that.
Make all tests that produce output in files respect
a TEST_OUTPUT_SUBDIR environment variable which specifies
the name of a subdirectory to use. This is combined
with the existing --output argument, which specifies
a per-test location.
Affected tests are reftests, css performance tests
and gsk compare tests.
2020-05-15 14:11:53 -04:00
Matthias Clasen
6719616c36
ci: Fix a typo in the run-docker.sh script
2020-05-15 14:11:53 -04:00
Matthias Clasen
18c7284817
ci: Add weston and weston-libs to the fedora image
...
We want to run tests under Wayland, using weston
as the compositor. The weston-libs package contains
the headless backend for weston.
2020-05-15 14:11:53 -04:00
Matthias Clasen
8912a6eb75
gtk: Handle seatless displays
...
If you run weston with the headless backend, you get a Wayland
display with no seat, which is just fine by the protocol.
gdk_display_get_default_seat() returns NULL in this case. Various
widgets assume that we always have a seat with a keyboard and a
pointer, since that is what X guarantees. Make things survive
without that, so we can run the testsuite under a headless
Wayland compositor.
2020-05-15 14:11:53 -04:00
Matthias Clasen
9b7a73268e
docs: Clarify gdk_display_get_default_seat() docs
...
This function can return %NULL if the display
does not have a seat. Document that.
2020-05-15 14:11:53 -04:00
Timm Bäder
d4d9644409
Merge branch 'wip/tintou/set_css_classes_array' into 'master'
...
widget: Add array annotation to set_css_classes
See merge request GNOME/gtk!1907
2020-05-15 11:19:05 +00:00
Corentin Noël
80473ccd69
widget: Add array annotation to set_css_classes
...
It expects a NULL-terminated array so annotate it.
2020-05-15 12:01:56 +02:00
Jakub Steiner
b51a5446ba
Merge branch 'wip/jimmac/tabs-again-focus' into 'master'
...
Adwaita: notebook tab focus tweak
Closes #2721
See merge request GNOME/gtk!1906
2020-05-15 08:17:58 +00:00
Jakub Steiner
d7e6fbf8a2
Adwaita: notebook tab focus tweak
...
Finally fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
2020-05-15 09:34:57 +02:00
Matthias Clasen
acae90cc6e
Merge branch 'tests-cleanup' into 'master'
...
Tests cleanup
See merge request GNOME/gtk!1904
2020-05-15 01:38:38 +00:00
Matthias Clasen
dcfb4690c3
tests: Drop testdnd3
...
This has been integrated in gtk4-demo as the
DND example.
See #2738
2020-05-14 20:32:53 -04:00
Matthias Clasen
9e8d845a61
tests: Rename testheaderbar2 to testheaderbar
...
There is only one headerbar test now.
2020-05-14 20:15:59 -04:00
Matthias Clasen
1e2b5a9c19
tests: Consolidate all headerbar tests
...
No need to have several binaries for this.
See #2738
2020-05-14 20:15:31 -04:00
Matthias Clasen
4079b782d6
tests: Drop testorientable
...
Not really that interesting, and it only
tests a single case of orientable, a box.
See #2738
2020-05-14 19:48:08 -04:00
Matthias Clasen
dca142d5d2
tests: Drop testemblems
...
We no longer support emblems on icons.
See #2738
2020-05-14 19:44:54 -04:00
Matthias Clasen
52c630d994
tests: Drop testgiconpixbuf
...
More a pixbuf test, and we don't support
emblems anymore.
See #2738
2020-05-14 19:44:08 -04:00
Matthias Clasen
aadd9ae201
tests: Drop testbuttons
...
This does not really add much. We have plenty
of different button styles in our demos and
tests.
See #2738
2020-05-14 19:44:05 -04:00
Matthias Clasen
3df0f95ee3
Merge branch 'wip/exalm/kinetic_scrolling' into 'master'
...
eventcontrollerscroll: Fix the history push condition
See merge request GNOME/gtk!1902
2020-05-14 22:40:54 +00:00
Alexander Mikhaylenko
5dc6194b98
eventcontrollerscroll: Fix the history push condition
...
Once upon a time, there was a function called gdk_event_get_scroll_deltas().
It returned %TRUE when an event had scroll deltas and that was used as the
condition to decide whether to push scroll deltas to the scroll history,
even when the both deltas are 0 for the stop event at the end of scrolling.
When GtkScrolledWindow kinetic scrolling code was adapted for
GtkEventControllerScroll, it was replaced with a (dx != 0 && dy != 0)
check. This prevented the stop event from getting into the history, and
instead allowed non-smooth scrolling to affect the history as they have
synthetic deltas with one of the values being -1 or 1 and the other on 0.
Instead, check the direction as we already have it as a local variable.
2020-05-15 01:32:04 +05:00
Jakub Steiner
c025a569a9
Merge branch 'wip/jimmac/focus-tabs' into 'master'
...
Adwaita: don't focus outline tabs with mouse
Closes #2721
See merge request GNOME/gtk!1901
2020-05-14 17:35:10 +00:00
Jakub Steiner
dd61c248c1
Adwaita: don't focus outline tabs with mouse
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2721
2020-05-14 18:50:47 +02:00
Matthias Clasen
a6c1aef78b
Merge branch 'wip/exalm/headerbar-migration' into 'master'
...
docs: Mention GtkHeaderBar title and subtitle changes in migration guide
See merge request GNOME/gtk!1900
2020-05-14 15:37:16 +00:00
Alexander Mikhaylenko
9f761feb93
docs: Mention GtkHeaderBar title and subtitle changes in migration guide
2020-05-14 19:51:19 +05:00
Matthias Clasen
38f09ac38e
Merge branch 'x11-dnd-fix' into 'master'
...
Fix dnd on X11
See merge request GNOME/gtk!1899
2020-05-14 13:10:54 +00:00
Alexander Larsson
fed071ca96
GdkX11DragSurface: set visible state and invalidate on present
...
Without this we won't actually draw the surface.
2020-05-14 14:33:57 +02:00
Daniel Mustieles
4629f206c5
Updated Spanish translation
2020-05-14 12:04:27 +02:00
Daniel Mustieles
aba6371ea5
Updated Spanish translation
2020-05-14 12:00:33 +02:00
Alexander Larsson
bca4af360d
X11 dnd: Calculate relative coords right in events
...
GdkSurface.x/y is mostly 0, we need to look atht GdkX11Surface->abs_x/y.
2020-05-14 11:46:33 +02:00
Alexander Larsson
32f58e6c0b
gtk-demo/dnd: Fix up drag_cancel
...
This needs to return a boolean, also it should not call end because
that will be called anyway by Gtk+ after cancel, and this was causing
warnings due to the opacity being unset with no dragged widget set.
2020-05-14 10:45:38 +02:00
Alexander Larsson
4ce65f019e
GtkDragSource: Pass return value of drag-cancel into drag_end()
...
This is needed to work as the docs say (don't play fallback cancel animation
if cancel returned TRUE to signal the drop already happened).
2020-05-14 10:44:07 +02:00
Alexander Larsson
707229ce17
gtk-demo/dnd: Use gtk_popover_set_child(), not gtk_box_append
2020-05-14 10:13:05 +02:00
Alexander Larsson
e702d42597
x11 drag: Fix mapped error
...
In the gtk-demo drag-and-drop demo i can't drag anything, all I get
is:
(gtk4-demo:358993): Gdk-CRITICAL **: 09:36:19.617: Surface 0x7e1bb0 has not been mapped in GdkSeatGrabPrepareFunc
This is because GdkX11Drag.ipc_surface is not considered mapped, even
though we called gdk_x11_surface_show() on it, because the
GDK_SURFACE_STATE_WITHDRAWN flag is still set.
I added calls to gdk_synthesize_surface_state() to match what
e.g. show_popup() and gdk_x11_toplevel_present() does.
2020-05-14 09:54:34 +02:00
Matthias Clasen
64db8be7d5
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1897
2020-05-14 05:47:26 +00:00
Matthias Clasen
7eaa10dd8e
gtk-demo: Fix a problem with the dnd demo
...
When I move this into gtk-demo, I broke the hack
that ensures the GtkColorSwatch type is registered.
Bring it back.
2020-05-14 01:16:56 -04:00
Matthias Clasen
102e7d0838
widget-factory: Ensure we have some backgrounds
...
The flowbox demo is otherwise less than useful,
if /usr/share/gnome/backgrounds isn't present.
At the same time, give the scale in the listbox
some function.
2020-05-14 00:28:03 -04:00
Matthias Clasen
9f4e7b1249
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1896
2020-05-14 03:28:08 +00:00
Matthias Clasen
378cca75ea
Add a test for a flowbox crash
2020-05-13 21:47:11 -04:00
Matthias Clasen
69ab403d78
flowbox: Avoid an assertion in snapshot()
...
The api contract for size_allocate() vfuncs is
that they must allocate all the children that are
going to be snapshotted in snapshot(). The flowbox
size_allocate() was just bailing out when the children
request a size of 0x0, leading to an assertion in
snapshot() vfunc later. Just allocate all children
a size of 0x0 in this case.
2020-05-13 21:47:11 -04:00
Matthias Clasen
33011ccdff
flowbox: Avoid a crash in measure()
...
When the children request a height of zero, the
flowbox measure() function was happily dividing
by that zero, leading to badness.
2020-05-13 21:47:11 -04:00
Matthias Clasen
7915e998e2
listbox: Make Shift-Tab work again
...
The previous fix broke the case where we're Shift-Tabbing
from a listboxrow child to the row itself. This was causing
the widget-factory2.tab-backward test to fail. Fix it, by
grabbing the focus to the row explicitly.
2020-05-13 21:45:49 -04:00
Matthias Clasen
7ef51da1c1
listbox: Don't steal focus-on-click
...
If a row has content that is focus-on-click, and is set
to focus-on-click itself, then the row steals the focus
fromt he content, since it uses focus-on-click on button
release, as opposed to button press. Avoid that by
refusing to take focus if it is already on some
descendent of the row.
This was showing up in the widget-factory listbox on
page 2, where clicking on the spinbutton would briefly
put the focus on the spinbutton, only to lose it to
the row.
2020-05-13 19:43:04 -04:00
Matthias Clasen
ce949c0f25
widget-factory: Cosmetic changes
...
Change which rows in the listbox on page 2 are activatable,
and trigger a dialog. It did not really make sense that this
would happen when clicking on the spin button to focus it.
2020-05-13 19:22:31 -04:00
Matthias Clasen
e9d966488b
gtk-demo: Don't overdraw the fishbowl
...
Set overflow to hidden for the fishbowl widget, so the
blur buttons don't leak out into the window shadow.
2020-05-13 19:21:00 -04:00
Matthias Clasen
4c8688b846
inspector: Disable recursive inspection
...
We can't inspect the inspector, it doesn't work.
Therefore, disable the keybindings in the
inspector window.
2020-05-13 18:56:25 -04:00
Matthias Clasen
cea66139ae
flowbox: Make the children focusable again
...
This broke when the :focusable property was introduced.
The symptom was that keynav in the Emoji chooser did
not work anymore.
2020-05-13 18:27:18 -04:00
Matthias Clasen
c1658903b7
Merge branch 'tests-cleanup' into 'master'
...
Tests cleanup
See merge request GNOME/gtk!1894
2020-05-13 22:19:55 +00:00
Matthias Clasen
15e7bf50df
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1895
2020-05-13 21:57:15 +00:00
Matthias Clasen
e87bc3d33d
gtk-demo: Plug a memory leak
...
This leak was there all along. But with the new
gtk_window_destroy(), it shows up as an unclosable
window. Very noticable.
2020-05-13 17:24:57 -04:00
Matthias Clasen
10be40a8b1
scrolledwindow: Fix swapping out child
...
This was not working in the case that the existing child
is not a scrollable. It showed up as crashes of the
scrolling benchmark in gtk4-demo when switching examples.
2020-05-13 17:10:36 -04:00
Matthias Clasen
8e6ec0b8a3
tests: Fix scrolling performance test
...
Maybe this should be added to the benchmarks section
in gtk-demo. For now, fix it to work again.
2020-05-13 17:10:00 -04:00
Matthias Clasen
25577e4fbf
tests: Drop testnoscreen
...
It tests something that no longer works, and that
we probably don't want to guarantee anyway.
See #2738
2020-05-13 16:35:28 -04:00
Matthias Clasen
dc8c37120e
tests: Drop testexpander
...
This was copied into gtk4-demo at some point.
See #2738
2020-05-13 16:23:48 -04:00
Matthias Clasen
a375c41510
tests: Drop testfontchooser
...
This test adds nothing over the font choosers in
our various demos.
See #2738
2020-05-13 16:18:50 -04:00
Matthias Clasen
b8e905eae7
tests: Drop testcolorchooser
...
We have plenty of color choosers in demos.
This test doesn't add anything.
See #2738
2020-05-13 16:15:09 -04:00
Matthias Clasen
d1134e7616
Merge branch 'usable-scales' into 'master'
...
Usable scales
See merge request GNOME/gtk!1893
2020-05-13 20:06:51 +00:00
Matthias Clasen
b0fcf64544
tests: Drop testbox
...
Not useful enough to keep.
See #2738
2020-05-13 16:04:00 -04:00
Matthias Clasen
604f4cf8bf
tests: Drop testcolorchooser2
...
This tests an embedded colorchooser. Just like we have in
widget-factory. And it doesn't work in !srcdir builds, so
it can go.
See: #2738
2020-05-13 15:55:29 -04:00
Matthias Clasen
1420e846b5
tests: Drop testicontheme
...
This is a command line utility for GtkIconTheme
that is probably not as useful as gtk4-icon-browser.
See: #2738
2020-05-13 15:55:21 -04:00
Matthias Clasen
c3aeac19bc
tests: Drop testpixbuf-scale
...
This looks like a GdkPixbuf utility, and we
are moving away from GdkPixbuf anyway.
See: #2738
2020-05-13 15:55:18 -04:00
Matthias Clasen
deef018c68
tests: Drop testtoolbar2
...
This is just a tool bar styling test; we have
the same in the widget factory.
See: #2738
2020-05-13 15:37:21 -04:00
Matthias Clasen
aae0770b82
scale: Make the area around the trough clickable
...
The narrow trough is too hard to hit as a click target.
Make the entire scale clickable.
2020-05-13 15:27:35 -04:00
Matthias Clasen
51ec0f1348
Merge branch 'wip/exalm/ocd' into 'master'
...
demo: Remove double borders from the treeview
See merge request GNOME/gtk!1892
2020-05-13 18:31:39 +00:00
Matthias Clasen
4ed062ec2a
Merge branch 'wip/jimmac/menu-styling-adjustments' into 'master'
...
Wip/jimmac/menu styling adjustments
See merge request GNOME/gtk!1891
2020-05-13 17:18:45 +00:00
Jakub Steiner
69ee1e1b86
Adwaita: use thinner arrows for navigation
...
- go-next go-previous instead of pan-end pan-start
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2675
2020-05-13 17:18:45 +00:00
Alexander Mikhaylenko
3bf6bdae73
demo: Remove double borders from the treeview
2020-05-13 20:57:00 +05:00
sicklylife
d0c54c1286
Update Japanese translation
2020-05-13 15:16:19 +00:00
sicklylife
cbc2493315
Update Japanese translation
2020-05-13 15:12:03 +00:00
Matthias Clasen
fa784aaa06
Cosmetics
2020-05-13 08:11:50 -04:00
Matthias Clasen
ab148c0135
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
Closes #2740 , #2742 , and #2741
See merge request GNOME/gtk!1890
2020-05-13 12:08:29 +00:00
Matthias Clasen
10813ddc23
Merge branch 'gtk-demo-expander-fix' into 'master'
...
gtk-demo: Fix expander demo
See merge request GNOME/gtk!1889
2020-05-13 11:44:11 +00:00
Matthias Clasen
8dfdd682cc
Merge branch 'print-editor-new-crash' into 'master'
...
print-editor: Fix crash
See merge request GNOME/gtk!1888
2020-05-13 11:42:00 +00:00
Timm Bäder
9149c79f25
window: Restructure gtk_window_destroy()
...
The previous code was unreffing the window twice, which caused problems
during dialog destruction. Move to g_list_store_find instead of
iterating manually.
ref() the window before and unref() after. g_list_store_remove will
actually unref() the window, since the toplevel_list owns its own
reference.
Fixes #2741
Fixes #2742
2020-05-13 12:18:09 +02:00
Timm Bäder
a50bf27cf2
main: Inline propagate_{down,up} in propagate_internal()
...
Don't have to worry about anyone calling the up/down variants on their
own this way.
2020-05-13 11:52:22 +02:00
Timm Bäder
ddaf50dfcc
window: Create constraint solver on demand
2020-05-13 11:52:16 +02:00
Timm Bäder
8a7fb4b133
widget: Make 1 if out of 2 ifs
2020-05-13 11:52:07 +02:00
Alexander Larsson
a02c588b19
gtk-demo: InfoBar is not a GtkBox anymore
...
Use gtk_info_bar_add_child to add children
2020-05-13 11:04:49 +02:00
Alexander Larsson
fede7cd81c
gtk-demo: Fix expander demo
...
GtkExpander is not a GtkBox anymore, so use the new gtk_expander_set_child()
API.
2020-05-13 10:50:41 +02:00
Alexander Larsson
fcbc972c2a
print-editor: Fix crash
...
We're trying to g_free a GFile, which is not good...
2020-05-13 10:18:17 +02:00
Timm Bäder
9e0bf35941
paned: Fix up the docs once more
2020-05-13 09:42:51 +02:00
Timm Bäder
f78c167476
cssvalue: Add class check to transition
...
In b25f93e24c we removed the code
comparing the transition functions, but we didn't add any other check
back.
Fixes #2740
2020-05-13 08:07:55 +02:00
Timm Bäder
b9ed957af3
gl renderer: Fix nested rounded clip rendering
...
If the inner clip intersects with the corners of the outer clip, we
potentially need a texture. We should add more fine-grained checks for
this in the future though.
Test case included.
2020-05-13 08:07:55 +02:00
Timm Bäder
949eb8d17a
node-editor: Monitor file and reload on changes
2020-05-13 08:07:55 +02:00
Timm Bäder
167c6119eb
widget: Move adjusted size calculation below early-out goto
2020-05-13 08:07:55 +02:00
Timm Bäder
ef2af521b1
widget: Remove size allocate signal enum member
2020-05-13 08:07:55 +02:00
Timm Bäder
aedc956f6c
renderboder: Ignore transparent outlines
2020-05-13 08:07:55 +02:00
Benjamin Otte
d9c0d98871
inspector: Use the monitor list to list monitors
2020-05-13 07:49:56 +02:00
Benjamin Otte
dd7d76f389
gdk: Add gdk_display_get_monitors()
...
Returns a GListModel of GDK_TYPE_MONITOR.
This will replace the current andling of monitors in GdkDisplay.
2020-05-13 07:00:35 +02:00
Benjamin Otte
bc88f01165
win32: Use a GListStore for the monitors
2020-05-13 06:45:08 +02:00
Benjamin Otte
7ff69e9356
x11: Use a GListStore for the monitors
2020-05-13 05:22:18 +02:00
Benjamin Otte
188e28e196
display: Remove unused vfunc
2020-05-13 04:51:52 +02:00
Benjamin Otte
3536bdd7a6
wayland: Use a GListStore for the monitors
...
Guess where this is going...
2020-05-13 04:51:52 +02:00
Benjamin Otte
c0c8e93d90
display: Remove gdk_display_get_last_seen_time()
...
Replace the only usage - in the X11 backend - with an X11-specific call.
2020-05-13 04:48:22 +02:00
Matthias Clasen
8d9a3de65a
Merge branch 'matthiasc/for-master' into 'master'
...
x11: Avoid a critical in clipboard data transfer
Closes #2736
See merge request GNOME/gtk!1887
2020-05-13 02:10:20 +00:00
Matthias Clasen
c66f2ca9eb
x11: Avoid a critical in clipboard data transfer
...
The handler we are calling here asserts that it gets
an interned string as mime_type. So give it one.
Fixes : #2736
2020-05-12 21:31:19 -04:00
Matthias Clasen
9c13bf70a7
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1885
2020-05-12 21:18:03 +00:00
Matthias Clasen
a4debecfb1
Merge branch 'tests-cleanup' into 'master'
...
Tests cleanup
See merge request GNOME/gtk!1884
2020-05-12 21:17:29 +00:00
Matthias Clasen
b230ea2140
paned: Don't ignore the type attribute
...
We were meaning to only handle <child> here for
compatibility, not <child type="somethingelse">.
2020-05-12 16:27:25 -04:00
Matthias Clasen
a37dc29850
paned: Drop the Private struct
2020-05-12 16:25:58 -04:00
Matthias Clasen
fe6238d1c4
tests: Drop the visuals test
...
This was just a different way to load a ui file
and try it with dark mode. This can be done
with gtk-builder-tool preview and GTK_THEME.
2020-05-12 15:56:46 -04:00
Matthias Clasen
e7bf4a3de8
tests: Move testcairo into gtk4-demo
...
Replace the boring checkboard pattern with this
exciting drawing, and save one test binary at the
same time!
2020-05-12 15:43:43 -04:00
Matthias Clasen
c133db4364
Drop the gtkgears test
...
This has recently been moved to gtk4-demo.
No need to duplicate it.
2020-05-12 15:43:43 -04:00
Matthias Clasen
694daa1d20
Move print-editor to demos
...
It is too demo-esque for languishing in tests/.
2020-05-12 15:43:43 -04:00
Matthias Clasen
f858a269dd
NEWS: Updates
2020-05-12 15:14:09 -04:00
Matthias Clasen
c916221f59
Merge branch 'matthiasc/for-master' into 'master'
...
printoperation-unix: Fix a use-after-free
See merge request GNOME/gtk!1883
2020-05-12 18:54:59 +00:00
Emmanuele Bassi
80539811c0
Merge branch 'docs-fixes' into 'master'
...
Docs fixes
See merge request GNOME/gtk!1882
2020-05-12 18:40:34 +00:00
Matthias Clasen
09ea880a43
printoperation-unix: Fix a use-after-free
...
It turns out that finish_print destroys the
PrintResponseData, so we can't access it afterwards.
2020-05-12 14:09:51 -04:00
Emmanuele Bassi
58774eea72
docs: Add annotations for GtkPaned new getters
...
Which means also adding gtk-doc stanzas.
2020-05-12 18:52:45 +01:00
Emmanuele Bassi
68682dda89
docs: Remove unnecessary SECTION
...
The GdkDragSurface definitions fall under the "dnd" section.
2020-05-12 18:44:21 +01:00
Emmanuele Bassi
6ae01f9815
docs: Remove redundant SECTION
...
We already have a SECTION stanza for gtk-doc.
2020-05-12 18:43:56 +01:00
Carlos Garnacho
3b9a8194a5
Merge branch 'wip/carlosg/broken-grabs' into 'master'
...
Fixes to broken grabs
Closes #2665
See merge request GNOME/gtk!1879
2020-05-12 16:14:47 +00:00
Matthias Clasen
fdc9bfa2e9
Merge branch 'matthiasc/for-master' into 'master'
...
window: Hide windows on destroy
See merge request GNOME/gtk!1881
2020-05-12 15:58:10 +00:00
Carlos Garnacho
9103fd6687
gtkmain: Release the active state on GDK_GRAB_BROKEN
...
This is handled internally here, but misses broken grabs. The active
state should be dropped just as if the button were released.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2665
2020-05-12 17:39:54 +02:00
Matthias Clasen
ffcffcd773
window: Hide windows on destroy
...
I thought I could get away with just unrealizing the
window, but it turns out that gtk_window_hide() is the
place where we remove grabs when a modal dialog goes
away, so we ended up with stuck grabs.
2020-05-12 11:10:36 -04:00
Matthias Clasen
450879b1da
Merge branch 'matthiasc/for-master' into 'master'
...
Documentation work
See merge request GNOME/gtk!1880
2020-05-12 14:52:01 +00:00
Matthias Clasen
c6cdd36586
Merge branch 'ebassi/run-dialog-run' into 'master'
...
Remove gtk_dialog_run() and friends
Closes #371
See merge request GNOME/gtk!1801
2020-05-12 14:29:54 +00:00
Emmanuele Bassi
717d4abebb
Do not release the GFile prematurely
...
Otherwise we won't be able to access it to get the URI for the
GtkPrinterOption.
This fixes a regression introduced in commit 5f070ff233 .
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
e8c4b8338f
docs: Mention blocking functions in the migration guide
...
Link to how to make a dialog modal, and to the response signal.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
d54b7dec94
Remove gtk_dialog_run()
...
Nested main loops are bad, as they introduce layers of complexity caused
by the potential re-entrancy in the case of multiple event sources, like
IPC, threads, etc. Additionally, the programming model they provide—stop
the world while spinning a new loop—does not conform to the event-driven
model employed by GTK.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
0a6848d70b
Remove gtk_dialog_run() from GtkPrintUnixDialog
...
Replace it with an explicit nested main loop, as we need to block the
signal handler currently being emitted depending on the response of the
overwrite confirmation dialog.
This is a bit of a hack, and the only reason we need it is that the
print dialog will load the last used path as the output file name, when
printing to a file; this means that, in theory, it would be possible to
press Print without selecting a file, and accidentally overwriting an
existing file.
It would be much simpler if we did not store the last used path, and
always explicitly asked the user to select a file; this would avoid
destructive actions, and would allow us to rely on the overwrite
confirmation dialog right inside the file chooser.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
b8988be4b5
Remove unnecessary deprecation pragmas
...
The gtk_window_present() function is not deprecated.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
45eec06500
Drop gtk_dialog_run() from GtkPrintOperationUnix
...
We still provide a blocking API, but we should strongly reconsider it.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
2090dbb27d
tests: Remove gtk_dialog_run()
...
Either use the "response" signal for dialogs that are already modal, or
use an explicit nested loop for tests that rely on the response id being
available in sequence.
2020-05-12 13:45:15 +01:00
Emmanuele Bassi
96856527e6
Drop gtk_dialog_run() from GtkFileChooserWidget
...
The various dialogs we use inside the file chooser are modal already,
and do no need a nested loop.
2020-05-12 13:22:09 +01:00
Emmanuele Bassi
f81e6042be
docs: Remove use of gtk_dialog_run()
...
Direct people to use GTK_DIALOG_MODAL and the "response" signal instead
of nested main loops.
2020-05-12 13:18:38 +01:00
Emmanuele Bassi
5d272a12cb
Remove gtk_native_dialog_run()
...
Nested main loops are bad, as they introduce layers of complexity caused
by the potential re-entrancy in the case of multiple event sources, like
IPC, threads, etc. Additionally, the programming model they provide—stop
the world while spinning a new loop—does not conform to the event-driven
model employed by GTK.
2020-05-12 13:15:19 +01:00
Emmanuele Bassi
3212b07cf1
docs: Remove use of gtk_native_dialog_run() from examples
...
Use the "response" signal instead.
2020-05-12 13:15:19 +01:00
Emmanuele Bassi
f573a1f3f2
Remove gtk_dialog_run() from GtkMountOperation
2020-05-12 13:15:16 +01:00
Carlos Garnacho
fbd0c8dc34
gtkmain: Propagate GDK_GRAB_BROKEN events to/from current focus
...
Let keyboard/pointer paths handle their own events, and find the
current focus. The event will be propagated through instead of
being just emitted on the toplevel.
This makes it handled throughout all the gestures that want to
know about it.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
e33af5895f
gdk/wayland: Drop explicit ungrab after surface move/resize
...
We now break grabs properly if receiving a .leave event with
active buttons. This is not necessary anymore.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
f7d2985f89
gdk/wayland: Ensure .leave events with active buttons breaks grabs
...
Instead of silently ending up the grab, make it sure that we emit
a GDK_GRAB_BROKEN event if needed.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
2bd8124b5d
gdk/wayland: Keep track of implicit grabs
...
Tracking of those broke sometime along the gdk cleanups, so we
started missing some GDK_GRAB_BROKEN events from being emitted
(eg. after a button press/implicit grab triggers an active grab).
Implicit grabs are only added if there's no prior grab (either
implicit through other button presses, or explicit), in order to
keep accounting correct, make those prevail.
2020-05-12 14:14:39 +02:00
Carlos Garnacho
5e765eaac4
gtktexthandle: Set css name on GtkWidgetClass
...
Handles are their own widget, special names are not necessary
anymore.
2020-05-12 14:14:39 +02:00
Emmanuele Bassi
4d09bf3b9b
demos: Remove gtk_dialog_run()
...
Use modal dialogs and the "response" signal.
2020-05-12 13:12:08 +01:00
Matthias Clasen
6df8bf7dde
docs: Updates to the migration guide
...
Remove some duplicated content, reorder things
to make more sense, and tweak the wording.
2020-05-12 07:50:17 -04:00
Matthias Clasen
d8db984890
docs: Tweaks
...
Replace some occurrences of GTK+ by GTK.
2020-05-12 07:50:12 -04:00
Matthias Clasen
072adbf079
docs: Updates to the common questions
...
Refresh the answers to some common questions.
2020-05-12 01:03:34 -04:00
Matthias Clasen
1ef6a35f3e
docs: Don't point at mailing lists
...
Replace references to the mailing lists by
discourse + irc.
2020-05-12 01:02:49 -04:00
Matthias Clasen
91f0fcde96
docs: Rearrange the introduction some more
...
Fine-tune some wording, and move the Custom Drawing
example earlier.
2020-05-12 01:02:07 -04:00
Matthias Clasen
82823dac97
Merge branch 'kill-containers' into 'master'
...
Kill containers
See merge request GNOME/gtk!1866
2020-05-12 03:14:26 +00:00
Matthias Clasen
848a8a792e
docs: Update migration guide
...
Add sections about GtkBin, GtkContainer and gtk_widget_destroy().
2020-05-11 22:38:21 -04:00
Matthias Clasen
7ef173aa34
dialog: Firm up handling of action widgets
...
It is unreliable to use the widget dom api to locate
action widgets. For example in a headerbar, they might
be deeper in the hierarchy, with boxes in between.
Therefore, make GtkDialog keep a list of action widgets,
and use that when operating on action widgets.
2020-05-11 22:38:21 -04:00
Matthias Clasen
f72d672434
dialog: Remove an unused struct
2020-05-11 22:38:21 -04:00
Matthias Clasen
5ebd42d402
Drop GtkContainer and its accessible implementation
...
It is no longer used.
2020-05-11 22:38:21 -04:00
Matthias Clasen
e706d4860e
testsuite: Drop a container api use
2020-05-11 22:38:21 -04:00
Matthias Clasen
5573a3465c
Drop gtkcontainer.h includes
...
These includes are unused.
2020-05-11 22:38:21 -04:00
Matthias Clasen
5f642f8096
box: Derive from GtkWidget
2020-05-11 22:38:21 -04:00
Matthias Clasen
6bc4446e3e
assistant: Remove code that doesn't work anymore
...
When GtkContainer goes away, we don't have
an "add" signal anymore.
2020-05-11 22:38:21 -04:00
Matthias Clasen
6c78eeebe4
dialog: Remove code that doesn't work anymore
...
When GtkContainer goes away, we don't have an
"add" signal anymore.
2020-05-11 22:38:21 -04:00
Matthias Clasen
58a88a88b8
shortcutssection: Drop container bits
...
When GtkBox stops being a container, GtkShortcutsSection
will also no longer be a container. So, stop overriding
container vfuncs, and instead add a buildable implementation
that does the right thing.
2020-05-11 22:38:21 -04:00
Matthias Clasen
537d21155f
shortcutsgroup: Drop container bits
...
When GtkBox stops being a container, GtkShortcutsGroup
will also no longer be a container. So, stop overriding
container vfuncs, and instead add a buildable implementation
that does the right thing.
2020-05-11 22:38:21 -04:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
665edcba53
box: Add gtk_box_append/prepend/remove
...
Add replacement api for gtk_container_add/remove.
2020-05-11 22:38:21 -04:00
Matthias Clasen
a0437628e3
notebook: Derive from GtkWidget
2020-05-11 22:38:21 -04:00
Matthias Clasen
0daa1f3daa
Stop using container api on GtkNotebook
2020-05-11 22:38:21 -04:00
Matthias Clasen
c7b7d78ae1
headerbar: Derive from GtkWidget
2020-05-11 22:38:21 -04:00
Matthias Clasen
abfa4d4a5c
Stop using container api on GtkHeaderBar
2020-05-11 22:21:39 -04:00
Matthias Clasen
d59d9d4bd5
headerbar: Add gtk_header_bar_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
3d100abea8
listbox: Derive from GtkWidget
2020-05-11 22:21:39 -04:00
Matthias Clasen
6f170a0cf7
testsuite: Fix listbox tests
...
When moving from gtk_container_forall to the widget dom
api, we are now iterating over all children of the listbox,
including headers, separators, etc. So, skip everything
that is not a listboxrow, to make the tests work again.
2020-05-11 22:21:39 -04:00
Matthias Clasen
c55aa7e590
testsuite: Redo listbox sort test
...
This test was relying on gtk_container_forall returning
the visual (ie sorted) order of children, while iterating
with the widget dom api gives the insertion order.
Instead of using gtk_container_forall, use
gtk_list_box_row_get_index to reconstruct the visual
order.
2020-05-11 22:21:39 -04:00
Matthias Clasen
88141103cd
Don't use container api on GtkListBox
2020-05-11 22:21:39 -04:00
Matthias Clasen
ff91ce9eb4
listbox: Add gtk_list_box_remove
...
This is a gtk_container_remove replacement.
2020-05-11 22:21:39 -04:00
Matthias Clasen
7af15ae277
buildable: Cosmetics
...
Don't refer to GtkContainer in the docs.
2020-05-11 22:21:39 -04:00
Matthias Clasen
001d62381a
customlayout: Cosmetics
...
Don't refer to GtkContainer in the docs.
2020-05-11 22:21:39 -04:00
Matthias Clasen
47139bc506
textviewchild: Derive from GtkWidget
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bf543e0367
text: Fix popover use
...
There were some leftover gtk_container_add calls here
on popovers on buttons, but these are no longer containers.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5c34b30819
textview: Fix popover use
...
There were some leftover gtk_container_add calls here
on popovers on buttons, but these are no longer containers.
2020-05-11 22:21:39 -04:00
Matthias Clasen
ddcc9db568
flowbox: Derive from GtkWidget
2020-05-11 22:21:39 -04:00
Matthias Clasen
3bff7d3a37
Stop using container api on GtkFlowBox
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
2f7f6e6a37
flowbox: Add gtk_flow_box_remove
...
This is the replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5907ecebfc
stack: Derive from GtkWidget
2020-05-11 22:21:39 -04:00
Matthias Clasen
a7769c9c88
treepopover: Stop using container api
2020-05-11 22:21:39 -04:00
Matthias Clasen
b490800949
shortcutswindow: Stop using container api
2020-05-11 22:21:39 -04:00
Matthias Clasen
ee5587d516
shortcutssection: Stop using container api
2020-05-11 22:21:39 -04:00
Matthias Clasen
01c3e2ce0d
Don't use container api on GtkStack
2020-05-11 22:21:39 -04:00
Matthias Clasen
5e0c1e6a86
stack: Add gtk_stack_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
741a9cb320
fixed: Derive from GtkWidget
2020-05-11 22:21:39 -04:00
Matthias Clasen
0d57abfe65
Stop using container api on GtkFixed
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
96d707444d
fixed: Add gtk_fixed_remove
...
This is the replacement for gtk_container_reomve.
2020-05-11 22:21:39 -04:00
Matthias Clasen
3852661865
grid: Derive from GtkWidget
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
c0657297d1
grid: Remove a test for grid container functionality
...
This test was specifically testing how gtk_container_add
behaves on grids. Well, it doesn't anymore.
2020-05-11 22:21:39 -04:00
Matthias Clasen
932aa58237
Avoid container api on grids
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5cda824784
grid: Add gtk_grid_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
1a33278703
infobar: Derive from GtkWidget
...
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bd843acde9
Use gtk_info_bar_add_child throughout
2020-05-11 22:21:39 -04:00
Matthias Clasen
12ca08c382
infobar: Add gtk_info_bar_add/remove_child
...
This is a replacement for container api that is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
78d20b9301
infobar: Add gtk_info_bar_remove_action_widget
...
This is mainly for completeness, since gtk_container_remove
will not work for those anymore.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bc6643f3c2
paned: Redo the api
...
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.
Update all users.
See #2719
2020-05-11 22:21:33 -04:00
Matthias Clasen
fc9873e9ef
paned: Drop some dead code
2020-05-11 22:21:14 -04:00
Matthias Clasen
253a39c6e9
iconview: Derive from GtkWidget
...
GtkIconView is not a container.
2020-05-11 22:21:14 -04:00
Matthias Clasen
825e98dcca
expander: 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 #2719
2020-05-11 22:21:14 -04:00
Matthias Clasen
1afc749443
Use gtk_expander_set_child throughout
...
Replace all uses of gtk_container_add on expanders
with gtk_expander_set_child.
2020-05-11 22:21:14 -04:00
Matthias Clasen
6b80d90db5
expander: Add a child property
2020-05-11 22:21:14 -04:00
Matthias Clasen
e2b23e8fde
actionbar: Derive from GtkWidget
...
GtkContainer is going away.
2020-05-11 22:21:09 -04:00
Matthias Clasen
c0f090627a
actionbar: Add gtk_action_bar_remove
...
This is a replacement for gtk_container_remove.
2020-05-11 20:33:23 -04:00
Matthias Clasen
3697c57e56
treeview: Derive from GtkWidget
...
Drop the GtkContainer vfuncs.
2020-05-11 20:33:23 -04:00
Matthias Clasen
52b1a347d8
treeview: Stop using container api
2020-05-11 20:33:23 -04:00
Matthias Clasen
aeef59fda9
textview: Derive from GtkWidget
...
Drop the GtkContainer vfuncs. As a replacement for
gtk_container_remove, make gtk_text_view_remove public.
2020-05-11 20:33:23 -04:00
Matthias Clasen
84632b0901
dragicon: drop gtkcontainer.h include
...
We don't need it anymore here.
2020-05-11 20:33:23 -04:00
Matthias Clasen
e516616cca
textviewchild: Don't leak children
...
Like everybody else, GtkTextViewChild must
unparent its children in dispose.
2020-05-11 20:33:23 -04:00
Matthias Clasen
d62ad4e6df
Fix a leftover window
...
We were still using container api on a window here.
2020-05-11 15:42:52 -04:00
Matthias Clasen
a7abb394e8
Fix a leftover list box child
...
We were still using container api on a list box child here.
2020-05-11 15:42:52 -04:00
Matthias Clasen
501eda2956
window: Fix accessible implementation
...
Now that GtkWindow is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
7fac7c2d28
statusbar: Fix accessible implementation
...
Now that GtkStatusBar is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
295c5594ce
scrolledwindow: Fix accessible implementation
...
Now that GtkScrolledWindow is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
a65f70ac23
popover: Fix accessible implementation
...
Now that GtkPopover is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
2e615d8c20
frame: Fix accessible implementation
...
Now that GtkFrame is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
ce5b51b017
flowboxchild: Fix accessible implementation
...
Now that GtkFlowBoxChild is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
cca73c436d
combobox: Fix accessible implementation
...
Now that GtkComboBox is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
840a5e35f4
listboxrow: Fix the accessible implementation
...
GtkListBoxRow is no longer a container, update
the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
af19c7275b
button: Fix accessible implementation
...
Now that GtkButton is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
d7b1ecdf52
Cosmetics: Replace GtkContainer in an error message
...
GtkWidget is not that much better here, unfortunately.
Adapt the testsuite to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
ba0579c670
Merge branch 'matthiasc/for-master' into 'master'
...
print-editor: Bring back the menubar
See merge request GNOME/gtk!1875
2020-05-11 19:08:53 +00:00
Matthias Clasen
757c9675b0
Merge branch 'wip/exalm/2242-test' into 'master'
...
tests: Add a headerbar-in-window test case
See merge request GNOME/gtk!1878
2020-05-11 18:51:20 +00:00
Matthias Clasen
cc28a7b0ef
Merge branch 'wip/tintou/doc-fixes' into 'master'
...
docs: Fix several missing references in the documentation
See merge request GNOME/gtk!1874
2020-05-11 18:40:34 +00:00
Matthias Clasen
58fd969b2d
printeroptionwidget: Avoid a critical
...
The new_location can be NULL, as we clearly
knew earlier in the function. We've forgotten
about that by the time we unref it :(
2020-05-11 14:26:31 -04:00
Matthias Clasen
495b9caf63
headerbar: Don't clean up other widget children
...
The parent of the title_widget is the center box,
it needs to call gtk_widget_unparent on it.
2020-05-11 14:25:57 -04:00
Emmanuele Bassi
aece8bab17
Merge branch 'cherry-pick-6d8fb83a' into 'master'
...
aboutdialog: Update precondition checks for new licenses added in 3.24.20
Closes #2734
See merge request GNOME/gtk!1877
2020-05-11 18:25:39 +00:00
Matthias Clasen
ea53b445a8
filechooserdialog: Be more careful with widgets
...
We were stepping on our own toes, by first setting
up a save entry and telling the filechooserwidget
about it, and then nuking it by setting a title
on the headerbar. The filechooserwidget wasn't
ready for the entry to die without anybody telling
it.
This fixes a crash when using the filechooser for
print-to-file in the print dialog.
2020-05-11 14:23:58 -04:00
Alexander Mikhaylenko
70d14f60b2
tests: Add a headerbar-in-window test case
...
See https://gitlab.gnome.org/GNOME/gtk/-/issues/2242
2020-05-11 22:37:58 +05:00
Simon McVittie
6451250b2e
aboutdialog: Update precondition checks for new licenses added in 3.24.20
...
To avoid making this mistake again, add a static assertion that the
enum is in sync with gtk_license_info, and use the length of
gtk_license_info for the precondition check.
Signed-off-by: Simon McVittie <smcv@debian.org >
Resolves : #2734
2020-05-11 18:37:22 +01:00
Corentin Noël
076b2f11d2
docs: Fix several missing references in the documentation
...
This fixes several typos and missing references
2020-05-11 19:26:20 +02:00
Matthias Clasen
7ae1d9d796
Merge branch 'window-destroy' into 'master'
...
Drop gtk_widget_destroy
See merge request GNOME/gtk!1864
2020-05-11 17:15:59 +00:00
Matthias Clasen
c8a96d08a0
print-editor: Bring back the menubar
...
This was the one place where we relied on
the menubar fallback in GtkApplicationWindow.
So turn it on explicitly.
2020-05-11 12:55:15 -04:00
Matthias Clasen
6d969d1026
Update the docs
...
Remove various references to gtk_widget_destroy in the docs.
2020-05-11 12:20:59 -04:00
Matthias Clasen
177c0eb9e2
Unset tooltip window earlier
...
This avoids a crash when the tooltip window tries
to update its action muxers.
2020-05-11 12:20:59 -04:00
Matthias Clasen
1306727fb1
window: Remove _set_has_user_ref_count
2020-05-11 12:20:59 -04:00
Timm Bäder
e5d6b493c0
testsuite: add widget refcount test case
...
Testing toplevels and popovers.
2020-05-11 12:20:59 -04:00
Matthias Clasen
0f10b170f4
widget: Drop gtk_widget_destroy
2020-05-11 12:20:59 -04:00
Matthias Clasen
6aebedb8bc
window: Implement gtk_window_destroy
...
Don't call gtk_widget_destroy; instead implement
gtk_window_destroy outselves by removing the window
from the toplevel lista and dropping the reference that
GTK holds.
2020-05-11 12:20:59 -04:00
Matthias Clasen
025375ff5f
Replace gtk_widget_destroy everywhere
...
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
2020-05-11 12:20:59 -04:00
Matthias Clasen
cd0081d08a
Use gtk_window_destroy
...
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Matthias Clasen
48821a64d0
window: Add gtk_window_destroy
...
This is a replacement for gtk_widget_destroy for toplevels.
For now, it is just a wrapper.
2020-05-11 12:19:39 -04:00
Matthias Clasen
81340da8b6
nativedialog: Do not ref the transient_for parent
...
gtk_window_set_transient_for does not ref its parent either. This is
important because a child widget of the parent might be the one calling
this function.
This was showing up as widget-factory not existing on close after
opening the file chooser.
2020-05-11 12:19:39 -04:00
Matthias Clasen
466d2a84de
testsuite: Clean up unexpected children
...
If you call gtk_widget_set_parent on an unsuspecting
parent widget, it is your reponsibility to clean up
before the parent gets finalized.
2020-05-11 12:19:39 -04:00
Matthias Clasen
ddebf07236
popover: Fix a reference leak
...
Don't leak the reference to the default widget.
2020-05-11 12:19:39 -04:00
Matthias Clasen
0ba1aad4e3
filechooserdialog: Fix disposing
...
We need to drop our widgetry in dispose to prevent
leakage.
2020-05-11 12:19:39 -04:00
Matthias Clasen
4b144855b9
colorchooserdialog: Fix disposing
...
We need to drop our widgetry in dispose to prevent
leakage.
2020-05-11 12:19:39 -04:00
Matthias Clasen
b6bfeb786f
fontchooserdialog: Fix disposing
...
We need to drop our widgetry in dispose to prevent
leakage.
2020-05-11 12:19:39 -04:00
Matthias Clasen
573b20a8f8
Drop gtk_widget_destroyed
...
Use g_object_add_weak_pointer or a weak reference instead.
2020-05-11 12:19:39 -04:00
Matthias Clasen
8f9c3ed44a
Stop using gtk_widget_destroyed
...
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
2020-05-11 12:19:37 -04:00
Matthias Clasen
9ce7b16dd8
Merge branch 'wip/exalm/test' into 'master'
...
Fix (most of the) tests
See merge request GNOME/gtk!1873
2020-05-11 15:52:24 +00:00
Matthias Clasen
597665517c
Merge branch 'teardown-cleanup-2' into 'master'
...
Treeview teardown cleanup
See merge request GNOME/gtk!1872
2020-05-11 15:23:40 +00:00
Alexander Mikhaylenko
228b3fc622
tests: Stop explicitly showing widgets
2020-05-11 20:15:57 +05:00
Alexander Mikhaylenko
ea9cea9be7
tests: Remove redundant image from testdialog
2020-05-11 20:04:23 +05:00
Alexander Mikhaylenko
56f56e6352
tests: Connect signal properly for testvolumebutton
2020-05-11 19:54:32 +05:00
Alexander Mikhaylenko
2323e8d77d
tests: Remove orientation from testvolumebutton
...
GtkVolumeButton isn't orientable anymore.
2020-05-11 19:53:31 +05:00
Alexander Mikhaylenko
531468cab6
test: Stop using stock-size for teestverticalcells
2020-05-11 19:51:18 +05:00
Alexander Mikhaylenko
58fcd09cff
tests: Fix testtreeelistmodel
...
Stop using GtkContainer API for GtkListBoxRow and GtkToggleButton.
2020-05-11 19:47:58 +05:00
Alexander Mikhaylenko
2940b17a8e
tests: Fix teststackedheader
...
Connect to signals programmatically.
2020-05-11 19:33:05 +05:00
Matthias Clasen
b8c5bf8af8
testsuite: Enable the remaining template tests
...
These are no longer failing.
2020-05-11 10:30:03 -04:00
Matthias Clasen
d061bcad52
treeview: Break reference cycles on unroot
...
It is a bad idea to have such cycles in the first place,
and there is no need to let them linger past unroot.
This stop the treeview depending on run_dispose to get
freed, a simple unparent will work now.
2020-05-11 10:30:03 -04:00
Alexander Mikhaylenko
1d2af907fc
tests: Fix teststack "add icon" button
2020-05-11 19:27:41 +05:00
Matthias Clasen
329994291a
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!1867
2020-05-11 14:24:45 +00:00
Alexander Mikhaylenko
b2da99fd4e
tests: Fix testselectionmode
...
Stop using <packing/> and GtkContainer API for random widgets.
2020-05-11 19:21:03 +05:00
Yuri Chornoivan
2d97357136
Update Ukrainian translation
2020-05-11 14:20:13 +00:00
Alexander Mikhaylenko
4361a884bf
tests: Fix testoverlay
...
Stop using child properties and margin property.
2020-05-11 19:13:04 +05:00
Alexander Mikhaylenko
14dc92c747
tests: Simplify testorientable
...
Since GtkButtonBox is gone, remove the separator and change grid to box.
2020-05-11 19:08:56 +05:00
Alexander Mikhaylenko
c9760ed456
tests: Remove testmodelbutton
...
GtkModelButton is private now, so it can't work anymore.
2020-05-11 19:03:53 +05:00
Alexander Mikhaylenko
7c148bebef
tests: Remove use-popover from testmenubutton
...
The corresponding property doesn't exist anymore.
2020-05-11 18:55:15 +05:00
Alexander Mikhaylenko
7aeb504652
tests: Fix testlogout
...
Stop using GtkApplication::quit signal.
2020-05-11 18:54:53 +05:00
Alexander Mikhaylenko
e0d36d1f2d
tests: Fix testiconview
...
Stop using GtkContainer API for GtkPopover.
2020-05-11 18:54:23 +05:00
Alexander Mikhaylenko
68fb643a7e
tests: Fix testheightforwidth layout
...
Stop using child properties and setting visible=true everywhere.
2020-05-11 18:39:32 +05:00
Alexander Mikhaylenko
fb0dcaf066
tests: Expand content for testheaderbar
2020-05-11 18:31:59 +05:00
Alexander Mikhaylenko
4277eeee1b
tests: Fix testgtk
...
An assorted collection of fixes.
2020-05-11 18:12:18 +05:00
Matthias Clasen
9f3fb69dce
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
Closes #2729 and #2730
See merge request GNOME/gtk!1870
2020-05-11 12:51:08 +00:00
Matthias Clasen
0e18e52f00
menubutton: Cosmetics
...
Fix a few typos in the docs.
2020-05-11 08:15:56 -04:00
Matthias Clasen
d2430c70bd
Refresh the tutorial examples
...
Redo this series of examples from 2013, and adapt it to modern
way of doing things. The biggest differences are that we use
a headerbar right from the start, and don't mention the app
menu.
Fixes : #2730
2020-05-11 08:15:56 -04:00
Matthias Clasen
4de4957aa3
applicationswindow: Make show-menubar FALSE by default
...
The fallback to the menubar is not a good sight,
we should not do that by default.
2020-05-11 08:15:56 -04:00
Matthias Clasen
0fc1a290e2
docs: Cosmetic updates to the tutorial
...
Since the meson conversion, we are no longer expanding
gtk-doc references in this file, so take them out. And
touch up the wording in various places.
2020-05-11 08:15:55 -04:00
Matthias Clasen
1b8a025a5f
Clean up a leak in a test
...
One of the treeview tests was calling gtk_widget_destroy
on a child instead of the toplevel, which leaks the toplevel
unnecessarily. Plus, we're moving towards allowing destroy
only on toplevels.
2020-05-11 08:15:55 -04:00
Matthias Clasen
d798527290
treeviewcolumn: Another case of box <> frame confusion
...
Don't call your boxes frames, folks!
2020-05-11 08:15:55 -04:00
Matthias Clasen
6140dafecf
builderscope: Fix finalize <> dispose confusion
...
Don't chain up to dispose if you implement finalize.
This fix s courtesy of GOBJECT_DEBUG=objects.
2020-05-11 08:15:55 -04:00
Matthias Clasen
3a5cf61a4d
print dialog: Fix frame <> box confusion
...
It is a bad idea to have a GtkBox called frame, event
if it started out its existence as a GtkFrame.
2020-05-11 08:15:55 -04:00
Matthias Clasen
a11119d317
treeview: Ensure search popover is properly inserted
...
The css tree and the widget tree are not in sync, so we need
to explicitly set the parent of the css node before inserting
the widget, or else we end up with critical warnings and a
non-working popover.
This can be seen in the print dialog, when moving the focus
to the printer list.
2020-05-11 08:15:55 -04:00
Matthias Clasen
756720fde4
print-editor: Cosmetics
...
Make the about dialog a bit less barren.
2020-05-11 08:15:55 -04:00
Matthias Clasen
2b920b22c1
print-editor: Fix a critical
...
GtkWindow is no longer a container, so don't call
gtk_container_add on it.
2020-05-11 08:15:55 -04:00
Matthias Clasen
bb8fa045c2
Merge branch 'focusable-property' into 'master'
...
Focusable property
See merge request GNOME/gtk!1834
2020-05-11 11:23:15 +00:00
Emmanuele Bassi
4cc21f1fa1
Merge branch 'aperezdc/vk-result-range-size' into 'master'
...
Fix build issue due to missing VK_RESULT_RANGE_SIZE
See merge request GNOME/gtk!1871
2020-05-11 10:02:53 +00:00
Adrian Perez de Castro
5c4ca1424d
Fix build issue due to missing VK_RESULT_RANGE_SIZE
...
Conditionally check whether the Vulkan headers version defines
VK_RESULT_RANGE_SIZE, and avoid using it for version >=140. The
following comming in Vulkan-Headers has removed the enum value:
0c5351f5e9 (diff-4febd94c0666d59030d8b1dd20c72403)
2020-05-11 10:07:41 +03:00
Matthias Clasen
6372a33838
Clarify docs around focus.
2020-05-11 00:29:41 -04:00
Matthias Clasen
b93631164f
Remove lots of focus vfuncs
...
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
2020-05-11 00:11:37 -04:00
Matthias Clasen
46bad5d513
widget: Fix gtk_widget_focus_all for !focusable
...
This was a case that wasn't handle properly when
the focus is entering from the outside, in forward
direction.
2020-05-11 00:11:04 -04:00
Matthias Clasen
edc31a264c
widget: Add a :focusable property
...
Add back a property that determines whether an individual
widget will accept focus or not. :can-focus prevents the
focus from ever entering the entire widget hierarchy
below a widget, and :focusable just determines if grabbing
the focus to the widget itself will succeed.
See #2686
2020-05-10 23:24:48 -04:00
Alexander Mikhaylenko
99704248b7
tests: Fix testgmenu
...
GtkMenuButton isn't a GtkButton anymore.
2020-05-11 04:58:36 +05:00
Alexander Mikhaylenko
7a09143519
tests: Add missing margin for testglarea
2020-05-11 04:57:01 +05:00
Alexander Mikhaylenko
25295d1e17
tests: Fix testgiconpixbuf test
...
Don't use GtkContainer API on GtkWindow.
2020-05-11 04:55:22 +05:00
Alexander Mikhaylenko
6920fc3625
tests: Fix testfontchooser layout
...
Remove an extra box so that we don't need to expand the chooser.
2020-05-11 04:52:04 +05:00
Alexander Mikhaylenko
b2f2b3f169
tests: Fix testfilechooser test
...
Don't use GtkContainer API on GtkWindow.
2020-05-11 04:47:26 +05:00
Alexander Mikhaylenko
466e8a70e5
tests: Add missing margin for testentrycompletion
2020-05-11 03:47:39 +05:00
Alexander Mikhaylenko
f2542e95f9
tests: Fix testdnd popup
...
Don't use GtkContainer API for GtkWindow.
2020-05-11 03:38:10 +05:00
Alexander Mikhaylenko
02b27775d8
tests: Fix testdialogtest
...
Fix deprecations in UI files, add a missing expand.
2020-05-11 03:36:51 +05:00
Alexander Mikhaylenko
9af4a420a3
tests: Update testcombochange test
...
GtkComboBox doesn't have list mode anymore, remove that.
2020-05-11 03:23:12 +05:00
Alexander Mikhaylenko
9efdf3c65c
tests: Fix testcombo
...
Don't use GtkContainer API on GtkFrame.
2020-05-11 03:22:34 +05:00
Alexander Mikhaylenko
e162b3ee19
tests: Fix testcalendar layout
...
Add a missing expand.
2020-05-11 03:22:15 +05:00
Alexander Mikhaylenko
1fd75d0fa2
tests: Add missing margin to simple test
2020-05-11 02:49:09 +05:00
Alexander Mikhaylenko
de5939f319
tests: Fix testadjustsize test
...
Don't assume GtkWindow is a container, also add missing expand and margin.
2020-05-11 02:47:40 +05:00
Alexander Mikhaylenko
31e3c1e362
tests: Fix testappchooser test
...
Don't assume GtkWindow is a container.
2020-05-11 02:47:40 +05:00
Alexander Mikhaylenko
1c03745ee4
tests: Fix testaccel layout
...
hexpand doesn't matter there, set vexpand instead.
2020-05-11 02:47:40 +05:00
Alexander Mikhaylenko
778d3884e2
tests: Fix testaccel indentation
2020-05-11 02:47:32 +05:00
Alexander Mikhaylenko
0f57e6c3c0
tests: Fix syncscroll
...
Set expand for the scrolled windows.
2020-05-11 02:26:42 +05:00
Alexander Mikhaylenko
edfaa5fc36
tests: Fix overlayscroll
...
Set expand for the scrolled window.
2020-05-11 02:18:06 +05:00
Alexander Mikhaylenko
b7bfb29ae8
tests: Fix print-editor
...
Don't assume GtkWindow is a container.
2020-05-11 02:17:42 +05:00
Matthias Clasen
caab6ac6e7
testsuite: Add more tests for automated components
...
Add template tests that show the complex dialogs before
destroying them. This reveals that we are leaking in
several of them. These leaks don't show up if the
dialogs are destroyed right away, as the existing
tests do.
Disable the two failing tests for now:
/template/GtkFileChooserDialog/show
/template/GtkPrintUnixDialog/show
2020-05-10 16:25:28 -04:00
Matthias Clasen
9d4b01fff8
testsuite: Use lowercase component in test paths
...
This is purely cosmetic.
2020-05-10 16:25:28 -04:00
Matthias Clasen
10921aa237
textview: Ensure popup menu is properly inserted
...
In the presence of attached children, the css tree and the
widget tree are not in sync, so we need to explicitly set
the parent of the css node before inserting the widget, or
else we end up with critical warnings and a non-working
menu.
This can be seen in testtextview.
2020-05-10 16:25:28 -04:00
Matthias Clasen
3f548327b5
textview: Give attached children a different css name
...
If we use "text" for the children that are attached to the
text view, they end up rendering the same background as the
main text content, causing that content to be covered up.
Fixes : #2729
2020-05-10 16:25:28 -04:00
Aurimas Černius
f6a4e68973
Updated Lithuanian translation
2020-05-10 22:34:16 +03:00
Matthias Clasen
eae4a194b8
Merge branch 'wip/exalm/headerbar-dragging' into 'master'
...
Extract GtkWindow dragging and titlebar actions
Closes #2689
See merge request GNOME/gtk!1814
2020-05-10 18:15:57 +00:00
Yuri Chornoivan
f693da148e
Update Ukrainian translation
2020-05-10 16:03:34 +00:00
Piotr Drąg
386b36a625
Update POTFILES.in
2020-05-10 14:34:33 +02:00
Timm Bäder
52ae384bfd
gl shaders: unify frag coord handling
2020-05-10 09:30:15 +02:00
Timm Bäder
b98ad549c2
gl renderer: Only destroy shader programs with ids > 0
...
We may return -1 as an error return value.
2020-05-10 09:30:15 +02:00
Timm Bäder
d015b1b29e
scrolledwindow: Always keep the main child first
...
Otherwise we can't pick the scrollbars, which are allocated behind it.
2020-05-10 09:30:15 +02:00
Timm Bäder
343d294bfb
stylecontext: Remove _save_named
...
Now unused.
2020-05-10 09:30:15 +02:00
Timm Bäder
6566fdc1e3
scrolledwindwo: Add a permanent junction node
...
Use that instead of save_named'ing a junction node.
2020-05-10 09:30:15 +02:00
Timm Bäder
bcdd6d5425
printunixdialog: Use two "paper" css nodes
...
Instead of save_named'ing to a temporary "paper" node.
2020-05-10 09:30:15 +02:00
Timm Bäder
cbbbf44dd4
cellrenderertoggle: Replace save_named with a css node
2020-05-10 09:30:13 +02:00
Timm Bäder
2455978c78
widget: Move {dis,}connect_frame_clock into their only caller
...
Makes sense to have these only in (un)realize.
2020-05-10 08:44:20 +02:00
Timm Bäder
343707e0a2
stylecontext: Remove some unused private API
2020-05-10 08:44:20 +02:00
Timm Bäder
1b10020b6e
css: Make GtkStyleAnimation and subclasses non-objects
...
Making them GObjects is unnecessary. This enables further optimizations
down the road. The only place we use them in is gtkcssanimatedstyle.c
after all.
2020-05-10 08:44:20 +02:00
Timm Bäder
57444f77f7
testtreeview: Properly annotate a switch fallthrough
2020-05-10 08:44:20 +02:00
Timm Bäder
06460ea50c
css: Drop a few dynamic type checks
...
We hit these code paths a lot
2020-05-10 08:44:20 +02:00
Timm Bäder
e12c9de5df
csstransiton: Save finished state
...
Once a transtion is finished it can't change to unfinished again, so we
don't have to consult the progress tracker all the time.
2020-05-10 08:44:20 +02:00
Timm Bäder
f38bbb9bc2
gtkarray: memcpy() directly into the GPtrArray
2020-05-10 08:44:20 +02:00
Timm Bäder
75cfe3c6ae
gtkarray: Create GPtrArray in insert() if we have to
2020-05-10 08:44:20 +02:00
Timm Bäder
24608d5c23
gtkarray: Fix a typo
2020-05-10 08:44:20 +02:00
Timm Bäder
b25f93e24c
Make dimension values and calc values just number values
2020-05-10 08:44:20 +02:00
Timm Bäder
df08387e35
csscalcvalue: Avoid allocating memory in compute()
...
We already know how many values we're going to have, it's
value->n_terms.
2020-05-10 08:44:20 +02:00
Christoph Reiter
90b3105d99
CI: install brotli in msys2
...
Not a direct dependency, but the freetype package is missing it atm
2020-05-10 08:37:01 +02:00
Matthias Clasen
0fdcc3778d
Merge branch 'matthiasc/for-master' into 'master'
...
window: Remove some dead code
Closes #2726 and #2724
See merge request GNOME/gtk!1862
2020-05-10 00:36:49 +00:00
Matthias Clasen
78343ef61a
placesview: Don't do the same thing twice
...
When the schema is supported, we want to remove
the error style class, not add it again. Pointed
out by Rafał Mikrut.
Fixes : #2724
2020-05-09 19:41:30 -04:00
Matthias Clasen
d83df5a928
gsk: Fix a typo
...
We were checking x_offset twice, when we meant to check
x_offset and y_offset. Pointed out by Rafał Mikrut.
Fixes : #2726
2020-05-09 19:40:06 -04:00
Matthias Clasen
fc42a0696e
Add a test for refcounts under reordering
...
It turns out that we have a ref leak at the very
core of our dom model :( gtk_widget_insert_before/after
leak a reference if the widget was already under
the same parent. This is something that GtkBox
frequently does. It shows up e.g. when packing
widgets at the end in a headerbar.
2020-05-09 19:38:19 -04:00
Matthias Clasen
0cd0ef2d26
widget: Don't leak a reference when reordering
...
When reordering a widget that is alrady under the
same parent, we must not take another reference.
2020-05-09 19:27:56 -04:00
Matthias Clasen
c4514e7eb4
window: Remove some dead code
...
We are not attaching windows anymore.
2020-05-09 19:27:56 -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
Alexander Mikhaylenko
8d24711567
testsuite: Update bloomfilter test
...
Add the 2 new css nodes.
2020-05-08 00:03:42 +05:00
Alexander Mikhaylenko
f4538839d4
window: Stop handling dragging and titlebar actions
...
Since GtkWindowHandle and GtkHeaderBar do it now, it can be removed from
GtkWindow, along with GTK_WINDOW_REGION_TITLE which at this point doesn't
differ from GTK_WINDOW_REGION_CONTENT.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2689 , since
GtkWindowHandle doesn't do that anymore.
2020-05-08 00:02:08 +05:00
Alexander Mikhaylenko
8ca1e0ddc3
headerbar: Include GtkWindowHandle
...
This allows it to continue being draggable when placed inside a window, and
will allow to remove the corresponding gestures from GtkWindow.
2020-05-07 23:58:16 +05:00
Alexander Mikhaylenko
4135276252
headerbar: Use GtkCenterBox internally
...
This will allow to easily wrap it into another widget in the next commits.
2020-05-07 23:58:16 +05:00
Alexander Mikhaylenko
8bd44cb3eb
Add GtkWindowHandle
...
This will allow to move the titlebar handling logic out from GtkWindow.
2020-05-07 23:57:58 +05: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
Alexander Mikhaylenko
6c636642df
widget: Pass parent to gtk_widget_consumes_motion()
...
Right now it assumes that the parent is a GtkWindow. This will break when
window dragging is handled by another widget.
2020-05-07 09:44:15 +05: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
Nelson Benítez León
ba9b4f418d
GtkTreeviewColumn: don't focus-on-click header buttons
...
currently when mouse clicking on a column header
to sort it it is grabbing keyboard focus, this
should not happen, keyboard focus should remain
where it was before. This can be seen on the
GtkFileChooser widget, when having the keyboard
focus on the file list items and clicking on a
column header to sort it the keyboard focus is
now on the header.
2020-04-30 22:59:08 -04: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
Nelson Benítez León
13506e36aa
FileChooserButton: query 'display name' also for unbookmarked files
...
Do also the async file info query for remote files when they
are not bookmarked, because otherwise "None" will be shown as
file name (and fallback text generic icon will be used).
The remote file was already browsed by the file chooser
instance when selecting it, so querying the display name
again should be using gio cache and not be slow.
Even if it's were slow it's better than showing 'None'
which makes it seem as if nothing was selected.
Fixes #1966
2020-04-19 16:59:33 -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
`:link: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
Alexander Larsson
970d9dc06e
Merge branch 'wip/tbaederr/fallthrough' into 'master'
...
Replace fallthrough comments with G_GNUC_FALLTHROUGH
See merge request GNOME/gtk!1505
2020-03-06 10:48:16 +00:00
Timm Bäder
a1c75795bc
Replace fallthrough comments with G_GNUC_FALLTHROUGH
2020-03-06 10:39:42 +01:00
Benjamin Otte
63126a1b3e
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!1504
2020-03-06 05:48:56 +00:00
Benjamin Otte
cda9007f0f
stack: Make static analyzer happy
2020-03-06 05:56:29 +01:00
Benjamin Otte
394955cceb
pathbar: Don't do the same thing twice.
...
Don't do the same thing twice.
2020-03-06 05:53:20 +01:00
Benjamin Otte
b1a257c0c3
reftest: Plug memleak
2020-03-06 05:52:44 +01:00
Benjamin Otte
a106b54355
treeview: Don't assign value twice.
2020-03-06 05:51:37 +01:00
Benjamin Otte
510e17d123
cellarea: Be very clear
...
The static analyzer needs to know we absolutely DO NOT want to use this
return value.
2020-03-06 05:50:35 +01:00
Benjamin Otte
317dcddddb
builder-tool: Don't allow property to be both resize and shrink
...
Otherwise builder-tool crashes when you do
<property name="shrink" name="resize">1</property>
Thanks to the static analyzer for figuring that one out.
2020-03-06 05:44:11 +01:00
Benjamin Otte
df282a13bb
applicationaccels: Use g_renew()
2020-03-06 05:44:11 +01:00
Benjamin Otte
e37729756d
liststore: Fix gtk_list_store_iter_is_valid()
...
The iter may be invalid, so we may not read from it.
testsuite/gtk/treemodel tests this and valgrind is shouting about it,
but it never crashed until I just ran it...
This bug is from 2004 and the test is from 2007. I guess invalid memory
accesses don't get caught by CI much.
2020-03-06 05:44:11 +01:00
Benjamin Otte
3b8d9dbd28
testtreeview: Fix 19 year old use-after-free
2020-03-06 05:43:56 +01:00
Benjamin Otte
03e7c7fab1
treepath: Use g_renew()
2020-03-06 05:43:56 +01:00
Benjamin Otte
b231a40106
testsuite: Avoid passing NULL to strcmp()
...
Use g_strcmp0() instead.
2020-03-06 05:43:56 +01:00
Benjamin Otte
be30f78e62
treeview: Don't initialize variable twice
2020-03-06 05:43:56 +01:00
Benjamin Otte
89e5b8cd3a
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!1502
2020-03-05 18:20:36 +00:00
Benjamin Otte
e356d59a92
build: Add -Wnull-dereference
...
Sprinkle various g_assert() around the code where gcc cannot figure out
on its own that a variable is not NULL and too much refactoring would be
needed to make it do that.
Also fix usage of g_assert_nonnull(x) to use g_assert(x) because the
first is not marked as G_GNUC_NORETURN because of course GTester
supports not aborting on aborts.
2020-03-05 08:14:37 +01:00
Benjamin Otte
4be4799316
icontheme: Remove unused parameter
...
It's only ever set to NULL (and then dereferenced, too)
2020-03-05 07:59:59 +01:00
Benjamin Otte
7dce9e426e
treerbtree: Use for loops
...
Makes the code more readable.
Also does the NULL check for the initial element, which was misisng
before.
2020-03-05 07:59:05 +01:00
Benjamin Otte
4e88d5a7cf
notebook: Don't crash on drags not coming from a notebook
2020-03-05 07:59:05 +01:00
Benjamin Otte
fdd4630952
icontheme: Don't crash on icon lookup failure
2020-03-05 07:59:05 +01:00
Benjamin Otte
a4ed6fde9d
device: Handle missing axis
2020-03-05 07:59:05 +01:00
Benjamin Otte
dc86c744bf
rbtree: Simplify macros
...
* NODE_FROM_POINTER() can not be NULL
* shuffle NODE_TO_POINTER() code for readability so that the NULL check
is on the outside and not the cast
2020-03-05 07:59:05 +01:00
Benjamin Otte
9fedcec82e
rbtree: Simplify code
...
This makes it easier to understand for gcc (and hopefully humans, too)
that by rotating we essentially just swap `node` and `p`.
2020-03-05 07:59:05 +01:00
Benjamin Otte
f6b11a5158
build: Add more useful warning flags
...
I found those on the interwebs and decided they are useful.
2020-03-05 07:56:28 +01:00
Benjamin Otte
38dcc8f63b
mountoperation-x11: Fix copy/paste thinko
2020-03-05 07:05:48 +01:00
Benjamin Otte
18b011a717
tests: Add a test for changing the hovered widget
...
The add/remove one crashes after a few enter/leave events.
2020-03-05 07:05:48 +01:00
Benjamin Otte
8fc360dac5
imcontextwayland: Fix copy/paste error
2020-03-05 04:03:02 +01:00
Benjamin Otte
4313c47113
textview: Fix copy/paste error
2020-03-05 04:03:02 +01:00
Timm Bäder
b376d9617e
Merge branch 'patch-1' into 'master'
...
gdk_monitor_get_model: Fix a typo in the function documentation
See merge request GNOME/gtk!1499
2020-03-04 11:01:30 +00:00
Antenore Gatta
efbae75f3d
gdk_monitor_get_model: Fix a typo in the function documentation
2020-03-04 11:05:46 +01:00
Piotr Drąg
3f7a7d4ca1
Update POTFILES.in
2020-03-03 17:10:36 +01:00
Emmanuele Bassi
2c04e9441a
Merge branch 'doc-fixes' into 'master'
...
Small documentation fixes
See merge request GNOME/gtk!1500
2020-03-03 15:30:43 +00:00
Emmanuele Bassi
a3b9dba13c
Fix annotation for GtkDropTarget.get_gtypes()
...
The argument name must match in the documentation, and the `allow-none`
annotation is deprecated, and should be replaced by `optional` in this
case.
2020-03-03 13:17:31 +00:00
Emmanuele Bassi
5e099e2606
Remove incorrect rename-to annotations
...
The `rename-to` annotation is used to "shadow" a symbol with another
one, which means both symbols need to exist. It can't be used to rename
a symbol to something else.
2020-03-03 13:13:26 +00:00
Emmanuele Bassi
041043eec1
Fix introspection warnings for GtkDragIcon
2020-03-03 13:12:52 +00:00
Emmanuele Bassi
ec9038a8f2
Add missing annotation for GtkIconTheme
2020-03-03 13:04:06 +00:00
sicklylife
c7414db684
Update Japanese translation
2020-03-03 12:09:06 +00:00
sicklylife
6d2c6b1257
Update Japanese translation
2020-03-03 12:06:32 +00:00
Matthias Clasen
9f829ebd4a
Merge branch 'gbsneto/gtkeventcontrollerfocus' into 'master'
...
build: Install gtkeventcontrollerfocus.h
See merge request GNOME/gtk!1498
2020-03-03 08:40:43 +00:00
Georges Basile Stavracas Neto
8e14b21e52
build: Install gtkeventcontrollerfocus.h
...
It's a public class, and is included by gtk.h. Ship it.
2020-03-03 00:38:13 -03: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
Benjamin Otte
3ef1dca51c
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!1496
2020-03-02 21:32:20 +00:00
Benjamin Otte
2e55c9cf8c
droptarget: Fast-path local value load
...
This way, we can ensure that for local same-type drops the GValue
is set when ::enter is emitted.
This is the common case for dnd between widgets inside larger
applications, so it's worth it to speed it up.
2020-03-02 21:45:59 +01:00
Benjamin Otte
7427f4f311
drop: Don't use g_object_get()
2020-03-02 21:45:42 +01:00
Benjamin Otte
c0a63e6dd2
dnd: Fix some documentation gotchas
2020-03-02 21:26:08 +01:00
Benjamin Otte
47230f191f
Merge branch 'wip/otte/dnd' into 'master'
...
DND: Sync drop target
See merge request GNOME/gtk!1495
2020-03-02 18:09:05 +00:00
Benjamin Otte
0e72adf6dd
drop: Remove unused convenience APIs
...
With the new event controllers, these are unused.
2020-03-02 04:43:56 +01:00
Benjamin Otte
f5fda3ae58
themes: Set proper foreground color for DND icons
2020-03-02 04:43:56 +01:00
Benjamin Otte
f4a00e7909
calendar: Use a drag source
2020-03-02 04:43:56 +01:00
Benjamin Otte
e7db386018
dnd: Don't create custom color drag icons
...
... use the default one. It looks much better.
2020-03-02 04:43:56 +01:00
Benjamin Otte
2a697827e1
dragicon: Add gtk_drag_icon_create_widget_for_value()
...
... and use it to set a drag icon.
2020-03-02 04:43:56 +01:00
Benjamin Otte
b2c3e39c89
contentformats: Constify some functions
2020-03-02 04:43:56 +01:00
Benjamin Otte
03882e1f96
dragicon: Change how to acquire drag icons
...
Before, gtk_drag_icon_new_for_drag() allowed creating new drag icons.
This could cause multiple drag icons to exist for a single drag.
Now, gtk_drag_icon_get_for_drag() makes sure that only one drag icon is
created.
2020-03-02 04:43:56 +01:00
Benjamin Otte
9efc4e6777
dragicon: Add GtkDragIcon::child
2020-03-02 04:43:56 +01:00
Benjamin Otte
7cd728a0ea
gdk: Make gdk_drop_status() take preferred action
...
This allows textview/text dnd to properly display a MOVE icon when in
the widget the drag started from but a COPY icon otherwise.
2020-03-02 04:43:56 +01:00
Benjamin Otte
c3fb6ca747
colorswatch: Switch to dragged color during dnd
...
This is really simple to implement now, so do it.
2020-03-02 03:18:55 +01:00
Benjamin Otte
3f7b401de0
gtk-demo: Add a simple peg solitaire DND demo
2020-03-02 03:18:55 +01:00
Benjamin Otte
a411959c91
droptarget: Redo
...
This is a huge reorganization of GtkDropTarget. I did not know how to
split this up, so it's unfortunately all one commit.
Highlights:
- Split GtkDropTarget into GtkDropTarget and GtkDropTargetAsync
GtkDropTarget is the simple one that only works with GTypes and offers
a synchronous interface.
GtkDropTargetAsync retains the full old functionality and allows
handling mime types.
- Drop events are handled differently
Instead of picking a single drop target and sending all DND events to
it, every event is sent to every drop target. The first one to handle
the event gets to call gdk_drop_status(), further handlers do not
interact with the GdkDrop.
Of course, for the ultimate GDK_DROP_STARTING event, only the first
one to accept the drop gets to handle it.
This allows stacking DND event controllers that aren't necessarily
interested in handling the event or that might decide later to drop
it.
- Port all widgets to either of those
Both have a somewhat changed API due to the new event handling.
For the ones who should use the sync version, lots of cleanup was
involved to operate on a sync API.
2020-03-02 03:18:55 +01:00
Benjamin Otte
f4ac74795c
placessidebar: Don't use the GdkDrag
...
First, it should have been a GdkDrop, but even then, proper DND code
should not rely on internals.
It's only been used in an unused signal emission anyway.
2020-03-02 03:18:55 +01:00
Benjamin Otte
b64a0273c5
notebook: Make dnd page switching a drop controller
...
This untangles tab dnd from page switching.
2020-03-02 03:18:55 +01:00
Benjamin Otte
b799bc5ce1
textview: Move drop scrolling to drop motion controller
...
Don't confuse the drop target with it.
2020-03-02 03:18:55 +01:00
Benjamin Otte
fdb39b095b
treeview, iconview: Don't return the drop target
...
Not a good idea to hand internal event controllers out to public API.
2020-03-02 03:18:55 +01:00
Benjamin Otte
d9fa839097
testsuite: Use g_assert() in tests
2020-03-02 03:18:55 +01:00
Emmanuele Bassi
35f8f05a63
Merge branch 'piotrdrag/placessidebar-typos' into 'master'
...
placessidebar: Fix a couple of typos and thinkos in menu labels
See merge request GNOME/gtk!1494
2020-03-01 15:07:17 +00:00
Piotr Drąg
810d567cc9
placessidebar: Fix a couple of typos and thinkos in menu labels
2020-03-01 15:05:28 +01:00
Matthias Clasen
c9d3f87e43
Merge branch 'kill-grabs-2' into 'master'
...
Kill grabs
See merge request GNOME/gtk!1492
2020-02-29 01:19:48 +00:00
Matthias Clasen
3d11973df8
Drop gtk_grab_add/remove from public api
...
The only form in which we still allow grabs to take place
is with modal toplevels.
2020-02-28 16:36:17 -05:00
Matthias Clasen
57c8a643ff
Drop gtk_grab_get_current
...
Another grab-related api that we are not using.
2020-02-28 16:29:56 -05:00
Matthias Clasen
0ffb35c9e7
Drop device grabs
...
We were not using this api at all, so lets drop it.
2020-02-28 16:27:42 -05:00
Matthias Clasen
d60097f8fe
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Fix the "Software GL" switch
See merge request GNOME/gtk!1491
2020-02-28 20:35:11 +00:00
Matthias Clasen
8f87555176
inspector: Fix the "Software GL" switch
...
This was crashing.
2020-02-28 14:42:19 -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
Piotr Drąg
cf2bcef814
Update POTFILES.in and POTFILES.skip
2020-02-27 22:05:24 +01:00
Matthias Clasen
29d033a8b3
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1488
2020-02-27 20:29:04 +00:00
Matthias Clasen
cf873f3426
Remove a stray g_object_unref
...
Events are no longer objects, so this does not do
any good. Use gdk_event_unref instead.
2020-02-27 14:31:19 -05:00
Matthias Clasen
527a8048b6
Avoid a crash in css font features values
2020-02-27 14:30:58 -05:00
Nathan Follens
0c1f93cd7c
Update Dutch translation
2020-02-27 11:05:23 +00:00
Timm Bäder
d86832ad5a
Merge branch 'patch-1' into 'master'
...
Fix a typo in gtkplacessidebar.c
See merge request GNOME/gtk!1486
2020-02-27 10:41:44 +00:00
Krzesimir Nowak
8df045537e
Fix a typo in gtkplacessidebar.c
...
Some mistyped vim command got into the code in commit 60d2813247 .
2020-02-27 10:02:56 +00:00
Matthias Clasen
73d40c2e6e
Merge branch 'matthiasc/for-master' into 'master'
...
Fix a leftover occurrence of ::expand
See merge request GNOME/gtk!1485
2020-02-27 01:12:23 +00:00
Matthias Clasen
90376d6d6e
Fix a leftover occurrence of ::expand
2020-02-26 19:31:25 -05:00
Danial Behzadi
6a359c54fb
Update Persian translation
2020-02-26 23:23:04 +00:00
Matthias Clasen
17b7aabfc1
Merge branch 'matthiasc/for-master' into 'master'
...
gesture: Actually track targets
See merge request GNOME/gtk!1484
2020-02-26 22:34:45 +00:00
Matthias Clasen
dcbecdac31
gesture: Actually track targets
...
Due to a mismerge, this wasn't actually working,
and was causing criticals from gtk_widget_has_grab
when dragging windows.
2020-02-26 17:06:15 -05:00
Matthias Clasen
fa75d7f480
builder-tool: Fix a thinko
...
We can't rely on the pspec for a removed property.
This code worked until I actually removed the properties.
Update the tests to reflect this.
2020-02-26 10:01:38 -05:00
Matthias Clasen
5430c80361
Merge branch 'expand-margin-cleanup' into 'master'
...
expand and margin cleanup
See merge request GNOME/gtk!1479
2020-02-26 14:27:47 +00:00
Matthias Clasen
37a2cae10e
Small fixups
...
Trying to get the ci style test to pass.
2020-02-26 08:13:45 -05:00
Emmanuele Bassi
815e18e069
Merge branch 'docs-fixes' into 'master'
...
Various documentation fixes
See merge request GNOME/gtk!1481
2020-02-26 11:19:09 +00:00
Emmanuele Bassi
c79acb418f
Merge branch 'remove-show-hidden' into 'master'
...
Remove last instances of GtkFileChooser:show-hidden
See merge request GNOME/gtk!1480
2020-02-26 10:41:50 +00:00
Emmanuele Bassi
303e20226c
Add missing ownership transfer annotations
2020-02-26 10:29:59 +00:00
Emmanuele Bassi
3c2312a2dd
Fix gtk-doc stanza for private symbol
2020-02-26 10:25:46 +00:00
Emmanuele Bassi
7eb7ee33ff
Add missing documentation to GdkDevice
2020-02-26 10:23:15 +00:00
Emmanuele Bassi
d4dcb43aa9
Add missing ownership transfer annotations
2020-02-26 10:23:01 +00:00
Emmanuele Bassi
a1bbd25e12
Fix introspection annotation syntax
2020-02-26 10:19:10 +00:00
Emmanuele Bassi
c8f4f903c6
Remove last instances of GtkFileChooser:show-hidden
...
The file chooser widget is still setting the show-hidden property, even
though it was removed.
2020-02-26 10:15:16 +00:00
Matthias Clasen
b5bacb3be6
Drop the margin property
...
Replace it with margin-start, -end, -top, -bottom throughout.
2020-02-25 20:59:04 -05:00
Matthias Clasen
a9c05193a7
Drop the expand property
...
The hexpand and vexpand properties are sufficient.
2020-02-25 18:29:15 -05:00
Matthias Clasen
2d4e1e248d
update testsuite
...
Update the expected results of the tools tests that are
affected by the new property handling for expand and margin.
2020-02-25 18:28:55 -05:00
Matthias Clasen
77ce55b9ac
builder-tool: replace some properties
...
Replace expand by hexpand and vexpand and
margin by margin-left, -right, -top, -bottom.
2020-02-25 17:50:57 -05:00
Emmanuele Bassi
06ff60aa35
Merge branch 'ci-docs' into 'master'
...
Restructure CI jobs
See merge request GNOME/gtk!1476
2020-02-25 19:47:57 +00:00
Emmanuele Bassi
341b2a3d39
ci: Add a static analysis job
...
Use the Clang static analysis tool.
For the time being, we're going to allow it to fail, but the plan is to
fix every issue it raises.
2020-02-25 19:06:39 +00:00
Emmanuele Bassi
7bc50b7466
ci: Update the docker wrapper script
...
Do a better job at detecting whether we have Docker installed.
2020-02-25 19:05:07 +00:00
Emmanuele Bassi
d9608a0357
ci: Move style-check to .pre phase
...
We want the style checks running at the start of the CI pipeline, no
need to have a specific phase for it.
2020-02-25 17:57:46 +00:00
Emmanuele Bassi
92d86c4a9f
ci: Update all fedora images to v14
2020-02-25 17:19:08 +00:00
Emmanuele Bassi
382340c158
ci: Add clang-analyzer to the fedora build image
2020-02-25 17:18:23 +00:00
Emmanuele Bassi
a87966b2bf
ci: Rename the "style-check" phase to "analysis"
...
We want to re-use it for other jobs.
2020-02-25 17:15:00 +00:00
Emmanuele Bassi
8a6d5a77bb
ci: Fix style check script
...
Propagate the exit status from clang-format-diff.py to avoid it being
overwritten by the `echo` at the end of the script.
2020-02-25 17:13:39 +00:00
Emmanuele Bassi
97b5775c1f
ci: Add a separate "docs" stage
...
Don't build the API reference on deploy; build it in a separate job,
instead, so we can run it on all pipelines, and deploy it only for
master.
2020-02-25 17:09:24 +00:00
Timm Bäder
64ff12dbd7
Merge branch 'wip/baedert/for-master' into 'master'
...
wip/baedert/for-master
See merge request GNOME/gtk!1466
2020-02-25 13:35:34 +00:00
Timm Bäder
02e295ec5d
statusbar: Remove _get_message_area() from public API
...
The message should be manipulated via push() and pop().
2020-02-25 14:18:24 +01:00
Timm Bäder
6ff057f36a
scrolledwindow: Remove an unnecessary cast
2020-02-25 14:18:24 +01:00
Timm Bäder
54bf739e8f
scrolledwindow: Remove useless local variables
2020-02-25 14:18:24 +01:00
Timm Bäder
d5327a61e6
widget: Remove gtk_widget_input_shape_combine_region()
...
Widget's don't have surfaces anymore these days.
2020-02-25 14:18:24 +01:00
Timm Bäder
0bca4a276a
inspect-button: Use new gtk_window_set_extra_input_region
2020-02-25 14:18:24 +01:00
Timm Bäder
6056ca9265
window: Carry an extra input region
...
This will be used in the inspector to make it possible to click through
the inspector window.
2020-02-25 14:18:24 +01:00
Timm Bäder
73c212d89b
popover: Stop using gtk_widget_input_shape_combine_region()
...
We control the surface anyway, we can as well set the input shape on it
directly.
2020-02-25 14:18:24 +01:00
Timm Bäder
6b970c6813
widget: Remove set_csd_input_shape
...
Replace the only caller (unsurprisingly from gtkwindow.c) with a direct
call to gdk_surface_input_shape_combine_region.
2020-02-25 14:18:24 +01:00
Timm Bäder
e552adf05a
widget: Remove surface member
...
Only GtkNatives are supposed to have a surface, so use the widget's
native.
2020-02-25 14:18:23 +01:00
Timm Bäder
a1fc94f1f7
range: Remove an outdated comment
...
What even is a CList.
2020-02-25 14:18:23 +01:00
Timm Bäder
b81cd8c929
range: Inline function into only caller
2020-02-25 14:18:23 +01:00
Timm Bäder
838fc4fdf4
range: Clean up compute_slider_position()
2020-02-25 14:18:23 +01:00
Timm Bäder
596be280c9
menusectionbox: Avoid a gtk_widget_destroy() call
2020-02-25 11:08:25 +01:00
Timm Bäder
b1d4d24c7b
pathbar: Inherit from GtkWidget
2020-02-25 11:08:25 +01:00
Timm Bäder
1baae1f288
colorchooser: Fix typo in checkerboard color
2020-02-25 11:08:25 +01:00
Timm Bäder
dae06d82ae
inspector: Remove double borders in recorder
2020-02-25 11:08:25 +01:00
Timm Bäder
549a3a81ae
headerbar: Replace gtk_widget_destroy() call
2020-02-25 11:08:25 +01:00
Timm Bäder
ff4a33b69b
headerbar: Remove size request on icon button
...
Doesn't make sense that we force this one button to be this big.
2020-02-25 11:08:25 +01:00
Timm Bäder
68b4c061cf
shortcutlabel: Remove unnecessary includes
2020-02-25 11:08:25 +01:00
Timm Bäder
dbd1180ce4
stackswitcher: Avoid calling gtk_widget_destroy()
2020-02-25 11:08:25 +01:00
Timm Bäder
df3b88483d
modelbutton: Fix wrong function name in doc comment
2020-02-25 11:08:25 +01:00
Timm Bäder
60d2813247
placessidebar: Convert popover menu to proper GtkPopoverMenu
2020-02-25 11:08:23 +01:00
Timm Bäder
995277f57d
placessidebar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
e1ca83ddbd
pathbar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
f4202c5075
headerbar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
103b6a9205
popovermenubar: Avoid calling gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
ceabe70a42
emojichooser: Avoid using gtk_widget_destroy()
2020-02-25 10:43:15 +01:00
Timm Bäder
73faa9c84a
popovermenu: Avoid a gtk_widget_destroy() call
2020-02-25 10:43:15 +01:00
Timm Bäder
1b278b0636
colorchooserwidget: Get rid of a gtk_widget_destroy() call
2020-02-25 10:43:15 +01:00
Matthias Clasen
648a67085f
testsuite: Remove outdated exclusions
...
There were mentions of GtkCList and GtkColorSelection
in these test. The memories!
2020-02-24 23:08:34 -05:00
Matthias Clasen
9d80db29de
Merge branch 'spinning-spinner' into 'master'
...
Rename GtkSpinner::active to ::spinning
See merge request GNOME/gtk!1475
2020-02-25 04:04:46 +00:00
Matthias Clasen
e73a40733f
Rename GtkSpinner::active to ::spinning
...
And add a setter and getter. The old name was
confusing with the widget state of the same
name. 'Active' is just too overloaded.
2020-02-24 22:37:02 -05:00
Matthias Clasen
00f6d1c24b
Merge branch 'kill-rtl-media-icons' into 'master'
...
Drop rtl variants of media-playback-start
See merge request GNOME/gtk!1474
2020-02-25 02:09:52 +00:00
Matthias Clasen
52c948e4e0
Merge branch 'kill-popover-relative-to' into 'master'
...
Drop GtkPopover::relative-to
See merge request GNOME/gtk!1471
2020-02-25 02:00:50 +00:00
Matthias Clasen
8628c573b5
Drop rtl variants of media-playback-start
...
According to #2469 , they are unwanted.
2020-02-24 20:49:10 -05:00
Matthias Clasen
a43d13aa74
popover: Drop ::relative-to
...
It is enough to just set the parent (and make the parent
call gtk_native_check_resize in size_allocate).
This commit removes the relative_to argument to the
constructors of GtkPopover and GtkPopoverMenu, and
updates all callers.
2020-02-24 20:46:41 -05:00
Matthias Clasen
259f465e01
Merge branch 'surface-get-mapped' into 'master'
...
Add gdk_surface_get_mapped
See merge request GNOME/gtk!1473
2020-02-25 00:26:42 +00:00
Matthias Clasen
6fb50ccd0d
Drop gdk_surface_is_visible
...
It has been replaced by gdk_surface_get_mapped.
2020-02-24 19:07:03 -05:00
Matthias Clasen
7a39f2d49d
Replace gdk_surface_is_visible by _get_mapped
...
The property is called ::mapped, and we want to get
to standard getter naming.
2020-02-24 19:07:03 -05:00
Matthias Clasen
96b7c5f575
Add gdk_surface_get_mapped
...
Returns the value of the ::mapped property. This is
a direct replacement for gtk_surface_is_visible.
2020-02-24 17:59:12 -05:00
Matthias Clasen
90fb0caf28
Merge branch 'getters-and-setters' into 'master'
...
gdk:Getters and setters
See merge request GNOME/gtk!1472
2020-02-24 20:31:22 +00:00
Matthias Clasen
3c95798cd3
Add missing GdkDrag getters
2020-02-24 14:38:42 -05:00
Matthias Clasen
ec76f65d09
surface: Add a getter for autohide
2020-02-24 14:38:42 -05:00
Matthias Clasen
6be9e44786
gdk: Drop GdkDevice::input-mode and rename ::input-source
...
Drop the input-mode, since it only makes sense for
floating devices, which we don't have anymore. And renamt
::input-source to ::source, to match the getter.
Update all users.
2020-02-24 14:38:42 -05:00
Matthias Clasen
9ce6e98487
device: Add missing getters
...
This adds getters for a few properties that were
missing them, and renames the input-mode and input-source
properties to match their existing getters.
2020-02-24 08:40:16 -05:00
Matthias Clasen
4ca0a93324
Add a getter for GdkAppLaunchContext::display
2020-02-24 08:32:34 -05:00
Matthias Clasen
3735c9d155
Fix the build with docs
...
This is fallout from filechooser api changes.
2020-02-24 08:22:51 -05:00
Matthias Clasen
7f46b25c04
Merge branch 'wip/ebassi/filechooser-new' into 'master'
...
Clean up the GtkFileChooser API
Closes #2455
See merge request GNOME/gtk!1454
2020-02-24 00:32:23 +00:00
Matthias Clasen
78d63a412c
Merge branch '138-gtk4-install-valgrind-suppressions' into 'master'
...
build: Install Valgrind suppressions files
Closes #138
See merge request GNOME/gtk!1467
2020-02-24 00:23:11 +00:00
Matthias Clasen
5af865f8cb
Merge branch 'matthiasc/for-master' into 'master'
...
broadway: Remove SURFACE_IS_TOPLEVEL
See merge request GNOME/gtk!1469
2020-02-24 00:03:09 +00:00
Matthias Clasen
247a68d602
broadway: Remove SURFACE_IS_TOPLEVEL
...
All surfaces are toplevels now.
2020-02-23 18:15:59 -05:00
Philip Chimento
e123853b8b
build: Install Valgrind suppressions files
...
This is so that other programs linking to GTK can use GTK's suppressions
files when performing their own Valgrind analysis.
Closes : #138
2020-02-23 15:00:37 -08:00
Piotr Drąg
9d2d4a69a5
Update POTFILES.in
2020-02-23 12:32:30 +01:00
Matthias Clasen
9036d49bea
Merge branch 'wip/otte/dnd' into 'master'
...
Get rid of GdkAtom
See merge request GNOME/gtk!1465
2020-02-23 01:50:52 +00:00
Benjamin Otte
cc7c1fe108
gdk: Remove GdkAtom
...
finally!!!!!
2020-02-23 01:59:26 +01:00
Benjamin Otte
f536cf0a43
win32: Get rid of GdkAtom
2020-02-23 01:59:26 +01:00
Benjamin Otte
60307da5b1
wayland: Replace final mention of GdkAtom
2020-02-23 01:59:26 +01:00
Benjamin Otte
6e935d469a
x11: Get rid of GdkAtom and APIs supporting it.
...
replace all uses with const char * (non-interned).
Also remove a lot fo juggling from atom to GdkAtom to string and back.
The X Atom hash table is now mapping to (again, non-interned) strings.
2020-02-23 01:59:26 +01:00
Benjamin Otte
4280ca2263
device: gdk_device_list_axes() => gdk_device_get_axis_names()
...
Turn a GList of GdkAtom into a char ** - and rename the function to not
cause problems.
2020-02-23 01:59:26 +01:00
Benjamin Otte
28dced597f
gdk: Remove gdk_text_property_to_utf8_list_for_display()
...
A lot of files became empty now, so they have been removed, which makes
this commit seem larger than it is.
2020-02-23 01:59:26 +01:00
Benjamin Otte
6c61c7bf0b
Don't use GdkAtom where const char * is used
...
Those are all forgotten transitions while updating code to new APIs.
2020-02-23 01:59:19 +01:00
Benjamin Otte
6442ec2f8d
gdk: Remove gdk_utf8_to_string_target()
...
Only keep the X11 version around in the backend.
2020-02-23 01:59:00 +01:00
Benjamin Otte
a62d78bf70
selection: Remove GtkSelectionData
2020-02-23 01:59:00 +01:00
Benjamin Otte
a4f7e2ca09
droptarget: Remove selectiondata read functions
...
They are unused now.
2020-02-23 01:59:00 +01:00
Benjamin Otte
a19066b17c
filechooserwidget: Stop using selection data
...
Use gdk_drop_read_async()
2020-02-23 01:59:00 +01:00
Benjamin Otte
992173c382
x11: Register DND atoms with all other atoms
...
It's 2020, there's no need to be restrained with registering atoms.
2020-02-23 01:59:00 +01:00
Benjamin Otte
b0f6996892
gdk: Remove gdk_surface_register_dnd()
...
All surfaces are expected to be DND surfaces from creation.
2020-02-23 01:59:00 +01:00
Matthias Clasen
8d5cece080
Merge branch 'x11-dnd-fixes' into 'master'
...
X11 dnd fixes
See merge request GNOME/gtk!1464
2020-02-23 00:21:54 +00:00
Matthias Clasen
ec383a2388
Add detail to gdk_drag_begin docs
...
Mention that GTK keeps a reference while the drag
operation is ongoing.
2020-02-22 19:10:16 -05:00
Matthias Clasen
7c1cfc5533
x11: Fix dnd coordinate handling
...
We were not properly converting the coordinates we
got to root coordinates. This was showing up as offsets
between the actual drop target and the area where drops
can happen, e.g. when dragging over a stack switcher
to switch pages.
2020-02-22 19:10:16 -05:00
Matthias Clasen
14122d1acb
x11: Export gdk_x11_surface_get_root_coords privately
...
This lets us avoid a roundtrip through the surface vfuncs.
2020-02-22 19:10:16 -05:00
Matthias Clasen
f93d0f8fb5
x11: Keep a ref on GdkDrag objects
...
It is expected that backends keep a ref on the GdkDrag
objects that they create as long as the drag is ongoing.
2020-02-22 19:02:13 -05:00
Matthias Clasen
833b564946
x11: Avoid crashes in dnd
...
We were forgetting to clean up the ::xevent signal
handler in some error cases. Move the signal connection
later, when we know the drag is going forward, and
use g_signal_connect_object to make sure the signal
handler is not forgotten.
2020-02-22 19:02:13 -05:00
Matthias Clasen
7edfcc37a3
Merge branch 'wip/wayland-fix-popup-grabs' into 'master'
...
Fix Wayland popup grabs
See merge request GNOME/gtk!1463
2020-02-22 20:51:32 +00:00
Jonas Ådahl
f0b0076a1c
wayland/popup: Emit un-withdrawn event earlier
...
Otherwise grabbing the seat will appear to have failed.
2020-02-22 20:09:38 +01:00
Jonas Ådahl
71323a8b48
wayland/popup: Remove unnecessary checks when mapping popup
...
We only call this when we're not already mapped so don't check that. We
also only call this when we should be mapped so don't check that either.
2020-02-22 20:08:37 +01:00
Matthias Clasen
b8db9e124b
Merge branch 'matthiasc/for-master' into 'master'
...
Fix a hard-to-spot typo
See merge request GNOME/gtk!1462
2020-02-22 19:01:18 +00:00
Matthias Clasen
ddd126740e
Fix a hard-to-spot typo
...
The symptom caused by this was scales in
popovers not reacting to dragging.
2020-02-22 13:49:12 -05:00
Emmanuele Bassi
9bf03cfeec
docs: Add migration notes for GtkFileChooser
2020-02-22 18:07:11 +00:00
Matthias Clasen
011f58fa64
Merge branch 'matthiasc/for-master' into 'master'
...
x11: Fix a crash in event handling
See merge request GNOME/gtk!1461
2020-02-22 16:41:29 +00:00
Matthias Clasen
1af94d0bce
x11: Fix a crash in event handling
...
This was overlooked in 79b4510c6d .
2020-02-22 16:41:29 +00:00
Emmanuele Bassi
ff6772fd98
Remove preview widget from GtkFileChooser
...
The preview widget harks from a platform before time, when we didn't
have GIO, or a thumbnail specification.
Very few applications use it correctly, if at all; it has an horrid hack
to deal with the ownership of the widget's instance when accessed
through the getter function; it messes up the layout of the widget and
its label is less than useful when it comes to file names longer than a
dozen characters; it's a poor substitute for a proper thumbnail view.
2020-02-22 16:39:01 +00:00
Matthias Clasen
be25905a8d
Fix gdk docs build
2020-02-22 10:44:21 -05:00
Emmanuele Bassi
e5ef26efa8
Remove GtkFileChooserEntry:local-only
...
We don't use it any more in GtkFileChooserWidget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
ebd23737c0
Remove GtkPlacesSidebar:local-only
...
We don't use it any more in GtkFileChooserWidget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
6e699e3f04
Remove GtkPlacesView:local-only
...
We don't use it any more from the file chooser widget.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
4a3742979d
Remove GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
...
We don't need a whole separate action, now that the file chooser widget
can create folders; we can create use SELECT_FOLDER and create one.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
b09e7df81b
Remove GtkFileChooser:local-only
...
Now that the whole API goes through GFile we don't have the weird split
between local-only and non-local-only modes.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
516eab5c43
Remove GtkFileChooser:show-hidden
...
This is a user setting and a user action, not something that ought to be
programmatically set via the file selection API.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
063ad28b1a
Remove overwrite confirmation machinery from GtkFileChooser
...
Overwrite confirmation should not be optional, and it should not loop
into application code to create their own dialog and user response.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
d505573ee6
Drop GtkFileChooser:extra-widget
...
We have "choices" as a more rational (and portable) API; additionally,
the ownership semantics of the extra widget property getter are a hack.
2020-02-22 15:22:06 +00:00
Emmanuele Bassi
5f070ff233
Remove filename/URI API from GtkFileChooser
...
GtkFileChooser's API predates GIO by a few years, so it started off with
filenames and URI as character arrays. After introducing GIO as a
dependency, the API included GFile-based entry points.
It's much more appropriate to use GFile everywhere, as we want to
encourage people to use GIO instead of passing random bytes to low level
POSIX API.
See: #2455
2020-02-22 15:22:06 +00:00
Benjamin Otte
b002572824
Merge branch 'wip/otte/dnd' into 'master'
...
stuff
See merge request GNOME/gtk!1460
2020-02-22 14:53:13 +00:00
Matthias Clasen
767849d6d2
Remove GdkSeatGrabPrepareFunc from headers
...
It is not used in public api anymore.
2020-02-22 08:11:34 -05:00
Matthias Clasen
76e115b910
Add a warning when a grab fails
...
This reveals that the grabs for popover menus
always fail now, causing the menus to not properly
hide.
2020-02-22 08:11:34 -05:00
Benjamin Otte
8a098b1343
tests: Guard variables with necessary macros
2020-02-22 07:44:52 +01:00
Benjamin Otte
9d915ff431
treeviewcolumn: Inline variable into return_if_fail()
2020-02-22 07:44:52 +01:00
Benjamin Otte
6f0a0ce7f1
testsuite: Don't use g_return_if_fail()
...
Use g_assert()
2020-02-22 07:44:52 +01:00
Benjamin Otte
18d7187e4b
testsuite: Don't use return_if_fail()
...
Use assert() instead
2020-02-22 07:35:23 +01:00
Benjamin Otte
d9e3eaaec8
treeview: Guard code by right compiler macros
2020-02-22 07:33:41 +01:00
Benjamin Otte
0c4c88b449
scrolledwindow: Inline variable into return_if_fail()
2020-02-22 07:33:41 +01:00
Benjamin Otte
2cb0007b89
iconview: Inline variables into return_if_fail()
2020-02-22 07:33:41 +01:00
Benjamin Otte
eb70173646
levelbar: Guard function by right compiler macros
2020-02-22 07:33:41 +01:00
Benjamin Otte
2e941acb29
filesystemmodel: Guard variable with correct compiler flags
2020-02-22 07:33:41 +01:00
Benjamin Otte
42d71f1016
combobox: Inline variables into return_if_fail()
2020-02-22 07:33:41 +01:00
Benjamin Otte
99fc31865a
comboboxtext: Inline functions into return_if_fail()
2020-02-22 07:33:40 +01:00
Benjamin Otte
f9b7825a47
device: Inline function into return_if_fail()
2020-02-22 07:33:40 +01:00
Benjamin Otte
e3aee62b18
drop: Guard variable with correct compiler flags
2020-02-22 07:33:40 +01:00
Benjamin Otte
ce3ed45e81
surface: Inline function
...
Fixes compile error with -DG_DISBALE_CHECKS
2020-02-22 07:33:40 +01:00
Benjamin Otte
a12e563cd2
main: Don't synthesize crossing events when nothing changed
...
This was especially bad because it was confusing the event controllers
so much, they'd emit leave + enter events every time the mouse moved.
2020-02-22 07:33:40 +01:00
Benjamin Otte
a5e2275a72
stackswitcher: Use GdkDropControllerMotion
...
... and use one controller per button instead of using it on the
switcher and then going through lots of pain attempting to find the
right button for the location under the mouse.
2020-02-22 07:33:40 +01:00
Benjamin Otte
d680e2e344
Port simple cases to GtkDropControllerMotion
2020-02-22 07:33:40 +01:00
Benjamin Otte
2a8fd25a4b
testsuite: Check proper notify emissions, too
...
This is in particular relevant for the ::is-focus property, because
updating that one doesn't cause enter/leave events.
But it also checks that notify and enter/leave happen in the right
order.
2020-02-22 07:33:40 +01:00
Benjamin Otte
34e5f36fdf
Add GtkDropControllerMotion
2020-02-22 07:33:40 +01:00
Benjamin Otte
9223d1ee04
eventcontrollermotion: Fix docs
2020-02-22 07:33:40 +01:00
Benjamin Otte
fc43ec0bbc
gtk: Bubble drag events like motion events
...
Emit crossing events - with a new GTK_CROSSING_DROP type - like we do
for motion events. There is no more special casing for them.
Note that the gesture has not been updated yet, so some obscure behavior
may occur.
2020-02-22 07:33:40 +01:00
Benjamin Otte
be4b34aa8f
events: Use GdkDrop as event sequence
...
This allows treating drop events like touch events, which GTK groups by
event sequence.
It's a bit ugly that we just case the GdkDrop pointer, but event
sequences are only meant to be unique pointer ids, so it's fine.
2020-02-22 07:33:40 +01:00
Benjamin Otte
6f73a750a7
widget: Simplify adjust_allocation()
...
And in particular, only do it if the widget doesn't use ALIGN_FILL.
This avoids lots of measuring in the common case and speeds up
size_allocate() by about 25%.
And because size_allocate() is the bottleneck in the fishbowl, this also
gets ~25% more fishies.
2020-02-22 07:33:40 +01:00
Benjamin Otte
4128ee88b0
widget: Pull margin computation out of adjust_allocation
...
It's way cheaper to just do it.
Also simplifies adjust_size_allocation a lot.
2020-02-22 07:33:23 +01:00
Benjamin Otte
418bdc87ef
sizerequest: Stop clamping for_size to natural size
...
Widgets should be given the actual size they will be allocated, so they
can do something with it.
If they want to clamp themselves to their natural size, nothing's
stopping them, they know their natural size after all.
2020-02-22 07:33:23 +01:00
Benjamin Otte
612ba7ec15
widget: Don't check for natives
...
It's the native's job to request a 1px x 1px size, not the job of
gtk_widget_size_allocate()
Also saves 10% of size_allocate() time because checking for an interface
is really expensive.
2020-02-22 05:50:07 +01:00
Benjamin Otte
f656cbdc5b
Ensure all natives request at least a 1px wide surface
...
FIXME: Is this necessary?
Could the surfaces just clamp to 1x1 themselves?
We recently declared that surfaces can decide on whatever size they want
so natives need to inspect the size they requested anyway.
2020-02-22 05:50:07 +01:00
Matthias Clasen
3eea9f3e79
Merge branch 'color-float-fix' into 'master'
...
color chooser: Fix fallout from floatification
See merge request GNOME/gtk!1459
2020-02-22 03:19:01 +00:00
Matthias Clasen
9fa7a47081
color chooser: Fix fallout from floatification
...
We are using (dddd) variants to store colors in variants,
which is dangerous now that GdkRGBA members are just floats.
Avoid passsing the GdkRGBA members directly to any varargs
functions.
2020-02-21 19:56:44 -05:00
Matthias Clasen
13ed531301
Merge branch 'wip/xdg-popup-layout-no-op' into 'master'
...
gdk/wayland: Avoid relayout with the same properties
See merge request GNOME/gtk!1457
2020-02-22 00:27:59 +00:00
Matthias Clasen
7a28118f3a
Merge branch 'wip/gdkpopuplayout-section' into 'master'
...
docs: Add GdkPopupLayout to gdk4-sections.txt
See merge request GNOME/gtk!1458
2020-02-22 00:26:42 +00:00
Jonas Ådahl
b4bce2ff8a
docs: Add GdkPopupLayout to gdk4-sections.txt
2020-02-21 23:25:30 +01:00
Jonas Ådahl
2f13ac2e4d
gdk/wayland: Avoid relayout with the same properties
...
When a popup is already showing, and gdk_surface_present_popup() is
called, if the layout didn't change, we're not really interested in
relayouting.
In the future, we'll be able to get notified if position of the popup
would change by some environmental changes, but until then, just don't
support it.
2020-02-21 21:55:16 +01:00
Jonas Ådahl
1d6100e7b0
gdk/popup-layout: Remove leftover struct field
...
The layouts never "seal", as they did in an earlier revision, so remove
the seal field.
2020-02-21 21:42:52 +01:00
Benjamin Otte
112bc964cb
Merge branch 'wip/otte/for-master' into 'master'
...
surface: Don't take a display argument in gdk_surface_new_popup()
See merge request GNOME/gtk!1456
2020-02-21 20:35:47 +00:00
Benjamin Otte
5577cfa40c
surface: Don't take a display argument in gdk_surface_new_popup()
...
The display can be taken from the surface, it must not be different.
2020-02-21 21:13:09 +01:00
Benjamin Otte
c73ac2ed70
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!1455
2020-02-21 18:24:56 +00:00
Benjamin Otte
7597f6b594
transform: Don't crash for gsk_transform_transform (id, id)
...
See attached tests
2020-02-21 18:30:13 +01:00
Benjamin Otte
b50093d044
transform: Make sure the identity transform is equal to NULL
2020-02-21 18:25:05 +01:00
Benjamin Otte
608e624ecf
x11: When clearing old Drop, emit LEAVE event
...
This can happen when the old DND operation died (like due to a crash or
a broken XWayland compositor.
2020-02-21 18:19:16 +01:00
Benjamin Otte
808961564c
gdk: Make DRAG_ENTER event take x/y coordinates
...
Make it mirror the behavior of ENTER/LEAVE events.
2020-02-21 18:19:16 +01:00
Benjamin Otte
41ef6e9fa5
transform: Add optimization for common case
...
Transforming identity by an other transform does not mean we need to
painstakingly apply the individual steps of other to construct a new
transform, it means we can just return other.
Or in math terms:
I * B = B
so just return B.
2020-02-21 18:19:16 +01:00
Piotr Drąg
4180ad57bc
Update POTFILES.in
2020-02-21 18:11:15 +01:00
Matthias Clasen
d7d7957b04
profiling: Avoid one extra printf
...
We already format the message, no need to use
printf again to combine that with the kind string.
2020-02-21 07:26:19 -05:00
Matthias Clasen
376f5eacbd
profiling: Avoid criticals
...
With events no longer GObjects, the type class is
longer around for peeking.
2020-02-21 07:23:40 -05:00
Matthias Clasen
77e1fd01c3
Merge branch 'readonly-events-1' into 'master'
...
Redo events
See merge request GNOME/gtk!1443
2020-02-21 06:18:25 +00:00
Matthias Clasen
43aa6d9c49
docs: Remove some no-longer existing api
2020-02-21 00:51:04 -05:00
Matthias Clasen
5ebe5be225
Stop exporting gtk_get_event_widget
...
This is non-essential convenience API, and we
don't really expose events to applications anymore.
2020-02-21 00:51:03 -05:00
Matthias Clasen
1c7191f45c
gtk-demo: Stop using gtk_get_event_widget
...
This is convenience api that will be going away.
2020-02-21 00:51:03 -05:00
Matthias Clasen
497a43a4ba
gdk: Drop event structs from the headers
...
All events are GdkEvents now.
2020-02-21 00:51:03 -05:00
Matthias Clasen
b2226ea1e3
gtk: Stop using GtkEventButton
...
Same as the previous commit. All events are
just GdkEvents now.
2020-02-21 00:51:03 -05:00
Matthias Clasen
8823882f97
gtk: Stop using GdkEventKey
...
We should just use GdkEvent, instead of taking
a GdkEventKey, and then cast it everywhere.
2020-02-21 00:51:03 -05:00
Matthias Clasen
9e415ad017
a11y: drop unused code
...
We are no longer using key snoopers.
2020-02-21 00:51:03 -05:00
Matthias Clasen
e062137b2c
motion controller: Match focus event propagation
...
Make the crossing event generation for pointer events
match what we do for focus now.
2020-02-21 00:51:03 -05:00
Matthias Clasen
77aed615e8
Keep more event controller api private
...
We don't want to expose the GtkCrossingData struct, and manually
feeding events to event controllers is not something we want to
encourage, going forward.
2020-02-21 00:51:03 -05:00
Matthias Clasen
4947b94a41
Stop exporting check_event_sanity
2020-02-21 00:51:03 -05:00
Matthias Clasen
0c96b2d8f7
Bring back im context focus-in/out
...
The key controller still needs to track focus,
in order to emit these signals when required.
2020-02-21 00:51:03 -05:00
Matthias Clasen
cadeca74e2
Go back to ::enter/::leave for pointer changes
...
These signals are behaving a little differently from
what ::focus-in/::focus-out used to do.
2020-02-21 00:51:03 -05:00
Matthias Clasen
5a2f829a40
Split off GtkEventControllerFocus
...
Split the focus tracking into a separate
GtkEventControllerFocus, and change the API one more time.
We are back to having ::focus-in and ::focus-out signals.
Update all users.
2020-02-21 00:51:03 -05:00
Matthias Clasen
89c3a7ab24
wip: Add more information to crossing events
...
Add fields for direct descendents to GtkCrossingData,
and populate them when emitting focus change events.
Also add accessors for these fields to GtkEventControllerKey,
and verify that they are set properly in the focus test.
Not done yet: Do the same for pointer crossing events.
2020-02-21 00:51:03 -05:00
Matthias Clasen
7bb6abb1d4
win32: Remove some leftover event struct access
...
And leftover old event api calls.
2020-02-21 00:51:03 -05:00
Matthias Clasen
de91e10a1b
wayland: Fix a release build warning
2020-02-21 00:51:03 -05:00
Matthias Clasen
4098653974
Update the focus test
...
This needs an update to handle the new focus-change signal.
2020-02-21 00:51:03 -05:00
Matthias Clasen
71b3f47909
Update event docs section
2020-02-21 00:51:03 -05:00
Matthias Clasen
1ef30c110f
Clean up GdkEventType docs
2020-02-21 00:51:03 -05:00
Matthias Clasen
6fd913b361
Some event struct packing improvements
...
Rearrange a few things, and move some booleans
into the Any struct, by using a bitfield there.
Some more cleanup could be done - the flags field
with its PENDING and FLUSHED members appears
entirely unused. Nobody is setting those flags.
2020-02-21 00:51:03 -05:00
Matthias Clasen
84edce3732
Streamline event structs
...
Use proper types (GdkModifierType, double), and drop
some unused fields (send_event, display).
2020-02-21 00:51:03 -05:00
Matthias Clasen
2cce508b33
x11: Remove some leftover event struct access
2020-02-21 00:51:03 -05:00
Matthias Clasen
56d44b4cec
x11: Stop using the send_event event field
...
The only use of this field is printing it out in a
debug message. We are going to drop it.
2020-02-21 00:51:03 -05:00
Matthias Clasen
563dd65530
Always deliver focus events to toplevels
...
Its was GTK expects. This change gets rid of the "Ignoring an
unexpected focus event from GDK on a non-toplevel surface."
warning.
2020-02-21 00:51:03 -05:00
Matthias Clasen
0fc2505ed6
Drop gtk_widget_event from API
...
We don't want events to be injected randomly from
the outside. Plus, there's no way to create such
events from the outside now.
2020-02-21 00:51:03 -05:00
Matthias Clasen
b1eaa502df
events: reorganize getters
...
Restructure the getters for event fields to
be more targeted at particular event types.
Update all callers, and replace all direct
event struct access with getters.
As a side-effect, this drops some unused getters.
2020-02-21 00:51:03 -05:00
Matthias Clasen
f1cf0eb3fc
Drop gdk_set/get_show_events
...
We don't need a separate api to turn on debugging
for events.
2020-02-21 00:51:02 -05:00
Matthias Clasen
31bf9da63a
Strip const from GdkEvent
...
Events are refcounted structs, and we generally don't
pass these as const.
2020-02-21 00:51:02 -05:00
Matthias Clasen
1026bfb1ac
events: Drop all setters
...
GdkEvent is now truly readonly.
2020-02-21 00:51:02 -05:00
Matthias Clasen
92288205d4
events: Drop target and related target
...
GTK no longer uses this, so we can drop it.
2020-02-21 00:51:02 -05:00
Matthias Clasen
e5223b1cee
main: Stop calling gdk_event_set_target
...
GTK is no longer relying on this.
2020-02-21 00:51:02 -05:00
Matthias Clasen
2416b4e2a0
Stop using gdk_event_get_target
...
We can now get the target widget from the gesture
that we are using to find the event in the first
place.
2020-02-21 00:51:02 -05:00
Matthias Clasen
2bac066a63
gesture: Keep the target widget for events
...
We already store the events; keep the target widget
in addition. This is a step towards getting rid of
gdk_event_get_target.
2020-02-21 00:51:02 -05:00
Matthias Clasen
cd601ffb9e
eventcontroller: Make the target widget available
...
Make it possible for event controllers to obtain
the target widget during handle_event.
2020-02-21 00:51:02 -05:00
Matthias Clasen
e54e48f6d1
Explicitly pass the target to handle_event
...
Pass the event propagation target explicitly down to
the event controllers. This is a step towards getting
rid of gdk_event_set_target.
2020-02-21 00:51:02 -05:00
Matthias Clasen
b38869b3aa
Stop looking at the related target for filtering
...
We are now sending crossing events (which are the only ones
where a related target makes sense) via handle_crossing.
2020-02-21 00:51:02 -05:00
Matthias Clasen
d063b6b6cc
Reinstate filtering for crossing events
...
The event propagation limit should apply to crossing events
as well.
2020-02-21 00:51:02 -05:00
Matthias Clasen
e3158a1bfb
Make crossing events handled the same way
2020-02-21 00:50:59 -05:00
Matthias Clasen
23c67f8c67
New focus change handling
...
Instead of relying on gdk's antiquated crossing events,
create a new GtkCrossingData struct that contains the
actual widgets, and a new event controller vfunc that
expects this struct. This also saves us from making sense
of X's crossing modes and details, and makes for a
generally simpler api.
The ::focus-in and ::focus-out signals of GtkEventControllerKey
have been replaced by a single ::focus-change signal that
takes GtkCrossingData as an argument. All callers have
been updated.
2020-02-21 00:47:53 -05:00
Matthias Clasen
9402e335d0
wip: scrolledwindow stop using targets
2020-02-21 00:47:53 -05:00
Matthias Clasen
64b9c6aaaa
main: Drop gtk_get_event_target
...
This is no longer used.
2020-02-21 00:47:53 -05:00
Matthias Clasen
61c32f3651
tooltip: stop using gtk_get_event_target
2020-02-21 00:47:53 -05:00
Matthias Clasen
1b2289ad9b
Stop using gtk_get_event_target
...
This is just a thin wrapper around gdk_event_get_target,
so use that directly.
2020-02-21 00:47:53 -05:00
Matthias Clasen
dd251d85c4
Pass translated coordinates outside the event
...
We want to make events readonly, so stop translating
their coordinates and instead pass the translated
coordinates separately, when propagating events.
2020-02-21 00:47:53 -05:00
Matthias Clasen
cd2b58574d
Drop GDK_NOTHING
...
Events of type GDK_NOTHING are good for nothing.
2020-02-21 00:47:53 -05:00
Matthias Clasen
3830e13b98
Make GdkEvent a boxed type
2020-02-21 00:47:53 -05:00
Matthias Clasen
c343031a0e
Stop using g_object_ref/unref on events
...
Use gdk_event_ref/unref instead of g_object_ref/unref.
Events will stop being object soon.
2020-02-21 00:47:53 -05:00
Matthias Clasen
835556c270
Drop gdk_event_new and gdk_event_copy
...
These functions are no longer used outside of gdkevents.c.
2020-02-21 00:47:52 -05:00
Matthias Clasen
59cc216985
display: Stop using gdk_event_copy
...
Events are effectively readonly in GDK now, so we can just
take a reference, no need for a copy.
2020-02-21 00:47:52 -05:00
Matthias Clasen
fe21223d48
win32: Use event constructors
2020-02-21 00:47:52 -05:00
Matthias Clasen
f11b1d258b
x11: Pass the right surface to the dnd filter
2020-02-21 00:47:52 -05:00
Matthias Clasen
e45711e727
x11: Remove an unnecessary check
...
We are not creating GDK_NOTHING events anymore. Yay
2020-02-21 00:47:52 -05:00
Matthias Clasen
79b4510c6d
x11: change event translator interface
...
Make the event translator return a new event, instead of
filling in a half-constructed one.
Update the two implementation in GdkX11Display and
GdkDeviceManagerXI2.
2020-02-21 00:47:51 -05:00
Matthias Clasen
15501afdbb
x11: Change the wm protocols filter api
...
Instead of passing a half-constructed event and expect
it to be filled in, pass the surface as in argument, and
add an out argument for a newly constructed GdkEvent.
2020-02-21 00:40:52 -05:00
Matthias Clasen
94fe0944cc
x11: Don't pass a GdkEvent to shape cache filters
...
The filter functions never look at that event, and
we want to get out of the business of passing half-
constructed events around.
2020-02-21 00:40:52 -05:00
Matthias Clasen
9c4f19e8ed
x11: Don't pass a GdkEvent to xsettings filters
...
The filter functions never look at that event, and
we want to get out of the business of passing half-
constructed events around.
2020-02-21 00:40:52 -05:00
Matthias Clasen
9a1497f582
events: Drop GDK_DESTROY
...
No backend is emitting GDK_DESTROY events anymore, so no
need to carry this around.
2020-02-21 00:40:52 -05:00
Matthias Clasen
7db8be93f4
gtk: Stop handling GDK_DESTROY differently from GDK_DELETE
...
We don't have child windows anymore, so there is no difference.
2020-02-21 00:40:52 -05:00
Matthias Clasen
047c18844c
x11: Don't generate GDK_DESTROY events
...
GTK does not differentiate between GDK_DESTROY and GDK_DELETE
anyway.
2020-02-21 00:40:52 -05:00
Matthias Clasen
30740f0e2c
x11: use event constructors
...
This is not quite complete and only handles the
simple cases.
2020-02-21 00:40:52 -05:00
Matthias Clasen
c9d9ccdb8c
broadway: Use event constructors
...
Convert all of Broadways event handling to use the new
constructors.
2020-02-21 00:40:52 -05:00
Matthias Clasen
4cf63f3eb3
wip: Use event constructors in the testsuite
...
This doesn't work because the constructors aren't exported,
so remove the gestures text temporarily, until we figure
out how to deal with it.
2020-02-21 00:40:52 -05:00
Matthias Clasen
c4a2cf03b2
textview: Stop using gdk_event_copy
2020-02-21 00:40:52 -05:00
Matthias Clasen
495de0b78b
main: Use constructors instead of gdk_event_copy + rewriting
2020-02-21 00:40:52 -05:00
Matthias Clasen
dac61b3cce
imcontextsimple: Use event constructors
2020-02-21 00:40:52 -05:00
Matthias Clasen
080e5de786
widget: Port emulation code to constructors
...
Use the new event constructors when generating events
for emulating presses.
2020-02-21 00:40:52 -05:00
Matthias Clasen
374c9dd880
window: Use event constructors
2020-02-21 00:40:52 -05:00
Matthias Clasen
a5f58e8d28
main: Use event constructors
...
At the same time, stop setting child_surface in
crossing events. Nothing in GTK looks at it.
2020-02-21 00:40:52 -05:00
Matthias Clasen
324aa39cb8
gdk: Use constructor for grab broken
2020-02-21 00:40:52 -05:00
Matthias Clasen
d6c5ecbea3
gdk: Use event constructors for dnd
2020-02-21 00:40:50 -05:00
Matthias Clasen
ef004c64c6
events: Drop x_root/y_root
...
We are not using these fields anymore.
2020-02-21 00:39:43 -05:00
Matthias Clasen
f15e90b194
broadway: Stop setting x_root/y_root in events
...
These fields are not used in GTK anymore, and are
going away soon.
2020-02-21 00:39:43 -05:00
Matthias Clasen
91b94f51f2
x11: Stop setting x_root/y_root in events
...
These fields are not used by GTK anymore and
will be going away soon.
2020-02-21 00:39:43 -05:00
Matthias Clasen
a8e9d6c1f5
x11: Stop relying on root coordinates in events
...
The X11 dnd code was still using x_root/y_root in
GdkEventMotion in a couple of places. Stop doing so,
these field are going away soon.
2020-02-21 00:39:43 -05:00
Matthias Clasen
7e80c39aee
Remove root coords from the GdkDrop api
2020-02-21 00:39:41 -05:00
Matthias Clasen
7f2564aabe
wayland: Clean up coordinate handling
...
Get rid of the get_coordinates function and just
use the structs directly.
2020-02-21 00:39:12 -05:00
Matthias Clasen
07ffa9ad6b
wayland: Use event constructors
...
Convert all of Waylands event handling to use the new
constructors.
2020-02-21 00:39:12 -05:00
Matthias Clasen
67035d2e35
gdk: Add event constructors
...
Add private API to construct events. This is a step towards
making events readonly, and not objects anymore.
The constructors here are sufficient to convert the Wayland
backend over. More may be added for other backends as needed.
Open issues:
- history
2020-02-21 00:39:12 -05:00
Matthias Clasen
9330158f11
Make a11y testsuite pass
2020-02-21 00:39:12 -05:00
Matthias Clasen
8318d3bed3
Merge branch 'master' into 'master'
...
build: gdk/wayland/cursor depends on wayland-client
See merge request GNOME/gtk!1453
2020-02-20 19:08:45 +00:00
Dominique Leuenberger
8b9ad1e963
build: gdk/wayland/cursor depends on wayland-client
...
On distros where wayland-client.h might not be directly in /usr/include
we fail to find the correct headers otherwise.
2020-02-20 17:07:02 +01:00
Timm Bäder
018870643a
scale: Remove useless extra local variable
2020-02-20 10:30:14 +01:00
Timm Bäder
aa53fef39c
scale: Remove unused member
2020-02-20 10:23:09 +01:00
Timm Bäder
faddbb18d3
emojichooser: Add style class to emoji toolbar
...
Closes #1013
2020-02-20 10:23:09 +01:00
Timm Bäder
f14978c68f
filechooserwidget: Fold function into only caller
2020-02-20 10:23:09 +01:00
Timm Bäder
c0de02520c
filechooserwidget: Use a proper GtkPopoverMenu
...
Instead of a fake one where we add .menu to a normal popover. This makes
the menu look like other context menus.
2020-02-20 10:23:09 +01:00
Timm Bäder
b58f9e2aa2
filechoosererrorstack: Set a layout manager
...
Otherwise it doesn't know what to do with its child widget.
2020-02-20 10:23:09 +01:00
Timm Bäder
b8a752c751
filechooserwidget: Allow typing a location in recent mode
...
This is triggered by typing / or hitting Ctrl+L. Since we don't have a
visual indicator for this mode right now anyway, the reason for not
allowing it in recent mode cited in the comment just above the
early-exit is irrelevant.
Closes #2178
2020-02-20 10:23:09 +01:00
Timm Bäder
194039c749
filechooserwidget: Remove unused constants
2020-02-20 10:23:09 +01:00
Timm Bäder
64d0f848bc
text: Remove gtk_text_get_im_context()
...
Unused.
2020-02-20 10:23:09 +01:00
Timm Bäder
d8a61b3185
docs: Remove focus_tracking.txt
...
All the info in there is outdated and not useful.
2020-02-20 10:23:09 +01:00
Timm Bäder
d3936f8d93
docs: Remove developers.txt
...
Everything in there has either been removed in the past or is outdated
information.
2020-02-20 10:23:09 +01:00
Timm Bäder
63bb1c2aaa
docs: Remove dnd_internals.txt
...
This is either already completely outdated or will be soon.
2020-02-20 10:23:09 +01:00
Timm Bäder
e18a159f16
spinbutton: Remove manual queue_draw() calls
...
Everything is automatically redrawn when changing the value, etc.
2020-02-20 10:23:09 +01:00
Timm Bäder
a1bc3ae2c8
popvermenu: Clarify css node docs
...
We add the .menu css class to the popover main node, not its contents
node.
2020-02-20 10:23:09 +01:00
Timm Bäder
2ad6c045b4
aboutdialog: Clarify docs and fix preconditions
2020-02-20 10:23:09 +01:00
Timm Bäder
ec6d5839bd
modelbutton: Un-select on mouse leave
...
This brings us closer to the old GtkMenuItem behavior and also makes
more sense.
2020-02-20 10:23:09 +01:00
Timm Bäder
2bf9a5bd29
aboutdialog: Replace visited_links GList with GPtrArray
2020-02-20 10:23:09 +01:00
Timm Bäder
b5d4815eb7
aboutdialog: Use new GtkStackPage API
2020-02-20 10:23:09 +01:00
Timm Bäder
188f00e05a
stack: Add GtkStackPage:visible accessors
2020-02-20 10:23:09 +01:00
Benjamin Otte
9660ae5556
Merge branch 'wip/xdg-popup-async-relayout' into 'master'
...
Synchronous popup layout
See merge request GNOME/gtk!1241
2020-02-19 18:57:14 +00:00
Emmanuele Bassi
da828a9d0c
Merge branch 'ci-flatpak' into 'master'
...
ci: Update flatpak jobs
See merge request GNOME/gtk!1451
2020-02-19 15:35:21 +00:00
Emmanuele Bassi
3a054d5a90
ci: Update flatpak jobs
...
The CI infrastructure was changed to run with fewer privileges, so we
need to adapt our Flatpak jobs to compensate.
See: https://mail.gnome.org/archives/desktop-devel-list/2020-February/msg00055.html
2020-02-19 15:04:58 +00:00
Jonas Ådahl
ca71119a40
gdk/surface: Replace move_to_rect() with GdkPopupLayout based API
...
Replace the gdk_surface_move_to_rect() API with a new GdkSurface
method called gdk_surface_present_popup() taking a new GdkPopupLayout
object describing how they should be laid out on screen.
The layout properties provided are the same as the ones used with
gdk_surface_move_to_rect(), except they are now set up using
GdkPopupLayout.
Calling gdk_surface_present_popup() will either show the popup at the
position described using the popup layout object and a new unconstrained
size, or reposition it accordingly.
In some situations, such as when a popup is set to autohide, presenting
may immediately fail, in case the grab was not granted by the display
server.
After a successful present, the result of the layout can be queried
using the following methods:
* gdk_surface_get_position() - to get the position relative to its
parent
* gdk_surface_get_width() - to get the current width
* gdk_surface_get_height() - to get the current height
* gdk_surface_get_rect_anchor() - to get the anchor point on the anchor
rectangle the popup was effectively positioned against given
constraints defined by the environment and the layout rules provided
via GdkPopupLayout.
* gdk_surface_get_surface_anchor() - the same as the one above but for
the surface anchor.
A new signal replaces the old "moved-to-rect" one -
"popup-layout-changed". However, it is only intended to be emitted when
the layout changes implicitly by the windowing system, for example if
the monitor resolution changed, or the parent window moved.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
37f4c644d3
gdk/surface: Reset position after hiding
...
The x and y position of GdkSurface is only valid when visible, so reset
them to their inital state after hiding.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
46d40cd4bd
wayland: Simplify logic deciding whether to use xdg_popup
...
From a handful of hueristics and guess-work, to a single
`surface->surface_type == GDK_SURFACE_POPUP`.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
11dbc384ab
wayland: Fix top-most-popup check
...
We can map a non-grabbing popup wherever, it's just the grabbing
popup-chain that needs to be ensured not to break any ordering rules.
Fix this by managing two lists; one of open popups, and another for
grabbing ones.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
ebd3ee9880
gdk: Move GdkGeometry declaration to gdktypes.h
2020-02-19 09:47:18 +01:00
Jonas Ådahl
339a04da7c
gdk: Move GdkGravity to gdktypes.h
2020-02-19 09:47:18 +01:00
Jonas Ådahl
40693412d3
x11: Make gdk_surface_get_position() return relative position
...
The returned position should be relative to the parent surface, but
GdkSurface::x,y were only managed properly for O-R windows. This makes
it correct for regular windows too.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
2bb0eddfb5
wayland: Simplify popup parent discovery
...
Now popups surfaces are always created with the parent set, so we don't
need to implement vorious guess work to try to find what the parent
might be. Remove that code and just use GdkSurface::parent which is
where the parent set during construction ends up at.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
49fcbc27ca
wayland: Remove old "gdk-attached-grab-surface" hackery
...
The corresponding code in gtk/ is long gone, so it's luckly unused these
days.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
7fafa5133b
wayland/surface: Add per surface configuration event queues
...
Add event queues specifically for surface configuration events
(xdg_surface.configure, xdg_toplevel.configure, xdg_popup.configure etc)
so that a configuration can be completed without having side effects on
other surfaces. This will be used to synchronously configure specific
GdkSurfaces, as is needed by the Gtk layout mechanisms.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
0d086872ae
gdk/wayland/surface: Use dedicated bool for frame callback freezing
...
The freezing is conditioned on various state, so lets make the thawing a
bit more robust. Without this there was a risk that we'd thaw too many
times if there was a frame callback requested while the conditions for
the freezing were not met.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
f284e1d483
wayland: Remove position method split
...
Position can only be done via gdk_surface_queue_relayout(); the legacy
way is no longer possible, so remove the legacy positioning code.
2020-02-19 09:47:18 +01:00
Jonas Ådahl
4e78dd2ae0
gdk/surface: Use enum type for surface type
2020-02-19 09:47:18 +01:00
Jonas Ådahl
6eaeadb3b9
tests/popover: Add check box for switching autohide prop
2020-02-19 09:47:18 +01:00
Jonas Ådahl
f43717a42e
popover: Unrealize when autohide prop changes
...
Changing the autohide property means the popover needs to be remapped.
Remapping may need user interaction, so lets just unrealize the popover
if the property changes, forcing the application to remap it should it
be shown again.
2020-02-19 09:47:18 +01:00
Timm Bäder
5097c1defc
Merge branch 'file-filter-name-property' into 'master'
...
GtkFileFilter: Add a GObject property for the name
See merge request GNOME/gtk!376
2020-02-19 07:43:51 +00:00
Matthias Clasen
d58a381c93
Merge branch 'icontheme-api' into 'master'
...
Icontheme api
Closes #2410
See merge request GNOME/gtk!1449
2020-02-19 01:50:49 +00:00
Matthias Clasen
66307f00f1
icontheme: Update the api
...
Add properties, and use string arrays instead of lists.
Among other things, this renames gtk_icon_theme_list_icons
to gtk_icon_theme_get_icon_names.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2410
2020-02-18 20:32:17 -05:00
Matthias Clasen
db1ca92790
Merge branch 'wip/otte/for-master' into 'master'
...
debug: When debug-printing, treat NULL as the default display
See merge request GNOME/gtk!1450
2020-02-19 01:18:04 +00:00
Benjamin Otte
732716ba95
debug: When debug-printing, treat NULL as the default display
...
Otherwise we lose debug prints from all code that allows NULL displays.
2020-02-19 01:21:33 +01:00
Matthias Clasen
03ee4229f2
Merge branch 'wip/otte/dnd' into 'master'
...
More DND rework
See merge request GNOME/gtk!1445
2020-02-18 22:15:56 +00:00
Emmanuele Bassi
e64cce2ca3
Merge branch 'dialog-headerbar-type-annotation' into 'master'
...
GtkDialog: Add `type Gtk.HeaderBar` annotation to headerbar getter return value
See merge request GNOME/gtk!1447
2020-02-18 10:58:06 +00:00
Sebastian Dröge
8378eb22a3
GtkDialog: Add type Gtk.HeaderBar annotation to headerbar getter return value
2020-02-18 10:55:31 +02:00
Benjamin Otte
0d4d4e9a8c
colorbutton: Fix drag source
...
By running it in the capture phase, it will not be starved for events by
the button's click source and make drags actually start a color drag
operation.
2020-02-18 02:58:58 +01:00
Benjamin Otte
7ca149ff90
Remove gdk_content_provider_new_with_formats()
...
See the removal of gdk_content_provider_new_with_callback() for a
rationale.
2020-02-18 02:40:00 +01:00
Benjamin Otte
7ae5fd357c
tests: Modernize testdnd2
2020-02-18 02:40:00 +01:00
Benjamin Otte
b8cf7ea1c6
dnd: Port the TreeModel machinery to GValue DND
2020-02-18 02:40:00 +01:00
Matthias Clasen
308d2caf31
Merge branch 'text-emoji-history' into 'master'
...
text: Treat Emoji insertion like clipboard
See merge request GNOME/gtk!1444
2020-02-17 22:31:17 +00:00
Benjamin Otte
1145da3ea5
placessidebar: Modernize DND
...
No more shooting pointers through pipes
2020-02-17 21:56:16 +01:00
Benjamin Otte
27d7aa1407
notebook: Use proper DND
...
Actually use GValues for the DND operation instead of sending GBytes of
pointer addresses through pipes.
This is a bit complicated because we need to special-case rootwindow
drops, because they're handled on the source side, so we need a custom
ContentProvider.
2020-02-17 21:56:16 +01:00
Benjamin Otte
9703fcc605
notebook: Move dnd scrolling via arrows to own drop target
...
This removes excess code from the tab dnd machinery
2020-02-17 21:56:16 +01:00
Benjamin Otte
e25bfa6a61
dragdest: Handle NULL content formats everywhere
...
NULL means we don't do content formats checks and accept everything.
We use this for notebook arrows or expanders that react to ongoing
drags.
2020-02-17 21:56:16 +01:00
Benjamin Otte
9a7607b419
contentprovider: Add a union content provider
2020-02-17 21:56:16 +01:00
Matthias Clasen
a838a54dca
text: Treat Emoji insertion like clipboard
...
Enter the Emoji inseration in the undo history.
Also, stop stashing away the selection when we
pop up the Emoji chooser, and use the selection
as-is when we insert the Emoji.
2020-02-17 15:05:09 -05:00
Benjamin Otte
f5e3584b5b
placessidebar: Don't claim to support text dnd
...
Because you don't. And never did.
2020-02-17 04:04:21 +01:00
Benjamin Otte
80ba7fd682
dragdest: Make gtk_drop_target_new() args be transfer full
...
Saves tons of code.
2020-02-17 04:04:21 +01:00
Benjamin Otte
91d91a29e8
colorbutton, colorswatch: Simplify DND
...
- Use GDK_TYPE_RGBA and let GDK do the conversion from
application-x-color
- Don't do extra mime type checks when accept() does that for us already
2020-02-17 04:04:21 +01:00
Benjamin Otte
3a7e3cf90d
dragdest: Simplify function
...
Make it obvious that the functions checks one condition and then the
other.
2020-02-17 04:04:21 +01:00
Benjamin Otte
e1f8c1430f
dnd: simplify code
...
The old code did mimetype checks everywhere when type compatibility has
since been moved to the GtkDropTarget::accept signal.
So the code can now just assume a compatible mime type exists.
2020-02-17 04:04:21 +01:00
Benjamin Otte
da83457a60
dnd: Remove gdk_content_provider_new_with_callback()
...
Content providers are meant to be immutable, apart from very special
cases, but in those cases they need to emit
gdk_content_provider_content_changed().
Having a constructor that just uses a get_func invites abuse of this
by not making developers aware of those requirments.
In fact, all users in GTK failed to do this.
Instead, code should use the GtkDragSource::prepare signal to create
content providers when needed.
The same problem exists with gdk_content_provider_new_with_formats(),
but this commit doesn't touch that.
2020-02-16 20:10:31 +01:00
Benjamin Otte
dbad440468
testdnd3: Use GValue dnd
2020-02-16 20:10:30 +01:00
Benjamin Otte
8d2ed36a1b
contentprovider: Add gdk_content_provider_new_typed()
...
Gets around the boilerplate required to create and initialize a GValue
by having this function doing it via G_VALUE_COLLECT().
2020-02-16 20:10:30 +01:00
Benjamin Otte
762c4602fb
wayland: Destroy the offer on gdk_drop_finish()
...
Otherwise the compositor won't be aware the dnd failed and will in turn
not notify the drag source.
2020-02-16 20:10:30 +01:00
Benjamin Otte
5a726bc665
drop: Add a state machine for tracking events
2020-02-16 20:10:30 +01:00
Benjamin Otte
410dbdf671
widget: Fix namespacing problem
...
In Vala and JS at least, gtk_widget_get_css_name() and
gtk_widget_class_get_css_name() are resolved to
GtkWidget.get_css_name().
To avoid this problem, we rename the class version.
2020-02-16 20:05:05 +01:00
Benjamin Otte
43b8aff62c
widget: Fix typos for css-clases property
2020-02-16 19:57:45 +01:00
Benjamin Otte
47c8026e38
Merge branch 'wip/otte/dnd' into 'master'
...
some DND fixes
See merge request GNOME/gtk!1440
2020-02-15 23:45:25 +00:00
Benjamin Otte
b844f34cda
tests: Do proper local DND
...
Just transfer GValues.
2020-02-15 22:33:57 +01:00
Benjamin Otte
46bbb397e1
wayland: Use a magic mime type for local DND
...
Otherwise the compositor gets all confused when it's trying to make
drag happen but we know it's not going to happen.
After all, we exchange data behind its back, we just need to keep it
informed.
2020-02-15 22:33:57 +01:00
Benjamin Otte
894ac6c126
dragdest: Use format matching APIs
2020-02-15 21:04:33 +01:00
Benjamin Otte
a824da66d9
drop: Ensure all relevant formats are available
...
1. GdkDrop does deserialization, so add the deserialize formats
2. If the drop is local, we can copy straight from the drag, so we can
also copy all its formats. This fixes cases where the backend would
drop formats it doesn't support.
2020-02-15 20:02:44 +01:00
Timm Bäder
08501c9510
calendar: Emit {next,prev}-{month,year} signals
...
Fixes #833
2020-02-15 17:18:27 +01:00
Timm Bäder
a4ecfd8f33
widget: Use get_css_name() in get_property()
...
Instead of reimplementing it there.
2020-02-15 17:18:27 +01:00
Timm Bäder
28482e52be
Adwaita: Add focus outlines back to scale troughs
...
Fixes #189
2020-02-15 17:18:27 +01:00
Timm Bäder
bf839dbb88
coloreditor: Scale h value to 360
...
Fixes #1321
2020-02-15 17:18:27 +01:00
Timm Bäder
2529464e21
range: Avoid rounding errors when allocating highlight
...
Fixes #2438
2020-02-15 17:18:26 +01:00
Timm Bäder
7e43034068
widget: Add css-classes property
...
Mirroring the values added and removed via {add,remove}_css_class().
2020-02-15 17:18:26 +01:00
Timm Bäder
52979a0e93
infobar: Remove _get_{action,content}_area()
...
Accessors like these are weird to have and we can add widgets to the
content area via gtk_container_add() as well as add widgets to the
action area via gtk_info_bar_add_action_widget().
2020-02-15 17:18:26 +01:00
Timm Bäder
78a5bf8e21
Remove gtk_info_bar_get_content_area() uses
...
We can just add() to the info bar directly.
2020-02-15 17:18:26 +01:00
Timm Bäder
8612a8a39f
testinfobar: Stop using gtk_info_bar_get_content_area()
...
We have an easier way of adding widgets to the content area of an
infobar: Just gtk_container_add() them like usual.
2020-02-15 17:18:26 +01:00
Timm Bäder
a7de8e6b2f
infobar: Don't store close button visibility separately
...
We can already set and query that value via
gtk_widget_{get,set}_visible() on the close button.
2020-02-15 17:18:26 +01:00
Timm Bäder
3cc57c2e3a
actionbar: Use a bin layout
2020-02-15 17:18:26 +01:00
Timm Bäder
a1d47ec59f
calendar: Add style class to today's label
...
Add the .today style class to the label indicating the current day.
Fixes #230
2020-02-15 17:18:26 +01:00
Timm Bäder
43a9f9bd02
calendar: Document style classes
...
Fixes #790
2020-02-15 17:18:26 +01:00
Matthias Clasen
e5d83eea30
events: Make proximity and scroll events have tools
...
The Wayland backend tries to set device tools on these
events, and it was just an oversight that they don't
carry them.
2020-02-15 09:44:34 -05:00
Benjamin Otte
5f7054862b
Merge branch 'wip/otte/for-master' into 'master'
...
Drop GTK_WINDOW_POPUP
See merge request GNOME/gtk!1437
2020-02-14 20:42:11 +00:00
Matthias Clasen
8ef7013165
Drop gdk_surface_new_temp
...
GTK is not using this API anymore, and we want
to consolidate our surface types to just toplevels
and popups.
2020-02-14 21:20:12 +01:00
Matthias Clasen
723b894c19
testsuite: Stop using gdk_surface_new_temp
...
We can just use regular toplevels here.
2020-02-14 21:19:29 +01:00
Benjamin Otte
c1f71ee3e8
window: Remove GtkWindowType and window->type
...
And remove code that was making decisions on the type and just use
the part for toplevels.
2020-02-14 21:18:49 +01:00
Benjamin Otte
222e6e5d6e
testsuite: Use GtkTextDirection instead of GtkWindowType
...
GtkWindowType is aout to be dropped, so use another enum for the enum
tests - one that is likely to survive for a long time.
2020-02-14 21:18:49 +01:00
Benjamin Otte
de49e47690
textview: Fix docs typo
2020-02-14 21:18:49 +01:00
Benjamin Otte
a278edab22
window: Remove type argument from gtk_window_new()
2020-02-14 21:18:49 +01:00
Benjamin Otte
c2bd4bc3cb
testsuite: Replace popups with toplevels
...
The tests do not depend on the window being a popup.
2020-02-14 21:18:49 +01:00
Benjamin Otte
fb856d96cd
builder: Use different construct-only property
...
The window type is going away, so use the css name instead.
2020-02-14 21:18:49 +01:00
Benjamin Otte
264967b764
widget: Add gtk_widget_get_css_name() API
2020-02-14 21:18:49 +01:00
Benjamin Otte
ad23ce23ad
testsuite: Remove popup property from simplify tools
...
I'm not even sure a popup GtkAssistant should be a thing...
2020-02-14 21:18:49 +01:00
Benjamin Otte
41bdf16b23
testsuite: Turn all CSS test ui files into regular windows
...
Use undecorated windows instead of popups.
2020-02-14 21:18:49 +01:00
Benjamin Otte
2c843362a0
testsuite: Make a11y tests use regular windows
2020-02-14 21:18:49 +01:00
Benjamin Otte
922f9df86f
Merge branch 'wip/otte/for-master' into 'master'
...
reftests: Change popup windows to non-decorated windows
See merge request GNOME/gtk!1435
2020-02-14 17:12:17 +00:00
Benjamin Otte
980934f82d
reftests: Change popup windows to non-decorated windows
...
This allows getting rid of popup windows.
2020-02-14 17:54:38 +01:00
Matthias Clasen
c45ed9d76e
Merge branch 'zhaoqiang/gtk-To_avoid_compiler_warning'
2020-02-14 08:47:36 -05:00
Matthias Clasen
b6cb1a6eb3
Merge branch 'master-subtract-base-size' into 'master'
...
gdk: Subtract base size when checking aspect ratio
See merge request GNOME/gtk!1331
2020-02-14 13:19:42 +00:00
Mohammed Sadiq
22a6aaf4c5
Merge branch 'wip/otte/for-master' into 'master'
...
slicelistmodel: Fix two wrong computations
See merge request GNOME/gtk!1433
2020-02-14 02:39:21 +00:00
Benjamin Otte
d303b5b0eb
slicelistmodel: Fix two wrong computations
...
Both of those are thinkos during math.
Found by Mohammed Sadiq.
Testcases triggering both have been added.
2020-02-14 03:15:22 +01:00
Matthias Clasen
97ec29d3f5
Force-create style contexts in realize
...
This is necessary as long as style contexts are
required for proper css change tracking.
Fixes #2435
2020-02-13 21:14:01 -05:00
Emmanuele Bassi
eb2e0137fa
Merge branch 'master' into 'master'
...
Fixed OpenGL extension detection for extensions promoted to OpenGL core.
Closes #2428
See merge request GNOME/gtk!1424
2020-02-13 19:53:33 +00:00
David Hogan
0969d06925
Fix detection of OpenGL 3.3 core GL_ARB_timer_query.
...
Some systems (notably macOS) will not allow enumeration of an extension that has been promoted to core OpenGL for context in use. This change assumes that GL_ARB_timer_query is available on OpenGL 3.3+.
I could not find definitive information on whether GL_ARB_debug_output or GL_KHR_debug have been added to core. Other extensions in use were addressed by https://gitlab.gnome.org/GNOME/gtk/merge_requests/1422 .
2020-02-14 05:41:01 +11:00
David Hogan
c4111dad31
Fixed OpenGL extension detection for extensions promoted to OpenGL core.
...
For a given OpenGL context, macOS in particular does not support enumeration / detection of OpenGL features that have been promoted to core OpenGL functionality. It is possible other drivers are the same. This change assumes support for GL_ARB_texture_non_power_of_two with OpenGL 2.0+, GL_ARB_texture_rectangle with OpenGL 3.1+ and GL_EXT_framebuffer_blit with OpenGL 3.0+. I failed to find definitive information on whether GL_GREMEDY_frame_terminator has been promoted to OpenGL core, or whether GL_ANGLE_framebuffer_blit or GL_EXT_unpack_subimage have been promoted to core in OpenGL ES. This change results in a significant GtkGLArea performance boost on macOS.
Closes #2428
2020-02-14 05:41:01 +11:00
Emmanuele Bassi
33c6032a10
Merge branch 'ci-flatpak' into 'master'
...
CI pipeline changes for Flatpak jobs
See merge request GNOME/gtk!1429
2020-02-13 18:10:29 +00:00
Emmanuele Bassi
9a631f2942
ci: Remove G_MESSAGES_DEBUG
...
We don't need all the debugging messages.
2020-02-13 17:10:19 +00:00
Emmanuele Bassi
9332abfd5b
ci: Allow flatpak jobs to fail
...
We have more accurate CI jobs, now; the Flatpak jobs are nice to have.
2020-02-13 17:09:35 +00:00
Matthias Clasen
883980c48c
Merge branch 'gi-fixes' into 'master'
...
Various fixes for documentation and introspectable API
See merge request GNOME/gtk!1427
2020-02-13 16:38:41 +00:00
Matthias Clasen
2e0af29839
Make release builds mandatory for ci
...
The tests are now passing in release builds, lets keep
it that way.
2020-02-13 11:21:15 -05:00
Matthias Clasen
cdee2ac173
testsuite: Handle icontheme test better
...
Skip just the failing tests in release builds.
2020-02-13 10:56:26 -05:00
Matthias Clasen
a66ed7c461
gsk: Fix the compiler warning differently
2020-02-13 10:42:21 -05:00
Emmanuele Bassi
09abb43628
Merge branch 'report-fixes' into 'master'
...
Fixes for the CI test reports
See merge request GNOME/gtk!1426
2020-02-13 15:04:04 +00:00
Emmanuele Bassi
de1543d4fa
ci: Use per-suite anchors
...
Anchors are global, so they need to be namespaced.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
5ed3f8d98b
ci: Rearrange the results in the HTML report
...
Move the failures up top, so they stand out.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
affc7b58fa
ci: Fix the HTML anchor in the report
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
2b1e273c53
ci: Use result instead of exit code in the JUnit report
...
We have a result code coming from Meson which is more accurate than just
looking at the exit code of the unit.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
1a4d1f8994
ci: Unexpected passes are failures
...
List them as such in our reports.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
adc7bf9f25
ci: Put the branch name in the HTML header
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
f4a8edf441
ci: Move HTML report meta from header to article
...
Makes the bar smaller.
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
3dc6a07f5d
ci: Re-enable ccache
2020-02-13 14:55:39 +00:00
Emmanuele Bassi
2a0dfa9670
Remove gtk_style_context_get_parent()
...
The function was declared and mentioned in the documentation, but it has
been removed in commit 416182a20d .
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
40852ea952
gi: Skip gtk_custom_layout_new()
...
The whole GtkCustomLayout class is mostly a C convenience API, and
there's no reason why high level languages should use it.
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
32a2a629dd
Fix the function name in the gtk-doc stanza
...
The documentation is still referring to the old function's name.
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
35ac7de140
Match argument name between declaration and definition
...
Otherwise the documentation and the introspection data will complain.
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
0d354d1dc4
docs: Match the argument name with its declaration
2020-02-13 14:53:25 +00:00
Emmanuele Bassi
cdd7e4c5ec
Add a notify function to GdkContentProvider
...
The callback-based content providers need a GDestroyNotify function to
free the data passed to them on construction, otherwise they are going
to leak.
2020-02-13 14:53:25 +00:00
Matthias Clasen
47f2a6cafd
Remove border-half-pixel reftest from xfail
...
It passes both locally and on ci now.
2020-02-13 09:39:27 -05:00
Matthias Clasen
313c399122
Merge branch 'wip/otte/no-clip-on-draw' into 'master'
...
Various fixes to rendernode drawing with Cairo
See merge request GNOME/gtk!1425
2020-02-13 13:43:59 +00:00
Benjamin Otte
052d0f6e60
gdk: Remove gdk_cairo_get_clip_rectangle()
...
The function is fundamentally broken for unbounded surfaces.
If a surface is unbounded, we cannot represent this as a
cairo_rectangle_int_t, and using the return value doesn't work because
it's already used for something else.
In GTK3, unbounded surfaces aren't a problem, but GTK4 uses recording
surfaces.
So better remove that function before we keep using it and using it
wrong.
2020-02-13 07:36:38 +01:00
Benjamin Otte
8f6cab6560
cairoblur: Get rid of gdk_cairo_get_clip_rectangle() call
...
It's about to be removed.
2020-02-13 07:36:38 +01:00
Benjamin Otte
6203cecf97
gsk: Clip shadow node before push_group()
...
We want to be sure to push a group that's as small as possible, so we
clip to the child's bounds, because that's the smallest we can go.
2020-02-13 07:36:38 +01:00
Benjamin Otte
6f9f18009c
gsk: Add a utility function for rectangles
...
... and use it.
2020-02-13 07:36:38 +01:00
Benjamin Otte
67610b1242
cairoblur: Move the check for early exit
...
That means we only have one place where we check all kinds of early
exits.
2020-02-13 07:36:38 +01:00
Benjamin Otte
f0993fc881
rendernode: Avoid rounding errors
...
Compute the pattern matrix directly instead of transforming the cairo_t.
This ensures that when node_size / texture_size is some obscure floating
point value, we don't get rounding issues from scaling by it once we
draw the texture_size rectangle.
I have no actual failure where this comes in handy, but I had written
the code anyway, so decided to keep it.
2020-02-13 07:36:38 +01:00
Benjamin Otte
75b130ed6b
testsuite: Add tests for rounded rect code
...
... including the bug that was fixed in the parent commit.
2020-02-13 07:36:38 +01:00
Benjamin Otte
77d7c713d4
roundedrect: Fix inlining of graphene functions
...
graphene treats equality for contains() operations as always matching,
so do the same thing.
This is because unlike integer math, floating point cannot do the "as
close as possible to the point, but not reaching it" operation that
integer does by just subtracting 1.
2020-02-13 07:36:38 +01:00
Benjamin Otte
b0369fc300
roundedrect: Fix gsk_rounded_rect_intersects_rect()
...
The previous code would return FALSE for
gsk_rounded_rect_intersects_rect (&rounded, &rounded.bounds);
if rounded was indeed rounded.
2020-02-13 07:36:38 +01:00
Benjamin Otte
16e38701b6
testsuite: Don't use gdk_cairo_get_clip_rectangle()
...
I want to remove it.
2020-02-13 06:15:44 +01:00
Benjamin Otte
9d8ceb0cb2
testsuite: Don't destroy surfaces that are still used
...
Coercing the surfaces must not unref the old surface, because the old
surface is going to be saved to a file.
2020-02-13 06:15:44 +01:00
Benjamin Otte
c313a71c3a
testsuite: Remove accidentally checked in file
...
This file should go in the listview branch I guess.
2020-02-13 06:14:05 +01:00
Matthias Clasen
fb84fe7065
Fix flickery hover
...
Commit 47c44644b1 was a bit overzealous in fixing
compiler warnings. We still need to call collect_textures,
even if we don't need the number that it returns.
2020-02-12 22:45:24 -05:00
Matthias Clasen
9be8f8cf43
Merge branch 'wip/baedert/cairo-paint' into 'master'
...
Remove cairo_clip() when drawing render nodes
Closes #2431
See merge request GNOME/gtk!1418
2020-02-12 23:44:38 +00:00
Matthias Clasen
14ecc9ec7e
Remove unused signal enum values
...
GtkWidget lost even more signals, so we don't need
these enum values anymore.
2020-02-12 18:25:42 -05:00
Matthias Clasen
073e8dd987
popovermenu: Avoid an uninitialized variable
...
Pointed out by Timm/clang.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2434
2020-02-12 17:58:41 -05:00
Matthias Clasen
6c6b3d0d11
Merge branch 'ci-pages' into 'master'
...
Rename the SCSS files for our themes
Closes #2423
See merge request GNOME/gtk!1423
2020-02-12 22:35:58 +00:00
Emmanuele Bassi
2ab9be54fb
Rename the SCSS files for our themes
...
It seems that Meson's gnome.compile_resources() cannot deal with two
files with the same name under different directories, which breaks the
build parallelism because the GResource file ends up not depending on
either the Adwaita or the HighContrast gtk-contained.css file.
This commit only changes the on-disk names of the Adwaita and
HighContrast SCSS files, and the corresponding generated CSS files; the
files in the GResource are going to be aliased to the old file names, to
minimise the breakage. We might want to change the theme entry points at
some later date, if we decide to commit to this naming scheme.
Fixes : #2423
See Meson bug: https://github.com/mesonbuild/meson/issues/6615
2020-02-12 20:22:43 +00:00
Matthias Clasen
11ab39617e
Fix the Emoji chooser finalize
...
If the Emoji chooser is finalized before the idle
has run, it would spew criticals, breaking some tests.
Avoid that.
2020-02-12 14:23:01 -05:00
Georges Basile Stavracas Neto
7404c393f3
Merge branch 'gbsneto/fix-emojichooser-header' into 'master'
...
build: Install gtkemojichooser.h
See merge request GNOME/gtk!1420
2020-02-12 18:56:19 +00:00
Georges Basile Stavracas Neto
1b95cd27bc
build: Install gtkemojichooser.h
...
It was made public at ef7172dc1e , but the header file
wasn't added to the public headers list.
Add the header file to the list.
2020-02-12 15:41:49 -03:00
Emmanuele Bassi
88e2a060f8
Merge branch 'ci-pages' into 'master'
...
Small CI pipeline fixes
See merge request GNOME/gtk!1419
2020-02-12 18:38:39 +00:00
Emmanuele Bassi
4247bf0fb6
ci: Update flatpak job
...
Use `flatpak build` and point at the nightly repo when generating the
bundle.
2020-02-12 18:24:54 +00:00
Emmanuele Bassi
f2da5e5617
ci: Deploy the API ref before flatpak
2020-02-12 18:12:53 +00:00
Emmanuele Bassi
f51ceb142b
ci: Fix linking of the CI assets in the report
...
The report is relative to the build directory, and so are the generated
assets.
2020-02-12 18:12:53 +00:00
Matthias Clasen
e1d85aeeb0
testsuite: Warn if a necessary env var is missing
...
Better to warn if we know why the tests are
going to fail. Saves headscratching later.
2020-02-12 12:18:59 -05:00
Matthias Clasen
cc8506ca15
Move performance tests to the right testsuite
...
This was a copy-paste error.
2020-02-12 12:18:59 -05:00
Timm Bäder
52c46e5c24
rendernode: Don't clip when _draw()ing
2020-02-12 16:54:49 +01:00
Timm Bäder
b12a6be9d9
rendernode: draw() only in node bounds
...
We currently disable when draw()ing nodes using the cairo fallback path,
which means we can't just use cairo_paint(). Use a proper rectangle
instead.
Fixes #2431
2020-02-12 16:54:46 +01:00
Matthias Clasen
d702c159d5
Merge branch 'cleanup-profiler-marks' into 'master'
...
Cleanup profiler marks
See merge request GNOME/gtk!1417
2020-02-12 14:31:40 +00:00
Alexander Larsson
6e3dd6dd62
profile: Use separate names for frameclock marks instead of using details
...
The marks are averaged based on the name, so this makes more sense.
Also rename the map/unmap marks to have the same capitalization as
everything else.
2020-02-12 14:29:31 +01:00
Alexander Larsson
d9c59a7c8c
profiler: Add G_GNUC_PRINTF markers to silence warnings
...
I was getting CI failures like:
../gdk/gdkprofiler.c: In function ‘add_markvf’:
../gdk/gdkprofiler.c:111:3: error: function ‘add_markvf’ might be a candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]
2020-02-12 13:36:04 +01:00
Alexander Larsson
324202a56c
profiler: Clean up profiler marks for frameclock
...
This drops the marks for before/after-paint as they are internal
things that very rarely use any time, and also flush/resume-events
as any events reported here will get separate marks so will be easy
to see anyway.
Also, we rename the entire frameclock cycle to "frameclock cycle"
rather than "paint_idle" which is rather cryptic.
2020-02-12 13:20:32 +01:00
Alexander Larsson
e3a67385f4
profiler: Add profiler marks for when surfaces are mapped and unmapped
...
This is done on the X11 side so we can tell when the map/unmap takes
effect and how long it took since the map request.
2020-02-12 12:44:43 +01:00
Alexander Larsson
b4b00e2887
icon theme: Don't add profiler marks for short async icon loads
...
We do a bunch of preloads, and most of these are not really interesting
anyway.
2020-02-12 12:43:27 +01:00
Alexander Larsson
e134eef505
builder: Don't add profiler marks for short parses
...
There are a lot of thes (since we're recursing), so don't spew the
output with uninteresting ones.
2020-02-12 12:42:29 +01:00
Alexander Larsson
2890cd849f
profiler: Add _end_mark() version of _add_mark()
...
These don't take a duration, instead they call g_get_monotonic_time() to
and subtract the start time for it.
Almost all our calls are like this, and this makes the callsites clearer
and avoids inlining the clock call into the call site.
2020-02-12 11:25:34 +01:00
Alexander Larsson
01d5ad2056
profiler: Make profiler-is-running a macro
...
When we use if (GDK_PROFILER_IS_RUNNING) this means we get an
inlined if (FALSE) when the compiler support is not compiled in, which
gets rid of all the related code completely.
We also expand to G_UNLIKELY(gdk_profiler_is_running ()) in the supported
case which might cause somewhat better code generation.
2020-02-12 11:05:01 +01:00
Alexander Larsson
cc643df88b
Convert all profiler times from nsec to usec
...
usec is the scale of the monotonic timer which is where we get almost
all the times from. The only actual source of nsec is the opengl
GPU time (but who knows what the actual resulution of that is).
Changing this to usec allows us to get rid of " * 1000" in a *lot* of
places all over the codebase, which are ugly and confusing.
2020-02-12 10:44:17 +01:00
Alexander Larsson
13eedf1a9f
Use markf in one more place
2020-02-12 10:40:26 +01:00
Alexander Larsson
685fd3c33d
fixup! Add gdk_profiler_add_markf() to do printf formating
2020-02-12 10:11:53 +01:00
Alexander Larsson
8a1c51db1c
Use the new gdk_profiler_add_markf() function
2020-02-12 09:59:03 +01:00
Alexander Larsson
6de85c0a68
Add gdk_profiler_add_markf() to do printf formating
...
This allows us to avoid hand-rolling g_strdup_printf calls,
but also moves the printf into the called function where
it doesn't bloat the code of the calling function if the profiler
is not running.
2020-02-12 09:58:52 +01:00
Carmen Bianca BAKKER
c2dcd1bf94
Update Esperanto translation
2020-02-12 07:43:58 +00:00
Matthias Clasen
6e0cf02494
Merge branch 'mark-events-with-kind' into 'master'
...
profiler: Always mark events with the kind
See merge request GNOME/gtk!1414
2020-02-11 19:01:10 +00:00
Alexander Larsson
36808e0c81
profiler: Always mark events with the kind
2020-02-11 19:51:49 +01:00
Matthias Clasen
9062607d5f
Merge branch 'wip/baedert/outline-radius' into 'master'
...
css boxes: Compute box from border box
Closes #2425
See merge request GNOME/gtk!1408
2020-02-11 16:59:11 +00:00
Emmanuele Bassi
042a5736fa
Merge branch 'share-gl-programs' into 'master'
...
GskGLRenderer: Share programs between different renderers in same display
See merge request GNOME/gtk!1413
2020-02-11 16:30:16 +00:00
Matthias Clasen
720e48ec51
Merge branch 'handle-max-texture-size' into 'master'
...
gl: Don't require too large texture for offsreen ops
See merge request GNOME/gtk!1411
2020-02-11 16:23:02 +00:00
Matthias Clasen
9d0393d8e6
Merge branch 'fix-angle-normalization' into 'master'
...
gsk: Fix angle normalization
See merge request GNOME/gtk!1409
2020-02-11 16:17:14 +00:00
Alexander Larsson
7b0b3d9547
GskGLRenderer: Share programs between different renderers in same display
...
This is similar to how we share texture atlases. Some added complexity
in that the program state also needed to be shared, so it had to move to
the shared Programs object.
With this change realization of additional GskRenderers when opening
popups went from ~60msec to ~35 msec on average.
2020-02-11 16:58:45 +01:00
Emmanuele Bassi
bb71cdd722
Merge branch 'ci-jobs' into 'master'
...
Update CI jobs
See merge request GNOME/gtk!1412
2020-02-11 15:25:48 +00:00
Emmanuele Bassi
2b425fa88a
ci: Allow release job to fail
...
We need to investigate release-specific failures, and possibly fix our
test suite to deal with debug-specific poking through the internal
state.
For the time being, allow the release job to fail, but this is strictly
a temporary measure.
2020-02-11 15:12:14 +00:00
Emmanuele Bassi
b99a4da939
testsuite/gtk: Add xfail tests
...
Some tests are expected to fail.
Some tests are expected to fail in non-debugging builds.
The icontheme test is the latter.
2020-02-11 14:53:57 +00:00
Emmanuele Bassi
c69595a3a9
vulkan: Handle VK_ERROR_UNKNOWN
...
A newly added Vulkan 1.2 error.
2020-02-11 14:47:22 +00:00
Emmanuele Bassi
76aba1f046
ci: Add a style check pass
...
We should at least try to get the style check done by a machine, as
opposed to have humans go through merge requests with coding style
nitpicks.
2020-02-11 14:47:22 +00:00
Emmanuele Bassi
59028d7d0f
ci: Generate the report for the release builds
...
We are going to need to hide the report generation into the test runner
script, as we want the job to produce the reports even in case of
failure, instead of bailing out immediately.
2020-02-11 14:47:22 +00:00
Emmanuele Bassi
0df542e494
Declare global counters only in debug builds
2020-02-11 14:47:22 +00:00
Emmanuele Bassi
47c44644b1
Silence compiler warnings in non-debug builds
2020-02-11 14:47:22 +00:00
Emmanuele Bassi
1806af1e83
Declare global counter only in debug builds
2020-02-11 14:47:22 +00:00
Matthias Clasen
b5dc03d940
Merge branch 'fix-revealer-scale' into 'master'
...
revealer: Fix child size allocation at small scales
See merge request GNOME/gtk!1410
2020-02-11 14:06:36 +00:00
Emmanuele Bassi
c4dfacc404
ci: Add missing newline escape
...
Otherwise we're going to run the accessibility test suite, and it's
going to fail.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
c00896a090
ci: Remove static build job
...
Now that we figured out why the build was failing on Fedora when the
profiling code was enabled, we can go back to building both shared and
static libraries by default.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
5ace9ef4e8
ci: Use the new Fedora image
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
a7d295254f
ci: Add static packages for GLib and PCRE
...
Otherwise Meson will warn about missing static dependencies for
sysprof-capture-3.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
62352dd1fc
Fix compiler warnings in the release build
...
We have a bunch of debug-only variables that get set and never used
outside of debug code paths, and the compiler is not happy about it.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
74b5bb12fb
ci: Disable ccache
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
02ac7ff0aa
Initialise out variable
...
Otherwise we might return an undefined value, and the compiler will be
very cross at us.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
c06a08d63a
ci: Split the static and shared builds (again)
...
Sadly, we can't do a static build with the profiling code enabled
because we don't have a static GLib build available.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
9e38a70c6b
ci: Replicate the CI image scripts from GLib
...
They are easier to use and document, and allow us to add new base images
in the future without making a mess.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
56f9cdd99d
ci: Refactor the CI pipeline
...
We should have a single job for building both static and shared
versions of GTK. On the other hand, having a separate job for the
release build would be a plus.
Additionally, we shouldn't use an opaque script to build GTK; the only
step in the process that requires hand-holding is running the tests
suites under Xvfb, and having the build options visible from the YAML
file gives us a better idea of what kind of build we're running.
2020-02-11 13:39:52 +00:00
Emmanuele Bassi
153e8a0c92
ci: Use release builds for Flatpak bundles
2020-02-11 13:39:52 +00:00
Chun-wei Fan
6ec546be02
tests/frame-stats.c: Include stdlib.h
...
It is used for exit().
2020-02-11 20:59:04 +08:00
Alexander Larsson
dc6fe091b9
revealer: Fix child size allocation at small scales
...
As pointed out in https://gitlab.gnome.org/GNOME/gtk/issues/1481
and seen from critical warnings with swinging revealers in widget-factory
there are some size allocation issues in GtkRevealer.
What happens is that we request a size of the revealer itself
based on the child natural size and the current stage of the transition
by applying a scale to the natural size. We then round up to nearest
int size. However, we want the widget to render as if it did get the
natural size so we can transform it, rather than the scaled down size.
For example, a label should not start ellipsizing in the animation.
So we inverse the scale when allocating the child.
Unfortunately, for very small scales the inversion of the scale can
result in very large sizes, and for such scales we rounded up the
requested size to 1, so we will be allocating huuuuge children.
In order to avoid such issue we pick an arbitrary maximum upscale
scale factor of 100. This means that in the case where the allocated
size is 1 we never allocate the child at > 100 px. This means
that in large downscaling cases we may run into the clipping issue
described above. However, at these downscaling levels (100 times!)
we're unlikely to notice much detail anyway.
2020-02-11 13:52:12 +01:00
Alexander Larsson
1f0438e7fe
gsk: Fix angle normalization
...
I was getting assertions that normalize_angle() failed the
result < 260 check. Doing some research on this it turns out
to be a precision issue. If the incomming angle is very slightly
below zero, then adding 360 to it may end up with exactly 360.
I simplified the code a bit to avoid division and rounding, because in
practice most angles will be "just outside" the 0-360 degree anyway.
And i also added a workaround for the "result is 360" case by just
setting it to 0.
2020-02-11 13:51:06 +01:00
Alexander Larsson
8fdb710c0f
gl: Don't require too large texture for offsreen ops
...
When rendering ops to an offscreen texture we take max-texture-size
in consideration and modify the scale we use such that the required
texture does not exceed the limit.
This means some rendering will be blocky/fuzzy, but that is better
than it being clipped.
2020-02-11 13:50:35 +01:00
Matthias Clasen
af98c46d04
Typo fix
2020-02-11 07:46:12 -05:00
Matthias Clasen
7ac2982617
Revert "Add the label-wrap-justify reftest to xfails"
...
This reverts commit 5e746d35b2 .
Turns out label-wrap-justify isn't failing in ci, and this is
now making ci fail :(
2020-02-11 07:44:01 -05:00
Timm Bäder
8561860aa1
css boxes: Compute inline box from border box
...
We can't just use the outline rect and apply the border radius because
the outline box is the border box grown by the outline offset, which
will also grow the resulting border radius.
Fixes #2425
2020-02-11 12:10:16 +01:00
Matthias Clasen
37a9d0620d
3.98.0
2020-02-10 15:32:19 -05:00
Matthias Clasen
5e746d35b2
Add the label-wrap-justify reftest to xfails
...
Seems just like the other label tests, down to details
of text rendering.
2020-02-10 15:19:13 -05:00
Matthias Clasen
d711ca3a67
Drop the toplevel-vs-popup reftest
...
Popups look different from toplevels. I don't think
a reftest that tries to prove otherwise has much
leg to stand on.
2020-02-10 15:15:05 -05:00
Matthias Clasen
564a43cd3a
Disable the buttons a11y test
...
The test fails because radio buttons are currently broken.
2020-02-10 15:06:56 -05:00
Matthias Clasen
17a5e9b2aa
Update expected test output
...
The a11y test for GtkAssistant produces different
output due to headerbar changes.
2020-02-10 15:03:47 -05:00
Matthias Clasen
c0dcaccf4b
calendar: Fix mismatches with GDateTime
...
GDatetime uses 1-based month and day numbers, whereas
GktCalendars are 0-based. Correct for this.
2020-02-10 14:59:40 -05:00
Matthias Clasen
11cd955591
Calendar: Make year/month/day writable again
...
Our a11y tests were relying on this.
2020-02-10 14:14:18 -05:00
Matthias Clasen
0677bfeb7f
testsuite: Update expected output
...
The output for combo boxes in a11y tests has changed
because they use popovers now.
2020-02-10 13:55:37 -05:00
Matthias Clasen
b38eb6eab4
Merge branch 'fix-gestures-test' into 'master'
...
Fix gestures test
See merge request GNOME/gtk!1406
2020-02-10 15:57:54 +00:00
Alexander Larsson
7d23b6dad5
Fix gestures test
...
This tests was testing gestures by faking an event in the
middle of a window that has a hbox with an expanding image in it.
For me (and I guess this depends on all sorts of issues like whether
CSD is enabled, font sizes, etc) the hbox ended up centered horizontally
but not vertically (probably because of csd at the top), so no events
ever hit the inner widgets.
This is fixed by emitting the events at allocation.x/y of the
hbox, which should contain both the hbox and the image (as it expands).
2020-02-10 16:24:03 +01:00
Matthias Clasen
e5e7dbf2a5
Merge branch 'fix-hidpi-popups' into 'master'
...
Fix popup placement on hidpi multi-monitor
See merge request GNOME/gtk!1405
2020-02-10 15:08:51 +00:00
Alexander Larsson
23211bcae8
hidpi: Rescan monitors when screen scale factor changes
...
All the code in e.g. init_randr15() divides the physical resolutions with
the screen scale, however if we get the screen scale from xsettings
rather than e.g. GDK_SCALE the initial setup is using the wrong value.
So, whenever the screen scale size is changed we need to trigger
a re-read of the randr data
2020-02-10 15:34:32 +01:00
Matthias Clasen
59b935af38
Merge branch 'mainloop-cleanup' into 'master'
...
Mainloop cleanup
See merge request GNOME/gtk!1404
2020-02-10 14:32:09 +00:00
Matthias Clasen
d0f5ce41aa
More updates
2020-02-10 08:13:23 -05:00
Alexander Larsson
1698369d52
Merge branch 'icon-theme-api-rework' into 'master'
...
Icon theme api rework
See merge request GNOME/gtk!1390
2020-02-10 12:45:56 +00:00
Alexander Larsson
96a4bb446c
Fix typo in GtkIconPaintable is-symbolic property
2020-02-10 13:30:57 +01:00
Alexander Larsson
ad0e901061
icon-theme: Add back and fix test for handling non-square icons
...
We test this by looking at the produced render nodes now that
we don't actualluy scale the icon. Also, it turns out that this
code was broken due to some typos, so we also fix those.
2020-02-10 13:17:15 +01:00
Alexander Larsson
ba781eca74
Expose gtk_icon_paintable_new_for_file
2020-02-10 13:17:15 +01:00
Alexander Larsson
8f1253ad26
GtkIconPaintable: Add properties for file, icon-name and is-symbolic
2020-02-10 13:17:05 +01:00
Matthias Clasen
e123fff545
Merge branch 'baselineoverlay' into 'master'
...
A baseline overlay
See merge request GNOME/gtk!840
2020-02-10 12:07:18 +00:00
Alexander Larsson
904eecd1ed
icon paintable: Replace get_filename and get_resource_path with get_file()
...
This returns a GFile which can represent both the above.
2020-02-10 12:33:17 +01:00
Alexander Larsson
344ad65031
Rename GTK_ICON_LOOKUP_LOAD_IN_THREAD to GTK_ICON_LOOKUP_PRELOAD
2020-02-10 11:43:47 +01:00
Alexander Larsson
14b3b684ef
icontheme: Always return some icon name in get_icon_name() for lookup results
...
If you called gtk_icon_theme_lookup(), then always return some useful
icon name from gtk_icon_paintable_get_icon_name(), even if we picked
an unthemed icon.
Also rewrite the gtk_icon_paintable_get_icon_name() docs to make this
clearer.
2020-02-10 11:40:00 +01:00
Matthias Clasen
9309153abc
Remove GTK_DEBUG=baselines
...
This has been reimplemented differently
in the inspector.
2020-02-10 00:10:43 -05:00
Matthias Clasen
643417dc32
widget: Stop embedding baseline debugging
...
The inspector has an overlay that achieves the
same, in a cleaner way.
2020-02-10 00:10:43 -05:00
Matthias Clasen
4a978dc8c4
inspector: Draw baselines as an overlay
2020-02-10 00:10:43 -05:00
Matthias Clasen
bc4637fff6
Remove unused includes
...
We eventually want to get rid of GtkSelectionData.
As a first step, stop including gtkselection.h unnecessarily.
2020-02-09 23:59:22 -05:00
Matthias Clasen
eec219e6c7
docs: Mention gtk_main in the migration guide
2020-02-09 23:13:13 -05:00
Matthias Clasen
a8db322be6
Drop gtk_get_main_thread
...
This is not a very useful api, and if you need it,
you can just as easily keep track yourself which thread
called gtk_init().
2020-02-09 23:13:13 -05:00
Matthias Clasen
4dd780a96b
Drop gtk_main and gtk_main_quit
...
The alternatives are to use GtkApplication,
or use GMainContext.
2020-02-09 23:13:13 -05:00
Matthias Clasen
4c22939dea
docs: Update an example
...
Don't use gtk_main() in the mainloop example.
It is going away.
2020-02-09 23:12:32 -05:00
Matthias Clasen
a6c5466900
Stop using gtk_main and gtk_main_quit
...
Replace these calls with direct use of GMainContext api.
2020-02-09 23:12:32 -05:00
Matthias Clasen
c789711652
Stop using gtk_main_quit
...
Stop using gtk_main and gtk_main_quit in tests and
examples. These APIs are on the way out.
2020-02-09 23:12:32 -05:00
Matthias Clasen
7eb889c7aa
Drop gtk_main_level
...
This api isn't useful without gtk_main, which is also
on the way out.
2020-02-09 23:12:32 -05:00
Matthias Clasen
49a6ad3dd1
Drop gtk_main_iteration
...
This function and its cousin, gtk_main_iteration_do, are
thin wrappers around GMainContext api that should just
be used directly.
2020-02-09 23:12:32 -05:00
Matthias Clasen
ebc720bfdb
Drop gtk_events_pending
...
This was just a thin wrapper around gtk_main_context_pending,
which should be used directly instead.
2020-02-09 23:11:49 -05:00
Matthias Clasen
24917ac353
tests: Stop using gtk_events_pending
...
Just use the GMainContext api directly.
2020-02-09 23:11:49 -05:00
Matthias Clasen
9eeeb631ca
win32 printing: Stop using gtk_events_pending
...
Just use the GMainContext API directly.
2020-02-09 23:11:49 -05:00
Matthias Clasen
07988fc17f
win32: One more build fix
2020-02-09 23:04:10 -05:00
Matthias Clasen
4f79676b0b
win32: Fix the build
2020-02-09 22:58:53 -05:00
Matthias Clasen
900ff743f1
Merge branch 'main-cleanup' into 'master'
...
Cleanup in gtkmain.h
See merge request GNOME/gtk!1403
2020-02-10 03:55:11 +00:00
Benjamin Otte
810f55c006
filechooser: Remove outdated hack
...
In GTK2, the filechooser was using a Paned, so switching between sidebar
and files list with the arrow keys didn't work (the slider would be
selected instead). So in
https://bugzilla.gnome.org/show_bug.cgi?id=161489 a crude hack was added
to make this possible.
Over the years the filechooser code has changed so that it now would do
this by default, yet the hack had been retained.
2020-02-09 16:54:38 -05:00
Benjamin Otte
fce37b137d
gdk: Make gdk_keyval_name() return a const char
...
The string is const, so return it like that.
2020-02-09 16:50:22 -05:00
Matthias Clasen
998384aa08
Remove unused include
2020-02-09 16:50:22 -05:00
Emmanuele Bassi
327441fa3e
cssprovider: Remove unused include
2020-02-09 16:50:22 -05:00
Matthias Clasen
b927609e21
Remove gtk_propagate_event from public API
...
This is not a function that can be safely called
outside of GTK.
2020-02-09 11:00:53 -05:00
Matthias Clasen
688f8bf085
Remove gtk_main_do_event from public API
2020-02-09 10:55:56 -05:00
Matthias Clasen
057f41532b
Remove gtk_main_do_event from the docs
2020-02-09 10:55:37 -05:00
Matthias Clasen
ebc24d75af
testsuite: Stop using gtk_main_do_event
...
Instead, emit ::event on the surface. Neither of
these is a proper test api, but one works as well
as the other.
2020-02-09 10:54:26 -05:00
Matthias Clasen
c1970009ff
docs: Remove more mentions of gtk_main_do_event
2020-02-09 10:45:33 -05:00
Matthias Clasen
8f0fc24516
docs: Remove a reference to gtk_main_do_event
...
It is not great to put a function in the public api and
document it as "do not call this" only so we can refer
to its docs in other places. Therefore, fold the docs
directly into the input handling overview chapter.
2020-02-09 10:38:01 -05:00
Matthias Clasen
ba825dce29
docs: Remove a mention of gtk_main_do_event
2020-02-09 10:37:24 -05:00
Matthias Clasen
c4b16f7424
css: Add a comment
...
All the other color values have this comment,
best to be consistent.
2020-02-09 10:23:27 -05:00
Matthias Clasen
cffff36436
Merge branch 'wip/baedert/remove-outline-properties' into 'master'
...
css: Remove outline border radius properties
Closes #2414
See merge request GNOME/gtk!1402
2020-02-09 15:03:44 +00:00
Matthias Clasen
7de5b391ab
gsk: Update docs sections
2020-02-08 19:40:56 -05:00
Matthias Clasen
0e15032635
gsk: Small documentation additions
2020-02-08 19:36:25 -05:00
Matthias Clasen
be2ba89900
Fix a doc comment
...
Signals take two colons.
2020-02-08 19:27:32 -05:00
Matthias Clasen
a824be2bb9
docs: Drop a few no longer existing symbols
2020-02-08 19:25:13 -05:00
Matthias Clasen
348dcaa4a3
docs: Update the switch thumbnail
...
Make the thumbnail for switches reflect the
current appearance of this widget.
2020-02-08 19:22:23 -05:00
Matthias Clasen
f240bcbbc4
emojichooser: Fix the docs
...
Make the emojichooser show up in the docs.
2020-02-08 19:21:57 -05:00
Matthias Clasen
621a427627
Fix the build with -Dgtk_doc=true
...
We need to export the emoji chooser symbols to
really make it public api.
2020-02-08 19:04:19 -05:00
Matthias Clasen
645f49cf2b
Fix build with -Dgtk_doc=true
...
Toolbars were removed, so don't try to create
thumbnails of them.
2020-02-08 19:02:46 -05:00
Timm Bäder
01ba11fc71
css: Remove outline border radius properties
...
These are always set to the same value as the corresponding border
radius properties. They are also non-standard, so remove them and
replace them with the border radius properties everywhere.
Fixes #2414
2020-02-08 20:43:16 +01:00
Matthias Clasen
f6b0e0e1c2
Merge branch 'avoid-mime-sniffing' into 'master'
...
Avoid mime sniffing where possible
See merge request GNOME/gtk!1400
2020-02-08 15:44:16 +00:00
Matthias Clasen
2f17ab3ce7
Avoid mime sniffing where possible
...
When we are loading symbolic pngs or svgs, we know
that we need to the png or svg loader, so there is
no need to go through (surprisingly expensive) mime
sniffing to find the right loader.
2020-02-08 10:22:54 -05:00
Matthias Clasen
55b60f6da9
gtk-demo: Don't call gtk_main_quit
...
It doesn't work with GtkApplications that do not
call gtk_main().
2020-02-07 16:25:02 -05:00
Matthias Clasen
1f74695758
Adwaita: Fix selection in vertical spin buttons
...
This was broken by more specific selectors.
2020-02-07 15:43:07 -05:00
Matthias Clasen
1ab70e2dfa
Merge branch 'patch-1' into 'master'
...
Update migrating-3to4.xml (fixed typo, in line 377)
See merge request GNOME/gtk!1398
2020-02-07 19:23:55 +00:00
J Arun Mani
3cbb3dc0f4
Update migrating-3to4.xml
2020-02-07 18:30:42 +00:00
Matthias Clasen
e3afb2fec8
label: Don't use gtk_widget_peek_style_context
...
We may just not have a style context. And we can just
as well go directly to the css styles.
2020-02-07 13:16:45 -05:00
Timm Bäder
d3857f8bd3
window: Move variable initialziation just before usage
2020-02-07 13:16:45 -05:00
Timm Bäder
655711fef2
Rename gtk_widget{get,set,has}_style_class to _css_class
...
We want to use css instead of style everywhere now.
2020-02-07 13:16:45 -05:00
Timm Bäder
69fa15981c
treepopover: Fix header guard
2020-02-07 13:16:32 -05:00
Timm Bäder
2a46d5960d
box: Move vfunc implementations before class_init
...
Just like we do everywhere else. This way we can also get rid of all the
prototypes.
2020-02-07 13:16:32 -05:00
Timm Bäder
b9b5cae6d2
calendar: Remove day-selected-double-click signal
...
It doesn't really make sense to treat double clicks here different than
single clicks (and is bad UX), and it also breaks switching months by
quickly trying to single-click the last/first days in the calendar.
2020-02-07 13:16:32 -05:00
Timm Bäder
3249756648
calendar: Remove an unused enum
2020-02-07 13:16:32 -05:00
Timm Bäder
8ef9009bde
calendar: Remove month-changed signal
...
Listen to notify::month instead.
2020-02-07 13:16:32 -05:00
Timm Bäder
093eac9441
calendar: Keep a GDateTime around
...
Instead of a year/month/day triple.
2020-02-07 13:16:32 -05:00
Timm Bäder
93c6f2256f
calendar: Return a GDateTime from get_date()
2020-02-07 13:16:32 -05:00
Timm Bäder
1151da5cf3
calendar: Use GDateTime to select days
2020-02-07 13:16:32 -05:00
Timm Bäder
a6f9052cf1
calendar: Use widgets for everything
2020-02-07 13:16:32 -05:00
Timm Bäder
a437162f6d
calendar: Try to avoid changing size when changing the year
2020-02-07 13:16:32 -05:00
Timm Bäder
9ecd448682
calendar: Remove spinning code
...
This is dead code
2020-02-07 13:16:32 -05:00
Timm Bäder
74cb1ca2f5
calendar: Add accessors for display properties
...
Instead of having a display flags enum and bitfield, just add proper
accessors for the properties, which is what we do everywhere else.
2020-02-07 13:16:32 -05:00
Timm Bäder
e94e703685
testcalendar: Remove unused function
2020-02-07 13:16:32 -05:00
Timm Bäder
4cceba06bc
calendar: Remove details
...
This is an unused feature that's way too complicated for a default
calendar widget and complicates the implementation a lot. Since we want
to eventually replace this with actual widgets, remove the details
support now.
2020-02-07 13:16:32 -05:00
Timm Bäder
ab84b17c1a
calendar: Fix an uninitialized value
...
Values pased to gtk_widget_measure must be initialized to 0. This failed
if the header widget of the calendar was invisible.
2020-02-07 13:16:32 -05:00
Timm Bäder
7fd06cacbd
Adwaita: Fix levelbar styling
...
The block nodes are inside a trough node.
2020-02-07 13:16:32 -05:00
Timm Bäder
b471158e38
{box,grid}layout: Access border spacing directly
...
Instead of going through the style context
2020-02-07 13:16:32 -05:00
Timm Bäder
8388791f87
GskTransform: Remove useless fmod check
...
All angles are in the [0; 360[ range
2020-02-07 13:16:32 -05:00
Timm Bäder
cbb05a3eab
GskTransform: add assertions to make normalize_angle() intentions clear
...
360deg should be expressed as 0deg and no angle should ever be
negative.
2020-02-07 13:16:32 -05:00
Timm Bäder
4cfac3b91c
snapshot: Remove new_with_parent
...
Unneeded now that we have push_collect()/pop_collect()
2020-02-07 13:16:32 -05:00
Timm Bäder
17ddae5bf9
textlayout: Use gtk_snapshot_{push,pop}_collect()
2020-02-07 13:16:32 -05:00
Timm Bäder
75ef8d8a50
GskRoundedRect: Inline graphene_rect_contains_rect
...
Brings gsk_rounded_rect_contains_rect down from 0.54% to 0.14% when
rendering rounded backgrounds.
2020-02-07 13:16:32 -05:00
Timm Bäder
47b8facca4
widget: Use gtk_snapshot_{push,pop})_collect
...
So we avoid allocating a new snapshot just for that.
2020-02-07 13:16:32 -05:00
Timm Bäder
bf8fb2c1a5
snapshot: Add _push_collect() and _pop_collect()
...
These will replace the previous gtk_snapshot_new_with_parent(), which
allocated an entirely new GObject just to push()/pop() some state. This
is already a problem but will be more important in the future as we
start using this more.
2020-02-07 13:16:32 -05:00
Timm Bäder
b7ee2cbc28
Start using GtkWidget's new style class API
2020-02-07 13:16:32 -05:00
Timm Bäder
b1d64a6b3a
renderborder: Make simple border case more obvious
...
When reaching this point, it is impossible that all border styles are
HIDDEN or NONE, but up to 3 of them can still be that style. In any
case, the "none or solid" border style is the most common on there is,
so try to make this simpler here by just appending a border node
directly instead of going through the snapshot_border path.
2020-02-07 13:15:59 -05:00
Timm Bäder
60095ade9b
Move GTK_BORDER_STYLE_HIDDEN before GTK_BORDER_STYLE_SOLID
...
The simple case when drawing border is "solid or nothing", which we can
now check for as simple as "style <= GTK_BORDER_STYE_SOLID".
2020-02-07 13:15:59 -05:00
Timm Bäder
3a727eed7a
testcalendar: Close window properly
2020-02-07 13:15:59 -05:00
Timm Bäder
64c6229f54
searchbar: Use proper getter in _get_property()
...
Instead of retuning a seemingly random boolean, just use
gtk_search_bar_get_search_mode().
2020-02-07 13:15:59 -05:00
Timm Bäder
60be37d63a
searchbar: Use g_object_notify_by_pspec
...
We already keep the pspecs around, so use them.
2020-02-07 13:15:59 -05:00
Timm Bäder
e044656d99
progressbar: Remove a few unneeded queue_resize() calls
...
This will happen automatically when adding style classes, setting the
label text, etc.
2020-02-07 13:15:59 -05:00
Timm Bäder
c0fef36692
Window: inline function into only caller
2020-02-07 13:15:59 -05:00
Timm Bäder
a67bd7a04e
widget: Fix a from_string/try_string mixup
2020-02-07 13:15:59 -05:00
Timm Bäder
e152d25ac0
widget: Speed up verify_invariants()
...
Hide the expensive GTK_IS_ROOT() checks behind the cheaper realized,
mapped, etc. checks. This way we only check for the widget being a root
if the invariant does not hold.
This gets pop_verify_invariants() from 16% to 6% when running the
scrolling benchmark in the widget-factory.
2020-02-07 13:15:59 -05:00
Timm Bäder
b561eb8299
widget: Remove verify_child_invariants
...
Just calls verify_invariants() anyway.
2020-02-07 13:15:59 -05:00
Piotr Drąg
6150344195
Update POTFILES.in
2020-02-07 17:27:16 +01:00
Alexander Larsson
24fede0225
GtkIconHelper: Trigger preload when css sizes is valid
...
When the css is validated we know the css size, so we can
create the paintable at that point, and we do so passing the
LOAD_IN_THREAD flag.
This causes us to load most icons early on, in parallel instead of
during the first snapshot.
2020-02-07 17:26:22 +01:00
Alexander Larsson
e27413a9ed
icon-theme: Add GTK_ICON_LOOKUP_LOAD_IN_THREAD flag
...
This causes lookup to trigger a thread that loads the icon texture.
2020-02-07 17:25:18 +01:00
Matthias Clasen
03317ec2ec
NEWS: Small additions
2020-02-07 09:17:51 -05:00
Matthias Clasen
1a671cfd63
flatpak: Build against the master runtime
...
This is what the ci is set up to use, and building
against 3.34 fails there.
2020-02-07 09:17:51 -05:00
Matthias Clasen
24e28309fb
Merge branch 'wip/otte/toolbar' into 'master'
...
remove GtkToolbar
See merge request GNOME/gtk!1383
2020-02-07 13:25:51 +00:00
Benjamin Otte
44e153d8a8
GtkToolbar: remove
2020-02-07 14:08:26 +01:00
Benjamin Otte
d72301b3c1
testsuite: Get rid of GtkToolbar
...
Just use GtkBox instead
2020-02-07 14:08:08 +01:00
Benjamin Otte
e00030dff2
css: Remove .primary-toolbar
...
It's not used anywhere anymore.
2020-02-07 14:08:08 +01:00
Benjamin Otte
9cccb944ef
css: Remove .inline-toolbar
...
It's not used anywhere anymore.
2020-02-07 14:08:08 +01:00
Benjamin Otte
1363cacb3a
widget-factory: Get rid of toolbars
2020-02-07 14:08:08 +01:00
Benjamin Otte
68dbb3f31a
gtk-demo: Get rid of toolbars
2020-02-07 14:08:08 +01:00
Benjamin Otte
8a60f5dc78
bloatpad: Use a box, not a toolbar
2020-02-07 14:08:08 +01:00
Benjamin Otte
3d9e622fda
print: Don't use a toolbar in the custom paper dialog
...
Use a regular linked box instead.
2020-02-07 14:08:08 +01:00
Benjamin Otte
645af0917c
cssnode: Remove leftover vfunc
2020-02-07 14:06:20 +01:00
Matthias Clasen
c247e7680b
Remove accidentally added files
2020-02-07 08:05:45 -05:00
Matthias Clasen
1da23b0c21
Add a forgotten word
2020-02-07 07:59:14 -05:00
Matthias Clasen
de299bb6bf
Fix syntax
2020-02-07 07:50:02 -05:00
Matthias Clasen
65cc8305c9
Updates for 3.98
2020-02-07 07:48:30 -05:00
Alexander Larsson
bdbafe63f9
icontheme: Optimize memory use and lookup speed by internalizing icon names
...
Instead of having the IconTheme have a hashtable that owns
individual strings and then IconThemeDirSize have a similar
hash (but with the strings owned by the other hash), we
have a consecutive memory chunks where we store the icon names
and then the hashtable has pointers into this.
This means we can avoid a bunch of individual strdup()s in a
way that is less fragmented and wastes less space. Additionally,
since we do an initial lookup anyway we have the internalized
icon name during lookup which means we can use g_direct_hash/equal
instead of g_str_hash/equal making the lookup faster too.
2020-02-07 12:00:52 +01:00
Alexander Larsson
2be29f982d
Remove stray space
2020-02-07 08:44:46 +01:00
Alexander Larsson
79699cc20d
Use G_OBJECT_TYPE_NAME instead of g_type_name_from_instance
2020-02-07 08:44:29 +01:00
Matthias Clasen
c7ab02d38c
Merge branch 'wip/carlosg/implicit-grabs-on-leave' into 'master'
...
Handle implicit grabs on leave events
Closes #13
See merge request GNOME/gtk!1397
2020-02-07 07:06:45 +00:00
Carlos Garnacho
e67f0bfcfd
gtkmain: Wait for GDK_CROSSING_UNGRAB leave event with implicit grabs
...
If there is a passive grab and the pointer leaves the window we would
receive a GDK_CROSSING_NORMAL event when the pointer moves outside
the window, and a GDK_CROSSING_UNGRAB event when we do release the
button and the implicit grab.
We currently would react to the first, but want to react to the
second. In the time between both events, the client would still receive
pointer motion that will reach the implicitly grabbed widget.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/13
2020-02-07 01:02:47 +01:00
Carlos Garnacho
56dc99a9fb
gtkroot: Make enum a typedef
...
Seems a typo, and prevents building as GtkRootProperties is deemed
to be defined multiple times.
2020-02-07 01:00:52 +01:00
Matthias Clasen
cf69b7d4c2
Merge branch 'a11y-fixes' into 'master'
...
A11y fixes
See merge request GNOME/gtk!1396
2020-02-06 23:54:39 +00:00
Matthias Clasen
e45b668e04
testsuite: Misc. updates of expected output
...
The a11y dumps for action and header bars
have changed in harmless ways.
2020-02-06 18:04:36 -05:00
Matthias Clasen
769dae2c71
infobar: Implement forall
...
As a container, that is what you have to do.
2020-02-06 18:04:36 -05:00
Matthias Clasen
048effdc5a
testsuite: Clean up a11y menu tests
...
We don't need some of the tests anymore, since
we just have popovers now.
2020-02-06 17:21:06 -05:00
Matthias Clasen
b916723baf
testsuite: Improve --generate support
...
When using the test binary to generate expected
output, don't initialize the test machinery, since
that pollutes the output with noise.
2020-02-06 16:54:59 -05:00
Matthias Clasen
2dba92fd0c
tests: Fix infobars in ui files
...
GtkInfoBar no longer exposes the content_area
as internal child.
2020-02-06 16:54:59 -05:00
Matthias Clasen
a11b1bd08e
testsuite: Update expected output
2020-02-06 16:54:59 -05:00
Matthias Clasen
bc682bef74
colorchooser: Use a composite accessible
...
This makes the content show up in the a11y tree again.
2020-02-06 16:54:59 -05:00
Matthias Clasen
580384e962
tests: Update expected output
...
The stackswitcher is no longer a box, so it doesn't
have the horizontal state anymore.
2020-02-06 16:54:59 -05:00
Matthias Clasen
18965eec83
testsuite: Update some a11y tests
...
GtkMenuButton::use-popover no longer exists, remove it
from test files.
2020-02-06 16:54:59 -05:00
Matthias Clasen
145ccfe1c4
stackswitcher: Use a composite accessible
...
This makes the buttons show up in the a11y tree again.
2020-02-06 16:54:59 -05:00
Matthias Clasen
d01070d472
a11y: Add an accessible for widgets with children
...
We've started to turns containers into widgets which
just happen to have children, and some of these need
to be exposed to the a11y stack.
This adds a very minimal implementation, it does not
currently emit change notification when children are
added or removed.
2020-02-06 16:54:59 -05:00
Matthias Clasen
b3f5243aeb
a11y: Report children of widgets
...
We want children of composite accessibles to be
reported.
2020-02-06 16:54:59 -05:00
Matthias Clasen
20aec5a744
Merge branch 'flatpak-build-sassc' into 'master'
...
Flatpak build sassc
See merge request GNOME/gtk!1392
2020-02-06 20:09:29 +00:00
Matthias Clasen
4a2d539251
Build sassc as a dependency for flatpaks
...
Downloading the subproject during the GTK build fails
in a flatpak build due to lack of network access.
flatpak-builder insists on having these things explicitly
spelled out as dependencies.
2020-02-06 14:30:31 -05:00
Alexander Larsson
a772bf7517
Add gtk_icon_paintable_get_resource_path()
...
Also, return NULL from gtk_icon_paintable_get_filename() if the path
is really a resource path.
2020-02-06 17:47:57 +01:00
Alexander Larsson
57ecb2829a
Add gtk_icon_paintable_get_icon_name()
...
This allows you to see which icon was actually chosen.
2020-02-06 17:47:57 +01:00
Alexander Larsson
d45d604df1
Remove gtk_icon_paintable_download_texture() public API
...
This allows us do do what we want internally, and anyway it didn't
really do what you'd expect anymore now that we do resizing during
rendering.
2020-02-06 17:47:57 +01:00
Alexander Larsson
6317fd3529
Replace last users of gtk_icon_paintable_download_texture ()
...
These now render the paintable to a cairo surface and convert that
to a texture. This is sort of a hack, but its only used in two
special cases internally and in two hacky test apps.
2020-02-06 17:47:56 +01:00
Alexander Larsson
8282698201
textview: Use paintables instead of textures, and fix the support
...
This changes gtk_text_buffer_insert_texture() to
gtk_text_buffer_insert_paintable() which is strictly more useful
(as textures are paintables). It also fixes the code to actually
support drawing the paintables (as well as tracking changes
to the paintables.
2020-02-06 17:47:56 +01:00
Alexander Larsson
fcc3c12919
gtk_css_style_snapshot_icon_paintable: Fix uninitialized memory access
...
We were reading the foreground color alpha even when we didn't read it.
2020-02-06 17:47:56 +01:00
Alexander Larsson
7c73f2fb02
GskPango: Allow specifying a custom shape snapshot handler
...
We will need this for GtkTextView to render the textures in it.
2020-02-06 17:47:56 +01:00
Alexander Larsson
6ff9f2198d
GtkBuilder: Directly load the fallback missing image
...
No need for all this complexity with the icon theme, especially when
its now a lot more work to get the texture back. We can just load
the pixbuf.
2020-02-06 17:47:56 +01:00
Alexander Larsson
1c253f5dfa
icontheme: Move IMAGE_MISSING_RESOURCE_PATH to (private) header
...
This way other code can use this resource too for fallbacks, avoing
having to go through the icon theme.
2020-02-06 17:47:56 +01:00
Alexander Larsson
a0533923fb
icontheme: Handle GEmblemIcon in lookup_by_gicon()
2020-02-06 17:47:52 +01:00
Matthias Clasen
5c594fc46a
Merge branch 'WindowsPrintDriverPreferencesMaster' into 'master'
...
Fixed bug that prevented GTK from storing printer driver preferences in the…
See merge request GNOME/gtk!397
2020-02-06 13:07:13 +00:00
Matthias Clasen
b6e2699409
notebook: Update arrows when text direction changes
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/103
2020-02-06 07:13:10 -05:00
Alexander Larsson
8788c76bd9
icon theme: Also never fail in gtk_icon_theme_lookup_by_gicon()
...
Similar to regular lookups, if the icon is some unknown type we return
a missing-image.
2020-02-06 10:26:15 +01:00
Alexander Larsson
6865744034
Remove unnecessary image-missing fallbacks
...
We now always return something from icon theme lookups, so no need to
do custom fallbacks.
2020-02-06 09:50:04 +01:00
Alexander Larsson
de02769a2f
icon-theme: Don't pre-scale pixbufs in gtk_icon_theme_lookup_by_gicon
...
We do scaling during rendering now anyway.
2020-02-06 09:45:03 +01:00
Alexander Larsson
d69f7fd63e
IconTheme: Never fail a lookup or icon load
...
If icon lookup fails or if loading it fails later, just always
fall back to the built in image-missing icon. Nobody is handling
missing icons in a sane way anyway.
If you *truly* need to handle missing icons, you need to manually
use gtk_icon_theme_has_icon().
While changing the loading code I also fixed an issue where it
was always passing "png" to pixbuf, now it also handles "xpm" if
that is the filename suffix.
2020-02-06 09:38:25 +01:00
Alexander Larsson
adccd1391e
Support aspect=TRUE in _gdk_pixbuf_new_from_stream_at_scale
...
The icon theme test failed without this, and we *should* handle
it if we're accepting the argument.
2020-02-06 09:38:25 +01:00
Alexander Larsson
b529f77827
IconTheme: Simplify icon scaling
...
We had a pretty complex setup where we tried to avoid scaling up themes from dirs
that specified a size. However, not only was it very complex, but it didn't quite
work with window scales, because when using e.g. a size 32 directory for 16@2x
the dir size is wrong anyway. Additionally it turns out most code either picks
an existing icon size, or uses the FORCE_SIZE flags, so it doesn't seem
like a useful behaviour.
This change drops the FORCE_SIZE flags, and always scales
icons. Additionally it moves the scaling of the icon to rendering,
which seems more modern, and allows us to (later) share icons loaded
for different sizes that happened to use the same source file (at
different scales).
Note that this changes the behaviour of
gtk_icon_paintable_download_texture() is it now returns the unscaled
source icon. However, ignore thats, as I plan to remove this function
and replace it with a way to render a paintable to a cairo-surface
instead.
2020-02-06 09:38:25 +01:00
Alexander Larsson
021aaef824
GtkIconPaintable: Always recolor when snapshotting.
...
It never makes sense to paint a texture that needs recoloring. If
you call the regular snapshot on a symbolic texture we just use the
default recoloring colors.
To support this we also change gtk_css_style_snapshot_icon_paintable()
to call gtk_icon_paintable_snapshot_with_colors() for IconPaintables
so that we get the correct colors, and we make it not emit the color
matrix.
Since we now rely on the icon to do the recoloring we also drop the
recolor argument in gtk_icon_paintable_snapshot_with_colors() as its
not needed anymore.
2020-02-06 09:38:25 +01:00
Alexander Larsson
c691399a80
icontheme: Align function arguments
2020-02-06 09:38:25 +01:00
Matthias Clasen
2f369b6d7a
Merge branch 'kill-simple-search' into 'master'
...
Remove simple search engine
See merge request GNOME/gtk!1393
2020-02-06 06:38:17 +00:00
Matthias Clasen
8703c7b7ac
Merge branch 'better-test-isolation-2' into 'master'
...
Better test isolation
See merge request GNOME/gtk!1391
2020-02-06 04:53:07 +00:00
Matthias Clasen
e41e8072b1
css tests: Ignore ".csd" vs ".solid-csd"
...
It it hard to control which of the csd style classes we get,
since it depends on details of the X server or compositor.
Explicitly ignore this difference by replacing .solid-csd
with .csd in the output.
2020-02-05 23:35:39 -05:00
Matthias Clasen
d1bd1270c9
testsuite: Make tests run without a11y bus
...
Not having an a11y bus around causes warnings from
at-spi, which make tests fail. Explicitly ignore those
warnings.
2020-02-05 22:24:39 -05:00
Matthias Clasen
34cc68003c
testsuite: Fix bloomfilter style tests
...
The results were expecting solid-csd, which is not what
we usually have.
2020-02-05 22:23:52 -05:00
Matthias Clasen
ac7dd02f8f
Merge branch 'master.msvc' into 'master'
...
Fix building recent GTK master on Visual Studio
See merge request GNOME/gtk!1369
2020-02-05 18:26:22 +00:00
Matthias Clasen
9746b728ca
Merge branch 'public-emojichooser' into 'master'
...
emojichooser: Make public
See merge request GNOME/gtk!1382
2020-02-05 18:04:42 +00:00
Benjamin Otte
0ad791277a
Merge branch 'wip/otte/css' into 'master'
...
Some CSS cleanup
See merge request GNOME/gtk!1389
2020-02-05 14:04:12 +00:00
Matthias Clasen
54f6515005
emojichooser: Add profiler marks for loading
...
This is a long-running operation, and worth showing
in traces.
2020-02-05 06:28:39 -05:00
Matthias Clasen
25c25ba5c1
icontheme: Fix various memory leaks
...
Tasks need to be unreffed too.
2020-02-05 06:28:39 -05:00
Matthias Clasen
fac435ba98
widget: Fix a memory leak with class actions
...
This code was doing the wrong thing even if the parent class
doesn't have actions.
2020-02-05 06:28:39 -05:00
Matthias Clasen
b996b85504
Add a lib64 variant of gtk.supp
2020-02-05 06:28:39 -05:00
Matthias Clasen
1cb575a138
icontheme: Remove some dead code
2020-02-05 06:28:39 -05:00
Matthias Clasen
9a446f2041
frameclock: cosmetics
...
Redo the profiler marks for the frame clock signals
to look more uniform.
2020-02-05 06:28:39 -05:00
Matthias Clasen
9e6ae7acd8
gdk: Silence some compiler warnings
...
These cause unused variable warnings in release builds.
2020-02-05 06:28:39 -05:00
Matthias Clasen
955305a034
treestore: Silence compiler warnings
...
This was causing compiler warnings in release builds.
2020-02-05 01:01:47 -05:00
Matthias Clasen
b1d5de78e1
notebook: Don't trigger criticals in dispose
...
When we dismantle our children in dispose, we
trigger a11y children-changed signals which end
up calling back into the notebook. Handle this
without critical warnings.
2020-02-05 01:01:47 -05:00
Matthias Clasen
47c21a255f
textview: Don't update action state in dispose
...
Only update the action state when we have a text buffer,
there is no need to do it otherwise, since we are going
to get a buffer before we get shown. This avoids triggering
the action state updates from finalize, which is a bad
time to be recreating the action muxer.
2020-02-05 01:01:47 -05:00
Matthias Clasen
005ea7a09d
entry: Avoid criticals in dispose
...
The accessible gets properties of the entry, and
resetting the entry icons triggers accessible change
notification, so do that before we dismantle the entry
too far to respond to a g_object_get () call.
2020-02-05 01:01:47 -05:00
Matthias Clasen
ed6c0dc15c
Don't export color picker functions
...
This is not public API, so it shouldn't be exported.
2020-02-05 01:01:47 -05:00
Matthias Clasen
1e6171a4a7
Read bookmarks async
...
Do not block the main thread while reading the bookmarks file.
This speeds up initial setup of a GtkPlacesSidebar.
2020-02-05 01:01:47 -05:00
Matthias Clasen
85ad943832
placessidebar: Change some initial property values
...
Giving these properties the initial value that the file
chooser wants for them avoids some calls to update_places
in the setup code.
2020-02-05 01:01:47 -05:00
Matthias Clasen
b7b251019e
testperf: More flexible mark selection
...
Allow selecting marks not just by their name, but
also by the message detail.
2020-02-05 00:46:47 -05:00
Matthias Clasen
ed742f1d6c
testperf: Allow measuring start time
...
This can be used e.g. to measure how long it takes us
to get the first frame on screen.
2020-02-05 00:46:39 -05:00
Benjamin Otte
fcb08a28bf
stylecontext: Remove unused typedef
2020-02-05 04:03:43 +01:00
Timm Bäder
b75d408d6d
css: Make some local variables const
2020-02-05 04:03:43 +01:00
Timm Bäder
98b42f6740
css: Remove unused function
2020-02-05 04:03:43 +01:00
Timm Bäder
416182a20d
style context: Remove parent relationship
...
We don't have foreign drawing anymore, so we don't need this.
2020-02-05 04:03:43 +01:00
Benjamin Otte
31713ab5ef
stylecontext: Remove gtk_style_context_new()
...
It's private now, no more foreign drawing of any sort.
To be fair, it was entirely useless without widget paths already.
2020-02-05 04:03:43 +01:00
Benjamin Otte
b9c880f58d
testsuite: Remove the stylecontext test
...
Stylecontexts are on their way out and I'm removing API that the
testsuite was relying on, so remove the tests.
Put the useful parts of the tests elsewhere.
2020-02-05 04:03:43 +01:00
Benjamin Otte
db9730b734
stylecontext: Remove the "changed" signal
...
Instead, always go directly to the GtkWidget::css_changed() call.
2020-02-05 04:03:43 +01:00
Benjamin Otte
546a748cd8
widget: Replace style-updated signal with css_changed vfunc
...
1. Rename the thing
2. Turn it from a signal to a vfunc
3. Pass the GtkCssStyleChange to it
We don't export any public API about the GtkCssStyleChange yet, it's
just a boring opaque struct.
2020-02-05 02:46:13 +01:00
Benjamin Otte
8722837e67
pathbar: Remove unneeded code
...
The icons here are GIcons, they don't depend on the theme.
2020-02-05 00:18:41 +01:00
Benjamin Otte
3177ac4270
cssnode: Remove redundant check
...
We assert that cssnode->parent is NULL, no need to check it again.
2020-02-04 23:24:50 +01:00
Benjamin Otte
3f7e409428
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!1388
2020-02-04 17:48:58 +00:00
Timm Bäder
903af75fa1
widget: Skip not-drawable widgets in snapshot_child
...
Otherwise we transform the snapshot just to not do anything.
2020-02-04 17:53:15 +01:00
Matthias Clasen
6640881711
maplistmodel: Add an example to the docs
2020-02-04 17:51:01 +01:00
Matthias Clasen
3bb8b56ab3
treelistmodel: Small documentation tweaks
2020-02-04 17:51:01 +01:00
Benjamin Otte
a1635719fc
widgetfocus: Remove unnecessary check
...
Mapped widgets are always realized.
2020-02-04 17:51:01 +01:00
Benjamin Otte
3cb150abbe
widget: Remove _gtk_widget_is_drawable()
...
Use _gtk_widget_get_mapped() instead.
Drawable checked visible && mapped and mapped widgets are always
visible, so that was an unnecessary check.
2020-02-04 17:51:01 +01:00
Benjamin Otte
cc22987b1b
Merge branch 'wip/otte/icontheme' into 'master'
...
Do simple icontheme API cleanups
See merge request GNOME/gtk!1378
2020-02-04 16:36:46 +00:00
Alexander Larsson
410541f82b
Rename GtkIcon to GtkIconPaintable
2020-02-04 17:19:22 +01:00
Benjamin Otte
c91be540c3
tooltip: Don't css-validate
...
That's a job for toplevels now.
See 17ca95a161 for the same comit on
popovers.
2020-02-04 17:19:04 +01:00
Benjamin Otte
138de60ab2
icontheme: Remove GENERIC_FALLBACKS
...
Instead, rely on people passing fallbacks explicitly.
Alternatively, GThemedIcon provides the functionality to create
fallbacks, which is what GtkImage and the testsuite now use.
That method is slightly better, too, so the expected test results
have been updated accordingly.
2020-02-04 16:51:54 +01:00
Benjamin Otte
571021cbc1
icontheme: Pass fallbacks as optional argument to lookup_icon()
...
This way, we can remove gtk_icon_theme_choose_icon() completely.
2020-02-04 16:51:54 +01:00
Benjamin Otte
f7a5dd7b8b
icontheme: Remove contexts
...
There is no way to query contexts or do anything useful with them.
So don't keep track of them and don't make them an argument in public
APIs with the docs saying "I don't know what to use here, maybe read
some spec somewhere".
2020-02-04 16:51:54 +01:00
Benjamin Otte
544cd1acfc
icontheme: Clean up includes
2020-02-04 16:43:59 +01:00
Benjamin Otte
4b96ba592f
icontheme: Remove gtk_icon_get_base_size() and gtk_icon_get_base_dir()
...
Those functions are unused and the documentation says "Returns some
random number that the icon theme creator chose" which does not seem at
all useful and an implementation detail.
So get rid of it.
2020-02-04 16:43:59 +01:00
Benjamin Otte
7e8d8218b9
Revert "Break out cairo color matrix recoloring to gdk_cairo_image_surface_recolor()"
...
We're not in the business of adding Cairo APIs. That's Cairo's job.
Also, we don't need this API anywhere like the original commit claimed,
so there's no need to make it available in any way.
This reverts commit afa6cc2369 .
2020-02-04 16:43:59 +01:00
Benjamin Otte
3bba52ed67
icontheme: Remove crayon APIs
...
We expose no API to get at any colors for drawing symbolics, so we
shouldn't have APIs to draw with them.
Apart from that, those APIs look like a box of crayons, not like an
icontheme.
2020-02-04 16:43:59 +01:00
Benjamin Otte
48b9791989
icontheme: Remove gtk_icon_theme_rescan_if_needed()
...
If the icon theme needs to be rescanned, it should just do it.
If it doesn't, there's no need for this function.
Ergo: Don't have the function.
2020-02-04 16:43:59 +01:00
Benjamin Otte
4c3363b8c2
icontheme: Remove NO_SVG and FORCE_SVG flags
...
If the icon theme loads SVGs or not is an implementation detail and
should not be exposed in public API.
2020-02-04 16:41:36 +01:00
Benjamin Otte
10023b5d6d
icontheme: Remove GTK_ICON_LOOKUP_USE_BUILTIN
...
It's unused.
2020-02-04 16:41:36 +01:00
Benjamin Otte
bbbe39fb44
icontheme: Make text direction a lookup argument
...
Most users were just forgetting to set the proper flags.
And flags aren't the right way to set this anyway, it was just
acceptable as a workaround during GTK3 to not break API.
2020-02-04 16:41:36 +01:00
Benjamin Otte
b713b9f68d
icontheme: Remove async APIs
...
Widgets would not use them properly. In fact, the only user was using
them wrong.
As icons are loaded async by default, this call isn't necessary.
2020-02-04 16:41:36 +01:00
Benjamin Otte
bfebc2b01a
icontheme: Remove gtk_icon_theme_get_default()
...
The API encouraged wrong usage - most of the users were indeed wrong.
Use the correct version instead:
gtk_icon_theme_get_for_display (gtk_widget_get_display ())
2020-02-04 16:41:36 +01:00
Alexander Larsson
a1856c30d9
a11y tests: Ignore "active" flag on toplevel
...
All the a11y tests were failing for me with a window state diff
like this:
- state: active enabled resizable sensitive showing visible
+ state: enabled resizable sensitive showing visible
I guess the windows in the CI always gets the focus, but not when
I run it here. Generally focus seems asynchronous and hard to rely
on so I just made the test ignore the active state on toplevels.
2020-02-04 15:01:48 +01:00
Alexander Larsson
008eb04125
tests: Initialize dbus before gtk
...
These days initilizing gtk may create a connection to the sesson bus,
so we have to initialize GTestDBus before initalizing gtk, or we'll
use the address of the "real" session bus (and remember that in the
global).
To further muck things up, g_test_dbus_up() resets important env
vars like DISPLAY and XDG_RUNTIME_DIR, which we have to re-set.
2020-02-04 14:13:33 +01:00
Alexander Larsson
85e59220a5
filechooser portal: Free portal proxy when bus connection closes
...
This was blocking the clean exit from the testdbus shutdown in
the defaultvalues test. The proxy was keeping the connection alive
which blocks g_test_dbus_down().
2020-02-04 14:08:10 +01:00
Matthias Clasen
b8ffe5b245
css: Fix the initial values optimization
...
Fix up the index computation. We have duplicate entries
in the type enum, so to go from one of the 'initial' types
to it corresponding type you subtract one, but to find
the size array entry for a type, you divide by 2.
2020-02-04 12:19:23 +01:00
Matthias Clasen
4685fe1716
Merge branch 'faster-theme-lookup' into 'master'
...
Faster icon theme lookup
See merge request GNOME/gtk!1381
2020-02-04 10:51:27 +00:00
Alexander Larsson
046de4ccbf
icon-theme: Only have one copy of the icon flags enum
...
It turns out with the icon cache now using the virtual SYMBOLIC_PNG_SUFFIX
flag the two enums are now identical, so lets just use one of them, the
one GtkIconCache (so we move it to the header).
2020-02-04 09:35:20 +01:00
Alexander Larsson
a3be0ec5f0
Don't use xsettings or xft defaults in testsuite
...
This adds a GDK_DEBUG=default-settings flag which disables reads
from xsettings and Xft resources, and enables this for the testsuite.
This is one less way to get different testresults depending on the
environment. In particular, it was failing the css tests for me
due to getting the wrong font size because i have a different dpi.
2020-02-03 15:11:35 +01:00
Matthias Clasen
ef7172dc1e
emojichooser: Make public
...
This is a useful widget to have, and it has minimal api.
Not having it public forces apps to recreate a lot of
complicated machinery for not good reason, if they need
an Emoji chooser in a different context.
2020-02-03 12:49:36 +01:00
Alexander Larsson
308d434b57
GtkIconCache: Remove unused code
...
We're not really using the icon theme cache much anymore, as the
individual per-directory hashes are no longer used, so delete all the
unused code.
2020-02-03 12:49:32 +01:00
Alexander Larsson
e4170661b9
IconTheme: Make icon lookups faster
...
Traditionally the icon lookup for a theme has been:
lookup (icon_name, size):
best_directory = NULL
forearch theme
foreach directory in theme
if dir_size_matches (directory, size) && dir_has_icon (directory, icon-name)
best_directory = chose_best_size_dir (best_directory, directory)
if best_directory
return icon from best_directory
However, it turns out that there are a lot of subdirectories which have the same
size, as they differ only in the (essentially useless) "context" value. For example
the "16x16/apps" subdirectory is essentially the same as the "16x16/actions" one.
So, instead rathern than keeping all the directories as separate we store the
all the directories with the same size as a single entity (DirSize) and the
icon lookup in that DirSize looks up not only which suffix to use for that icon
but also which subdir it is in.
Additionally we keep a hashtable with all icon names that are
available in the entire theme (i.e. all DirSizes), which allows use
both to store each icon name only once, but also to do a quick
negative lookup and early exit in case we're looking up an icon that
doesn't exist. This is pretty common because we often look up sets of
icons like "image-png-symbolic", "image-png", "image", expecting some
to fail.
This brings down the time of the initial css validation from 20msec to 15msec for
me when running icon-factory.
2020-02-03 12:49:26 +01:00
Alexander Larsson
0a8d7603ea
icon-cache: Add new function to list all the icons in a directory
...
This lists the icons in a particular director, with their flags in a
hashtable. We also convert from "icon.symbolic" + SUFFIX_PNG to
"icon" + SUFFIX_SYMBOLIC_PNG.
2020-02-03 12:49:26 +01:00
Chun-wei Fan
f8d3845b1a
meson/MSVC builds: Use -utf-8 where available
...
This avoids the build from erroring out on C4819 (Unicode handling issue in
Visual Studio compiler), notably when running on Chinese, Japanese and
Korean locales.
Also apply -D_USE_MATH_DEFINES, -FImsvc_recommended_pragmas.h and -utf-8 to
the C++ compiler options as well.
2020-02-03 17:55:09 +08:00
Rico Tzschichholz
4ab12ab755
Remove last GtkWidgetPath reference
...
See 49b47c9133
2020-02-03 10:51:50 +01:00
Chun-wei Fan
69ed4c90e5
demos/widget-factory/widget-factory.c: Include stdlib.h
...
Include it for exit().
2020-02-03 17:18:36 +08:00
Chun-wei Fan
f2915180a6
tests/testdnd2.c: Don't include unistd.h unconditionally
...
Instead, on Windows when it is not available, include io.h for close()
2020-02-03 17:18:36 +08:00
Matthias Clasen
e7f2833703
Merge branch 'wip/muktupavels/update-documentation' into 'master'
...
display-x11: don't mention gdk_monitor_is_primary in the docs
See merge request GNOME/gtk!1380
2020-02-03 08:15:30 +00:00
Alberts Muktupāvels
66af531ff3
display-x11: don't mention gdk_monitor_is_primary in the docs
...
https://gitlab.gnome.org/GNOME/gtk/merge_requests/1371#note_699272
2020-02-02 19:18:22 +02:00
Matthias Clasen
621120d1d3
css: Fix an oversight in style change computation
...
Take the 'color == NULL means currentColor' trick into account
when computing the changes between two styles.
2020-02-02 16:41:14 +01:00
Matthias Clasen
f84fdfc0c1
Merge branch 'sigma' into 'master'
...
gdk: Handle small final sigma in gdk_keyval_convert_case
See merge request GNOME/gtk!1351
2020-02-02 12:04:09 +00:00
Matthias Clasen
27223f7956
Merge branch 'initial-style' into 'master'
...
Make it easy to recognize initial style values
See merge request GNOME/gtk!1375
2020-02-01 12:52:44 +00:00
Matthias Clasen
5faf977f66
border: Don't render initial borders
...
Add a fast exist for comon case that the border
values are unset.
2020-02-01 09:12:12 +01:00
Matthias Clasen
7fbb37a09f
background: Don't render initial backgrounds
...
Add a fast exit for the common case that the background
values are unset.
2020-02-01 09:11:39 +01:00
Matthias Clasen
7027fc9ab6
Make it easy to recognize initial style values
...
Reuse the type field in GtkCssValues to make initial
style values easily recognizable.
2020-02-01 09:11:22 +01:00
Matthias Clasen
7479564972
modelbutton: Update a11y states
...
We took care to set the proper role on our accessible object,
but we forgot to update the state for check and radio button
roles.
2020-01-31 19:14:05 +01:00
Matthias Clasen
09612a1b3c
filechooser: Remove debug spew
2020-01-31 16:55:01 +01:00
Matthias Clasen
79c8a16b8d
Remove simple search engine
2020-01-31 16:52:27 +01:00
Matthias Clasen
6104c12392
Build fix for GtkCssValues
2020-01-31 11:40:06 +01:00
Jor Teron
0c5ba00d59
Update Karbi translation
2020-01-31 10:15:03 +00:00
Daniel Mustieles
9f55377b69
Updated Spanish translation
2020-01-31 09:09:43 +01:00
Matthias Clasen
f140b151e1
Merge branch 'meson-sassc-subproject' into 'master'
...
build: require sassc and drop generated .css files
See merge request GNOME/gtk!814
2020-01-31 07:26:48 +00:00
Matthias Clasen
c91c4b60e7
Merge branch 'kill-primary-monitor-2' into 'master'
...
Remove primary monitor api
See merge request GNOME/gtk!1371
2020-01-30 20:51:07 +00:00
Matthias Clasen
a46f9af1c0
Remove primary monitor api
...
We only have implementations of this on X11 and Win32,
so make it available as backend api there.
Update all callers to use either the backend api, or
just monitor 0.
2020-01-30 21:33:37 +01:00
Christoph Reiter
4071e1e734
build: require sassc and drop generated .css files
...
Instead of requiring sassc to be installed add meson subprojects
which build libsass and sassc (currently both forks of mine, tested
under linux/mingw/msvc) when needed.
This allows us to drop the generated .css files and build scripts from git.
See #1502
2020-01-30 20:45:38 +01:00
Alexander Larsson
99c89d61e1
Merge branch 'icon-theme-rework' into 'master'
...
Rework icon themes
See merge request GNOME/gtk!1368
2020-01-30 17:30:10 +00:00
Alexander Larsson
09ef67afbc
icon-theme: Add icon theme name in profiler mark
2020-01-30 18:22:11 +01:00
Alexander Larsson
d478ae1ef5
icon-theme: Avoid reentrancy issues while loading icon theme
...
In gtk_icon_theme_get_for_display() we were calling
gtk_icon_theme_set_display() which eventually (via the css machinery)
called back into gtk_icon_theme_get_for_display() which created a
second icon theme. We avoid this by setting the user-data earlier so
that the css machinery gets back the currently initializing theme
instead.
2020-01-30 18:19:56 +01:00
Alexander Larsson
b67d582230
GtkIconHelper: Preload icons for mapped widgets with higher priority
...
We look at whether a widget will be mapped (the actual state is not
yet set, so we can't rely on that at css validation time) and use
that to set the i/o priority of the async task.
This means that its likely that widgets that will be displayed soon
are loaded before those that are not yet going to be needed.
2020-01-30 15:41:24 +01:00
Alexander Larsson
498ab6ac6c
IconHelper: Only preload icons once
...
This limits the amount of preloading we to, which can for instance
avoid trashing if the icon cache is full, and in general do less work
when its likely to be wasted such as when e.g. background-color for an
icon helper changes.
2020-01-30 15:17:59 +01:00
Alexander Larsson
c69327caa8
icon-theme: Show which icon loads are threaded in profile mark
2020-01-30 15:16:40 +01:00
Alexander Larsson
d1cd578d59
icon-theme: Add i/o priority to choose_icon_async()
...
This is set on the GTask and lower priority will be loaded before,
this can be used to prioritize some icons for preloading.
2020-01-30 15:15:08 +01:00
Alexander Larsson
5f8c2b52c6
indentation: fix various alignment issues
...
Most of these stem from the GtkIconInfo -> GtkIcon rename
2020-01-30 12:27:15 +01:00
Alexander Larsson
27799ba4f5
Remove final references to "icon info" with just "icon"
2020-01-30 10:53:43 +01:00
Alexander Larsson
2ec51b7010
icon-theme: Update the docs
2020-01-30 10:53:43 +01:00
Alexander Larsson
f7cd2a782b
Fix warnings in gdk gir build
...
We now have graphene arguments in a gdk function, so add that to the
dependencies.
2020-01-30 10:53:43 +01:00
Alexander Larsson
ff0642bba6
icon-theme: Remove trailing whitespaces
...
Since everything is changing anyway lets just clean up all the
trailing whitespace issues in the whole file.
2020-01-30 10:53:43 +01:00
Alexander Larsson
b227a2f190
icon-theme: Use GtkSnapshot, not GdkSnapshot
2020-01-30 10:53:43 +01:00
Alexander Larsson
2b202129bb
icon-theme: Fix indentation of matrix values
2020-01-30 10:53:43 +01:00
Alexander Larsson
d1c6d78ebb
GtkImage: Preload icons during css validation
...
At the end of GtkImage css validation (during style-updated) when the
css properties (like the icon size) are valid we call _gtk_icon_helper_preload
which does an async icon theme lookup and load. This will happen on a thread
in parallel with the rest of the css machinery, and hopefully by the
time we need the icon it will be ready. If not we will block when we need
it, but during that blocking all the other icons will be loaded.
Testing widget-factory this changes the time of snapshot() from 31 to
25 msec, but on the other hand we also load a few more icons that we
didn't before causing the css validation phase to be about 8 msec slower.
This is because we're preloading all the images in the window, not only
the ones that are visible.
Unfortunately we still load a bunch of icons in snapshot(), from
GtkCssImageIconTheme, and ideally we should try to preload those also.
2020-01-30 10:53:43 +01:00
Alexander Larsson
6a8001fe7d
icon-theme: Preload default icon themes in thread
...
This happens when we first get the theme for a display, or then the
icon theme setting changes.
This means we don't have to do this scan in the first snapshot
and can do the i/o it in parallel with other stuff. This moves
a 10msec block from the first snapshot cycle to early setup.
2020-01-30 10:53:43 +01:00
Alexander Larsson
ff3e022182
icon helper: Remove profiler mark
...
This was hitting every time we looked up an icon, and we already
log the actual load of the icon in the icon theme.
2020-01-30 10:53:43 +01:00
Alexander Larsson
d2f26b2f27
icon-theme: Improve profiler mark for icon loads
...
This adds the actual time it took to them as well as the icon size
and scale.
2020-01-30 10:53:43 +01:00
Alexander Larsson
55db9d07c5
icon-theme: Only add theme load profiler mark if we actually load theme
2020-01-30 10:53:43 +01:00
Alexander Larsson
1be932279c
icon theme: Actually use scale in choose_icon_async()
2020-01-30 10:53:43 +01:00
Alexander Larsson
56ec748824
icon theme: Actually don't block in gtk_icon_theme_choose_icon_async()
...
If some other thread is lock the icon or icon theme locks they are likely
to do so for a long time, doing i/o. So, switch to trylock() for the
nonblocking part of _async(). This way we can return directly if the
result is available, but do a thread otherwise, never blocking the
calling (main) thread.
2020-01-30 10:53:43 +01:00
Alexander Larsson
1e6a82513b
icon-theme: Clean up locking
...
Move the lru cache under the global cache lock to avoid some ABBA
style deadlocks when going from icon_theme->icon lock an icon->icon_theme.
We also move all the icon lock uses to a small part of code and make
sure that code never calls out or blocks with any locks held.
Rename the GtkIcon->cache_lock to texture_lock to avoid confusion withe
the global cache_lock.
Removed any mentions of threadsafety from the API docs, we don't
want apps to rely on this, but rather use it outselves internally.
2020-01-30 10:53:43 +01:00
Alexander Larsson
b087f9ca51
icon-theme: Drop the _for_scale() versions and always take scale
2020-01-30 10:53:43 +01:00
Alexander Larsson
e2f778602b
icon-theme: Rename GtkIconInfo to GtkIcon
2020-01-30 10:53:43 +01:00
Alexander Larsson
6a15e9169d
Rename GtkIcon widget to GtkBuiltinIcon
...
This is an internal widget whose name is not very important, and we
want to rename GtkIconInfo to GtkIcon, so lets rename this.
2020-01-30 10:53:33 +01:00
Matthias Clasen
929d325560
profiler: Exit gracefully on SIGTERM
...
This is nice, since it lets me quickly launch a test app
and terminate it with Ctrl-C and still produce a usable
sysprof trace.
2020-01-30 10:04:38 +01:00
Matthias Clasen
cb60c1b83d
builder: Add profiler marks for parsing
...
This is useful to understand what ui files take
long to load.
2020-01-30 10:04:38 +01:00
Matthias Clasen
ab69d43089
builder: Use a better name for templates
...
This name can show up in error messages or profiler
traces, so it is nice to provide some hint what
file we are dealing with.
<GtkFileChoser template> is a lot more helpful
than <input>.
2020-01-30 10:04:38 +01:00
Alexander Larsson
6af4b6a644
icon-theme: Drop all load() calls from GtkIconInfo
...
All users now either use it directly as a paintable or download
the texture to use the pixels.
2020-01-29 19:12:15 +01:00
Alexander Larsson
0d666f0cec
icon-theme: Use gtk_icon_theme_choose_icon_async in tests
2020-01-29 19:06:16 +01:00
Alexander Larsson
317b395f0f
icon-theme: Drop loading_themes recursion check
...
This was added in 0b1c9b7cc2 to protect
against reentrancy from the theme-changed signal, but we only emit this
from an idle these days, so thats not necessary anymore, and the recursion
check was causing issues with the async operations where a different
thread loading the theme caused the calling thread to thing the
theme is valid.
2020-01-29 19:06:16 +01:00
Alexander Larsson
71b3b54215
icon-theme: Add async icon loader
2020-01-29 19:06:16 +01:00
Alexander Larsson
97b24b0732
tests: Use gtk_icon_info_download_colored_texture instead of load_symbolic
2020-01-29 19:06:16 +01:00
Alexander Larsson
6ffb54f47f
icon-theme: Add gtk_icon_info_download_colored_texture()
...
This is a way to get at recolored pixels and will replace all existing users
of _load_symbolic*()
2020-01-29 19:06:16 +01:00
Alexander Larsson
afa6cc2369
Break out cairo color matrix recoloring to gdk_cairo_image_surface_recolor()
...
This is useful in some parts of the icon theme APIs.
2020-01-29 19:06:16 +01:00
Alexander Larsson
dbe021239f
icons: Convert use of load() to download_texture()
2020-01-29 19:06:16 +01:00
Alexander Larsson
884e06ad37
icon theme: Add gtk_icon_info_download_texture() function
...
This returns a reference to the texture (if possible) and can be
used to get access to the pixels of the icon.
2020-01-29 19:06:16 +01:00
Alexander Larsson
53c542765f
Add gtk_icon_info_snapshot_with_colors() and use instead of custom code
2020-01-29 19:06:16 +01:00
Alexander Larsson
c42977af04
Convert trivial users of icon theme loading to use info as paintable
2020-01-29 19:06:16 +01:00
Alexander Larsson
aefd8443de
GtkIconHelper use GtkIconInfo as paintable
2020-01-29 19:06:16 +01:00
Alexander Larsson
b96ab7453b
GtkIconInfo: Implement paintable
...
This makes GtkIconInfo directly implement paintable by loading
the icon as needed. This is done in a blocking fashion for now, but
could be made more async in the future.
It also means we can't return errors to the called, but I doubt
anyone actually does anything useful with them other than showing
nothing (which we already do).
This also changes a fringe behaviour for unthemed icons. They used to
be never scaled down, but that means we can't tell without i/o the
size of the paintable. Since this is the only case we can't know the
size i took an executive decision and removed that behaviour. I don't
think picking some arbitrary much larger than requested size is ever
right, nor do i think using GtkIconTheme with unthemed icons is overly
useful. If you want to display some random non-iconish image, use
GtkImage instead.
2020-01-29 19:06:16 +01:00
Alexander Larsson
3ac7e30455
icon theme: Make GtkIconInfo cached data threadsafe
...
Whenever this is accessed or updated we just grab a lock, thus
blocking on whoever is currenly updating it.
2020-01-29 19:06:16 +01:00
Alexander Larsson
aef67bd53a
GtkIconTheme: Make the base GtkIconTheme threadsafe
...
This makes the core icon theme object threadsafe, however its
not yet very useful because the IconInfo objects are not threadsafe.
2020-01-29 19:06:16 +01:00
Piotr Drąg
bba5de7c6d
Update POTFILES.skip
2020-01-29 17:20:23 +01:00
Emmanuele Bassi
556a8a8351
Merge branch 'wip/muktupavels/work-areas' into 'master'
...
per-monitor work areas
Closes #1086 and #980
See merge request GNOME/gtk!1300
2020-01-29 13:38:31 +00:00
Matthias Clasen
5e95e15a03
animatedstyle: Fix the debug build
...
This wasn't caught by our ci.
2020-01-29 14:10:24 +01:00
Alberts Muktupāvels
248883089c
x11: add support for _GTK_WORKAREAS_Dn
...
If window manager supports _GTK_WORKAREAS use per-monitor work areas.
https://mail.gnome.org/archives/wm-spec-list/2018-December/msg00000.html
https://gitlab.freedesktop.org/xdg/xdg-specs/merge_requests/22
https://gitlab.gnome.org/GNOME/gtk/merge_requests/1300
2020-01-29 14:38:08 +02:00
Carlos Garnacho
aabb250741
Merge branch 'gtk-4-im-wayland-controller-focus-in' into 'master'
...
imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey
See merge request GNOME/gtk!1349
2020-01-29 11:22:11 +00:00
Matthias Clasen
83cccfc984
Merge branch 'gdk-device-leak-fix' into 'master'
...
GdkDevice leak fix
See merge request GNOME/gtk!1358
2020-01-29 10:44:42 +00:00
Matthias Clasen
b97054fc38
Merge branch 'css-style-split-2' into 'master'
...
css: Split styles into groups
See merge request GNOME/gtk!1362
2020-01-29 10:39:43 +00:00
Matthias Clasen
b859407620
Merge branch 'reset-with-click' into 'master'
...
Always emit reset for IM preedit with mouse click
Closes #1534
See merge request GNOME/gtk!460
2020-01-29 10:39:22 +00:00
Matthias Clasen
75c73ac3cd
Merge branch 'robertroth/shortcuts-overlay-accel' into 'master'
...
Application: Do not reuse Ctrl+F1 for help-overlay
See merge request GNOME/gtk!307
2020-01-29 10:25:40 +00:00
Matthias Clasen
10e4c04e61
Use style values directly
...
Replace uses of gtk_css_style_get_value with direct access,
throughout the tree. We don't replace all uses, just those
where we are dealing with a fixed property. Be careful to
handle the currentColor special case for color properties.
2020-01-29 11:07:32 +01:00
Matthias Clasen
b378f566d7
Compute style change based on values structs
...
We can save some time here by comparing struct by
struct and avoiding individual values comparisons
as much as possible.
2020-01-29 11:07:32 +01:00
Matthias Clasen
5776d0dd99
css: Split styles into groups
...
Introduce refcounted structs for groups of related css properties,
and use them to store the style values. Both GtkCssStaticStyle and
GtkCssAnimatedStyle fill in the structs in GtkCssStyle, and we
can avoid vfuncs for value access, which should be much faster.
We can even start accessing style->core->color directly.
2020-01-29 11:07:32 +01:00
Matthias Clasen
59994bdd22
performance test: Produce better numbers
...
Try to isolate the test runs from each other in the
eyes of the kernel scheduler, by sleeping a bit. And
ignore the first run, to avoid cache effects.
2020-01-29 11:06:32 +01:00
Matthias Clasen
db8276f470
Merge branch 'wip/baedert/widget-add-style-class' into 'master'
...
widget: Add style class API
See merge request GNOME/gtk!1366
2020-01-29 09:46:36 +00:00
Matthias Clasen
c3421cea25
Silence a compiler warning
2020-01-29 10:44:25 +01:00
Emmanuele Bassi
6830845fda
Merge branch 'gtk-doc-ci' into 'master'
...
Publish the API reference
See merge request GNOME/gtk!1367
2020-01-29 09:11:15 +00:00
Emmanuele Bassi
db5d9ccdfb
Remove reftests from expected-fail list
...
With an updated version of the base CI image it seems some tests that
were failing have started to pass again.
2020-01-29 10:02:02 +01:00
Emmanuele Bassi
51e155bffa
ci: Deploy the API reference on our GitLab pages
...
Now that we can build gtk-doc as a sub-project, we can go back to
publishing the API reference for the master branch every time we
build it.
2020-01-29 09:46:13 +01:00
Emmanuele Bassi
98e6e0cf77
ci: Update the version of Meson in the CI image
...
We need at least 0.52.1 to be able to use gtk-doc as a sub-project.
2020-01-29 09:39:21 +01:00
Emmanuele Bassi
058f82d03d
Add gtk-doc as a subproject
...
We rely on a specific minimum version of gtk-doc to be able to build the
GTK API reference for the new API. In order to be able to use gtk-doc as
a subproject, though, we need to use a recent version of Meson.
2020-01-29 09:39:21 +01:00
Timm Bäder
a7b34df6af
widget: Add style class API
...
Add GtkWidget API for adding and removing style classes, as well as
checking whether a widget has a style class applied.
Everyone has to go through GtkStyleContext for this these days but with
GtkStyleContext eventually going away, it makse sense for GtkWidget to
have API for this.
2020-01-29 09:36:48 +01:00
Timm Bäder
b3f454ed98
Merge branch 'fix-doc-typo' into 'master'
...
Fix a doc typo
See merge request GNOME/gtk!1364
2020-01-29 07:49:13 +00:00
Benjamin Otte
fd021e794c
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!1365
2020-01-29 04:35:56 +00:00
Benjamin Otte
5e3cbff8d2
cssselector: Rework how we handle the bloom filter
...
Instead of foreaching through all the previous selectors every time we
bloom-filter, just bloom-filter the current element and return a special
value if that filter fails (FALSE). If that happens, don't try
filter-matching more nodes in the caller as we know it's an abort.
2020-01-29 04:20:47 +01:00
Luca Bacci
f0fe2e0743
Fix a doc typo
2020-01-28 20:42:03 +00:00
Benjamin Otte
c6158f1684
cssselector: Reorder functions
...
This just changes the order of functions in the source code in
preparation for the next commit.
2020-01-28 18:28:32 +01:00
Benjamin Otte
65050a1c81
css: Don't do the "all set" test
...
We have so many properties that it is basically impossible that all of
them are set and the time spent checking is higher than the time saved
if it does indeed happen.
2020-01-28 17:57:59 +01:00
Benjamin Otte
12ec090a7b
Merge branch 'wip/otte/for-master' into 'master'
...
popover: Do not validate the css node on show()
See merge request GNOME/gtk!1363
2020-01-28 16:43:33 +00:00
Benjamin Otte
17ca95a161
popover: Do not validate the css node on show()
...
This was a good idea back in GTK3 when popovers were toplevels, but now
they're regular child widgets, so they should behave that way.
Also, with the introduction of the bloom filter, gtk_css_node_validate()
now assumes it's only called on root nodes, so assert that that is the
case.
2020-01-28 17:19:28 +01:00
Takao Fujiwara
5be14577d6
imwayland: Connect gtk_im_context_focus_in/out to GtkEventControllerKey
...
GtkEventControllerKey can handle GDK_FOCUS_CHANGE and call
gtk_im_context_focus_in/out directly.
https://gitlab.gnome.org/GNOME/gtk/issues/2390
2020-01-28 23:47:16 +09:00
Benjamin Otte
1a9ab1a32f
Merge branch 'wip/otte/css' into 'master'
...
selector: Rework iterating over subnodes
See merge request GNOME/gtk!1361
2020-01-28 03:56:49 +00:00
Benjamin Otte
c7dca199ae
selector: Rework iterating over subnodes
...
Instead of a foreach() function, introduce an iterator, so that the
caller can drive the iteration.
This allows doing stuff inbetween callbacks and avoids closures when
more than one data object should be passed.
As a side effect I even get a small, but noticeable performance
improvement in the 2-10% range depending on benchmark, I guess that's
because there's no function pointer passing going on anymore.
2020-01-28 04:32:15 +01:00
Benjamin Otte
50a3d9be6a
Merge branch 'wip/otte/css' into 'master'
...
CSS improvements
See merge request GNOME/gtk!1360
2020-01-28 02:47:25 +00:00
Benjamin Otte
5e4b102273
styleproperty: Remove ability to query properties
...
With gtk_style_context_get() gone, this is no longer used.
2020-01-28 02:58:02 +01:00
Benjamin Otte
632fab0ca7
stylecontext: Get rid of gtk_style_context_get()
...
... and replace all the calls to it with
gtk_style_context_peek_property().
All the calls are hacks that need to go away btw.
2020-01-28 02:58:02 +01:00
Benjamin Otte
43339f1c1c
testcalendar: Don't do dumb stuff with font sizes.
...
If you want to test font stuff, it's 2020 and we have an inspector.
2020-01-28 02:17:32 +01:00
Benjamin Otte
afbff574f5
filechooser: Remove default size machinery
...
The FileChooser ToolKit (fctk) had its own machinery to handle default
sizes which was completely busted and trying to marshal random numbers
through the widget hierarchy that maybe made sense in 2012 but don't do
now.
Get rid of it, just keep the dialog's GSetting - which funnily enough
used to be written by the dialog but written by the widget.
But that's fctk for you.
2020-01-28 02:17:31 +01:00
Benjamin Otte
aff25212df
cellrenderertoggle: size based on -gtk-icon-size
...
Instead of hardcoding 16px.
2020-01-28 02:17:03 +01:00
Benjamin Otte
18cb15a05a
stylecontext: Remove gtk_style_context_get_section()
...
The inspectors gets values differently these days.
2020-01-28 02:17:03 +01:00
Benjamin Otte
6c8b65baf9
stylecontext: Remove GTK_STYLE_PROPERTY_* defines
...
They shouldn't be (and aren't) used anymore.
2020-01-28 02:17:03 +01:00
Benjamin Otte
495eaf31d4
css: Use the bloom filter for change matching
...
Instead of just doing radical change matching on the node itself, also
consider the parent nodes via the bloom filter.
This means a radical change is now also one where the parent
name/id/classes change, but since that's considered a radical change on
the parent already, those things are slow anyway.
Improves the benchmark times for CSS validation during backdrop
transitions in widget-factory from 45ms to 35ms on my machine.
2020-01-28 02:17:03 +01:00
Benjamin Otte
ccdc3ee406
selector: Make :not() selectors not radical
...
:not() selectors cannot be radical because the bloomfilter only knows if
a value is set in any of the nodes, but cannot determine the opposite
(if a value is not set in at least one node), but that would be required
for:not() selectors.
However, this is very unlikely to happen in the real world, so it's not
worth optimizing.
Unfortunately, change tracking could know this, so by excluding the
:not() selectors from radical changes, the change tracking will now pick
them up. If that turns out to be a performance problem, we need to add a
special category for radical not filters, so change tracking and bloom
filters can deal with them.
The testcase demonstrating the problem in widget-factory has been
extrated and added.
2020-01-28 02:17:03 +01:00
Benjamin Otte
93cf76b068
testsuite: Improve diff_with_file() function
...
Properly handle diff(1) failing.
In this particular case, the test passed a NULL input file to the diff
(that was fixed, too) and then diff only found one input file and
aborted.
But without this fix, we'd also not catch other abortion reasons for
diff() - as long as it exited in any way, we were happy.
2020-01-28 02:17:03 +01:00
Benjamin Otte
170130f1d9
css: Add fast-path for parent selector matching
...
Add a fast path for parent selector matching that uses a bloom filter to
quickly discard selectors that can't possibly match.
Keep in mind that we match using a bloom filter, so we might
accidentally include too many selectors when hash/bucket collisions
occur.
That's not a correctness problem though, because we'll do a real check
afterwards.
The idea for this change is taken from browsers, in particular WebKit.
2020-01-28 02:17:03 +01:00
Benjamin Otte
6aac56e144
cssnodedeclaration: C99-ify the code
...
zero-sized arrays are allowed now.
2020-01-28 02:17:03 +01:00
Benjamin Otte
2d5a8974b3
selector: Hash differently
...
This will be relevant for a bloom filter. And bloom filters want 12bit
hashes, so we try to produce hash values < 4096.
2020-01-28 02:17:03 +01:00
Benjamin Otte
146b921246
cssnode: Convert name + id from interned string to GQuark
...
The reason for this is simply that I want to get hash functions that
have their values close together, so they can fit in a smaller range
(the goal here is 12 bits). By using GQuark, we get consecutive numbers
starting with 1 (and applications have <1000 quarks usually), whereas
interned strings can be all over the place.
As a side effect we also save 64 bytes per declaration.
2020-01-28 02:17:03 +01:00
Benjamin Otte
8b93ea9238
css: Get rid of GtkCssMatcher
2020-01-28 02:17:02 +01:00
Benjamin Otte
aa7c5e96a6
css: Pass node through the lookup code
...
... instead of passing a matcher.
The matcher code is now local to the CssProvider/CssSelector machinery.
2020-01-28 02:17:02 +01:00
Benjamin Otte
1953bc92bc
cssnode: Remove init_matcher() vfunc
...
It's unused.
2020-01-28 02:17:02 +01:00
Benjamin Otte
98eeee5bce
cssnode: Remove ability to set GType as fallback name
2020-01-28 02:17:02 +01:00
Benjamin Otte
49b47c9133
Remove GtkWidgetPath
...
... and all associated demos and tests.
2020-01-28 02:17:02 +01:00
Benjamin Otte
af6128b3ab
Remove gtkwidgetpath.h include where no longer needed
2020-01-28 02:17:02 +01:00
Benjamin Otte
496f3c17bd
Revert "cssmatcher: Inline node values into matcher"
...
This reverts commit a75529f3c0 .
It just complicates code and there are no performance numbers that would
warrant such a commit.
2020-01-28 02:17:02 +01:00
Benjamin Otte
c2d69643a8
css: Move utility function
...
The function was not selector-specific, so putting it with all the other
utility functions makes more sense.
Also use the utility function in the node declaration printing.
2020-01-28 02:17:02 +01:00
Sebastian Keller
9c6669be48
gdk/x11: Properly unref removed device in XI2 device manager
...
When a device is added, there are two references to it by the device
manager, the initial one and the one used for the id_table. Removing a
device only removed the reference added by the id_table resulting in the
GdkDevice being leaked.
https://gitlab.gnome.org/GNOME/gtk/merge_requests/1358
2020-01-27 21:42:34 +01:00
Matthias Clasen
d0aa79b5a1
textutil: Stop using GtkStyleContext
...
We can just use the css style directly.
2020-01-27 13:35:04 -05:00
Matthias Clasen
4b63523b1f
gskpango: Don't free rgba's we don't own
...
We don't copy them anymore, so don't free them.
2020-01-27 13:35:04 -05:00
Matthias Clasen
997186f640
filechooser: Stop using gtk_style_context_get
...
Just go to the css style directly.
2020-01-27 12:52:24 -05:00
Rafael Fontenelle
3940482820
Update Brazilian Portuguese translation
2020-01-27 17:09:32 +00:00
Timm Bäder
616a83fb53
popover: Fix an oversight in gap coord computation
...
This caused a border to show up between the popover arrow and the
contents.
2020-01-27 13:37:50 +01:00
Timm Bäder
baeadea342
calendar: Use widgets for the header
...
This is not meant to be a full GtkCalendar conversion to use widgets
instead of custom drawing, but we lost the arrows in the calendar header
when builtin icons were removed. Using proper button for the year/month
buttons brings them back.
2020-01-27 13:37:50 +01:00
Umarzuki Bin Mochlis Moktar
04beedfef0
Update Malay translation
2020-01-27 12:25:12 +00:00
Umarzuki Bin Mochlis Moktar
da73394abd
Update Malay translation
2020-01-27 12:22:47 +00:00
Fabio Tomat
d0f69794a5
Update Friulian translation
2020-01-27 08:56:42 +00:00
Dušan Kazik
185ef214fa
Update Slovak translation
2020-01-27 07:01:51 +00:00
Robert Ancell
b530c83d98
GtkFileFilter: Don't set the name from the GtkBuilder ID
...
Don't use the GtkBuilder ID for the filter name - this is an ID, not a human
readable name. The name can now be set with a property.
2020-01-27 16:01:54 +13:00
Robert Ancell
b83caec6b9
GtkFileFilter: Add a GObject property for the name
...
The name field was previously not a property, which meant you couldn't set in in
GtkBuilder as translatable.
2020-01-27 16:01:54 +13:00
Matthias Clasen
3cdde3fc4b
css: Don't lose inset when computing shadows
...
This was showing up as reftest failures,
sporadically
2020-01-26 20:18:23 -05:00
Sebastian Keller
5040d81e03
gdkseatdefault: Unref removed slave devices
...
Adding a slave device adds a ref, but removing it does not unref it.
https://gitlab.gnome.org/GNOME/gtk/merge_requests/1358
2020-01-27 01:37:14 +01:00
Timm Bäder
05b9a99661
gsk: Remove some unused defines
...
These are from the GVariant days of render nodes.
2020-01-26 18:21:07 +01:00
Timm Bäder
a16e1cbf18
cssdimensionvalue: Remove an outdated comment
...
It's actually implemented in gtkcssdimensionvalue.c these days.
2020-01-26 18:21:07 +01:00
Timm Bäder
c7ea83cd82
cssboxes: Try to avoid doing work for rectangular boxes
...
Use the new gtk_css_dimension_value_is_zero() to check if we really need
to e.g. apply a border radius at all.
We compute css boxes a lot so this makes sense here, it especially shows
up during pick(), where we need the border box.
2020-01-26 18:21:07 +01:00
Timm Bäder
352c9ba42a
dimensionvalue: Add gtk_css_{dimension,corner}_value_is_zero()
...
We can usually omit computations when the dimension value ends up being
zero anyway.
2020-01-26 18:21:07 +01:00
Timm Bäder
30b37dd7c5
widget: Restructure pick() a bit
...
Don't even invert transforms if we can do it easily ourselves. This also
fixes a small GtkTransform memory leak.
2020-01-26 18:21:07 +01:00
Timm Bäder
2e256986c3
renderbackground: Avoid unnecessary work in snapshot_background()
2020-01-26 18:21:07 +01:00
Timm Bäder
77e0d360ed
Add pure and const annotations to various functions
2020-01-26 18:21:07 +01:00
Timm Bäder
942a93250a
render: Remove gtk_render_background_get_clip
2020-01-26 18:21:07 +01:00
Timm Bäder
7ccd6597c3
Remove gtkutils{.c,private.h}
...
All but one functions are unused. Move the remaining one into
gtkmodules.c, its only caller.
2020-01-26 18:21:07 +01:00
Timm Bäder
355a417dba
cssparser: make a few local variables const
2020-01-26 18:21:07 +01:00
Timm Bäder
36e3f4d902
cssprovider: Parse selectors without a GList
...
The maximum length of this list in Adwaita is 18, so use a generous
maximum length of 64 for the selector list of a ruleset.
2020-01-26 18:21:07 +01:00
Timm Bäder
69fe705d0d
GtkCssImageUrl: Implement is_computed()
2020-01-26 18:21:07 +01:00
Timm Bäder
f62535affc
gl renderer: Avoid some work when rendering border nodes
2020-01-26 18:21:07 +01:00
Timm Bäder
1a56a10fc1
cssimage: Add gtk_css_image_to_string()
...
In line with all the other _to_string() implementations
2020-01-26 18:21:07 +01:00
Timm Bäder
4287f0def4
window: Replace GtkStyleContext use to get surface transform
...
We have GtkCssBoxes for this these days.
2020-01-26 18:21:07 +01:00
Matthias Clasen
7bebc3e2b2
Revert "lookup stats"
...
This reverts commit 3d9e3390f1 .
2020-01-25 23:49:33 -05:00
Matthias Clasen
b4e2df8fca
Revert "css: Split style into groups"
...
This reverts commit 0df0de0b5d .
2020-01-25 23:49:17 -05:00
Matthias Clasen
0df0de0b5d
css: Split style into groups
2020-01-25 23:47:02 -05:00
Matthias Clasen
53c22bf833
Adwaita: take out an unnecessary rule
...
The comment says setting caret-color to currentColor
shouldn't be necessary, and it is right.
2020-01-25 18:38:42 -05:00
Matthias Clasen
d8144ec497
Adwaita: drop the *
2020-01-25 18:20:40 -05:00
Matthias Clasen
3d9e3390f1
lookup stats
2020-01-25 18:20:26 -05:00
Matthias Clasen
03595f9567
Fix a scrollbar sizing issue
...
The recent Adwaita changes inadvertendly made scrollbars
resize on hover. Fix that, by reinstating some lost rules.
2020-01-25 15:05:14 -05:00
Matthias Clasen
64e026d0a9
Revert "Ensure icon themes are loaded with other themes"
...
This reverts commit 88d26b7549 .
This change caused GtkShortcutWindow to not work anymore,
and we are fixing icon themes differently, anyway.
2020-01-25 14:32:01 -05:00
Matthias Clasen
0623b00512
Merge branch 'style-context-redux' into 'master'
...
Stop using GtkStyleContext internally
See merge request GNOME/gtk!1353
2020-01-25 19:29:20 +00:00
Matthias Clasen
ac902e697e
popover: Stop using style context getters
2020-01-25 14:18:22 -05:00
Matthias Clasen
f1ff69963e
drag icon: Stop using style context getters
...
Just go to the css node directly.
2020-01-25 14:18:22 -05:00
Matthias Clasen
731ae8f39e
gskpango: Stop using style context getters
...
Just go to the css nodes directly.
2020-01-25 14:18:22 -05:00
Matthias Clasen
7da6fdc30e
widget: Stop using style context internally
2020-01-25 11:05:27 -05:00
Matthias Clasen
a297129685
Add a profiler mark around renderer realization
...
This takes time that is worth calling out.
2020-01-25 01:28:24 -05:00
Matthias Clasen
1eec7362b9
Adwaita: Fix some entry styling
...
This was accidentally broken when parent selectors
were introduced here.
2020-01-24 21:01:42 -05:00
Matthias Clasen
a105256611
GtkSpinner: Pay attention to style changes
...
Make GtkIcon redraw and resize when style changes
require it.
2020-01-24 20:55:42 -05:00
Matthias Clasen
2ee04ee8ed
GtkPaned: Pay attention to style changes
...
Make GtkPaned redraw and resize when style change
require it.
2020-01-24 20:55:42 -05:00
Matthias Clasen
6e358e2a49
GtkIcon: Pay attention to style changes
...
Make GtkIcon redraw and resize when style changes
require it.
2020-01-24 20:55:42 -05:00
Matthias Clasen
71ee4df357
css: Update affects flags for icons
...
We want to differentiate what requires recreating the
texture and what doesn't. In particular, the current
flags are not handling symbolic icons right.
2020-01-24 20:55:42 -05:00
Alex Henrie
f15a34c7e4
gdk: Handle small final sigma in gdk_keyval_convert_case
2020-01-24 17:10:07 -07:00
Matthias Clasen
2bc6e1b875
Merge branch 'wayland-cursors' into 'master'
...
Make wayland load cursors on demand
See merge request GNOME/gtk!1350
2020-01-24 23:03:56 +00:00
Matthias Clasen
4e58541d52
Make wayland load cursors on demand
...
Copy just enough of libwayland-cursor to make our own
loading. This lets us drop the dependency on libwayland-cursor,
and changes the startup cost for cursor theme loading
from 25ms to 0.1ms.
At the same time, simplify the handling of scaled cursors -
instead of creating an array of theme objects, just make a
single theme object provide all scaled cursor sizes.
2020-01-24 17:27:45 -05:00
Matthias Clasen
53bc1d60c4
Revert "css: Print selectors"
...
This reverts commit da5d524324 .
And this one too. The commits are there, if people need this
kind of statistics again, they can just be cherry-picked.
2020-01-24 11:51:18 -05:00
Matthias Clasen
5b6b4f5075
Revert "css: Print out relative costs of selectors"
...
This reverts commit 5dcce0c0bd .
I forgot to ifdef a few things in here, so lets take this out
again.
2020-01-24 11:50:40 -05:00
Matthias Clasen
16654eeef4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1348
2020-01-24 16:20:42 +00:00
Matthias Clasen
871959c88c
Adwaita: Drop selection mode
...
This is not really a feature that GTK has; and it lets
us drop a significant amount of css.
2020-01-24 09:09:27 -05:00
Matthias Clasen
55d08d8400
Adwaita: Drop menu remnants
...
Menus are gone.
2020-01-24 09:09:27 -05:00
Matthias Clasen
5dcce0c0bd
css: Print out relative costs of selectors
...
Count how often each tree node is visited, and print the number
at the end. This gives a good indication what selectors are costly
and should be avoided. #ifdefed out.
2020-01-24 09:09:08 -05:00
Matthias Clasen
975fe76a0e
Adwaita: Remove a wildcard rule for tooltips
...
These rules are expensive, and don't seem to make
any difference for typical tooltip content.
2020-01-24 09:09:08 -05:00
Matthias Clasen
00be314feb
Adwaita: Drop menuitem support
...
menuitems don't exist anymore.
2020-01-24 09:09:08 -05:00
Matthias Clasen
da5d524324
css: Print selectors
...
Add code that prints all the selectors when a theme
is loaded. #ifdefed out.
2020-01-24 09:08:52 -05:00
Timm Bäder
8e41fa2778
widget: Use gsk_transform_transform_point() in gtk_widget_pick()
...
This also covers the 2D_AFFINE case.
2020-01-24 06:19:16 +01:00
Timm Bäder
f80a341b4f
gl renderer: handle cross-fade nodes with invisible children
2020-01-24 06:19:16 +01:00
Timm Bäder
77f8245c0c
gl renderer: Handle blur nodes with invisible children
2020-01-24 06:19:16 +01:00
Timm Bäder
8afdbd6ee3
gl renderer: Make render_rounded_clip_node clearer
2020-01-24 06:19:16 +01:00
Timm Bäder
ac4e98f16a
testsuite: Add test cases for last commit
...
Easy enough to test
2020-01-24 06:19:16 +01:00
Timm Bäder
ab0869ecbc
gl renderer: Add builder offset correctly for non-affine modelviews
2020-01-24 06:19:16 +01:00
Timm Bäder
cff8304133
GskTransform: Add gsk_transform_transform_point()
...
Equivalent of gsk_transform_transform_bounds() and
graphene_matrix_transform_point() respectively.
2020-01-24 06:19:12 +01:00
Timm Bäder
962e38c5c9
gl renderer: Shorten shaders a bit
2020-01-24 06:08:39 +01:00
Timm Bäder
7855a98fd1
cssimageicontheme: Avoid copying colors
2020-01-24 06:08:39 +01:00
Timm Bäder
aea27b86c1
cssimagepaintable: Implement is_computed()
2020-01-24 06:08:39 +01:00
Timm Bäder
d4caf3d679
cssimagescaled: Implement is_computed()
2020-01-24 06:08:39 +01:00
Timm Bäder
d9652675ef
cssimagerecolor: Implement is_computed()
2020-01-24 06:08:39 +01:00
Timm Bäder
685288216f
gl renderer: Move rect transformation to the vertex shader
...
No need to do this for every fragment.
2020-01-24 06:08:39 +01:00
Timm Bäder
c8fa1f19db
gl renderer: Transform rounded rect on the GPU
...
Change the RoundedRect struct we use in our shaders so we can transform
it using (affine) matrices.
2020-01-24 06:08:39 +01:00
Matthias Clasen
7e4feb092b
colorbutton: Use a css name
...
This was the sole widget to show up as 'widget' in
the css tree.
2020-01-23 23:48:43 -05:00
Matthias Clasen
9eadcd8d55
testsuite: Update mark names
...
We've changed some of the profiler mark names to
be clearer and more unique. Update the tests that
look for those marks to use the new names.
2020-01-23 23:48:43 -05:00
Matthias Clasen
86aa011587
Adwaita: Use child selectors in many more places
...
These are much cheaper to match than descendent
selectors, so use them whenever we know the element
is a direct child.
2020-01-23 23:48:43 -05:00
Matthias Clasen
f9e613f8fd
text: Don't compute invisible char in init
...
This causes us to create a pango layout and
validate the css style, a high-overhead
operation. Just do it when the entry is set
to be invisible.
2020-01-23 15:12:38 -05:00
Matthias Clasen
e13692c52f
Fix Emoji completion
...
This was broken in various ways; Tabbing between pages
was causing segfaults, and using the hover state like
this does not work anymore, with hover now being completely
managed by GTK. Use focus instead, and also fix up the
style.
2020-01-23 14:07:09 -05:00
Matthias Clasen
cbed409f52
Replace .emoji with emoji for css
2020-01-23 14:07:09 -05:00
Matthias Clasen
0351f27af2
Adwaita: Drop .context-menu
...
We are not using it anymore, and yet fonts on a bold
textview are fine. So no need for this.
2020-01-23 14:07:09 -05:00
Matthias Clasen
f84ecf9cd2
Adwaita: Just use .menu, instead of .appmenu
...
No need for this one-off class, there's no other menus
that could show up here.
2020-01-23 14:07:09 -05:00
Emmanuele Bassi
5e9d186c26
Merge branch 'fix-avahi_service_resolver_cb-crash-master' into 'master'
...
printing: Fix crash in avahi_service_resolver_cb (master)
See merge request GNOME/gtk!1347
2020-01-23 17:50:47 +00:00
WGH
de9f0c5505
printing: Fix crash in avahi_service_resolver_cb
...
printer_name_compressed_strv is NULL-terminated array
of gchar*, which means N+1 memory should be allocated.
Otherwise, if the printer name has no empty components
(which is usually the case), printer_name_compressed_strv[N],
which should contain the NULL sentinel, will actually lie
just outside of allocated memory, which is UB.
In my case, it led to crashes inside g_strjoinv
when Print... dialog is opened in evince.
#0 0x00007fad2ce1bad7 in __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:96
#1 0x00007fad2d04d88d in g_strjoinv (separator=separator@entry=0x7fad0c9bc508 "-", str_array=str_array@entry=0x556b017f0200) at ../glib-2.60.7/glib/gstrfuncs.c:2585
#2 0x00007fad0c9b8a89 in avahi_service_resolver_cb (source_object=<optimized out>, res=<optimized out>, user_data=0x7fad08020ee0) at /var/tmp/portage/x11-libs/gtk+-3.24.13/work/gtk+-3.24.13/modules/printbackends/cups/gtkprintbackendcups.c:3223
#3 0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8b00 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
#4 0x00007fad2d1f987d in g_task_return (task=0x556b017a8b00 [GTask], type=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1278
#5 0x00007fad2d1f9dec in g_task_return (type=G_TASK_RETURN_SUCCESS, task=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1678
#6 0x00007fad2d1f9dec in g_task_return_pointer (task=<optimized out>, result=<optimized out>, result_destroy=<optimized out>) at ../glib-2.60.7/gio/gtask.c:1683
#7 0x00007fad2d24b6af in g_dbus_connection_call_done (source=<optimized out>, result=0x556b017a8bc0, user_data=0x556b017a8b00) at ../glib-2.60.7/gio/gdbusconnection.c:5747
#8 0x00007fad2d1f8ed3 in g_task_return_now (task=0x556b017a8bc0 [GTask]) at ../glib-2.60.7/gio/gtask.c:1209
#9 0x00007fad2d1f8f09 in complete_in_idle_cb (task=0x556b017a8bc0) at ../glib-2.60.7/gio/gtask.c:1223
#10 0x00007fad2d02d2c0 in g_main_dispatch (context=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3189
#11 0x00007fad2d02d2c0 in g_main_context_dispatch (context=context@entry=0x556b00eee090) at ../glib-2.60.7/glib/gmain.c:3854
#12 0x00007fad2d02d658 in g_main_context_iterate (context=context@entry=0x556b00eee090, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib-2.60.7/glib/gmain.c:3927
#13 0x00007fad2d02d6df in g_main_context_iteration (context=context@entry=0x556b00eee090, may_block=may_block@entry=1) at ../glib-2.60.7/glib/gmain.c:3988
#14 0x00007fad2d22248d in g_application_run (application=0x556b0116f130 [EvApplication], argc=<optimized out>, argv=<optimized out>) at ../glib-2.60.7/gio/gapplication.c:2519
#15 0x0000556b002e55a1 in ()
#16 0x00007fad2ccd6f1b in __libc_start_main (main=0x556b002e50d0, argc=2, argv=0x7ffe1057fa88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe1057fa78) at ../csu/libc-start.c:308
#17 0x0000556b002e567a in ()
(gdb) p printer_name_compressed_strv[0]
$4 = (gchar *) 0x556d4a4be430 "Brother"
(gdb) p printer_name_compressed_strv[1]
$5 = (gchar *) 0x7f9dbc011090 "MFC"
(gdb) p printer_name_compressed_strv[2]
$6 = (gchar *) 0x556d4a51ba50 "7860DW"
(gdb) p printer_name_compressed_strv[3]
$7 = (gchar *) 0x401 <error: Cannot access memory at address 0x401>
2020-01-23 20:32:05 +03:00
Matthias Clasen
f5865b125e
Add profiler marks around css selector tree building
...
This is a big part of theme loading, and worth
showing in traces.
2020-01-23 10:29:22 -05:00
Matthias Clasen
3483c1a45b
Adwaita: Remove .entry-tag class
...
Not used in GTK.
2020-01-23 00:14:49 -05:00
Matthias Clasen
5cc088128f
Adwaita: Remove .rubberband class
...
All GTK widget are using a rubberband element now.
2020-01-23 00:13:54 -05:00
Matthias Clasen
c4548e9c7b
Adwaita: Remove .location-bar class
...
Not used in GTK.
2020-01-23 00:08:53 -05:00
Matthias Clasen
5d6aeb4bf7
Adwaita: Remove gtkstyle-fallback
2020-01-23 00:04:41 -05:00
Matthias Clasen
560e03f962
Adwaita: Remove the .drag-icon class
...
This class was not used in GTK.
2020-01-22 23:57:30 -05:00
Matthias Clasen
c3f1ff7db4
pathbar: Use a css name insead of a style class
...
Use pathbar for GtkPathBar in css, instead of the
previous .path-bar. Update Adwaita to match.
2020-01-22 23:56:22 -05:00
Matthias Clasen
88d26b7549
Ensure icon themes are loaded with other themes
...
Trigger icon theme loading from the code in GtkApplication
where we set up the icon theme search path. This makes
it happen before the first frame.
2020-01-22 23:44:01 -05:00
Matthias Clasen
4ac8011126
icontheme: Add profiler marks around icon theme loading
...
This is happening during the first frame.
2020-01-22 23:44:01 -05:00
Matthias Clasen
9b29da93b6
iconhelper: Add profiler marks around icon loading
...
These mainly happen during the first frame, causing
it to be longer than 'normal' frames.
2020-01-22 23:44:01 -05:00
Matthias Clasen
0fe9643728
css: Add a profiler mark around theme loading
...
This is also time spent before the first frame.
2020-01-22 23:44:01 -05:00
Matthias Clasen
73a214d1a9
application: Add some profiler marks
...
Add marks around gtk_init and application startup
helps to understand where the time before the first
frame goes.
2020-01-22 23:44:01 -05:00
Matthias Clasen
59a31e05bc
gdk: Add a profiler mark for paint_idle
...
This is the big frame clock function where most
signals are emitted, and it can keep us away from
the mainloop for a long time.
2020-01-22 23:44:01 -05:00
Matthias Clasen
527b67af3d
wayland: Add a mark for cursor loading
...
This is much too slow.
2020-01-22 23:44:01 -05:00
Matthias Clasen
3c03d7970a
More profiler reshuffling
...
Add more of the marks without requiring a debug build.
2020-01-22 23:44:01 -05:00
Matthias Clasen
278762f00a
gtk: Clearer names for profiler marks
...
Naming matters. Don't be overly generic here.
2020-01-22 16:38:40 -05:00
Matthias Clasen
1565f597c8
gl: Disambiguate profiler marks
...
"render" was used for both GL and widgets. Oops.
2020-01-22 16:37:48 -05:00
Matthias Clasen
fea42def61
surface: Always dd events to the profiler trace
...
We want to get this data for release builds as well.
2020-01-22 16:36:54 -05:00
Matthias Clasen
56b8d1dfbe
frame clock: Redo the profiler marks
...
Instead of reporting the frame clock phases as defined,
report the duration of the signal emissions, which is more
useful for tracking down what is taking time.
2020-01-22 16:36:02 -05:00
Matthias Clasen
3120fb29e1
ci: Save syscap files from performance tests
...
They might become useful at some point.
2020-01-22 15:55:31 -05:00
Matthias Clasen
119457279b
window: Rename a profiler mark
...
The "layout" name was already taken for the frame clock
phase by that name. Oops.
2020-01-22 15:12:03 -05:00
Matthias Clasen
dfea9bf0e8
wayland: Add profiler marks around surface handling
...
Add marks for when we do commits, swap buffer or
receive frame events. These are the low-level start
and end points of the frame cycle, and it is useful
to see them in the profiler.
2020-01-22 15:12:03 -05:00
Matthias Clasen
36cb812ad8
surface: Add enter/leave events to profiler traces
...
These are just as likely to trigger extra work than
other mouse events, so it is useful to show them.
2020-01-22 15:12:03 -05:00
Matthias Clasen
95ed9de706
icontheme: Add profiler marks for loading icons
...
This helps to clearly identify the places where we
do IO, in profiler traces.
2020-01-22 15:12:03 -05:00
sicklylife
a0448e2c7f
Update Japanese translation
2020-01-22 17:32:21 +00:00
sicklylife
a6b05a19f1
Update Japanese translation
2020-01-22 17:29:36 +00:00
Matthias Clasen
672d7f679a
Merge branch 'wip/jimmac/typography-classes' into 'master'
...
Adwaita: general typography classes
Closes #1808
See merge request GNOME/gtk!1339
2020-01-22 12:54:48 +00:00
Jakub Steiner
feecfcab27
Adwaita: general typography classes
...
- many moons and some iterations later, these are the suggested
general typographic styles. Already being referenced in apps like
Banner Viewer (for now shipping custom definitions)
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1808
2020-01-22 12:02:51 +01:00
Matthias Clasen
24fa0f8e28
testsuite: Move the meson performance tests up
...
Since the binary is moved, there is no need for
the subdirectory here anymore.
2020-01-22 00:59:09 -05:00
Matthias Clasen
878f35515d
Make the performance testcase more general
...
Reuse the performance test for layout and snapshot timings.
2020-01-22 00:59:04 -05:00
Matthias Clasen
68fd796125
css: Make performance test more flexible
...
Allow to specify the name of the mark that we're looking
for the first instance of.
2020-01-22 00:29:43 -05:00
Matthias Clasen
5014b2a7fe
widget: Add profiler marks
...
This gives high-level entries for the duration of
snapshotting and layout in the frame cycle.
2020-01-21 23:43:37 -05:00
Matthias Clasen
8cb375de11
window: Add a profiler mark around size allocation
...
This give a high-level entry for the duration of size allocation
in the frame cycle.
2020-01-21 23:43:01 -05:00
Matthias Clasen
7927bcf6c5
container: Remove an unnecessary check
...
GtkWindow implements GtkRoot, so we can avoid
treating them separately.
2020-01-21 23:19:24 -05:00
Matthias Clasen
d24d0e9667
Merge branch 'matthiasc/perf-tests' into 'master'
...
Performance tests
See merge request GNOME/gtk!1338
2020-01-22 03:38:50 +00:00
Matthias Clasen
e9e4bd423a
testsuite: Make performance test fail
...
If a child process exits unsuccessfully,
make the performance test fail.
2020-01-21 19:55:08 -05:00
Matthias Clasen
81ddf4b946
testsuite: Point performance tests at uninstalled schemas
...
widget-factory won't run otherwise.
2020-01-21 19:51:14 -05:00
Matthias Clasen
c8485af819
Use the v9 image for ci runs
...
The v9 image add sysprof-devel, so we can build
and run performance tests using libsysprof.
2020-01-21 19:30:59 -05:00
Matthias Clasen
704a659438
ci: Build with profiler support
...
This will let us run sysprof-based performance tests.
2020-01-21 18:20:05 -05:00
Matthias Clasen
d32b0d3118
ci: Add sysprof-devel to the image
...
We need it to build with profiler support.
2020-01-21 18:17:50 -05:00
Matthias Clasen
23426b0f39
Fix testsuite without -Dprofiler=true
...
Only build and run the performance tests if we have sysprof.
2020-01-21 18:09:43 -05:00
Matthias Clasen
417edd28fb
Run the css performance test in the testsuite
...
The numbers just end up in the testlog for now.
2020-01-21 17:49:40 -05:00
Matthias Clasen
ea17728ee5
Prototype a sysprof helper
...
This is an attempt to see how we can use sysprof data
in our tests to extract useful performance numbers.
Use it as a wrapper around any GTK+ process:
./testperf ./gtk4-widget-factory
Currently, it repeatedly runs the given commandline,
extracts the first css validation time from the resulting
syscap file, and prints out the min/max/avg of the runs
at the end.
This relies on the environment variable GTK_DEBUG_AUTO_QUIT
to cause the process to exit soon after launch.
2020-01-21 17:31:48 -05:00
Matthias Clasen
a6f300cefd
widget-factory: Add a way to quit automatically
...
This can be used to measure startup cost in tests.
2020-01-21 17:31:48 -05:00
Matthias Clasen
05b98c3834
gdk: Make profiler support unconditional
...
We are still not providing samples unless debugging is enabled.
That needs a bit more work.
2020-01-21 11:50:12 -05:00
Matthias Clasen
820c9403e3
cssnode: Make the profiler support unconditional
2020-01-21 11:38:34 -05:00
Matthias Clasen
509531349d
Merge branch 'otte/for-master' into 'master'
...
selector: Add GtkSelectorCategory
See merge request GNOME/gtk!1337
2020-01-21 16:17:17 +00:00
Benjamin Otte
2a5a52dd4b
selector: Add GtkSelectorCategory
...
This will make it easier to write more complex matching algorithms.
2020-01-21 16:59:37 +01:00
Benjamin Otte
f42e18507f
Merge branch 'otte/for-master' into 'master'
...
Otte/for master
See merge request GNOME/gtk!1336
2020-01-21 14:13:02 +00:00
Benjamin Otte
e6a0a2f587
stylecontext: Remove excess gtk_css_node_invalidate() call
...
This call is not necessary, because gtk_css_node_set_parent() does the
right thing. (It probably hasn't been necessary for years, but I'm
not gonna try my luck on GTK3 at this stage.)
This code is usually called the first time
gtk_widget_get_style_context() is called on a widget and its style
context gets create. At that point however, the css nodes are in the
right place already, so no invalidation should happen.
2020-01-21 14:49:25 +01:00
Benjamin Otte
631ea5caac
Merge branch 'otte/for-master' into 'master'
...
Otte/for master
See merge request GNOME/gtk!1333
2020-01-21 12:09:26 +00:00
Benjamin Otte
d59784f7c7
win32: Don't save/restore the context for querying the font
...
Use the font in the current state.
2020-01-21 12:48:20 +01:00
Benjamin Otte
193eb5b0dd
widget: Remove gtk_widget_get_path()
2020-01-21 12:47:16 +01:00
Benjamin Otte
6a1adf6f1a
cssnode: Remove unused widget path vfuncs
2020-01-21 12:47:16 +01:00
Benjamin Otte
563ad2db1b
containter: Remove gtk_container_get_path_for_child()
2020-01-21 12:47:16 +01:00
Benjamin Otte
c85d9a3259
stylecontext: Change semantics of gtk_style_context_get_path()
...
Widget contexts now return NULL here. A non-NULL result requires a
previous call to gtk_style_context_set_path()
2020-01-21 12:47:16 +01:00
Benjamin Otte
b9c81b1b94
widget: Initialize cssnode name asap
...
That way, it's correct in subclass's init functions.
2020-01-21 12:47:16 +01:00
Matthias Clasen
b52bcf7e0a
Merge branch 'matthiasc/for-master' into 'master'
...
Add some static assertions
See merge request GNOME/gtk!1334
2020-01-21 04:52:12 +00:00
Matthias Clasen
a38ba91e35
Add some static assertions
...
Add assertions that ensure the relationships between
css property IDs that we rely on are preserved.
2020-01-20 22:54:26 -05:00
Matthias Clasen
a350c2452a
Add profiler support for css validation
...
Push numbers about css validation and style creation
to sysprof.
2020-01-20 21:55:16 -05:00
Benjamin Otte
025902b9fb
textview: Make cursor work when blinking is disabled
2020-01-21 01:42:00 +01:00
Matthias Clasen
7e2e92a87e
cssselector: Inline a few things
2020-01-19 15:56:54 -05:00
Matthias Clasen
be4d42507c
style cascade: Remove some pointless casts
...
The casts and checks in gtkstylecascade.c are leftovers
from when we had GtkStyleProviderPrivate, and no longer
serve any purpose.
2020-01-19 15:56:54 -05:00
Matthias Clasen
6e88ccf7fb
pick: Take advantage of transform categories
...
Transform categories let us easily avoid doing matrix math
when we can just do a simple translation.
2020-01-19 15:56:54 -05:00
Matthias Clasen
cec4c15f05
Refactor gtk_widget_pick
...
Split this into a recursive part and a public
entry point. This lets us avoid some duplicate
checks.
2020-01-19 15:56:54 -05:00
Piotr Drąg
ce1f1f7dec
Update Polish translation
2020-01-19 13:04:34 +01:00
Matthias Clasen
95f00c6071
css: Redo the pseudoclass selectors
...
There is no need to duplicate the classes, we can make
do with a single class for all the states.
2020-01-18 23:06:25 -05:00
Matthias Clasen
55cfeccfd2
css: Go back to clearing out selectors
...
Now that we use the selector tree for change computation
again, we don't need the ruleset selectors anymore.
Bring back the code that cleans them out.
2020-01-18 23:06:25 -05:00
Goran Vidović
2301916fa4
Update Croatian translation
2020-01-19 00:33:57 +00:00
Vlad Zahorodnii
b36258f204
gdk: Subtract base size when checking aspect ratio
...
According to the ICCCM spec [1], one should subtract the base size from
the window size before checking that the aspect ratio falls in range.
This change fixes shrinking Firefox Picture-in-Picture windows when
running KDE Plasma (with KWin as the window manager).
[1] https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.3
2020-01-19 02:22:44 +02:00
Goran Vidović
bb4efe18b7
Update Croatian translation
2020-01-19 00:13:42 +00:00
Matthias Clasen
a463dccd81
Refine the selector tree printing
...
Also show which tree nodes have exact matches.
2020-01-18 14:32:55 -05:00
Matthias Clasen
eff129323f
Fix a css change testcase
...
The ui file here was invalid, leading to nonsensical
results.
2020-01-18 14:32:55 -05:00
Matthias Clasen
a5530caec3
Actually turn of css value accounting
...
We need an #undef here. While doing so, make sure
it compiles without warnings when disabled.
2020-01-18 14:30:23 -05:00
Matthias Clasen
92cfc03821
inspector: Avoid an array overrun
...
Commit 3f56af3738 added a new value to the
GdkInputSource enum, forgetting that the inspector
has an array of names to match this enum.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2385
2020-01-18 11:49:16 -05:00
Matthias Clasen
46bb1a9b6a
wayland: Fix release build warnings
2020-01-18 11:49:16 -05:00
Matthias Clasen
19280db075
x11: Fix release build warnings
2020-01-18 11:49:16 -05:00
Piotr Drąg
7210c5484e
Update POTFILES.skip
2020-01-18 17:39:53 +01:00
Timm Bäder
433c8307b2
gl renderer: Pull a local variable in the closest scope
2020-01-18 08:49:52 +01:00
Timm Bäder
26506b0a15
cssimagefallback: Don't snapshot invisible colors
...
This avoids a few render nodes later.
2020-01-18 08:49:52 +01:00
Timm Bäder
f8fa946989
widget: Get opacity without GtkStyleContext
...
GtkStyleContext is really just unnecessary here.
2020-01-18 08:49:52 +01:00
Timm Bäder
119ebe1d70
cssstyle: set font variations in get_pango_font()
...
Doesn't make sense to set all the css values on the font description in
there except for the font variations, so do these here as well.
2020-01-18 08:49:52 +01:00
Timm Bäder
dda54b2b8f
widget: Get DPI from style directly
...
Instead of going through GtkStyleContext.
2020-01-18 08:49:52 +01:00
Timm Bäder
821efcb725
cssstyle: Implement get_pango_font() directly
...
Instead of going through the slow GValue code path. This function was
unused, so use it in GtkWidget's update_pango_context() now.
2020-01-18 08:49:52 +01:00
Timm Bäder
85793fe6b6
testsuite: Update expected css errors
2020-01-18 08:49:52 +01:00
Timm Bäder
dc8dedce07
gl renderer: Draw outset shadows white
...
and only apply the actual shadow color when we draw them from the
texture. This way we can reuse the cached shadows during color
transitions.
2020-01-18 08:49:52 +01:00
Matthias Clasen
f5182f1c35
css: Mark transform value as computed
...
This is not very useful, since transitions generate
a ton of transforms anyway.
2020-01-18 08:49:52 +01:00
Matthias Clasen
1efa39672b
css: Simplify default values
...
We no longer need to create one-element arrays or
corners with two identical values.
2020-01-18 08:49:52 +01:00
Matthias Clasen
3f38a1c94c
css: Re-add a lost special case
...
When the border-style special cases were moved in
c687f485fd , the one for outline-width was lost.
Make the code more compact, and bring the special
case back.
2020-01-18 08:49:52 +01:00
Timm Bäder
d861dd5df8
csshorthandproperty: Try to avoid allocating a GString for 1 font
2020-01-18 08:49:52 +01:00
Timm Bäder
8c98fd2e46
cssdimensionvalue: remove early-out code from transition()
...
We do this directly in gtk_css_value_transition() now
2020-01-18 08:49:52 +01:00
Timm Bäder
3091679ffa
gl renderer: Render simple border nodes in a simple way
...
Roughly 80% of the border nodes are just one color and have the same
width on all sides, so we can draw them by uploading just one rect and
not four.
2020-01-18 08:49:52 +01:00
Timm Bäder
2e89c5360a
numbervalue: Add early-out to multiply()
...
If the factor is 1, we already know what the result is going to be.
2020-01-18 08:49:52 +01:00
Timm Bäder
e448fc41f3
cssnumbervalue: Move early-out code to GtkCssValue
...
These checks make sense for all css values.
2020-01-18 08:49:52 +01:00
Timm Bäder
c9e972eecb
cssdimensionvalue: Implement transition()
...
Instead of falling back to the generic gtk_css_number_value_transition
(which can allocate multiple new css values), just implement this here.
2020-01-18 08:49:52 +01:00
Timm Bäder
45455f1bdb
Remove GtkCssShadowsValue
...
Previously, we wrapped all GtkCssShadowValues in a GtkCssShadowsValue,
even if it was just one shadow. This causes an unnecessary bloat in
css values.
Make each GtkCssShadowValue able to handle multiple shadows instead, and
use gtk_css_shadow_value* API everywhere.
2020-01-18 08:49:52 +01:00
Timm Bäder
a3769eb0e5
cssshadowvalue: Only create 2 shadows values for transitions
...
This is for cases where we want to transition from "no shadow" to
"shadow", which we need quite a lot.
2020-01-18 08:49:52 +01:00
Timm Bäder
7c75ea376f
cssvalue: Improve css value accounting output
...
And make it fully optional behind an #ifdef.
2020-01-18 08:49:52 +01:00
Timm Bäder
96143548ac
csscolorvalue: check for singletons in new_literal
...
Gets rid of another ~400 GtkCssValue instances in the widget-factory.
2020-01-18 08:49:51 +01:00
Timm Bäder
0b2a6e34c4
cssimage: Add is_computed vfunc
...
Same semantics as the is_computed field of GtkCssValue
2020-01-18 08:49:51 +01:00
Timm Bäder
24d8c0a7dc
css: Set the is_computed flag for more values
...
With these changes, we skip roughly 85% of compute() calls during
widget-factory startup
2020-01-18 08:49:51 +01:00
Timm Bäder
ba08f5e67d
cssvalue: Don't call compute() for already computed css values
...
As per the previous commit, this is unnecessary.
Even with the small amount of css values we mark as is_computed, we
already skip computing over 60% of them like this during the startup of
the widget factory.
2020-01-18 08:49:51 +01:00
Timm Bäder
31aa5a0e53
cssvalue: Add is_computed flag
...
When a css value has "child" css values (e.g. a linear gradient has
several color stop css values) which are all computed (won't change when
compute() is called on them), we want to skip computing the entire
subtree.
Since css values are immutable, we can set the is_computed flag at
construct time.
Since GtkCssValue instances are 0-initialized in _gtk_css_value_alloc,
the default for is_computed it FALSE. This commit only sets it to TRUE
in a few cases, such as various "none" singleton values which will never
change. Later commits will refine this and set it for more values.
2020-01-18 08:49:51 +01:00
Timm Bäder
7aa17afe7a
testsuite: Update css color output
2020-01-18 08:49:51 +01:00
Timm Bäder
8c678ac756
css: Move border-width special cases out of GtkCssDimensionValue
...
Move them to style computation instead, so we don't have them in such a
generic place.
2020-01-18 08:49:51 +01:00
Timm Bäder
7d1f915a61
csscolorvalue: Don't copy rgbas when applying function
...
We get const pointers to the colors, so just use those and unref the
values later.
2020-01-18 08:49:51 +01:00
Timm Bäder
afa991752c
gl renderer: Look at shadow color in the outset shadow cache
...
It would probably be better to not do this and always render the outline
in plain white, then later recolor it but do this for no, just for
correctness.
2020-01-18 08:49:51 +01:00
Timm Bäder
fc2d05ee38
cssimageradial: Use array + length instead of GArray
...
This makes sense since we're not going to change the (amount of) colors
after parsing.
2020-01-18 08:49:51 +01:00
Timm Bäder
00aa4f0597
cssimagelinear: Use count+array for the color stops, not GArray
...
This makse sense but will also make later changes to GtkCssImageLinear
simpler.
2020-01-18 08:49:51 +01:00
Timm Bäder
3401150cca
cssimagefallback: Don't compute new image if only a color is set
...
Themes might use e.g. image(red), which is a constant value and will
never change. In that case, the fallback image has ->color set, but not
->images. If that's the case and the computed color is the same as
the one we already have, just return the already existing image.
2020-01-18 08:49:51 +01:00
Timm Bäder
67991ed0f4
Remove GtkCssRgbaValue
...
The differenciation between a literal color value and an RGBA value
caused problems in various situations. Just treat the two the same but
don't allow access to the rgba value of a non-literal color value.
This gets rid of around 1.6k rgba values in the widget-factory.
2020-01-18 08:49:51 +01:00
Matthias Clasen
741e12012d
dump css value stats
2020-01-18 08:49:51 +01:00
Timm Bäder
91aa60b210
csssshadwovalue: Remove unused function prototype
2020-01-18 08:49:51 +01:00
Timm Bäder
e31c0898e5
cssnumbervalue: Add early-outs to transition code
...
we don't need to do the calculation at all if the progress is 0 or 1
anyway.
We also sometimes transition from 0 to 0 etc., so we can short-circuit
that as well by doing the fast pointer-equality check and relying on the
singletons.
2020-01-18 08:49:51 +01:00
Timm Bäder
1f2f2777e1
csscornervalue: Accept other values if x == y
...
Most corners are square, so x == y. In that case, just accept either of
them. This makes the corner value unnecessary.
In fact none of the corner values in the widget-factory are needed, so
this spares us around 500 corner value allocations.
css value stats before:
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssCornerValue: 556
GtkCssArrayValue: 143
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
GtkCssColorValue: 1452
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
SUM: 8428
and after:
GtkCssColorValue: 1452
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssArrayValue: 143
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
SUM: 7872
8428 to 7872 is a 556 reduction (6.5%)
asdf
2020-01-18 08:49:51 +01:00
Timm Bäder
9cb2fe5cac
cssarrayvalue: Don't allocate memory when parsing array values
...
We probably won't find CSS with more than 128 values in array.
2020-01-18 08:49:51 +01:00
Timm Bäder
8d15efba8f
cssarrayvalue: Allow calling array API on non-arrays
...
Just allow calling _get_nth() and _get_n_values() on every kind of css
value. This way we can allow all values in places where only array
values would be allowed before.
This spares us around 1000 array values in the widget factory.
css value stats before:
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssCornerValue: 556
GtkCssArrayValue: 1130
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
GtkCssColorValue: 1452
SUM: 9415
and after:
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssCornerValue: 556
GtkCssArrayValue: 143
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
GtkCssColorValue: 1452
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
SUM: 8428
9415 to 8428 is a 987 reduction (10.4%)
2020-01-18 08:49:51 +01:00
Timm Bäder
1200fe2daf
cssvalue: Add type names for all classes
...
This is important to have for debugging and e.g. to print statistics for
the individual css value types
2020-01-18 08:49:51 +01:00
Timm Bäder
515a527b27
csscolorvalue: Compute alpha/shade/mix of color literals directly
...
The values of these are never gonna change so we can as well create
literal color values from the resulting colors instead.
2020-01-18 08:49:51 +01:00
Timm Bäder
06dbde22a0
csscolorvalue: Don't resolve literal color values
2020-01-18 08:49:51 +01:00
Matthias Clasen
c21280e455
Merge branch 'adwaita-performance' into 'master'
...
Adwaita: Remove wildcards
Closes #2380
See merge request GNOME/gtk!1330
2020-01-18 06:43:11 +00:00
Matthias Clasen
0d9a7fe089
Adwaita: Remove wildcards
...
Selectors like *:disabled or *:link have bad performance
implications, since they cause all styles to be recomputed
when the state of the window changes. Replace these by a
list of the elements that are actually affected.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2380
2020-01-18 01:30:02 -05:00
Matthias Clasen
03883b8b1a
Merge branch 'matthiasc/css-change-tracking-4' into 'master'
...
Improve change computation
See merge request GNOME/gtk!1327
2020-01-18 05:41:26 +00:00
Matthias Clasen
f28cd6cea9
Remove the widget-factory test again
...
This was failing in ci, in hard to track down ways.
2020-01-18 00:27:52 -05:00
Matthias Clasen
b8b90fefd8
change tests: Update test output
...
Some of these test cases involve :not, and thus are affected
by our now correct handling of it for change computation.
All of them are affected by the window now being visible.
2020-01-17 23:47:34 -05:00
Matthias Clasen
b4a9cf2bfb
Remove no longer needed code
...
We no longer use superset or any matchers to find changes.
2020-01-17 23:47:34 -05:00
Matthias Clasen
2a919a4d4f
Go back to the tree for computing change
2020-01-17 23:47:34 -05:00
Matthias Clasen
b2775d9bdd
Redo the way we compute change
...
Instead of expecting a superset matcher, call
gtk_css_selector_match_for_change while walking the tree with the
original matcher. This fixes the handling of :not while determining
changes.
2020-01-17 23:47:34 -05:00
Matthias Clasen
d0a8a717ef
Bring back the reserved bit
2020-01-17 23:47:34 -05:00
Matthias Clasen
7d72703d54
Revert "Remove no longer used code"
...
This reverts commit 105acfe908 .
2020-01-17 23:47:34 -05:00
Matthias Clasen
8ecd4e87e3
Add testcases for css change flags
...
Add various tests for the change flag computation that
we do in the css selector tree.
test1: Just test the basic machinery of this test
test2: Trigger every change flag at least once
test3: Test that multiple states combine as expected
test4: Test negations (known to produce wrong results)
test5: Test a complex selector (not producing the expected
output atm)
widget-factory.ui:
The real thing: widget-factory+Adwaita. Note that
this expedts to be run with GSETTINGS_BACKEND=memory
Note that test4 checks the wrong results that we currently
produce for selectors involving :not. It will have to be
updated when we fix the handling of :not. The widget-factory.ui
testcase will certainly also be affected.
2020-01-17 23:47:34 -05:00
Matthias Clasen
9de31929d6
Add a test for css change flags
2020-01-17 23:47:34 -05:00
Matthias Clasen
b41bba07fa
Add a way to dump css node change values
...
Add a GTK_STYLE_CONTEXT_PRINT_SHOW_CHANGE flag that
tells gtk_style_context_to_string to include the
change values of nodes in the output. This will
help debugging css change tracking.
2020-01-17 23:47:34 -05:00
Matthias Clasen
0f694b8beb
style tests: Update expected output
...
The printing of css nodes has changed, and the window
is visible now.
2020-01-17 23:47:34 -05:00
Matthias Clasen
7b1ab8fb8b
style tests: Show the window
...
Not doing so somewhat defeats the point that we want
to verify the regular styles, not some weird initial
conditions.
2020-01-17 23:47:34 -05:00
Matthias Clasen
d9b1a1ebb1
style tests: Clean up --generate support
...
Reshuffle things so we don't call gtk_test_init() when --generate
is passed, to avoid polluting the output with test spew.
2020-01-17 23:47:34 -05:00
Matthias Clasen
d4f3979896
node tests: Update expected output
...
The printing of css nodes has changed and the
window is visible now.
2020-01-17 23:47:34 -05:00
Matthias Clasen
2e7cb6019f
node tests: Show the window
...
This avoids using default styles.
2020-01-17 23:47:34 -05:00
Matthias Clasen
f1fce5253e
node tests: Clean up --generate support
...
Reshuffle things so we don't call gtk_test_init() when --generate
is passed, to avoid polluting the output with test spew.
2020-01-17 23:47:34 -05:00
Matthias Clasen
81b65eadcb
Add an Empty theme for tests
2020-01-17 23:47:34 -05:00
Matthias Clasen
1e7705c08e
cssnode: Fix a corner case in style computation
...
When we recomputed the change flags, and the style
did not change, we still need to replace the style
object, since it holds the new change flags.
2020-01-17 23:47:34 -05:00
Matthias Clasen
cc3cf581ab
cssnodedeclaration: Make print output deterministic
...
This was depending on the memory order of quarks, which
is not a good fit for tests that depend on this output.
2020-01-17 23:47:34 -05:00
Matthias Clasen
6e09c5cee8
Quiet compiler warnings in release builds
2020-01-17 23:47:34 -05:00
Matthias Clasen
69fb3648b2
Tweak the file transfer portal _again_
...
This is a neverending story. I was seeing problems in tests where
the nested mainloop was picking up unrelated timeouts.
Break down and make this async. This changes the ordering in which
the (de)serializers are registered. If this is causing issues, we
can introduce priorities or something else.
2020-01-17 23:46:37 -05:00
Matthias Clasen
23f84e3a3d
Merge branch 'gtk-fix-gesture-get-center' into 'master'
...
gtkgesture: Fix gtk_gesture_get_bounding_box_center() for touchpads
Closes #2316
See merge request GNOME/gtk!1257
2020-01-17 21:59:33 +00:00
Yariv Barkan
1a9b1f38a4
demo: Use pinch translation in the gestures demo
...
Add the pinch translation offset to the pinch gesture demo. That allows
moving the square around in addition to the already-supported rotate and
zoom.
2020-01-17 22:34:48 +02:00
Yariv Barkan
00a488a5b5
gtkgesture: Fix get-center for touchpad gestures
...
Touchpad gestures have only a single event sequence. The current
'center' of the gesture is the starting point + accumulated deltas.
Update gtk_gesture_get_bounding_box_center() accordingly.
2020-01-17 22:34:48 +02:00
Matthias Clasen
26c4c28068
Fix a few bugs in the css change flag definition
...
These were found by the new change flag tests.
2020-01-17 11:26:50 -05:00
Timm Bäder
da2e184639
Merge branch 'fix-imwayland-cursor' into 'master'
...
imwayland: Fix get_preedit_string cursor position (GTK4)
Closes #2383
See merge request GNOME/gtk!1328
2020-01-17 09:24:48 +00:00
xdavidwu
9576222b47
imwayland: Fix get_preedit_string cursor position
...
GtkIMContext get_preedit_string should return cursor position counted
in characters, but cursor_begin here is counted in bytes. This add the
missing conversion.
2020-01-17 16:16:13 +08:00
Matthias Clasen
7738a05bd2
Merge branch 'matthiasc/css-change-tracking-3' into 'master'
...
Preliminary css matcher work
See merge request GNOME/gtk!1326
2020-01-17 00:38:04 +00:00
Matthias Clasen
93b5b487ae
cssmatcher: Change get_state to has_state
...
This matches all the other vfuncs, and it gets us
out of keeping several big state flag enumerations
in sync.
Update all callers.
2020-01-16 19:24:43 -05:00
Matthias Clasen
7588655a42
Allow printing css matchers
...
This can help in debugging css matching.
2020-01-16 19:11:21 -05:00
Matthias Clasen
007713c0ba
css: Add a matcher type enum
...
For now, this just replaces the is_any boolean
by a type field in the class. It will be used in
future commits.
2020-01-16 19:11:21 -05:00
Matthias Clasen
f0c1c3349f
css: Simplify the superset matcher
...
We use the superset matcher in exactly one place,
so there is no need for the generality of allowing
to ignore different aspects. Just hardcode the one
case we need: ignoring everything except for name,
id and class.
2020-01-16 19:11:08 -05:00
Matthias Clasen
0dba6e5759
Cosmetic change
...
Update comments for name changes that happened long ago.
2020-01-16 19:10:03 -05:00
Matthias Clasen
60cd7cd96c
css: Fix the ANY matcher state list
...
The ANY and matcher was not, in fact, matching any state,
since the list of states was not up-to-date.
The same fix applies to the superset matcher as well.
2020-01-16 19:09:19 -05:00
Matthias Clasen
2b504201e3
Merge branch 'matthiasc/css-change-tracking-2' into 'master'
...
Better css change tracking
See merge request GNOME/gtk!1325
2020-01-16 23:00:17 +00:00
Matthias Clasen
3fcbe8d5f3
Remove an unused define
...
We no longer use the GTK_CSS_CHANGE_RESERVED_BIT define.
2020-01-16 17:39:03 -05:00
Matthias Clasen
105acfe908
Remove no longer used code
...
We no longer consult the selector tree to find changes,
so this code is no longer needed.
2020-01-16 17:24:34 -05:00
Matthias Clasen
1caf197a0d
css: Don't got to the selector tree for change
...
The tree is optimized for mimizing the decisions, and is built ahead-of-time.
That prevents us from taking advantage of the information in the matcher when
collecting changes.
So, instead do what we used to do for verification: Use the selector tree
for finding the superset matches, then just walk the rulesets to collect
the changes.
Since we are now recomputing the change masks much less frequently, this
slightly less optimized way of computing them is not a problem, and will
let us compute better results in the future, by improving the superset
matcher to be more precise.
2020-01-16 17:20:45 -05:00
Matthias Clasen
0a49726c73
cssprovider: Keep selectors around
...
Don't remove selectors from the rulsets after
creating the selector tree. We want to use them
in future commits.
2020-01-16 17:17:07 -05:00
Benjamin Otte
dd0cc9df9f
Merge branch 'matthiasc/css-change-tracking' into 'master'
...
Better css change handling
See merge request GNOME/gtk!1324
2020-01-16 22:13:57 +00:00
Matthias Clasen
789f6f3941
css: Avoid computing change too often
...
Most of the time when styles need to be recreated, the name and classes
of the css node haven't changed. In this case, the change value will not
change either, since we are computing change under the assumption that
name and classes are unchanged.
So don't recompute the change. This avoids the second match we do to
find the superset, cutting down the number of times we consult the
selector tree.
2020-01-16 17:03:51 -05:00
Matthias Clasen
2c231f4336
Revisit gtk_css_style_get_static_style one more time
...
Move the implementation to where it belongs.
2020-01-16 17:02:21 -05:00
Matthias Clasen
3c50e5324f
Change the signature of gtk_css_style_get_static_style
...
It is clearer if this function returns a GtkCssStaticStyle.
2020-01-16 14:06:14 -05:00
Matthias Clasen
3182063ffe
Quiet a compiler warning
...
This was causing warnings in a release build.
2020-01-16 13:04:33 -05:00
Matthias Clasen
5910e5ac6d
Merge branch 'static-style-getter' into 'master'
...
css: Add gtk_css_style_get_static_style
See merge request GNOME/gtk!1323
2020-01-16 17:10:31 +00:00
Matthias Clasen
b2b89f6c57
css: Add gtk_css_style_get_static_style
...
This lets us avoid poking directly at the GtkCssAnimatedStyle
struct in gtkcssnode.c.
2020-01-16 12:02:44 -05:00
Matthias Clasen
5ac24db049
Merge branch 'matthiasc/css-split-states' into 'master'
...
Split off some states in css change tracking
See merge request GNOME/gtk!1322
2020-01-16 16:58:23 +00:00
Matthias Clasen
192a24fa1f
css: Track selected state separately
...
Like the previous change, this reduces the number of
css nodes reacting to parent-state changes. The remaining
parent-state cases here are due to :link.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
parent-backdrop 4
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
selected 579
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 115
parent-hover 5
parent-disabled 91
parent-backdrop 4
parent-selected 144
2020-01-16 11:26:46 -05:00
Matthias Clasen
2426b9e23a
css: Track backdrop state separately
...
Like the previous change, this reduces the number of
css nodes reacting to parent-state changes.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 562
disabled 859
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
parent-backdrop 4
2020-01-16 11:25:04 -05:00
Matthias Clasen
64848aebf4
css: Track disabled state separately
...
Significantly reduces the number of nodes that react to
parent-state changes.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 2247
sibling-name 63
sibling-state 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 2226
parent-hover 5
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 562
disabled 859
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
2020-01-16 11:23:25 -05:00
Matthias Clasen
fcceac6d11
css: Track hover state changes separately
...
The idea is that this reduce the amount of frequently
changing state that css nodes are sensitive to.
This is going to reduce the amount of style recomputation.
2020-01-16 11:17:48 -05:00
Matthias Clasen
975f6529b1
Merge branch 'wip/carlosg/x11-dnd' into 'master'
...
X11 dnd fixes.
See merge request GNOME/gtk!1321
2020-01-16 14:29:48 +00:00
Carlos Garnacho
357e215fb8
gdkdrag/x11: Issue XdndLeave on cancellation
...
According to XDND "The XdndLeave message cancels the session.",
issue one when cancelling a drag, so the dest side has an opportunity
to forget about the GdkDrop.
2020-01-16 15:03:24 +01:00
Carlos Garnacho
4716c9ae2f
gdkdrag/x11: Drop timestamp argument from gdk_drag_do_leave()
...
This is not necessary for the XdndLeave message, nor used.
2020-01-16 15:02:16 +01:00
Carlos Garnacho
5aad3d7d0e
gdk/x11: Ensure to hide DnD surface after failed operation
...
The drag source might be cached and held alive, only disposed after
future drag begin operations. Ensure the drag surface gets hidden
properly or might might stay transparent but mapped till then.
2020-01-16 13:34:08 +01:00
Carlos Garnacho
fe36c24b07
gdk/x11: Ensure to sync type list after sending XdndEnter
...
Otherwise we are not ensured the GdkDrop is up-to-date, might even
be a stale one from an older DnD operation.
2020-01-16 13:33:57 +01:00
Carlos Garnacho
682068f887
gdk/x11: Serialize gtype content formats before sending Xdnd enter
...
This ensures GType handlers get serialized to mimetypes at the time
the drag dest inspects the XdndTypeList property.
2020-01-16 13:31:40 +01:00
Matthias Clasen
e8eb1df29f
Speed up gtk_widget_pick
...
Add early exits, and avoid as much work as
possible.
2020-01-15 11:01:20 -05:00
Matthias Clasen
82dc7b903c
Fix the filetransfer portal initialization
...
Reusing the cancellable only works if you don't throw
it away after first use.
2020-01-15 10:58:54 -05:00
Matthias Clasen
b020a3fcf9
Try harder to make ci not timeout
...
Make getting the file transfer portal proxy more
async, and avoid leaking a bus connection. This
causes GTestDBus to hang at the end of the test
run.
2020-01-14 18:32:05 -05:00
Matthias Clasen
cb88de5938
css: Drop unsused bitmasks
...
GtkCssProvider was maintaining bitmasks for the
set properties in each ruleset. The masks are never
used, so drop them.
2020-01-14 18:32:05 -05:00
Matthias Clasen
94b1e72aa3
css: Remove an unused function
...
_gtk_css_style_property_get_mask_affecting was superseded
by GtkCssStyleChange back in 2015.
2020-01-14 18:32:05 -05:00
Matthias Clasen
20b92638ec
testsuite: Improve --generate support
...
We don't want annoying spew from GTest when
using --generate, since it interferes with just
piping the output to a text file.
2020-01-14 18:32:05 -05:00
Matthias Clasen
dccb83c9ec
quiet a compiler warning in release builds
2020-01-14 18:32:05 -05:00
Alex Samorukov
d668d2fa25
Use bundle id instead of package name for the macOS preview as filename is now changed
2020-01-14 22:15:05 +00:00
Matthias Clasen
34f1ae8fad
fontchooser: Fix up the previous commit
2020-01-14 15:42:01 -05:00
Matthias Clasen
042537cf0d
fontchooser: Fix objects-finalize test
...
The treeview is evil and keeps reference cycles in the
form of various tree row references. That gets cleaned up
if you explicitly gtk_widget_destroy the treeview. But since
07f2024bfc , the scrolled window no longer destroys
its child, exposing this issue as a reference leak in
the objects-finalize test.
The font chooser widget is affected here because it calls
gtk_tree_view_scroll_to_path from init(), which creates one
of those reference cycles. Work around this in the font
chooser by unsetting the tree view model in dispose, which
clears up this cycle.
2020-01-14 15:25:27 -05:00
Matthias Clasen
d03f38470e
Fix encoding symbolic pixbufs
...
This was broken in 1a931da046 .
2020-01-14 14:14:45 -05:00
Sucipto
a7d72cf69b
Update Indonesian translation
2020-01-14 15:11:27 +00:00
Matthias Clasen
256139baab
testsuite: Skip GtkDragIcon
...
GtkDragIcon needs a special surface, so skip it
in the notify tests.
2020-01-14 09:20:18 -05:00
Daniel Mustieles
a935aae6f1
Updated Spanish translation
2020-01-14 12:39:44 +01:00
Kukuh Syafaat
9955d686ee
Update Indonesian translation
2020-01-14 06:27:18 +00:00
Matthias Clasen
a9da41c66a
Merge branch 'adwaita-cross-fade-fix-gtk4' into 'master'
...
Adwaita: Fix syntax error in cross-fade() (GTK4)
Closes #2371
See merge request GNOME/gtk!1308
2020-01-14 06:08:24 +00:00
Matthias Clasen
4d8691b762
Merge branch 'wip/chergert/fix-dragicon-installation' into 'master'
...
build: fix gtkdragicon header installation
See merge request GNOME/gtk!1306
2020-01-14 06:06:35 +00:00
Matthias Clasen
806e159b8b
Handle lack of file transfer portal
...
Don't block for 25 seconds trying to get a bus
connection. Give up after 1 second.
2020-01-14 01:03:48 -05:00
Matthias Clasen
794ee0b8c0
gtk-demo: Use a default action in the infobars demo
...
This makes the question infobar activatable by clicking
anywhere in it.
2020-01-14 00:05:23 -05:00
Matthias Clasen
2b7de841a9
Adwaita: Add hover for clickable infobars
2020-01-14 00:05:23 -05:00
Matthias Clasen
45309811c5
infobar: Activate default action on clicks
...
When we have a default action set on the infobar, activate it
for clicks anywhere in the infobar. Also add an .action style
class in this case, so we can add a hover highlight to the infobar
just for this case.
2020-01-14 00:05:23 -05:00
Matthias Clasen
2b695ac8d1
Merge branch 'wip/chergert/textview-propagate-undo-state' into 'master'
...
textview: propagate GtkTextBuffer can-undo/redo action state
See merge request GNOME/gtk!1311
2020-01-14 01:59:22 +00:00
Christian Hergert
cb03969c5f
textview: propagate GtkTextBuffer can-undo/redo action state
...
This ensures the action state for undo and redo are propagated from the
buffer. Doing so means menu items now properly show sensitivity.
2020-01-13 17:26:18 -08:00
Matthias Clasen
57e71a6a69
Merge branch 'wip/chergert/textview-undo-menu-item' into 'master'
...
textview: add undo/redo menu actions
See merge request GNOME/gtk!1310
2020-01-13 23:51:40 +00:00
Christian Hergert
15b5a404b8
textview: add undo/redo menu actions
2020-01-13 15:25:05 -08:00
nana-4
4056a40d2d
Adwaita: Fix syntax error in cross-fade()
...
cross-fade() requires two images.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2371
2020-01-14 06:19:12 +09:00
Christian Hergert
c1e9523f0e
build: fix gtkdragicon header installation
2020-01-13 09:07:24 -08:00
Daniel Mustieles
4c1ccfd7be
Updated Spanish translation
2020-01-13 16:51:22 +01:00
Daniel Mustieles
823e00dec9
Updated Spanish translation
2020-01-13 16:50:21 +01:00
Timm Bäder
3e51966ea9
Merge branch 'wip/jimmac/updated-checkmark' into 'master'
...
Adwaita: update checkbox & radio
Closes #2291
See merge request GNOME/gtk!1289
2020-01-13 14:12:51 +00:00
Jakub Steiner
e292767a01
Adwaita: update checkbox & radio
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2291
2020-01-13 13:45:34 +01:00
Matthias Clasen
75c433fb5f
Merge branch 'closure-annotations' into 'master'
...
Fix incorrect use of GIR closure annotations.
See merge request GNOME/gtk!1305
2020-01-13 05:00:12 +00:00
Robert Ancell
83867f9cbf
Add missing (closure) GIR annotations
2020-01-13 14:26:50 +13:00
Robert Ancell
ea9f0df67b
Fix incorrect use of GIR closure annotations.
...
They were being applied to the callback function, not the data that is passed
to that function.
2020-01-13 14:11:15 +13:00
Matthias Clasen
15c7980ba6
Merge branch 'textbuffer-missing-api-docs' into 'master'
...
Add missing public API documentation.
See merge request GNOME/gtk!1301
2020-01-13 00:51:24 +00:00
Matthias Clasen
de5fde1e12
Merge branch 'menutoolbutton-missing-api-docs' into 'master'
...
menutoolbutton: Add missing public API documentation.
See merge request GNOME/gtk!1303
2020-01-13 00:50:58 +00:00
Matthias Clasen
a83b360224
Merge branch 'docstring-typos' into 'master'
...
Fix docstring errors with drag and drop code
See merge request GNOME/gtk!1304
2020-01-13 00:50:16 +00:00
Matthias Clasen
4d55d23c1a
Merge branch 'missing-transfer-notation' into 'master'
...
Add missing transfer notation for function return types.
See merge request GNOME/gtk!1302
2020-01-13 00:49:25 +00:00
Robert Ancell
2b6162116d
Fix docstring errors with drag and drop code
2020-01-13 12:30:17 +13:00
Robert Ancell
b2ca947934
textbuffer: Add missing public API documentation.
...
This API was added in a52757874e .
2020-01-13 12:19:43 +13:00
Robert Ancell
3eaf88b84c
menutoolbutton: Add missing public API documentation.
...
This API was added in 03e30431a8
2020-01-13 12:17:55 +13:00
Robert Ancell
9e9eae3ad4
Add missing transfer notation for function return types.
2020-01-13 12:14:08 +13:00
Matthias Clasen
903afcbddd
Adwaita: Fix needs-attention
...
Stack switchers are now stackswitcher, no longer .stack-switcher.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2370
2020-01-11 20:14:35 -05:00
Piotr Drąg
d37612a476
Update POTFILES.in
2020-01-11 16:07:48 +01:00
ZhaoQiang
e75bc172ef
Remove some unused variables
...
To avoid compiler warnings.
See merge request GNOME/gtk!513
2019-04-09 22:06:50 +08:00
Takao Fujiwara
4b2e4f6628
Always emit reset for IM preedit with mouse click
...
Hangul inputs treat pre-edit text as output text and the pre-edit
text won't be moved with mouse click.
Now the reset signal is always emitted simply with mouse click and
each IM engine could handle the signal whether the preedit is committed,
cleared or kept.
Closes #1534
2019-02-20 18:58:51 +09:00
Sean Farley
99dfdfcd5e
Allow LPR backend to print PDF and PS file formats
...
At least from GTK v3.22.30, the code disallows attempts to print PDF and
PS files using the LPR backend. Although it is not easy or possible for
GTK to determine if the printer can print these formats by querying lpr,
the print backend should allow lpr to try.
There are two uses cases:
- A filter is being used by lpr, specified in the printcap file, to process the
files prior to printing them.
- The printer can print PDF and PS files directly. There are many printers that
can print these formats, so GTK should allow for the possibility.
2018-11-17 13:04:35 -05:00
Rick Yorgason
26febcc3a8
Fixed win32 printer dialogue not saving devmode->dmDeviceName. Caused the print dialogue to select the wrong printer, and potentially feed bad "extra" data to the default printer.
2018-11-01 11:31:05 -07:00
Rick Yorgason
5dd7f20dab
Fixed code styling.
2018-10-29 04:04:10 -07:00
Rick Yorgason
fc15a409cc
Fixed bug that prevented GTK from storing printer driver preferences in the print dialogue on Windows.
2018-10-27 06:00:20 -07:00
Daniel Boles
4b96e7fc78
Application: Do not reuse Ctrl+F1 for help-overlay
...
It just gets overridden to do something else, as the 1st GtkWidget’s
class_init() adds it as a binding to toggle tooltips with the keyboard.
The last entity to hook it (& return TRUE) is the only one who gets it.
So, worse: If users needed to manually set accels for a ShortcutsWindow,
coincidentally waited until after the 1st GtkWidget init() to do it, &
copied what GtkApplication said in an attempt to be good & consistent —
they inadvertently broke the keyboard tooltips (except for users with a
GDK_KEY_KP_F1 – whatever that is) as their handler blocked GtkWidget’s.
So, one side has to drop this accelerator, and it seems clear that being
able to open tooltips with the keyboard is more important than having a
second accel for the help-overlay. We can make up a replacement later.
https://gitlab.gnome.org/GNOME/gtk/issues/626
2018-08-24 14:51:21 +03:00