Compare commits

...

534 Commits

Author SHA1 Message Date
Matthias Clasen
0935a50bf5 macos: Use shadow size from GdkToplevelSize 2020-08-12 08:20:09 -04:00
Matthias Clasen
19d60d7234 broadway: Use shadow size from GtkToplevelSize 2020-08-12 08:20:09 -04:00
Matthias Clasen
f2c148c42d win32: Use shadow size from GdkToplevelSize 2020-08-12 08:20:09 -04:00
Matthias Clasen
5af0e93de0 x11: Use shadow size from GdkToplevelSize 2020-08-12 08:13:03 -04:00
Matthias Clasen
e21a7d70f1 window: Set shadow size in ::compute-size
This is the new way of communicating shadow size.
2020-08-12 08:00:34 -04:00
Matthias Clasen
bc05b0bba5 wayland: Use shadow size from GdkToplevelSize 2020-08-12 08:00:11 -04:00
Matthias Clasen
ece755ff62 toplevelsize: Add shadow size
Setting the shadow together with the size makes
sense, since the shadow is needed to make sense
of the size.
2020-08-12 07:59:16 -04:00
Matthias Clasen
8c1a99214f Revert "gridview: Work around unexpected focus changes"
This reverts commit c13d70479b.
2020-08-08 17:26:39 -04:00
Matthias Clasen
8ce83d03af window: Allocate on map
We normally wait for the surface ::size-changed signal,
but then we only queue a resize, which is not sufficient
on map - we need to have an allocation by the time start
moving focus around in show. So, call check_resize()
right away.
2020-08-08 17:26:39 -04:00
Matthias Clasen
29c83ef0b9 window: Some more renaming
Rename gtk_window_compute_configure_request
to gtk_window_compute_size and hints_changed
to min_size_changed.
2020-08-08 15:22:03 -04:00
Matthias Clasen
7def3bf542 window: Get rid of GdkGeometry uses
Instead, store a min size in the Private struct.
2020-08-08 15:22:03 -04:00
Matthias Clasen
6d855c307b window: Some renaming
Rename gtk_window_move_resize to gtk_window_do_resize
(no moving involved anymore), rename configure_notify_received
to need_resize and replace gtk_window_guess_default_size
by gtk_window_compute_default_size.
2020-08-08 15:22:03 -04:00
Matthias Clasen
baf05d816a window: Fix some issues in ::compute-size
gtk_window_compute_default_size was unsetting
need_default_size, before we were checking that
flag in toplevel_compute_size.
2020-08-08 15:22:03 -04:00
Matthias Clasen
490bfce319 window: Drop some dead code
We always set a min size
2020-08-08 15:22:03 -04:00
Matthias Clasen
a27fef3a27 window: Stop using gdk_surface_constrain_size 2020-08-08 15:22:03 -04:00
Matthias Clasen
294d45f0c7 window: Drop an unused argument 2020-08-08 15:22:03 -04:00
Matthias Clasen
1d068da0c9 window: Move the last size into the Private struct 2020-08-08 15:22:03 -04:00
Matthias Clasen
109c48a082 window: Move resize size into the Private struct
Another step towards getting rid of GdkGeometry here.
2020-08-08 15:22:03 -04:00
Matthias Clasen
21e730003a window: Move default size into the Private struct
This is a step towards getting rid of GdkGeometry
use here.
2020-08-08 15:22:03 -04:00
Matthias Clasen
55b77278f2 window: Move icon info into the Private struct
No need to use object data for this.
2020-08-08 15:22:03 -04:00
Matthias Clasen
b62802b52f window: Stop handling positions
We don't do positions anymore, time to stop trying.
2020-08-08 15:22:03 -04:00
Matthias Clasen
2ba9c35195 window: Stop counting ConfigureRequests
Stop counting configure reuqests and stop freezing
the surface ourselves. The backend should do that
if it wants to.
2020-08-08 15:22:03 -04:00
Matthias Clasen
bbb8c04323 wayland: bypass events for ::size-changed
This is a step towards getting rid of configure
events altogether.
2020-08-08 15:22:03 -04:00
Matthias Clasen
89a15f6d03 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 (52, 52), that is happening
when GtkWindow sets the shadow_width before the window
is mapped.
2020-08-08 15:22:03 -04:00
Matthias Clasen
16a7197586 bookmarksmanager: Load bookmarks initially
This was broken in 1e6171a4a7.
2020-08-08 13:56:17 -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
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
872 changed files with 32472 additions and 64459 deletions

View File

@@ -16,11 +16,11 @@ stages:
# Common variables
variables:
COMMON_MESON_FLAGS: "--fatal-meson-warnings --werror"
COMMON_MESON_FLAGS: "--fatal-meson-warnings -Dgtk:werror=true"
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true -Dvulkan=yes"
FEATURE_FLAGS: "-Dcloudproviders=true"
MESON_TEST_TIMEOUT_MULTIPLIER: 3
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v20"
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v22"
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v19"
@@ -68,9 +68,11 @@ style-check-diff:
fedora-x86_64:
extends: .build-fedora-default
stage: build
needs: []
variables:
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
script:
- meson subprojects update
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
-Dprofiler=true
_build
@@ -82,14 +84,38 @@ fedora-x86_64:
release-build:
extends: .build-fedora-default
stage: build
needs: []
variables:
EXTRA_MESON_FLAGS: "--buildtype=release"
script:
- meson subprojects update
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
_build
- ninja -C _build
- .gitlab-ci/run-tests.sh _build x11
installed-tests:
extends: .build-fedora-default
stage: build
needs: []
variables:
EXTRA_MESON_FLAGS: "--prefix=/usr --libdir=/usr/lib64 -Dinstall-tests=true"
script:
- meson subprojects update
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
_build
- ninja -C _build
- sudo ninja -C _build install
- dbus-run-session xvfb-run -a -s "-screen 0 1024x768x24"
gnome-desktop-testing-runner
--report-directory=_build/installed-tests-report/failed/
--parallel=0
gtk-4.0
artifacts:
paths:
- "_build/installed-tests-report/"
.mingw-defaults:
stage: build
tags:
@@ -109,6 +135,7 @@ release-build:
msys2-mingw64:
extends: .mingw-defaults
needs: []
variables:
MSYSTEM: "MINGW64"
CHERE_INVOKING: "yes"
@@ -139,37 +166,44 @@ msys2-mingw64:
flatpak-manual:demo:
extends: .flatpak-manual
needs: []
variables:
APPID: org.gtk.Demo4
flatpak-master:demo:
extends: .flatpak-master
needs: []
variables:
APPID: org.gtk.Demo4
flatpak-manual:widget-factory:
extends: .flatpak-manual
needs: []
variables:
APPID: org.gtk.WidgetFactory4
flatpak-master:widget-factory:
extends: .flatpak-master
needs: []
variables:
APPID: org.gtk.WidgetFactory4
flatpak-manual:icon-browser:
extends: .flatpak-manual
needs: []
variables:
APPID: org.gtk.IconBrowser4
flatpak-master:icon-browser:
extends: .flatpak-master
needs: []
variables:
APPID: org.gtk.IconBrowser4
static-scan:
image: $FEDORA_IMAGE
stage: analysis
needs: []
variables:
EXTRA_MESON_FLAGS: "--buildtype=debug"
script:
@@ -186,6 +220,7 @@ asan-build:
image: $FEDORA_IMAGE
tags: [ asan ]
stage: analysis
needs: []
variables:
script:
- CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=false _build
@@ -199,6 +234,7 @@ asan-build:
reference:
image: $DOCS_IMAGE
stage: docs
needs: []
variables:
EXTRA_MESON_FLAGS: "--buildtype=release"
script:
@@ -214,6 +250,7 @@ reference:
pages:
stage: deploy
needs: ['reference']
script:
- mv _reference/ public/
artifacts:

View File

@@ -29,6 +29,7 @@ RUN dnf -y install \
glib2-static \
glibc-devel \
glibc-headers \
gnome-desktop-testing \
gobject-introspection-devel \
graphene-devel \
gstreamer1-devel \
@@ -75,7 +76,6 @@ RUN dnf -y install \
python3-wheel \
redhat-rpm-config \
sassc \
sysprof-devel \
systemtap-sdt-devel \
vulkan-devel \
wayland-devel \

View File

@@ -1,8 +1,11 @@
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v20
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v21
# Enable sudo for wheel users
RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' /etc/sudoers
ARG HOST_USER_ID=5555
ENV HOST_USER_ID ${HOST_USER_ID}
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
RUN useradd -u $HOST_USER_ID -G wheel -ms /bin/bash user
USER user
WORKDIR /home/user

View File

@@ -12,13 +12,12 @@ export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp
case "${backend}" in
x11)
xvfb-run -a -s "-screen 0 1024x768x24" \
xvfb-run -a -s "-screen 0 1024x768x24 -noreset" \
meson test -C ${builddir} \
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
--print-errorlogs \
--setup=${backend} \
--suite=gtk \
--no-suite=gtk:a11y \
--no-suite=gsk-compare-broadway
# Store the exit code for the CI run, but always
@@ -38,7 +37,6 @@ case "${backend}" in
--print-errorlogs \
--setup=${backend} \
--suite=gtk \
--no-suite=gtk:a11y \
--no-suite=gsk-compare-broadway
exit_code=$?
@@ -57,7 +55,6 @@ case "${backend}" in
--print-errorlogs \
--setup=${backend} \
--suite=gtk \
--no-suite=gtk:a11y \
--no-suite=gsk-compare-opengl
# don't let Broadway failures fail the run, for now

View File

@@ -33,17 +33,29 @@ pacman --noconfirm -S --needed \
mingw-w64-$MSYS2_ARCH-gst-plugins-bad \
mingw-w64-$MSYS2_ARCH-shared-mime-info
# https://gitlab.gnome.org/GNOME/gtk/issues/2243
wget "https://gitlab.gnome.org/creiter/gitlab-ci-win32-runner-v2/raw/master/pango/mingw-w64-$MSYS2_ARCH-pango-git-1.44.7.90.ge48ae523-1-any.pkg.tar.zst"
pacman --noconfirm -U "mingw-w64-$MSYS2_ARCH-pango-git-1.44.7.90.ge48ae523-1-any.pkg.tar.zst"
# https://github.com/msys2/MINGW-packages/pull/6465
pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-brotli
mkdir -p _ccache
export CCACHE_BASEDIR="$(pwd)"
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
# https://gitlab.gnome.org/GNOME/gtk/-/issues/2243
# https://gitlab.gnome.org/GNOME/gtk/-/issues/3002
if ! pkg-config --atleast-version=2.65.0 glib-2.0; then
git clone https://gitlab.gnome.org/GNOME/glib.git _glib
meson setup _glib_build _glib
meson compile -C _glib_build
meson install -C _glib_build
fi
pkg-config --modversion glib-2.0
if ! pkg-config --atleast-version=1.45.4 pango; then
git clone https://gitlab.gnome.org/GNOME/pango.git _pango
meson setup _pango_build _pango
meson compile -C _pango_build
meson install -C _pango_build
fi
pkg-config --modversion pango
# Build
ccache --zero-stats
ccache --show-stats
@@ -56,7 +68,7 @@ meson \
-Dwin32-backend=true \
-Dvulkan=no \
-Dintrospection=false \
--werror \
-Dgtk:werror=true \
_build
unset CCACHE_DISABLE

53
NEWS
View File

@@ -1,6 +1,53 @@
Overview of Changes in GTK 3.99.1
=================================
* GtkGridLayout: Rename left-/top-attach to column/row
* Drop GtkAccelLabel - it is no longer used
* GtkTextView:
- Fix redraw issues with selections
- Make insert-emoji replace the selection
* GtkTreeView:
- Fix selection handling in cell editables
* CSS:
- Hexadecimal colors can now specify alpha
* Documentation:
- Refresh the widget gallery
- Add images for new widgets to the gallery
- Fix many cross-references
* Demos:
- Numerous crash- and bug fixes
* Fix build with cups < 2.3
* win32:
- Default to the GL renderer when we can
* Translation updates:
Catalan
Polish
Romanian
Spanish
Ukrainian
Overview of Changes in GTK 3.99.0
=================================
* Remove the old accessibility implementation and
add the foundations for a new one that is based
on ARIA. The relevant widget api is GtkAccessible,
the backend implementations will use GtkATContext.
Currently, there is just a nascent test backend.
* Update the GTK headers to use char *, int, float and
double instead of the corresponding GLib types.
* Add GtkEditableLabel, a label that can be edited
* Add GtkBookmarkList, a list model for bookmarks
@@ -35,6 +82,7 @@ Overview of Changes in GTK 3.99.0
* GtkFilterListModel:
- Add incremental filtering
- Add a boolean filter, GtkBoolFilter
* GtkSortListModel:
- Use timsort
@@ -51,13 +99,18 @@ Overview of Changes in GTK 3.99.0
* Inspector:
- Improve list model support
- Add direct navigation between objects
- Show accessibility information
* GDK:
- Compress scroll events
- Keep a scroll history
- Clean up GdkDevice api
- Drop the master/slave device split
- Move axes to GdkDeviceTool
- Change monitor workarea to be per-backend API
- Improve frame clock accuracy
- Add a new macOS backend
- Add an ANGLE-based GLES renderer for Windows
* GSK:
- Use GL_ARB_framebuffer_object

View File

@@ -56,7 +56,6 @@ building for:
- [Pango](https://download.gnome.org/sources/pango)
- [Epoxy](https://github.com/anholt/libepoxy)
- [Graphene](https://github.com/ebassi/graphene)
- [ATK](https://download.gnome.org/sources/atk)
- [Xkb-common](https://github.com/xkbcommon/libxkbcommon)
If you are building the X11 backend, you will also need:
@@ -70,7 +69,6 @@ If you are building the X11 backend, you will also need:
- xcursor
- xdamage
- xcomposite
- [atk-bridge-2.0](https://download.gnome.org/sources/at-spi2-atk)
If you are building the Wayland backend, you will also need:

View File

@@ -13,8 +13,8 @@
<object class="GtkLabel">
<property name="label">Target</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -23,8 +23,8 @@
<signal name="changed" handler="update_preview" swapped="yes"/>
<signal name="changed" handler="update_button" swapped="yes"/>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -32,8 +32,8 @@
<object class="GtkComboBoxText" id="target_attr">
<signal name="changed" handler="update_preview" swapped="yes"/>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
<property name="column">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -41,8 +41,8 @@
<object class="GtkLabel">
<property name="label">Relation</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -50,8 +50,8 @@
<object class="GtkComboBoxText" id="relation">
<signal name="changed" handler="update_preview" swapped="yes"/>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -59,8 +59,8 @@
<object class="GtkLabel">
<property name="label">Source</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -69,8 +69,8 @@
<signal name="changed" handler="update_preview" swapped="yes"/>
<signal name="changed" handler="update_button" swapped="yes"/>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -79,8 +79,8 @@
<signal name="changed" handler="update_preview" swapped="yes"/>
<signal name="changed" handler="source_attr_changed" swapped="yes"/>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
<property name="column">2</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -88,8 +88,8 @@
<object class="GtkLabel">
<property name="label">Multiplier</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
<property name="column">0</property>
<property name="row">4</property>
</layout>
</object>
</child>
@@ -97,8 +97,8 @@
<object class="GtkEntry" id="multiplier">
<signal name="changed" handler="update_preview" swapped="yes"/>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
<property name="column">1</property>
<property name="row">4</property>
</layout>
</object>
</child>
@@ -106,8 +106,8 @@
<object class="GtkLabel">
<property name="label">Constant</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
<property name="column">0</property>
<property name="row">5</property>
</layout>
</object>
</child>
@@ -115,8 +115,8 @@
<object class="GtkEntry" id="constant">
<signal name="changed" handler="update_preview" swapped="yes"/>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
<property name="column">1</property>
<property name="row">5</property>
</layout>
</object>
</child>
@@ -124,16 +124,16 @@
<object class="GtkLabel">
<property name="label">Strength</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">6</property>
<property name="column">0</property>
<property name="row">6</property>
</layout>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="strength">
<layout>
<property name="left-attach">1</property>
<property name="top-attach">6</property>
<property name="column">1</property>
<property name="row">6</property>
</layout>
</object>
</child>
@@ -141,8 +141,8 @@
<object class="GtkLabel" id="preview">
<property name="xalign">0</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">7</property>
<property name="column">1</property>
<property name="row">7</property>
<property name="column-span">2</property>
</layout>
<attributes>
@@ -155,8 +155,8 @@
<property name="label">Create</property>
<signal name="clicked" handler="create_constraint"/>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">8</property>
<property name="column">2</property>
<property name="row">8</property>
</layout>
</object>
</child>

View File

@@ -174,28 +174,25 @@ constraint_view_init (ConstraintView *self)
manager = gtk_constraint_layout_new ();
gtk_widget_set_layout_manager (GTK_WIDGET (self), manager);
all_children = gtk_widget_observe_children (GTK_WIDGET (self));
all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager));
guides = gtk_constraint_layout_observe_guides (GTK_CONSTRAINT_LAYOUT (manager));
all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager));
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
constraints = (GListModel *)gtk_filter_list_model_new (all_constraints, filter);
g_object_unref (filter);
all_children = gtk_widget_observe_children (GTK_WIDGET (self));
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
children = (GListModel *)gtk_filter_list_model_new (all_children, filter);
g_object_unref (filter);
list = g_list_store_new (G_TYPE_LIST_MODEL);
g_list_store_append (list, children);
g_list_store_append (list, guides);
g_list_store_append (list, constraints);
self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
g_object_unref (children);
g_object_unref (guides);
g_object_unref (constraints);
g_object_unref (all_children);
g_object_unref (all_constraints);
g_object_unref (list);
self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
controller = (GtkEventController *)gtk_gesture_drag_new ();
g_signal_connect (controller, "drag-begin", G_CALLBACK (drag_begin), self);

View File

@@ -55,8 +55,8 @@
<object class="GtkLabel">
<property name="label">Name</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -64,8 +64,8 @@
<object class="GtkEntry" id="name">
<property name="max-width-chars">20</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -74,8 +74,8 @@
<object class="GtkLabel">
<property name="label">Min Size</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -84,8 +84,8 @@
<property name="adjustment">min_width_adj</property>
<property name="max-width-chars">5</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -94,8 +94,8 @@
<property name="adjustment">min_height_adj</property>
<property name="max-width-chars">5</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
<property name="column">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -103,8 +103,8 @@
<object class="GtkLabel">
<property name="label">Nat Size</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -113,8 +113,8 @@
<property name="adjustment">nat_width_adj</property>
<property name="max-width-chars">5</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -123,8 +123,8 @@
<property name="adjustment">nat_height_adj</property>
<property name="max-width-chars">5</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">2</property>
<property name="column">2</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -132,8 +132,8 @@
<object class="GtkLabel">
<property name="label">Max Size</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -142,8 +142,8 @@
<property name="adjustment">max_width_adj</property>
<property name="max-width-chars">5</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -152,8 +152,8 @@
<property name="adjustment">max_height_adj</property>
<property name="max-width-chars">5</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
<property name="column">2</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -161,16 +161,16 @@
<object class="GtkLabel">
<property name="label">Strength</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
<property name="column">0</property>
<property name="row">4</property>
</layout>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="strength">
<layout>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
<property name="column">1</property>
<property name="row">4</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -180,8 +180,8 @@
<property name="label">Create</property>
<signal name="clicked" handler="create_guide"/>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">5</property>
<property name="column">2</property>
<property name="row">5</property>
</layout>
</object>
</child>

View File

@@ -31,8 +31,8 @@
</object>
</child>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -54,8 +54,8 @@
</object>
</child>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -70,8 +70,8 @@
</object>
</child>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -79,8 +79,8 @@
<object class="GtkStatusbar" id="status">
<property name="hexpand">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>

View File

@@ -18,8 +18,8 @@
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -29,8 +29,8 @@
<property name="has-frame">1</property>
<property name="min-content-width">150</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -40,8 +40,8 @@
<property name="hexpand">1</property>
<property name="stack">stack</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -67,8 +67,8 @@
<object class="GtkLabel">
<property name="label" translatable="yes">Duck</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -76,8 +76,8 @@
<object class="GtkLabel">
<property name="label" translatable="yes">Background</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -87,8 +87,8 @@
<class name="duck"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -98,8 +98,8 @@
<class name="gradient"/>
</style>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -108,8 +108,8 @@
<property name="label" translatable="yes">
Blended picture</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -121,8 +121,8 @@ Blended picture</property>
<class name="blend0"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -146,8 +146,8 @@ Blended picture</property>
<object class="GtkLabel">
<property name="label" translatable="yes">Red</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -155,8 +155,8 @@ Blended picture</property>
<object class="GtkLabel">
<property name="label" translatable="yes">Blue</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -166,8 +166,8 @@ Blended picture</property>
<class name="red"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -177,8 +177,8 @@ Blended picture</property>
<class name="blue"/>
</style>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -187,8 +187,8 @@ Blended picture</property>
<property name="label" translatable="yes">
Blended picture</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -200,8 +200,8 @@ Blended picture</property>
<class name="blend1"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -228,8 +228,8 @@ Blended picture</property>
<class name="cyan"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -239,8 +239,8 @@ Blended picture</property>
<class name="magenta"/>
</style>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -250,8 +250,8 @@ Blended picture</property>
<class name="yellow"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -262,8 +262,8 @@ Blended picture</property>
<class name="blend2"/>
</style>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -275,8 +275,8 @@ Blended picture</property>
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -288,8 +288,8 @@ Blended picture</property>
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -301,8 +301,8 @@ Blended picture</property>
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -314,8 +314,8 @@ Blended picture</property>
<attribute name="weight" value="bold"></attribute>
</attributes>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -324,8 +324,8 @@ Blended picture</property>
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>

View File

@@ -95,9 +95,6 @@
<property name="program-name" translatable="yes">Builder demo</property>
<property name="logo-icon-name" translatable="yes">gtk3-demo</property>
<property name="modal">True</property>
<accessibility>
<relation target="window1" type="subwindow-of"/>
</accessibility>
</object>
<object class="GtkWindow" id="window1">
<property name="default-height">250</property>
@@ -113,11 +110,6 @@
</child>
<child>
<object class="GtkBox" id="toolbar1">
<child internal-child="accessible">
<object class="AtkObject" id="a11y-toolbar">
<property name="AtkObject::accessible-name">The toolbar</property>
</object>
</child>
<child>
<object class="GtkButton">
<property name="label" translatable="yes">New</property>
@@ -174,14 +166,6 @@
<object class="GtkTreeView" id="treeview1">
<property name="model">liststore1</property>
<property name="tooltip-column">3</property>
<child internal-child="accessible">
<object class="AtkObject" id="a11y-treeview">
<property name="AtkObject::accessible-name">Name list</property>
<property name="AtkObject::accessible-description">
A list of person with name, surname and age columns
</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="column1">
<property name="title">Name</property>

View File

@@ -23,14 +23,12 @@
#include "demotaggedentry.h"
#include <gtk/gtk.h>
#include <gtk/gtk-a11y.h>
struct _DemoTaggedEntry
{
GtkWidget parent_instance;
GtkWidget *box;
GtkWidget *entry;
GtkWidget *text;
};
struct _DemoTaggedEntryClass
@@ -46,15 +44,10 @@ G_DEFINE_TYPE_WITH_CODE (DemoTaggedEntry, demo_tagged_entry, GTK_TYPE_WIDGET,
static void
demo_tagged_entry_init (DemoTaggedEntry *entry)
{
entry->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_parent (entry->box, GTK_WIDGET (entry));
entry->entry = gtk_text_new ();
gtk_widget_set_hexpand (entry->entry, TRUE);
gtk_widget_set_vexpand (entry->entry, TRUE);
gtk_widget_set_hexpand (entry->box, FALSE);
gtk_widget_set_vexpand (entry->box, FALSE);
gtk_box_append (GTK_BOX (entry->box), entry->entry);
entry->text = gtk_text_new ();
gtk_widget_set_hexpand (entry->text, TRUE);
gtk_widget_set_vexpand (entry->text, TRUE);
gtk_widget_set_parent (entry->text, GTK_WIDGET (entry));
gtk_editable_init_delegate (GTK_EDITABLE (entry));
}
@@ -62,12 +55,15 @@ static void
demo_tagged_entry_dispose (GObject *object)
{
DemoTaggedEntry *entry = DEMO_TAGGED_ENTRY (object);
GtkWidget *child;
if (entry->entry)
if (entry->text)
gtk_editable_finish_delegate (GTK_EDITABLE (entry));
g_clear_pointer (&entry->entry, gtk_widget_unparent);
g_clear_pointer (&entry->box, gtk_widget_unparent);
while ((child = gtk_widget_get_first_child (GTK_WIDGET (entry))))
gtk_widget_unparent (child);
entry->text = NULL;
G_OBJECT_CLASS (demo_tagged_entry_parent_class)->dispose (object);
}
@@ -101,7 +97,7 @@ demo_tagged_entry_grab_focus (GtkWidget *widget)
{
DemoTaggedEntry *entry = DEMO_TAGGED_ENTRY (widget);
return gtk_widget_grab_focus (entry->entry);
return gtk_widget_grab_focus (entry->text);
}
static void
@@ -118,15 +114,14 @@ demo_tagged_entry_class_init (DemoTaggedEntryClass *klass)
gtk_editable_install_properties (object_class, 1);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_ENTRY_ACCESSIBLE);
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
gtk_widget_class_set_css_name (widget_class, "entry");
}
static GtkEditable *
demo_tagged_entry_get_delegate (GtkEditable *editable)
{
return GTK_EDITABLE (DEMO_TAGGED_ENTRY (editable)->entry);
return GTK_EDITABLE (DEMO_TAGGED_ENTRY (editable)->text);
}
static void
@@ -147,7 +142,7 @@ demo_tagged_entry_add_tag (DemoTaggedEntry *entry,
{
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
gtk_box_append (GTK_BOX (entry->box), tag);
gtk_widget_set_parent (tag, GTK_WIDGET (entry));
}
void
@@ -157,10 +152,7 @@ demo_tagged_entry_insert_tag_after (DemoTaggedEntry *entry,
{
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
if (sibling == NULL)
gtk_box_append (GTK_BOX (entry->box), tag);
else
gtk_box_insert_child_after (GTK_BOX (entry->box), tag, sibling);
gtk_widget_insert_after (tag, GTK_WIDGET (entry), sibling);
}
void
@@ -169,7 +161,7 @@ demo_tagged_entry_remove_tag (DemoTaggedEntry *entry,
{
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
gtk_box_remove (GTK_BOX (entry->box), tag);
gtk_widget_unparent (tag);
}
struct _DemoTaggedEntryTag

View File

@@ -254,7 +254,7 @@ do_dropdown (GtkWidget *do_widget)
gtk_widget_set_margin_bottom (box, 10);
gtk_window_set_child (GTK_WINDOW (window), box);
button = gtk_drop_down_new ();
button = gtk_drop_down_new (NULL, NULL);
model = G_LIST_MODEL (pango_cairo_font_map_get_default ());
gtk_drop_down_set_model (GTK_DROP_DOWN (button), model);

View File

@@ -45,12 +45,9 @@
<attributes>
<attribute name="weight" value="bold"></attribute>
</attributes>
<accessibility>
<relation type="label-for" target="treeview1"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -83,12 +80,9 @@
</child>
</object>
</child>
<accessibility>
<relation type="labelled-by" target="label1"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -133,12 +127,9 @@
</child>
</object>
</child>
<accessibility>
<relation type="labelled-by" target="label2"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -149,12 +140,9 @@
<attributes>
<attribute name="weight" value="bold"></attribute>
</attributes>
<accessibility>
<relation type="label-for" target="treeview2"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -165,12 +153,9 @@
<attributes>
<attribute name="weight" value="bold"></attribute>
</attributes>
<accessibility>
<relation type="label-for" target="treeview3"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -197,12 +182,9 @@
</child>
</object>
</child>
<accessibility>
<relation type="labelled-by" target="label3"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>

View File

@@ -209,7 +209,7 @@ set_widget_type (GtkFishbowl *fishbowl,
widget_types[selected_widget_type].name);
}
void
G_MODULE_EXPORT void
fishbowl_next_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
@@ -224,7 +224,7 @@ fishbowl_next_button_clicked_cb (GtkButton *source,
set_widget_type (fishbowl, new_index);
}
void
G_MODULE_EXPORT void
fishbowl_prev_button_clicked_cb (GtkButton *source,
gpointer user_data)
{
@@ -239,7 +239,7 @@ fishbowl_prev_button_clicked_cb (GtkButton *source,
set_widget_type (fishbowl, new_index);
}
void
G_MODULE_EXPORT void
fishbowl_changes_toggled_cb (GtkToggleButton *button,
gpointer user_data)
{
@@ -249,7 +249,7 @@ fishbowl_changes_toggled_cb (GtkToggleButton *button,
gtk_button_set_icon_name (GTK_BUTTON (button), "changes-allow");
}
char *
G_MODULE_EXPORT char *
format_header_cb (GObject *object,
guint count,
double fps)

View File

@@ -130,6 +130,10 @@ static const char *
get_feature_display_name (unsigned int tag)
{
int i;
static char buf[5] = { 0, };
if (tag == MAKE_TAG ('x', 'x', 'x', 'x'))
return _("Default");
for (i = 0; i < G_N_ELEMENTS (open_type_layout_features); i++)
{
@@ -137,7 +141,10 @@ get_feature_display_name (unsigned int tag)
return g_dpgettext2 (NULL, "OpenType layout", open_type_layout_features[i].name);
}
return NULL;
hb_tag_to_string (tag, buf);
g_warning ("unknown OpenType layout feature tag: %s", buf);
return buf;
}
static void update_display (void);
@@ -1285,8 +1292,7 @@ do_font_features (GtkWidget *do_widget)
"palt",
"twid",
"qwid", NULL });
add_check_group (feature_list, _("Alternative Stylistic Sets"), (const char *[]){ "ss00",
"ss01",
add_check_group (feature_list, _("Alternative Stylistic Sets"), (const char *[]){ "ss01",
"ss02",
"ss03",
"ss04",

View File

@@ -21,12 +21,6 @@ static PangoContext *context;
static int scale = 10;
static void
on_destroy (gpointer data)
{
window = NULL;
}
static void
update_image (void)
{
@@ -251,9 +245,7 @@ do_fontrendering (GtkWidget *do_widget)
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
gtk_window_set_display (GTK_WINDOW (window),
gtk_widget_get_display (do_widget));
g_signal_connect (window, "destroy",
G_CALLBACK (on_destroy), NULL);
g_object_set_data_full (G_OBJECT (window), "builder", builder, g_object_unref);
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
font_button = GTK_WIDGET (gtk_builder_get_object (builder, "font_button"));
up_button = GTK_WIDGET (gtk_builder_get_object (builder, "up_button"));
down_button = GTK_WIDGET (gtk_builder_get_object (builder, "down_button"));
@@ -276,6 +268,8 @@ do_fontrendering (GtkWidget *do_widget)
g_signal_connect (show_extents, "notify::active", G_CALLBACK (update_image), NULL);
update_image ();
g_object_unref (builder);
}
if (!gtk_widget_get_visible (window))

View File

@@ -28,7 +28,7 @@
<object class="GtkEntry" id="entry">
<property name="text">Fonts render</property>
<layout>
<property name="left-attach">1</property>
<property name="column">1</property>
</layout>
</object>
</child>
@@ -41,16 +41,16 @@
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkFontButton" id="font_button">
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -62,7 +62,7 @@
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">2</property>
<property name="column">2</property>
</layout>
</object>
</child>
@@ -77,7 +77,7 @@
<item translatable="yes" id="full">Full</item>
</items>
<layout>
<property name="left-attach">3</property>
<property name="column">3</property>
</layout>
</object>
</child>
@@ -92,8 +92,8 @@
</object>
</child>
<layout>
<property name="left-attach">3</property>
<property name="top-attach">1</property>
<property name="column">3</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -109,8 +109,8 @@
</object>
</child>
<layout>
<property name="left-attach">4</property>
<property name="top-attach">0</property>
<property name="column">4</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -126,8 +126,8 @@
</object>
</child>
<layout>
<property name="left-attach">4</property>
<property name="top-attach">1</property>
<property name="column">4</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -138,8 +138,8 @@
<class name="circular"/>
</style>
<layout>
<property name="left-attach">5</property>
<property name="top-attach">0</property>
<property name="column">5</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -150,8 +150,8 @@
<class name="circular"/>
</style>
<layout>
<property name="left-attach">5</property>
<property name="top-attach">1</property>
<property name="column">5</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -159,7 +159,7 @@
<object class="GtkLabel">
<property name="hexpand">1</property>
<layout>
<property name="left-attach">6</property>
<property name="column">6</property>
</layout>
</object>
</child>
@@ -184,8 +184,8 @@
</object>
</child>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
<property name="column-span">7</property>
</layout>
</object>
@@ -204,8 +204,8 @@
</object>
</child>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
<property name="column">0</property>
<property name="row">4</property>
<property name="column-span">7</property>
</layout>
</object>

View File

@@ -1,7 +1,7 @@
precision highp float;
void main() {
float lerpVal = gl_FragCoord.y / 500.0f;
float lerpVal = gl_FragCoord.y / 500.0;
gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
gl_FragColor = mix(vec4(1.0, 0.85, 0.35, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpVal);
}

View File

@@ -220,7 +220,7 @@ set_widget_type (int type)
tick_cb = gtk_widget_add_tick_callback (window, scroll_cb, NULL, NULL);
}
void
G_MODULE_EXPORT void
iconscroll_next_clicked_cb (GtkButton *source,
gpointer user_data)
{
@@ -235,7 +235,7 @@ iconscroll_next_clicked_cb (GtkButton *source,
set_widget_type (new_index);
}
void
G_MODULE_EXPORT void
iconscroll_prev_clicked_cb (GtkButton *source,
gpointer user_data)
{
@@ -249,7 +249,7 @@ iconscroll_prev_clicked_cb (GtkButton *source,
set_widget_type (new_index);
}
GtkWidget *
G_MODULE_EXPORT GtkWidget *
do_iconscroll (GtkWidget *do_widget)
{
if (!window)

View File

@@ -26,8 +26,8 @@
<property name="margin-end">8</property>
<property name="icon-name">image-missing</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
<property name="row-span">5</property>
</layout>
</object>
@@ -71,8 +71,8 @@
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -84,12 +84,9 @@
<property name="yalign">0</property>
<property name="label" translatable="0">Message</property>
<property name="wrap">1</property>
<accessibility>
<role type="static"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -114,8 +111,8 @@
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -168,8 +165,8 @@
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -184,27 +181,17 @@
<property name="margin-bottom">2</property>
<property name="spacing">8</property>
<child>
<object class="GtkFrame" id="frame1">
<child>
<object class="GtkLabel" id="n_reshares_label">
<property name="label" translatable="0">&lt;b&gt;2&lt;/b&gt;
<object class="GtkLabel" id="n_reshares_label">
<property name="label" translatable="0">&lt;b&gt;2&lt;/b&gt;
Reshares</property>
<property name="use-markup">1</property>
</object>
</child>
<child type="label_item"/>
<property name="use-markup">1</property>
</object>
</child>
<child>
<object class="GtkFrame" id="frame2">
<child>
<object class="GtkLabel" id="n_favorites_label">
<property name="label" translatable="0">&lt;b&gt;2&lt;/b&gt;
<object class="GtkLabel" id="n_favorites_label">
<property name="label" translatable="0">&lt;b&gt;2&lt;/b&gt;
FAVORITES</property>
<property name="use-markup">1</property>
</object>
</child>
<child type="label_item"/>
<property name="use-markup">1</property>
</object>
</child>
</object>
@@ -234,8 +221,8 @@ FAVORITES</property>
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
<property name="column">1</property>
<property name="row">4</property>
</layout>
</object>
</child>

View File

@@ -166,14 +166,6 @@ do_listview_applauncher (GtkWidget *do_widget)
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);
/* Create the list widget here.
*/
list = gtk_list_view_new_with_factory (factory);
/* We connect the activate signal here. It's the function we defined
* above for launching the selected application.
*/
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
/* And of course we need to set the data model. Here we call the function
* we wrote above that gives us the list of applications. Then we set
* it on the list widget.
@@ -181,8 +173,15 @@ do_listview_applauncher (GtkWidget *do_widget)
* to create as many listitems as it needs to show itself to the user.
*/
model = create_application_list ();
gtk_list_view_set_model (GTK_LIST_VIEW (list), model);
g_object_unref (model);
/* Create the list widget here.
*/
list = gtk_list_view_new_with_factory (model, factory);
/* We connect the activate signal here. It's the function we defined
* above for launching the selected application.
*/
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
/* List widgets should always be contained in a #GtkScrolledWindow,
* because otherwise they might get too large or they might not

View File

@@ -463,7 +463,6 @@ do_listview_clocks (GtkWidget *do_widget)
GtkWidget *gridview, *sw;
GtkListItemFactory *factory;
GListModel *model;
GtkNoSelection *selection;
/* This is the normal window setup code every demo does */
window = gtk_window_new ();
@@ -485,16 +484,12 @@ do_listview_clocks (GtkWidget *do_widget)
factory = gtk_signal_list_item_factory_new ();
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
gridview = gtk_grid_view_new_with_factory (factory);
model = G_LIST_MODEL (gtk_no_selection_new (create_clocks_model ()));
gridview = gtk_grid_view_new_with_factory (model, factory);
gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
gtk_scrollable_set_vscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
model = create_clocks_model ();
selection = gtk_no_selection_new (model);
gtk_grid_view_set_model (GTK_GRID_VIEW (gridview), G_LIST_MODEL (selection));
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), gridview);
g_object_unref (selection);
g_object_unref (model);
}
if (!gtk_widget_get_visible (window))

View File

@@ -226,7 +226,7 @@ gtk_color_set_property (GObject *object,
break;
case PROP_COLOR:
self->color = *(GdkRGBA *) g_value_dup_boxed (value);
self->color = *(GdkRGBA *) g_value_get_boxed (value);
rgb_to_hsv (&self->color, &h, &s, &v);
self->h = round (360 * h);
self->s = round (100 * s);
@@ -663,7 +663,7 @@ create_color_grid (void)
GtkWidget *gridview;
GtkListItemFactory *factory;
gridview = gtk_grid_view_new ();
gridview = gtk_grid_view_new (NULL);
gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
gtk_scrollable_set_vscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
@@ -884,7 +884,7 @@ do_listview_colors (GtkWidget *do_widget)
sort_model = gtk_sort_list_model_new (gtk_color_list_new (0), NULL);
gtk_sort_list_model_set_incremental (sort_model, TRUE);
selection = GTK_MULTI_SELECTION (gtk_multi_selection_new (G_LIST_MODEL (sort_model)));
selection = gtk_multi_selection_new (G_LIST_MODEL (sort_model));
window = gtk_window_new ();
gtk_window_set_title (GTK_WINDOW (window), "Colors");
@@ -950,7 +950,7 @@ do_listview_colors (GtkWidget *do_widget)
factory = gtk_signal_list_item_factory_new ();
g_signal_connect (factory, "setup", G_CALLBACK (setup_selection_listitem_cb), NULL);
selection_view = gtk_grid_view_new_with_factory (factory);
selection_view = gtk_grid_view_new_with_factory (NULL, factory);
gtk_widget_add_css_class (selection_view, "compact");
gtk_grid_view_set_max_columns (GTK_GRID_VIEW (selection_view), 200);
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), selection_view);
@@ -970,7 +970,6 @@ do_listview_colors (GtkWidget *do_widget)
no_selection = G_LIST_MODEL (gtk_no_selection_new (selection_filter));
gtk_grid_view_set_model (GTK_GRID_VIEW (selection_view), no_selection);
g_object_unref (selection_filter);
g_object_unref (no_selection);
selection_info_toggle = gtk_toggle_button_new ();
@@ -1003,8 +1002,7 @@ do_listview_colors (GtkWidget *do_widget)
g_signal_connect (selection, "items-changed", G_CALLBACK (items_changed_cb), label);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), label);
dropdown = gtk_drop_down_new ();
gtk_drop_down_set_from_strings (GTK_DROP_DOWN (dropdown), (const char *[]) { "8", "64", "512", "4096", "32768", "262144", "2097152", "16777216", NULL });
dropdown = gtk_drop_down_new_from_strings ((const char * const[]) { "8", "64", "512", "4096", "32768", "262144", "2097152", "16777216", NULL });
g_signal_connect (dropdown, "notify::selected",
G_CALLBACK (limit_changed_cb),
gtk_sort_list_model_get_model (sort_model));
@@ -1082,22 +1080,17 @@ do_listview_colors (GtkWidget *do_widget)
g_list_store_append (sorters, multi_sorter);
g_object_unref (multi_sorter);
dropdown = gtk_drop_down_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_append (GTK_BOX (box), gtk_label_new ("Sort by:"));
gtk_box_append (GTK_BOX (box), dropdown);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
expression = gtk_cclosure_expression_new (G_TYPE_STRING,
NULL,
0, NULL,
(GCallback)get_title,
NULL, NULL);
gtk_drop_down_set_expression (GTK_DROP_DOWN (dropdown), expression);
gtk_expression_unref (expression);
gtk_drop_down_set_model (GTK_DROP_DOWN (dropdown), G_LIST_MODEL (sorters));
g_object_unref (sorters);
dropdown = gtk_drop_down_new (G_LIST_MODEL (sorters), expression);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_append (GTK_BOX (box), gtk_label_new ("Sort by:"));
gtk_box_append (GTK_BOX (box), dropdown);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
g_object_bind_property (dropdown, "selected-item", sort_model, "sorter", G_BINDING_SYNC_CREATE);
@@ -1113,24 +1106,20 @@ do_listview_colors (GtkWidget *do_widget)
set_title (factory, "Everything");
g_list_store_append (factories, factory);
dropdown = gtk_drop_down_new ();
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_append (GTK_BOX (box), gtk_label_new ("Show:"));
gtk_box_append (GTK_BOX (box), dropdown);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
expression = gtk_cclosure_expression_new (G_TYPE_STRING,
NULL,
0, NULL,
(GCallback)get_title,
NULL, NULL);
gtk_drop_down_set_expression (GTK_DROP_DOWN (dropdown), expression);
gtk_expression_unref (expression);
gtk_drop_down_set_model (GTK_DROP_DOWN (dropdown), G_LIST_MODEL (factories));
g_object_unref (factories);
dropdown = gtk_drop_down_new (G_LIST_MODEL (factories), expression);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
gtk_box_append (GTK_BOX (box), gtk_label_new ("Show:"));
gtk_box_append (GTK_BOX (box), dropdown);
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
g_object_bind_property (dropdown, "selected-item", gridview, "factory", G_BINDING_SYNC_CREATE);
g_object_unref (selection);
}
if (!gtk_widget_get_visible (window))

View File

@@ -214,7 +214,6 @@ transform_settings_to_keys (GBinding *binding,
GtkSortListModel *sort_model;
GtkFilterListModel *filter_model;
GtkFilter *filter;
GtkNoSelection *selection_model;
char **keys;
guint i;
@@ -242,21 +241,13 @@ transform_settings_to_keys (GBinding *binding,
g_object_unref (settings);
sort_model = gtk_sort_list_model_new (G_LIST_MODEL (store),
gtk_column_view_get_sorter (GTK_COLUMN_VIEW (data)));
g_object_unref (store);
g_object_ref (gtk_column_view_get_sorter (GTK_COLUMN_VIEW (data))));
filter = gtk_string_filter_new (gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name"));
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (sort_model), filter);
g_object_unref (sort_model);
g_set_object (&current_filter, filter);
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (sort_model), filter);
g_object_unref (filter);
selection_model = gtk_no_selection_new (G_LIST_MODEL (filter_model));
g_object_unref (filter_model);
g_value_take_object (to_value, selection_model);
g_value_take_object (to_value, gtk_no_selection_new (G_LIST_MODEL (filter_model)));
return TRUE;
}
@@ -367,6 +358,8 @@ do_listview_settings (GtkWidget *do_widget)
builder = gtk_builder_new ();
gtk_builder_set_scope (builder, scope);
g_object_unref (scope);
gtk_builder_add_from_resource (builder, "/listview_settings/listview_settings.ui", NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
@@ -403,8 +396,8 @@ do_listview_settings (GtkWidget *do_widget)
g_object_unref (actions);
model = create_settings_model (NULL, NULL);
treemodel = gtk_tree_list_model_new (FALSE,
model,
treemodel = gtk_tree_list_model_new (model,
FALSE,
TRUE,
create_settings_model,
NULL,
@@ -418,8 +411,6 @@ do_listview_settings (GtkWidget *do_widget)
columnview, NULL);
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
g_object_unref (selection);
g_object_unref (treemodel);
g_object_unref (model);
name_column = GTK_COLUMN_VIEW_COLUMN (gtk_builder_get_object (builder, "name_column"));
sorter = gtk_string_sorter_new (gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name"));

View File

@@ -281,20 +281,16 @@ GtkWidget *
create_weather_view (void)
{
GtkWidget *listview;
GListModel *model, *selection;
GListModel *model;
GtkListItemFactory *factory;
factory = gtk_signal_list_item_factory_new ();
g_signal_connect (factory, "setup", G_CALLBACK (setup_widget), NULL);
g_signal_connect (factory, "bind", G_CALLBACK (bind_widget), NULL);
listview = gtk_list_view_new_with_factory (factory);
model = G_LIST_MODEL (gtk_no_selection_new (create_weather_model ()));
listview = gtk_list_view_new_with_factory (model, factory);
gtk_orientable_set_orientation (GTK_ORIENTABLE (listview), GTK_ORIENTATION_HORIZONTAL);
gtk_list_view_set_show_separators (GTK_LIST_VIEW (listview), TRUE);
model = create_weather_model ();
selection = G_LIST_MODEL (gtk_no_selection_new (model));
gtk_list_view_set_model (GTK_LIST_VIEW (listview), selection);
g_object_unref (selection);
g_object_unref (model);
return listview;
}

View File

@@ -65,6 +65,7 @@ read_lines_cb (GObject *object,
{
g_print ("Could not read data: %s\n", error->message);
g_clear_error (&error);
g_object_unref (stringlist);
return;
}
@@ -74,6 +75,7 @@ read_lines_cb (GObject *object,
{
if (size)
gtk_string_list_take (stringlist, g_utf8_make_valid (buffer, size));
g_object_unref (stringlist);
return;
}
@@ -121,6 +123,7 @@ file_is_open_cb (GObject *file,
{
g_print ("Could not open file: %s\n", error->message);
g_error_free (error);
g_object_unref (data);
return;
}
@@ -134,7 +137,7 @@ load_file (GtkStringList *list,
GFile *file)
{
gtk_string_list_splice (list, 0, g_list_model_get_n_items (G_LIST_MODEL (list)), NULL);
g_file_read_async (file, G_PRIORITY_HIGH_IDLE, NULL, file_is_open_cb, list);
g_file_read_async (file, G_PRIORITY_HIGH_IDLE, NULL, file_is_open_cb, g_object_ref (list));
}
static void
@@ -157,7 +160,6 @@ do_listview_words (GtkWidget *do_widget)
{
GtkWidget *header, *listview, *sw, *vbox, *search_entry, *open_button, *overlay;
GtkFilterListModel *filter_model;
GtkNoSelection *selection;
GtkStringList *stringlist;
GtkFilter *filter;
GFile *file;
@@ -175,6 +177,7 @@ do_listview_words (GtkWidget *do_widget)
stringlist = gtk_string_list_new ((const char **) words);
g_strfreev (words);
}
g_object_unref (file);
filter = gtk_string_filter_new (gtk_property_expression_new (GTK_TYPE_STRING_OBJECT, NULL, "string"));
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (stringlist), filter);
@@ -215,18 +218,15 @@ do_listview_words (GtkWidget *do_widget)
gtk_overlay_set_child (GTK_OVERLAY (overlay), sw);
listview = gtk_list_view_new_with_factory (
G_LIST_MODEL (gtk_no_selection_new (G_LIST_MODEL (filter_model))),
gtk_builder_list_item_factory_new_from_bytes (NULL,
g_bytes_new_static (factory_text, strlen (factory_text))));
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), listview);
selection = gtk_no_selection_new (G_LIST_MODEL (filter_model));
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
g_object_unref (selection);
g_signal_connect (filter_model, "items-changed", G_CALLBACK (update_title_cb), progress);
g_signal_connect (filter_model, "notify::pending", G_CALLBACK (update_title_cb), progress);
update_title_cb (filter_model);
g_object_unref (filter_model);
}
if (!gtk_widget_get_visible (window))

View File

@@ -146,10 +146,16 @@ activate_about (GSimpleAction *action,
NULL
};
char *version;
char *os_name;
char *os_version;
GString *s;
s = g_string_new ("");
os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
os_version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
if (os_name && os_version)
g_string_append_printf (s, "OS\t%s %s\n\n", os_name, os_version);
g_string_append (s, "System libraries\n");
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
glib_major_version,
@@ -184,6 +190,8 @@ activate_about (GSimpleAction *action,
g_string_free (s, TRUE);
g_free (version);
g_free (os_name);
g_free (os_version);
}
static void
@@ -226,373 +234,113 @@ activate_run (GSimpleAction *action,
gtk_demo_run (demo, window);
}
/* Stupid syntax highlighting.
*
* No regex was used in the making of this highlighting.
* It should only work for simple cases. This is good, as
* that's all we should have in the demos.
*/
/* This code should not be used elsewhere, except perhaps as an example of how
* to iterate through a text buffer.
*/
enum {
STATE_NORMAL,
STATE_IN_COMMENT
};
static const char *tokens[] =
static GBytes *
fontify_text (const char *format,
const char *text)
{
"/*",
"\"",
NULL
};
GSubprocess *subprocess;
GBytes *stdin_buf;
GBytes *stdout_buf = NULL;
GBytes *stderr_buf = NULL;
GError *error = NULL;
char *format_arg;
static const char *types[] =
{
"static",
"const ",
"void",
" int ",
" char ",
"char ",
"float",
"double",
"gint8",
"gint16",
"gint32",
"guint",
"guint8",
"guint16",
"guint32",
"guchar",
"glong",
"gboolean" ,
"gshort",
"gushort",
"gulong",
"gpointer",
"NULL",
"GList",
"GSList",
"FALSE",
"TRUE",
"FILE ",
"GtkColorSelection ",
"GtkWidget ",
"GtkButton ",
"GdkColor ",
"GdkRectangle ",
"GdkEventExpose ",
"GdkGC ",
"GdkPixbufLoader ",
"GdkPixbuf ",
"GError",
"size_t",
"GtkAboutDialog ",
"GtkAction ",
"GtkActionEntry ",
"GtkRadioActionEntry ",
"GtkIconFactory ",
"GtkTextBuffer ",
"GtkStatusbar ",
"GtkTextIter ",
"GtkTextMark ",
"GdkEventWindowState ",
"GtkActionGroup ",
"GtkUIManager ",
"GtkRadioAction ",
"GtkActionClass ",
"GtkToggleActionEntry ",
"GtkAssistant ",
"GtkBuilder ",
"GtkSizeGroup ",
"GtkTreeModel ",
"GtkTreeSelection ",
"GdkDisplay ",
"GdkScreen ",
"GdkSurface ",
"GdkEventButton ",
"GdkCursor ",
"GtkTreeIter ",
"GtkTreeViewColumn ",
"GdkDisplayManager ",
"GdkClipboard ",
"GtkIconSize ",
"GtkImage ",
"GdkDragContext ",
"GtkSelectionData ",
"GtkDialog ",
"GtkMenuItem ",
"GtkListStore ",
"GtkCellLayout ",
"GtkCellRenderer ",
"GtkTreePath ",
"GtkTreeStore ",
"GtkEntry ",
"GtkEditable ",
"GtkEditableInterface ",
"GdkPixmap ",
"GdkEventConfigure ",
"GdkEventMotion ",
"GdkModifierType ",
"GtkEntryCompletion ",
"GtkToolItem ",
"GDir ",
"GtkIconView ",
"GtkCellRendererText ",
"GtkContainer ",
"GtkPaned ",
"GtkPrintOperation ",
"GtkPrintContext ",
"cairo_t ",
"PangoLayout "
"PangoFontDescription ",
"PangoRenderer ",
"PangoMatrix ",
"PangoContext ",
"PangoLayout ",
"GtkToggleButton ",
"GString ",
"GtkIconSize ",
"GtkTreeView ",
"GtkTextTag ",
"GdkEvent ",
"GdkEventKey ",
"GtkTextView ",
"GdkBitmap ",
"GtkTextChildAnchor ",
"GArray ",
"GtkCellEditable ",
"GtkCellRendererToggle ",
NULL
};
format_arg = g_strconcat ("--syntax=", format, NULL);
subprocess = g_subprocess_new (G_SUBPROCESS_FLAGS_STDIN_PIPE |
G_SUBPROCESS_FLAGS_STDOUT_PIPE |
G_SUBPROCESS_FLAGS_STDERR_PIPE,
&error,
"highlight",
format_arg,
"--out-format=pango",
NULL);
g_free (format_arg);
static const char *control[] =
{
" if ",
" while ",
" else",
" do ",
" for ",
"?",
":",
"return ",
"goto ",
NULL
};
void
parse_chars (char *text,
char **end_ptr,
int *state,
const char **tag,
gboolean start)
{
int i;
char *next_token;
/* Handle comments first */
if (*state == STATE_IN_COMMENT)
if (!subprocess)
{
*end_ptr = strstr (text, "*/");
if (*end_ptr)
if (g_error_matches (error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
{
*end_ptr += 2;
*state = STATE_NORMAL;
*tag = "comment";
}
return;
}
static gboolean warned = FALSE;
*tag = NULL;
*end_ptr = NULL;
/* check for comment */
if (!strncmp (text, "/*", 2))
{
*end_ptr = strstr (text, "*/");
if (*end_ptr)
*end_ptr += 2;
else
*state = STATE_IN_COMMENT;
*tag = "comment";
return;
}
/* check for preprocessor defines */
if (*text == '#' && start)
{
*end_ptr = NULL;
*tag = "preprocessor";
return;
}
/* functions */
if (start && * text != '\t' && *text != ' ' && *text != '{' && *text != '}')
{
if (strstr (text, "("))
{
*end_ptr = strstr (text, "(");
*tag = "function";
return;
}
}
/* check for types */
for (i = 0; types[i] != NULL; i++)
if (!strncmp (text, types[i], strlen (types[i])) ||
(start && types[i][0] == ' ' && !strncmp (text, types[i] + 1, strlen (types[i]) - 1)))
{
*end_ptr = text + strlen (types[i]);
*tag = "type";
return;
}
/* check for control */
for (i = 0; control[i] != NULL; i++)
if (!strncmp (text, control[i], strlen (control[i])))
{
*end_ptr = text + strlen (control[i]);
*tag = "control";
return;
}
/* check for string */
if (text[0] == '"')
{
int maybe_escape = FALSE;
*end_ptr = text + 1;
*tag = "string";
while (**end_ptr != '\000')
{
if (**end_ptr == '\"' && !maybe_escape)
if (!warned)
{
*end_ptr += 1;
return;
warned = TRUE;
g_message ("For syntax highlighting, install the “highlight” program");
}
if (**end_ptr == '\\')
maybe_escape = TRUE;
else
maybe_escape = FALSE;
*end_ptr += 1;
}
return;
else
g_warning ("%s", error->message);
g_clear_error (&error);
return NULL;
}
/* not at the start of a tag. Find the next one. */
for (i = 0; tokens[i] != NULL; i++)
stdin_buf = g_bytes_new_static (text, strlen (text));
if (!g_subprocess_communicate (subprocess,
stdin_buf,
NULL,
&stdout_buf,
&stderr_buf,
&error))
{
next_token = strstr (text, tokens[i]);
if (next_token)
{
if (*end_ptr)
*end_ptr = (*end_ptr<next_token)?*end_ptr:next_token;
else
*end_ptr = next_token;
}
g_clear_pointer (&stdin_buf, g_bytes_unref);
g_clear_pointer (&stdout_buf, g_bytes_unref);
g_clear_pointer (&stderr_buf, g_bytes_unref);
g_warning ("%s", error->message);
g_clear_error (&error);
return NULL;
}
for (i = 0; types[i] != NULL; i++)
g_bytes_unref (stdin_buf);
if (g_subprocess_get_exit_status (subprocess) != 0)
{
next_token = strstr (text, types[i]);
if (next_token)
{
if (*end_ptr)
*end_ptr = (*end_ptr<next_token)?*end_ptr:next_token;
else
*end_ptr = next_token;
}
if (stderr_buf)
g_warning ("%s", (char *)g_bytes_get_data (stderr_buf, NULL));
g_clear_pointer (&stdout_buf, g_bytes_unref);
}
for (i = 0; control[i] != NULL; i++)
{
next_token = strstr (text, control[i]);
if (next_token)
{
if (*end_ptr)
*end_ptr = (*end_ptr<next_token)?*end_ptr:next_token;
else
*end_ptr = next_token;
}
}
g_clear_pointer (&stderr_buf, g_bytes_unref);
g_object_unref (subprocess);
return stdout_buf;
}
/* While not as cool as c-mode, this will do as a quick attempt at highlighting */
void
fontify (GtkTextBuffer *source_buffer)
fontify (const char *format,
GtkTextBuffer *source_buffer)
{
GtkTextIter start_iter, next_iter, tmp_iter;
int state;
GtkTextIter start, end;
char *text;
char *start_ptr, *end_ptr;
const char *tag;
GBytes *bytes;
gtk_text_buffer_create_tag (source_buffer, "source",
"font", "monospace",
NULL);
gtk_text_buffer_create_tag (source_buffer, "comment",
"foreground", "DodgerBlue",
NULL);
gtk_text_buffer_create_tag (source_buffer, "type",
"foreground", "ForestGreen",
NULL);
gtk_text_buffer_create_tag (source_buffer, "string",
"foreground", "RosyBrown",
"weight", PANGO_WEIGHT_BOLD,
NULL);
gtk_text_buffer_create_tag (source_buffer, "control",
"foreground", "purple",
NULL);
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
"style", PANGO_STYLE_OBLIQUE,
"foreground", "burlywood4",
NULL);
gtk_text_buffer_create_tag (source_buffer, "function",
"weight", PANGO_WEIGHT_BOLD,
"foreground", "DarkGoldenrod4",
NULL);
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
text = gtk_text_buffer_get_text (source_buffer, &start, &end, TRUE);
gtk_text_buffer_get_bounds (source_buffer, &start_iter, &tmp_iter);
gtk_text_buffer_apply_tag_by_name (source_buffer, "source", &start_iter, &tmp_iter);
state = STATE_NORMAL;
gtk_text_buffer_get_iter_at_offset (source_buffer, &start_iter, 0);
next_iter = start_iter;
while (gtk_text_iter_forward_line (&next_iter))
bytes = fontify_text (format, text);
if (bytes)
{
gboolean start = TRUE;
start_ptr = text = gtk_text_iter_get_text (&start_iter, &next_iter);
char *markup;
gsize len;
do
{
parse_chars (start_ptr, &end_ptr, &state, &tag, start);
start = FALSE;
if (end_ptr)
{
tmp_iter = start_iter;
gtk_text_iter_forward_chars (&tmp_iter, end_ptr - start_ptr);
}
else
{
tmp_iter = next_iter;
}
if (tag)
gtk_text_buffer_apply_tag_by_name (source_buffer, tag, &start_iter, &tmp_iter);
start_iter = tmp_iter;
start_ptr = end_ptr;
}
while (end_ptr);
g_free (text);
start_iter = next_iter;
markup = g_bytes_unref_to_data (bytes, &len);
gtk_text_buffer_delete (source_buffer, &start, &end);
gtk_text_buffer_insert_markup (source_buffer, &start, markup, len);
g_free (markup);
}
g_free (text);
}
static GtkWidget *
display_image (const char *resource)
display_image (const char *format,
const char *resource)
{
GtkWidget *sw, *image;
@@ -606,7 +354,8 @@ display_image (const char *resource)
}
static GtkWidget *
display_text (const char *resource)
display_text (const char *format,
const char *resource)
{
GtkTextBuffer *buffer;
GtkWidget *textview, *sw;
@@ -633,8 +382,10 @@ display_text (const char *resource)
buffer = gtk_text_buffer_new (NULL);
gtk_text_buffer_set_text (buffer, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
if (g_str_has_suffix (resource, ".c"))
fontify (buffer);
if (format)
fontify (format, buffer);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (textview), buffer);
g_bytes_unref (bytes);
@@ -649,7 +400,8 @@ display_text (const char *resource)
}
static GtkWidget *
display_video (const char *resource)
display_video (const char *format,
const char *resource)
{
GtkWidget *video;
@@ -676,18 +428,20 @@ display_nothing (const char *resource)
static struct {
const char *extension;
GtkWidget * (* display_func) (const char *resource);
const char *format;
GtkWidget * (* display_func) (const char *format,
const char *resource);
} display_funcs[] = {
{ ".gif", display_image },
{ ".jpg", display_image },
{ ".png", display_image },
{ ".c", display_text },
{ ".css", display_text },
{ ".glsl", display_text },
{ ".h", display_text },
{ ".txt", display_text },
{ ".ui", display_text },
{ ".webm", display_video }
{ ".gif", NULL, display_image },
{ ".jpg", NULL, display_image },
{ ".png", NULL, display_image },
{ ".c", "c", display_text },
{ ".css", "css", display_text },
{ ".glsl", NULL, display_text },
{ ".h", "c", display_text },
{ ".txt", NULL, display_text },
{ ".ui", "xml", display_text },
{ ".webm", NULL, display_video }
};
static void
@@ -717,7 +471,7 @@ add_data_tab (const char *demoname)
}
if (j < G_N_ELEMENTS(display_funcs))
widget = display_funcs[j].display_func (resource_name);
widget = display_funcs[j].display_func (display_funcs[j].format, resource_name);
else
widget = display_nothing (resource_name);
@@ -912,7 +666,7 @@ load_file (const char *demoname,
g_strfreev (lines);
fontify (source_buffer);
fontify ("c", source_buffer);
gtk_text_buffer_end_irreversible_action (source_buffer);
gtk_text_view_set_buffer (GTK_TEXT_VIEW (source_view), source_buffer);
@@ -1136,8 +890,8 @@ activate (GApplication *app)
g_signal_connect (search_bar, "notify::search-mode-enabled", G_CALLBACK (clear_search), NULL);
listmodel = create_demo_model ();
treemodel = gtk_tree_list_model_new (FALSE,
G_LIST_MODEL (listmodel),
treemodel = gtk_tree_list_model_new (G_LIST_MODEL (listmodel),
FALSE,
TRUE,
get_child_model,
NULL,
@@ -1145,6 +899,7 @@ activate (GApplication *app)
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (treemodel), NULL);
filter = gtk_custom_filter_new ((GtkCustomFilterFunc)demo_filter_by_name, filter_model, NULL);
gtk_filter_list_model_set_filter (filter_model, filter);
g_object_unref (filter);
search_entry = GTK_WIDGET (gtk_builder_get_object (builder, "search-entry"));
g_signal_connect (search_entry, "search-changed", G_CALLBACK (demo_search_changed_cb), filter);

View File

@@ -31,6 +31,11 @@
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<releases>
<release version="3.99.0" date="2020-07-30">
<description>
<p>A new developers snapshot towards GTK 4.0.</p>
</description>
</release>
<release version="3.94.0" date="2018-06-25">
<description>
<p>A new developers snapshot towards GTK 4.0.</p>

View File

@@ -293,6 +293,7 @@ do_paintable_mediastream (GtkWidget *do_widget)
gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Nuclear MediaStream");
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
nuclear = gtk_nuclear_media_stream_new ();
gtk_media_stream_set_loop (GTK_MEDIA_STREAM (nuclear), TRUE);

View File

@@ -19,8 +19,8 @@
</object>
</child>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">2</property>
<property name="column">2</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -35,8 +35,8 @@
</object>
</child>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
<property name="column">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -51,8 +51,8 @@
</object>
</child>
<layout>
<property name="left-attach">3</property>
<property name="top-attach">2</property>
<property name="column">3</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -66,8 +66,8 @@
</object>
</child>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
<property name="column">2</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -82,8 +82,8 @@
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -98,8 +98,8 @@
</object>
</child>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="column">2</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -114,8 +114,8 @@
</object>
</child>
<layout>
<property name="left-attach">4</property>
<property name="top-attach">2</property>
<property name="column">4</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -129,8 +129,8 @@
</object>
</child>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">4</property>
<property name="column">2</property>
<property name="row">4</property>
</layout>
</object>
</child>
@@ -145,8 +145,8 @@
</object>
</child>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>

View File

@@ -33,12 +33,9 @@
<object class="GtkLabel" id="label_plain">
<property name="label">Plain</property>
<property name="xalign">0</property>
<accessibility>
<relation type="label-for" target="scale_plain"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -48,12 +45,9 @@
<property name="draw-value">0</property>
<property name="adjustment">adjustment1</property>
<property name="hexpand">1</property>
<accessibility>
<relation type="labelled-by" target="label_plain"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -61,12 +55,9 @@
<object class="GtkLabel" id="label_marks">
<property name="label">Marks</property>
<property name="xalign">0</property>
<accessibility>
<relation type="label-for" target="scale_marks"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -83,12 +74,9 @@
<mark value="3" position="bottom"></mark>
<mark value="4" position="bottom"></mark>
</marks>
<accessibility>
<relation type="labelled-by" target="label_marks"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -96,12 +84,9 @@
<object class="GtkLabel" id="label_discrete">
<property name="label">Discrete</property>
<property name="xalign">0</property>
<accessibility>
<relation type="label-for" target="scale_discrete"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -112,9 +97,6 @@
<property name="draw-value">0</property>
<property name="adjustment">adjustment3</property>
<property name="hexpand">1</property>
<accessibility>
<relation type="labelled-by" target="label_discrete"/>
</accessibility>
<marks>
<mark value="0" position="bottom"></mark>
<mark value="1" position="bottom"></mark>
@@ -123,8 +105,8 @@
<mark value="4" position="bottom"></mark>
</marks>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>

View File

@@ -37,6 +37,7 @@ static void
search_progress_done (GtkEntry *entry)
{
gtk_entry_set_progress_fraction (entry, 0.0);
g_object_unref (entry);
}
static gboolean
@@ -54,9 +55,11 @@ finish_search (GtkButton *button)
static gboolean
start_search_feedback (gpointer data)
{
gtk_entry_set_progress_fraction (GTK_ENTRY (data), 0.1);
search_progress_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 100,
(GSourceFunc)search_progress, data,
(GSourceFunc)search_progress, g_object_ref (data),
(GDestroyNotify)search_progress_done);
return G_SOURCE_REMOVE;
}
@@ -162,7 +165,8 @@ activate_cb (GtkEntry *entry,
}
static void
search_entry_destroyed (GtkWidget *widget)
search_entry_destroyed (gpointer data,
GObject *widget)
{
if (finish_search_id != 0)
{
@@ -261,8 +265,8 @@ do_search_entry (GtkWidget *do_widget)
gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
gtk_window_set_title (GTK_WINDOW (window), "Search Entry");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "destroy",
G_CALLBACK (search_entry_destroyed), &window);
g_object_weak_ref (G_OBJECT (window), search_entry_destroyed, &window);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
gtk_widget_set_margin_start (vbox, 5);

View File

@@ -272,7 +272,7 @@ start_puzzle (GdkPaintable *paintable)
/* Create a new grid */
grid = gtk_grid_new ();
gtk_widget_set_can_focus (grid, TRUE);
gtk_widget_set_focusable (grid, TRUE);
gtk_aspect_frame_set_child (GTK_ASPECT_FRAME (frame), grid);
aspect_ratio = gdk_paintable_get_intrinsic_aspect_ratio (paintable);
if (aspect_ratio == 0.0)
@@ -284,7 +284,7 @@ start_puzzle (GdkPaintable *paintable)
* keys to move the puzzle */
controller = gtk_shortcut_controller_new ();
gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller),
GTK_SHORTCUT_SCOPE_GLOBAL);
GTK_SHORTCUT_SCOPE_LOCAL);
add_move_binding (GTK_SHORTCUT_CONTROLLER (controller),
GDK_KEY_Left, GDK_KEY_KP_Left,
-1, 0);

View File

@@ -40,8 +40,8 @@
<property name="mnemonic-widget">basic_spin</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -54,8 +54,8 @@
<property name="digits">2</property>
<property name="numeric">1</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -64,8 +64,8 @@
<property name="width-chars">10</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">0</property>
<property name="column">2</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -76,8 +76,8 @@
<property name="mnemonic-widget">hex_spin</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -90,8 +90,8 @@
<signal name="output" handler="spinbutton_hex_spin_output"/>
<property name="wrap">1</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -100,8 +100,8 @@
<property name="width-chars">10</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
<property name="column">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -112,8 +112,8 @@
<property name="mnemonic-widget">time_spin</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -126,8 +126,8 @@
<signal name="output" handler="spinbutton_time_spin_output"/>
<property name="wrap">1</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -136,8 +136,8 @@
<property name="width-chars">10</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">2</property>
<property name="column">2</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -148,8 +148,8 @@
<property name="mnemonic-widget">month_spin</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -163,8 +163,8 @@
<property name="wrap">1</property>
<property name="update-policy">if-valid</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -173,8 +173,8 @@
<property name="width-chars">10</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
<property name="column">2</property>
<property name="row">3</property>
</layout>
</object>
</child>

View File

@@ -10,8 +10,8 @@
<property name="stack">stack</property>
<property name="halign">center</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -59,8 +59,8 @@
</object>
</child>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>

View File

@@ -50,6 +50,8 @@ about_activated (GSimpleAction *action,
char *icon_theme;
char *version;
GString *s;
char *os_name;
char *os_version;
g_object_get (gtk_settings_get_default (),
"gtk-icon-theme-name", &icon_theme,
@@ -57,6 +59,10 @@ about_activated (GSimpleAction *action,
s = g_string_new ("");
os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
os_version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
if (os_name && os_version)
g_string_append_printf (s, "OS\t%s %s\n\n", os_name, os_version);
g_string_append (s, "System libraries\n");
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
glib_major_version,
@@ -91,6 +97,8 @@ about_activated (GSimpleAction *action,
g_string_free (s, TRUE);
g_free (version);
g_free (icon_theme);
g_free (os_name);
g_free (os_version);
}
static GActionEntry app_entries[] =

View File

@@ -18,3 +18,19 @@ executable('gtk4-icon-browser',
gui_app: true,
link_args: extra_demo_ldflags,
install: true)
# icons
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
foreach size: ['scalable', 'symbolic']
install_subdir('data/' + size,
install_dir: icontheme_dir
)
endforeach
# desktop file
install_data('org.gtk.IconBrowser4.desktop', install_dir: gtk_applicationsdir)
# appdata
install_data('org.gtk.IconBrowser4.appdata.xml', install_dir: gtk_appdatadir)

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>org.gtk.IconBrowser4.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LGPL-2.0+</project_license>
<name>GTK Icon Browser</name>
<summary>Program to browse themed icons</summary>
<description>
<p>
GTK Icon Browser is a simple application to show themed icons that
are available on the system.
</p>
</description>
<screenshots>
<screenshot>
<image>https://static.gnome.org/appdata/gtk4-icon-browser/gtk-icon-browser1.png</image>
<caption>Icon Browser</caption>
</screenshot>
<screenshot>
<image>https://static.gnome.org/appdata/gtk4-icon-browser/gtk-icon-browser2.png</image>
<caption>Search</caption>
</screenshot>
</screenshots>
<kudos>
<kudo>HiDpiIcon</kudo>
<kudo>ModernToolkit</kudo>
</kudos>
<url type="homepage">https://www.gtk.org</url>
<translation type="gettext">gtk-4.0</translation>
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<releases>
<release version="3.99.0" date="2020-07-30">
<description>
<p>A new developers snapshot towards GTK 4.0.</p>
</description>
</release>
<release version="3.94.0" date="2018-06-25">
<description>
<p>A new developers snapshot towards GTK 4.0.</p>
</description>
</release>
</releases>
</component>

View File

@@ -245,12 +245,9 @@
<object class="GtkImage" id="image1">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label1"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -258,12 +255,9 @@
<object class="GtkImage" id="image2">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label2"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -271,12 +265,9 @@
<object class="GtkImage" id="image3">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label3"/>
</accessibility>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
<property name="column">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -284,12 +275,9 @@
<object class="GtkImage" id="image4">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label4"/>
</accessibility>
<layout>
<property name="left-attach">3</property>
<property name="top-attach">1</property>
<property name="column">3</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -297,12 +285,9 @@
<object class="GtkImage" id="image5">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label5"/>
</accessibility>
<layout>
<property name="left-attach">4</property>
<property name="top-attach">1</property>
<property name="column">4</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -310,12 +295,9 @@
<object class="GtkImage" id="image6">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label5"/>
</accessibility>
<layout>
<property name="left-attach">5</property>
<property name="top-attach">1</property>
<property name="column">5</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -323,12 +305,9 @@
<object class="GtkImage" id="image7">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label5"/>
</accessibility>
<layout>
<property name="left-attach">6</property>
<property name="top-attach">1</property>
<property name="column">6</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -336,12 +315,9 @@
<object class="GtkImage" id="image8">
<property name="halign">center</property>
<property name="valign">end</property>
<accessibility>
<relation type="labelled-by" target="label6"/>
</accessibility>
<layout>
<property name="left-attach">7</property>
<property name="top-attach">1</property>
<property name="column">7</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -353,12 +329,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image1"/>
</accessibility>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -370,12 +343,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image2"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -387,12 +357,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image3"/>
</accessibility>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">2</property>
<property name="column">2</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -404,12 +371,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image4"/>
</accessibility>
<layout>
<property name="left-attach">3</property>
<property name="top-attach">2</property>
<property name="column">3</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -421,12 +385,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image5"/>
</accessibility>
<layout>
<property name="left-attach">4</property>
<property name="top-attach">2</property>
<property name="column">4</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -438,12 +399,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image6"/>
</accessibility>
<layout>
<property name="left-attach">5</property>
<property name="top-attach">2</property>
<property name="column">5</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -455,12 +413,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image7"/>
</accessibility>
<layout>
<property name="left-attach">6</property>
<property name="top-attach">2</property>
<property name="column">6</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -472,12 +427,9 @@
<style>
<class name="dim-label"/>
</style>
<accessibility>
<relation type="label-for" target="image8"/>
</accessibility>
<layout>
<property name="left-attach">7</property>
<property name="top-attach">2</property>
<property name="column">7</property>
<property name="row">2</property>
</layout>
</object>
</child>

View File

@@ -38,8 +38,8 @@
<object class="GtkCheckButton" id="testcase_cairo_checkbutton">
<property name="label">Render using Cairo renderer</property>
<layout>
<property name="top-attach">1</property>
<property name="left-attach">0</property>
<property name="row">1</property>
<property name="column">0</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -52,8 +52,8 @@
<property name="use-markup">1</property>
<property name="max-width-chars">50</property>
<layout>
<property name="top-attach">2</property>
<property name="left-attach">0</property>
<property name="row">2</property>
<property name="column">0</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -64,8 +64,8 @@
<property name="wrap">1</property>
<property name="xalign">0</property>
<layout>
<property name="top-attach">3</property>
<property name="left-attach">0</property>
<property name="row">3</property>
<property name="column">0</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -83,8 +83,8 @@
<class name="suggested-action" />
</style>
<layout>
<property name="top-attach">4</property>
<property name="left-attach">0</property>
<property name="row">4</property>
<property name="column">0</property>
<property name="column-span">2</property>
</layout>
</object>

View File

@@ -25,7 +25,7 @@
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<releases>
<release version="3.99.0" date="2020">
<release version="3.99.0" date="2020-07-30">
<description>
<p>A new developers snapshot towards GTK 4.0.</p>
</description>

View File

@@ -1,6 +1,7 @@
#include <config.h>
#include <math.h>
#include <pango/pangocairo.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
static GtkWidget *main_window;
@@ -597,8 +598,24 @@ activate_about (GSimpleAction *action,
char *setting;
char **backends;
int i;
char *os_name;
char *os_version;
const char *authors[] = {
"Alexander Larsson",
NULL
};
const char *maintainers[] = {
"The GTK Team",
NULL
};
GtkWidget *dialog;
sysinfo = g_string_new ("System libraries\n");
os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
os_version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
sysinfo = g_string_new ("");
if (os_name && os_version)
g_string_append_printf (sysinfo, "OS\t%s %s\n\n", os_name, os_version);
g_string_append (sysinfo, "System libraries\n");
g_string_append_printf (sysinfo, "\tGLib\t%d.%d.%d\n",
glib_major_version,
glib_minor_version,
@@ -614,8 +631,9 @@ activate_about (GSimpleAction *action,
g_object_get (gtk_settings_get_default (), "gtk-print-backends", &setting, NULL);
backends = g_strsplit (setting, ",", -1);
g_string_append (sysinfo, "\t");
for (i = 0; backends[i]; i++)
g_string_append_printf (sysinfo, "\t%s\n", backends[i]);
g_string_append_printf (sysinfo, "%s ", backends[i]);
g_strfreev (backends);
g_free (setting);
@@ -625,18 +643,23 @@ activate_about (GSimpleAction *action,
gtk_get_minor_version (),
gtk_get_micro_version ());
gtk_show_about_dialog (GTK_WINDOW (main_window),
dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
"transient-for", main_window,
"program-name", "GTK Print Editor",
"version", version,
"copyright", "© 2006-2020 Red Hat, Inc",
"license-type", GTK_LICENSE_LGPL_2_1,
"website", "http://www.gtk.org",
"comments", "Program to demonstrate GTK printing",
"authors", (const char *[]){ "Alexander Larsson", NULL },
"authors", authors,
"logo-icon-name", "org.gtk.PrintEditor4.Devel",
"title", "About GTK Print Editor",
"system-information", sysinfo->str,
NULL);
gtk_about_dialog_add_credit_section (GTK_ABOUT_DIALOG (dialog),
_("Maintained by"), maintainers);
gtk_window_present (GTK_WINDOW (dialog));
g_string_free (sysinfo, TRUE);
g_free (version);

View File

@@ -32,6 +32,11 @@
<update_contact>matthias.clasen_at_gmail.com</update_contact>
<developer_name>Matthias Clasen and others</developer_name>
<releases>
<release version="3.99.0" date="2020-07-30">
<description>
<p>A new developers snapshot towards GTK 4.0.</p>
</description>
</release>
<release version="3.94.0" date="2018-06-25">
<description>
<p>A new developers snapshot towards GTK 4.0.</p>

View File

@@ -255,11 +255,22 @@ activate_about (GSimpleAction *action,
"Cosimo Cecchi",
NULL
};
const char *maintainers[] = {
"The GTK Team",
NULL
};
char *version;
char *os_name;
char *os_version;
GString *s;
GtkWidget *dialog;
s = g_string_new ("");
os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
os_version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
if (os_name && os_version)
g_string_append_printf (s, "OS\t%s %s\n\n", os_name, os_version);
g_string_append (s, "System libraries\n");
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
glib_major_version,
@@ -279,7 +290,8 @@ activate_about (GSimpleAction *action,
gtk_get_minor_version (),
gtk_get_micro_version ());
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
dialog = g_object_new (GTK_TYPE_ABOUT_DIALOG,
"transient-for", gtk_application_get_active_window (app),
"program-name", "GTK Widget Factory",
"version", version,
"copyright", "©1997—2020 The GTK Team",
@@ -292,8 +304,15 @@ activate_about (GSimpleAction *action,
"system-information", s->str,
NULL);
gtk_about_dialog_add_credit_section (GTK_ABOUT_DIALOG (dialog),
_("Maintained by"), maintainers);
gtk_window_present (GTK_WINDOW (dialog));
g_string_free (s, TRUE);
g_free (version);
g_free (os_name);
g_free (os_version);
}
static void
@@ -565,7 +584,6 @@ on_scale_button_value_changed (GtkScaleButton *button,
}
gtk_widget_set_tooltip_text (GTK_WIDGET (button), str);
atk_object_set_description (gtk_widget_get_accessible (GTK_WIDGET (button)), str);
g_free (str);
}

View File

@@ -35,7 +35,7 @@
<attribute name="target">highcontrast-inverse</attribute>
</item>
</section>
</submenu>
</submenu>
<item>
<attribute name="label" translatable="yes">Transition Pages</attribute>
<attribute name="action">win.transition</attribute>
@@ -639,8 +639,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<object class="GtkCheckButton" id="checkbutton2">
<property name="label" translatable="yes">checkbutton</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -649,8 +649,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="label" translatable="yes">checkbutton</property>
<property name="inconsistent">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -660,8 +660,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="sensitive">0</property>
<property name="active">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -670,8 +670,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="label" translatable="yes">checkbutton</property>
<property name="sensitive">0</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">4</property>
<property name="column">0</property>
<property name="row">4</property>
</layout>
</object>
</child>
@@ -681,8 +681,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="sensitive">0</property>
<property name="inconsistent">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">5</property>
<property name="column">0</property>
<property name="row">5</property>
</layout>
</object>
</child>
@@ -691,8 +691,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="label" translatable="yes">radiobutton</property>
<property name="active">1</property>
<layout>
<property name="left-attach">0</property>
<property name="left-attach">1</property>
<property name="column">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
@@ -701,8 +701,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="label" translatable="yes">radiobutton</property>
<property name="group">radiobutton1</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -712,8 +712,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="inconsistent">1</property>
<property name="group">radiobutton1</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -722,8 +722,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="label" translatable="yes">radiobutton</property>
<property name="sensitive">0</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -733,8 +733,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="sensitive">0</property>
<property name="group">radiobutton3</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">4</property>
<property name="column">1</property>
<property name="row">4</property>
</layout>
</object>
</child>
@@ -745,8 +745,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="inconsistent">1</property>
<property name="group">radiobutton3</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">5</property>
<property name="column">1</property>
<property name="row">5</property>
</layout>
</object>
</child>
@@ -754,15 +754,15 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<object class="GtkSpinner" id="spinner1">
<property name="spinning">1</property>
<layout>
<property name="left-attach">2</property>
<property name="column">2</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinner" id="spinner2">
<layout>
<property name="left-attach">2</property>
<property name="top-attach">1</property>
<property name="column">2</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -771,8 +771,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="spinning">1</property>
<property name="sensitive">0</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
<property name="column">2</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -780,8 +780,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<object class="GtkSpinner" id="spinner4">
<property name="sensitive">0</property>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">4</property>
<property name="column">2</property>
<property name="row">4</property>
</layout>
</object>
</child>
@@ -789,11 +789,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator" id="separator1">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox" id="box19">
<property name="orientation">vertical</property>
@@ -889,11 +884,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator" id="separator2">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox" id="box20">
<property name="orientation">vertical</property>
@@ -1042,11 +1032,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator" id="separator3">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox" id="box26">
<property name="orientation">vertical</property>
@@ -1145,11 +1130,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator" id="separator4">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox" id="box4">
<property name="orientation">vertical</property>
@@ -1249,9 +1229,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator" id="separator5"/>
</child>
<child>
<object class="GtkBox" id="box5">
<property name="spacing">10</property>
@@ -1542,8 +1519,8 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
<property name="value">.5</property>
<property name="halign">center</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -1559,8 +1536,8 @@ microphone-sensitivity-medium-symbolic</property>
<property name="halign">center</property>
<signal name="value-changed" handler="on_scale_button_value_changed" swapped="no"/>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -1568,9 +1545,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkFrame" id="page2frame1">
<child>
@@ -1639,9 +1613,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="has-frame">1</property>
@@ -1898,11 +1869,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
@@ -1979,9 +1945,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="vexpand">1</property>
@@ -2006,9 +1969,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkBox">
<child>
@@ -2069,11 +2029,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox" id="filler2">
<property name="orientation">vertical</property>
@@ -2083,9 +2038,6 @@ microphone-sensitivity-medium-symbolic</property>
<property name="halign">center</property>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkExpander" id="expander1">
<property name="expanded">1</property>
@@ -2260,9 +2212,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="hscrollbar-policy">never</property>
@@ -2278,11 +2227,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
@@ -2372,9 +2316,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkFrame">
<child>
@@ -2852,11 +2793,6 @@ microphone-sensitivity-medium-symbolic</property>
</child>
</object>
</child>
<child>
<object class="GtkSeparator">
<property name="orientation">vertical</property>
</object>
</child>
<child>
<object class="GtkBox">
<property name="orientation">vertical</property>
@@ -2883,9 +2819,6 @@ microphone-sensitivity-medium-symbolic</property>
</style>
</object>
</child>
<child>
<object class="GtkSeparator"/>
</child>
<child>
<object class="GtkNotebook">
<property name="scrollable">1</property>
@@ -3029,9 +2962,6 @@ bad things might happen.</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="label" translatable="yes">To free the princess, you have to slay the dragon.</property>
<accessibility>
<role type="static"/>
</accessibility>
</object>
</child>
</object>
@@ -3081,8 +3011,8 @@ bad things might happen.</property>
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -3090,8 +3020,8 @@ bad things might happen.</property>
<object class="GtkEntry" id="details_entry">
<property name="valign">baseline</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -3106,8 +3036,8 @@ bad things might happen.</property>
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -3115,8 +3045,8 @@ bad things might happen.</property>
<object class="GtkEntry" id="more_details_entry">
<property name="valign">baseline</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -3131,8 +3061,8 @@ bad things might happen.</property>
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">2</property>
<property name="column">0</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -3142,8 +3072,8 @@ bad things might happen.</property>
<property name="draw-value">0</property>
<property name="adjustment">adjustment1</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
</layout>
</object>
</child>
@@ -3158,8 +3088,8 @@ bad things might happen.</property>
<class name="dim-label"/>
</style>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">3</property>
<property name="column">0</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -3168,8 +3098,8 @@ bad things might happen.</property>
<property name="halign">start</property>
<property name="valign">baseline</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -3231,9 +3161,6 @@ bad things might happen.</property>
<object class="GtkLabel" id="title_label">
<property name="label">Title:</property>
<property name="xalign">1</property>
<accessibility>
<relation type="label-for" target="open_popover_entry"/>
</accessibility>
</object>
</child>
<child>
@@ -3241,11 +3168,8 @@ bad things might happen.</property>
<property name="valign">start</property>
<property name="label">Description:</property>
<property name="xalign">1</property>
<accessibility>
<relation type="label-for" target="open_popover_textview"/>
</accessibility>
<layout>
<property name="top-attach">1</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -3259,14 +3183,11 @@ bad things might happen.</property>
<property name="max-content-width">100</property>
<child>
<object class="GtkTextView" id="open_popover_textview">
<accessibility>
<relation type="labelled-by" target="description_label"/>
</accessibility>
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -3274,11 +3195,8 @@ bad things might happen.</property>
<child>
<object class="GtkEntry" id="open_popover_entry">
<property name="activates-default">1</property>
<accessibility>
<relation type="labelled-by" target="title_label"/>
</accessibility>
<layout>
<property name="left-attach">1</property>
<property name="column">1</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -3297,8 +3215,8 @@ bad things might happen.</property>
</object>
</child>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">2</property>
<property name="column">1</property>
<property name="row">2</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -3310,8 +3228,8 @@ bad things might happen.</property>
<property name="menu-model">gear_menu</property>
<property name="tooltip-text">This is a menu button</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">3</property>
<property name="column">1</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -3324,8 +3242,8 @@ bad things might happen.</property>
<class name="suggested-action"/>
</style>
<layout>
<property name="left-attach">2</property>
<property name="top-attach">3</property>
<property name="column">2</property>
<property name="row">3</property>
</layout>
</object>
</child>
@@ -3357,9 +3275,6 @@ bad things might happen.</property>
<child>
<object class="GtkLabel">
<property name="label">No updates at this time</property>
<accessibility>
<role type="static"/>
</accessibility>
</object>
</child>
</object>
@@ -3368,9 +3283,6 @@ bad things might happen.</property>
<child>
<object class="GtkLabel">
<property name="label">You&apos;re in too deep!</property>
<accessibility>
<role type="static"/>
</accessibility>
</object>
</child>
</object>

View File

@@ -33,6 +33,7 @@
<xi:include href="xml/gdksurface.xml" />
<xi:include href="xml/gdktoplevel.xml" />
<xi:include href="xml/gdktoplevellayout.xml" />
<xi:include href="xml/gdktoplevelsize.xml" />
<xi:include href="xml/gdkpopup.xml" />
<xi:include href="xml/gdkpopuplayout.xml" />
<xi:include href="xml/gdkframeclock.xml" />

View File

@@ -81,7 +81,6 @@ gdk_display_close
gdk_display_is_closed
gdk_display_is_rgba
gdk_display_is_composited
gdk_display_get_default_group
gdk_display_supports_input_shapes
gdk_display_get_app_launch_context
gdk_display_notify_startup_complete
@@ -190,9 +189,7 @@ gdk_surface_create_vulkan_context
gdk_surface_create_cairo_context
<SUBSECTION>
gdk_surface_queue_expose
gdk_surface_freeze_updates
gdk_surface_thaw_updates
gdk_surface_queue_render
gdk_surface_get_frame_clock
<SUBSECTION>
@@ -348,21 +345,14 @@ GdkAxisUse
GdkAxisFlags
GdkDeviceTool
GdkDeviceToolType
GdkDeviceType
<SUBSECTION>
gdk_device_get_name
gdk_device_get_vendor_id
gdk_device_get_product_id
gdk_device_get_source
gdk_device_get_axis_use
gdk_device_get_associated_device
gdk_device_list_physical_devices
gdk_device_get_device_type
gdk_device_get_display
gdk_device_get_has_cursor
gdk_device_get_n_axes
gdk_device_get_axes
gdk_device_get_seat
gdk_device_get_num_touches
gdk_device_get_device_tool
@@ -374,15 +364,14 @@ gdk_device_get_scroll_lock_state
gdk_device_has_bidi_layouts
<SUBSECTION>
gdk_device_get_state
gdk_device_get_surface_at_position
GdkTimeCoord
gdk_device_get_axis
<SUBSECTION>
gdk_device_tool_get_serial
gdk_device_tool_get_tool_type
gdk_device_tool_get_hardware_id
gdk_device_tool_get_axes
<SUBSECTION Standard>
GDK_TYPE_AXIS_USE
@@ -438,7 +427,8 @@ gdk_seat_get_display
gdk_seat_get_capabilities
gdk_seat_get_pointer
gdk_seat_get_keyboard
gdk_seat_get_physical_devices
gdk_seat_get_devices
gdk_seat_get_tools
<SUBSECTION Standard>
GDK_SEAT
@@ -478,7 +468,6 @@ gdk_event_unref
gdk_event_get_event_type
gdk_event_get_surface
gdk_event_get_device
gdk_event_get_source_device
gdk_event_get_device_tool
gdk_event_get_time
gdk_event_get_display
@@ -643,8 +632,6 @@ gdk_toplevel_layout_get_maximized
gdk_toplevel_layout_set_fullscreen
gdk_toplevel_layout_get_fullscreen
gdk_toplevel_layout_get_fullscreen_monitor
gdk_toplevel_layout_get_min_width
gdk_toplevel_layout_get_min_height
gdk_toplevel_layout_set_resizable
gdk_toplevel_layout_get_resizable
<SUBSECTION Standard>
@@ -652,6 +639,18 @@ GDK_TYPE_TOPLEVEL_LAYOUT
gdk_toplevel_layout_get_type
</SECTION>
<SECTION>
<FILE>gdktoplevelsize</FILE>
<TITLE>GdkToplevelSize</TITLE>
GdkToplevelSize
gdk_toplevel_size_get_bounds
gdk_toplevel_size_set_size
gdk_toplevel_size_set_min_size
<SUBSECTION Standard>
GDK_TYPE_TOPLEVEL_SIZE
gdk_toplevel_size_get_type
</SECTION>
<SECTION>
<FILE>gdktoplevel</FILE>
<TITLE>GdkToplevel</TITLE>
@@ -684,6 +683,8 @@ gdk_toplevel_get_type
<TITLE>Textures</TITLE>
<FILE>textures</FILE>
GdkTexture
GdkMemoryTexture
GdkGLTexture
gdk_texture_new_for_pixbuf
gdk_texture_new_from_resource
gdk_texture_new_from_file
@@ -823,6 +824,7 @@ gdk_x11_display_get_xrootwindow
gdk_x11_display_get_xcursor
gdk_x11_display_grab
gdk_x11_display_ungrab
gdk_x11_display_get_default_group
gdk_x11_display_error_trap_push
gdk_x11_display_error_trap_pop
gdk_x11_display_error_trap_pop_ignored
@@ -846,6 +848,8 @@ gdk_x11_surface_move_to_desktop
gdk_x11_surface_get_desktop
gdk_x11_surface_set_utf8_property
gdk_x11_surface_set_frame_sync_enabled
gdk_x11_surface_set_group
gdk_x11_surface_get_group
gdk_x11_keymap_get_group_for_state
gdk_x11_keymap_key_is_modifier
gdk_x11_visual_get_xvisual
@@ -1130,7 +1134,6 @@ GDK_TYPE_GL_PROFILE
GdkMonitor
gdk_monitor_get_display
gdk_monitor_get_geometry
gdk_monitor_get_workarea
gdk_monitor_get_width_mm
gdk_monitor_get_height_mm
gdk_monitor_get_manufacturer
@@ -1290,4 +1293,3 @@ GDK_CONTENT_DESERIALIZER
GDK_IS_CONTENT_DESERIALIZER
gdk_content_deserializer_get_type
</SECTION>

View File

@@ -185,10 +185,9 @@ is to create a menu using a GMenu menu model. GMenu provides an
abstract way to describe typical menus: nested groups of items
where each item can have a label, and icon, and an action.
Typical uses of GMenu inside GTK are to set up an application
menu or menubar with gtk_application_set_app_menu() or
gtk_application_set_menubar(). Another, maybe more common use
is to create a popover for a menubutton, using
A typical use of GMenu inside GTK is to set up an application
menubar with gtk_application_set_menubar(). Another, maybe more
common use is to create a popover for a menubutton, using
gtk_menu_button_set_menu_model().
Unlike traditional menus, those created from menu models don't

View File

@@ -127,7 +127,7 @@ compilation flags needed for that library along with version number
information.)
Some of the libraries that GTK depends on are maintained by the
GTK team: GLib, GdkPixbuf, Pango, ATK and GObject Introspection.
GTK team: GLib, GdkPixbuf, Pango, and GObject Introspection.
Other libraries are maintained separately.
- The GLib library provides core non-graphical functionality
@@ -139,10 +139,6 @@ Other libraries are maintained separately.
file formats. It is available [here](ttps://download.gnome.org/sources/gdk-pixbuf/).
- [Pango](http://www.pango.org) is a library for internationalized
text handling. It is available [here](https://download.gnome.org/sources/pango/).
- ATK is the Accessibility Toolkit. It provides a set of generic
interfaces allowing accessibility technologies such as
screen readers to interact with a graphical user interface.
It is available [here](https://download.gnome.org/sources/atk/).
- [GObject Introspection](https://wiki.gnome.org/Projects/GObjectIntrospection)
is a framework for making introspection data available to language
bindings. It is available [here](https://download.gnome.org/sources/gobject-introspection/).
@@ -192,7 +188,7 @@ you'll have all of these installed already, or they will be easily
accessible through your operating system package repositories.
Then build and install the GTK libraries in the order:
GLib, Cairo, Pango, ATK, then GTK. For each library, follow the
GLib, Cairo, Pango, then GTK. For each library, follow the
instructions they provide, and make sure to share common settings
between them and the GTK build; if you are using a separate prefix
for GTK, for instance, you will need to use the same prefix for

View File

@@ -9,9 +9,9 @@ is used (the actual output on your system may be different):
```
$ pkg-config --cflags gtk4
-pthread -I/usr/include/gtk-4.0 -I/usr/lib64/gtk-4.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
-pthread -I/usr/include/gtk-4.0 -I/usr/lib64/gtk-4.0/include -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
$ pkg-config --libs gtk4
-pthread -lgtk-4 -lgdk-4 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
-pthread -lgtk-4 -lgdk-4 -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0
```
The simplest way to compile a program is to use the "backticks"
feature of the shell. If you enclose a command in backticks

View File

@@ -649,8 +649,8 @@ Create a new file with the following content named `builder.ui`.
<object id="button1" class="GtkButton">
<property name="label">Button 1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -658,8 +658,8 @@ Create a new file with the following content named `builder.ui`.
<object id="button2" class="GtkButton">
<property name="label">Button 2</property>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -667,8 +667,8 @@ Create a new file with the following content named `builder.ui`.
<object id="quit" class="GtkButton">
<property name="label">Quit</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
<property name="column-span">2</property>
</layout>
</object>
@@ -1266,16 +1266,16 @@ Lets start with the template.
<property name="mnemonic-widget">font</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">0</property>
<property name="column">0</property>
<property name="row">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkFontButton" id="font">
<layout>
<property name="left-attach">1</property>
<property name="top-attach">0</property>
<property name="column">1</property>
<property name="row">0</property>
</layout>
</object>
</child>
@@ -1286,8 +1286,8 @@ Lets start with the template.
<property name="mnemonic-widget">transition</property>
<property name="xalign">1</property>
<layout>
<property name="left-attach">0</property>
<property name="top-attach">1</property>
<property name="column">0</property>
<property name="row">1</property>
</layout>
</object>
</child>
@@ -1299,8 +1299,8 @@ Lets start with the template.
<item translatable="yes" id="slide-left-right">Slide</item>
</items>
<layout>
<property name="left-attach">1</property>
<property name="top-attach">1</property>
<property name="column">1</property>
<property name="row">1</property>
</layout>
</object>
</child>

View File

@@ -12,6 +12,13 @@ import subprocess
# The following code is taken from gtk-doc
def ExpandAbbreviations(symbol, text):
# Hack!
# Strip xlink namespace from hrefs since pandoc insists on
# inserting them, and namespace setup doesn't transfer across
# xi:include.
# Yay for XML!
text = re.sub('xlink:href', 'href', text)
# Convert '@param()'
text = re.sub(r'(\A|[^\\])\@(\w+((\.|->)\w+)*)\s*\(\)', r'\1<parameter>\2()</parameter>', text)
@@ -173,11 +180,10 @@ def ConvertToDocbook(infile, outfile):
else:
division='chapter'
input_format = "markdown" + "".join(MarkdownExtensions)
output_format = "docbook"
output_format = "docbook4"
subprocess.check_call(["pandoc", infile, "-o", outfile,
"--from=" + input_format,
"--to=" + output_format,
"--standalone",
"--top-level-division=" + division])
def ExpandGtkDocAbbreviations(infile, outfile):

View File

@@ -55,6 +55,7 @@
<xi:include href="xml/gtkfilter.xml" />
<xi:include href="xml/gtkcustomfilter.xml" />
<xi:include href="xml/gtkmultifilter.xml" />
<xi:include href="xml/gtkboolfilter.xml" />
<xi:include href="xml/gtkstringfilter.xml" />
<xi:include href="xml/gtkfilefilter.xml" />
</section>
@@ -337,6 +338,13 @@
<xi:include href="xml/gtkshortcutlabel.xml" />
</chapter>
<chapter id="Accessibility">
<title>Accessibility</title>
<xi:include href="section-accessibility.xml"/>
<xi:include href="xml/gtkaccessible.xml" />
<xi:include href="xml/gtkatcontext.xml" />
</chapter>
<chapter id="MiscObjects">
<title>Miscellaneous</title>
<xi:include href="xml/gtkadjustment.xml" />

View File

@@ -88,25 +88,6 @@ GtkAccelLabelPrivate
gtk_accel_label_get_type
</SECTION>
<SECTION>
<FILE>gtkaccessible</FILE>
<TITLE>GtkAccessible</TITLE>
GtkAccessible
gtk_accessible_get_widget
gtk_accessible_set_widget
<SUBSECTION Standard>
GTK_ACCESSIBLE
GTK_TYPE_ACCESSIBLE
GTK_ACCESSIBLE_CLASS
GTK_ACCESSIBLE_GET_CLASS
GTK_IS_ACCESSIBLE
GTK_IS_ACCESSIBLE_CLASS
<SUBSECTION Private>
GtkAccessiblePrivate
gtk_accessible_get_type
</SECTION>
<SECTION>
<FILE>gtkadjustment</FILE>
<TITLE>GtkAdjustment</TITLE>
@@ -276,6 +257,7 @@ GtkListBoxUpdateHeaderFunc
gtk_list_box_new
gtk_list_box_prepend
gtk_list_box_append
gtk_list_box_insert
gtk_list_box_remove
gtk_list_box_select_row
@@ -449,7 +431,7 @@ gtk_single_selection_get_type
<SECTION>
<FILE>gtkmultiselection</FILE>
<TITLE>GtkMultiSeledction</TITLE>
<TITLE>GtkMultiSelection</TITLE>
GtkMultiSelection
gtk_multi_selection_new
gtk_multi_selection_get_model
@@ -662,6 +644,7 @@ gtk_grid_view_get_type
<FILE>gtkbuildable</FILE>
GtkBuildable
GtkBuildableIface
GtkBuildableParser
gtk_buildable_set_name
gtk_buildable_get_name
gtk_buildable_add_child
@@ -684,6 +667,10 @@ GTK_BUILDABLE_GET_IFACE
<SECTION>
<FILE>gtkbuilderscope</FILE>
<TITLE>GtkBuilderScope</TITLE>
GtkBuilderScope
GtkBuilderClosureFlags
GtkBuilderScopeInterface
GtkBuilderCScope
gtk_builder_cscope_new
gtk_builder_cscope_add_callback_symbol
gtk_builder_cscope_add_callback_symbols
@@ -881,7 +868,6 @@ gtk_combo_box_set_active_id
gtk_combo_box_get_model
gtk_combo_box_set_model
gtk_combo_box_popdown
gtk_combo_box_get_popup_accessible
gtk_combo_box_get_row_separator_func
gtk_combo_box_set_row_separator_func
GtkSensitivityType
@@ -1223,9 +1209,6 @@ gtk_entry_completion_compute_prefix
gtk_entry_completion_complete
gtk_entry_completion_get_completion_prefix
gtk_entry_completion_insert_prefix
gtk_entry_completion_insert_action_text
gtk_entry_completion_insert_action_markup
gtk_entry_completion_delete_action
gtk_entry_completion_set_text_column
gtk_entry_completion_get_text_column
gtk_entry_completion_set_inline_completion
@@ -2832,7 +2815,7 @@ gtk_sort_list_model_set_model
gtk_sort_list_model_get_model
gtk_sort_list_model_set_incremental
gtk_sort_list_model_get_incremental
gtk_sort_list_model_get_peanding
gtk_sort_list_model_get_pending
<SUBSECTION Standard>
GTK_SORT_LIST_MODEL
GTK_IS_SORT_LIST_MODEL
@@ -4074,7 +4057,6 @@ GtkCellRendererState
GtkCellRendererMode
GtkCellRenderer
GtkCellRendererClass
gtk_cell_renderer_class_set_accessible_type
gtk_cell_renderer_get_aligned_area
gtk_cell_renderer_snapshot
gtk_cell_renderer_activate
@@ -4429,7 +4411,6 @@ gtk_widget_paintable_get_type
<TITLE>GtkWidget</TITLE>
GtkWidget
GtkWidgetClass
GtkCallback
GtkRequisition
GtkAllocation
gtk_widget_new
@@ -4487,9 +4468,7 @@ gtk_widget_get_cursor
gtk_widget_set_cursor
gtk_widget_set_cursor_from_name
gtk_widget_mnemonic_activate
gtk_widget_class_set_accessible_type
gtk_widget_class_set_accessible_role
gtk_widget_get_accessible
gtk_widget_child_focus
gtk_widget_get_child_visible
gtk_widget_get_parent
@@ -6291,6 +6270,8 @@ gtk_popover_set_autohide
gtk_popover_get_autohide
gtk_popover_set_has_arrow
gtk_popover_get_has_arrow
gtk_popover_set_offset
gtk_popover_get_offset
gtk_popover_set_default_widget
<SUBSECTION Standard>
GTK_TYPE_POPOVER
@@ -7272,10 +7253,10 @@ gtk_grid_layout_get_baseline_row
<SUBSECTION>
GtkGridLayoutChild
gtk_grid_layout_child_set_top_attach
gtk_grid_layout_child_get_top_attach
gtk_grid_layout_child_set_left_attach
gtk_grid_layout_child_get_left_attach
gtk_grid_layout_child_set_column
gtk_grid_layout_child_get_column
gtk_grid_layout_child_set_row
gtk_grid_layout_child_get_row
gtk_grid_layout_child_set_column_span
gtk_grid_layout_child_get_column_span
gtk_grid_layout_child_set_row_span
@@ -7571,6 +7552,19 @@ GTK_TYPE_EXPRESSION
gtk_expression_get_type
</SECTION>
<SECTION>
<FILE>gtkboolfilter</FILE>
GtkBoolFilter
gtk_bool_filter_new
gtk_bool_filter_get_expression
gtk_bool_filter_set_expression
gtk_bool_filter_get_invert
gtk_bool_filter_set_invert
<SUBSECTION Private>
gtk_bool_filter_get_type
</SECTION>
<SECTION>
<FILE>gtkstringfilter</FILE>
GtkStringFilter
@@ -7594,7 +7588,7 @@ gtk_string_filter_get_type
<TITLE>GtkDropDown</TITLE>
GtkDropDown
gtk_drop_down_new
gtk_drop_down_set_from_strings
gtk_drop_down_new_from_strings
gtk_drop_down_set_model
gtk_drop_down_get_model
gtk_drop_down_set_selected
@@ -7635,7 +7629,59 @@ gtk_string_object_get_string
<TITLE>GtkSelectionFilterModel</TITLE>
GtkSelectionFilterModel
gtk_selection_filter_model_new
gtk_selection_filter_model_new_for_type
gtk_selection_filter_model_set_model
gtk_selection_filter_model_get_model
</SECTION>
<SECTION>
<FILE>gtkaccessible</FILE>
GtkAccessible
GtkAccessibleRole
GtkAccessibleState
GtkAccessibleProperty
GtkAccessibleRelation
GtkAccessibleTristate
GtkAccessibleInvalidState
GtkAccessibleAutocomplete
GtkAccessibleSort
gtk_accessible_get_accessible_role
gtk_accessible_update_state
gtk_accessible_update_state_value
gtk_accessible_reset_state
gtk_accessible_update_property
gtk_accessible_update_property_value
gtk_accessible_reset_property
gtk_accessible_update_relation
gtk_accessible_update_relation_value
gtk_accessible_reset_relation
<SUBSECTION Standard>
GTK_TYPE_ACCESSIBLE
GTK_TYPE_ACCESSIBLE_PROPERTY
GTK_TYPE_ACCESSIBLE_ROLE
GTK_TYPE_ACCESSIBLE_STATE
GTK_ACCESSIBLE
GTK_ACCESSIBLE_GET_IFACE
GTK_IS_ACCESSIBLE
<SUBSECTION Private>
gtk_accessible_get_type
</SECTION>
<SECTION>
<FILE>gtkatcontext</FILE>
GtkATContext
gtk_at_context_get_accessible
gtk_at_context_get_accessible_role
<SUBSECTION>
gtk_at_context_create
<SUBSECTION Standard>
GTK_TYPE_AT_CONTEXT
GTK_AT_CONTEXT
GTK_AT_CONTEXT_CLASS
GTK_AT_CONTEXT_GET_CLASS
GTK_IS_AT_CONTEXT
GTK_IS_AT_CONTEXT_CLASS
<SUBSECTION Private>
GtkATContextClass
gtk_at_context_get_type
</SECTION>

View File

@@ -2,7 +2,6 @@
#include <gtk/gtkunixprint.h>
gtk_about_dialog_get_type
gtk_accel_label_get_type
gtk_accessible_get_type
gtk_actionable_get_type
gtk_action_bar_get_type
@@ -17,6 +16,7 @@ gtk_application_window_get_type
gtk_aspect_frame_get_type
gtk_assistant_get_type
gtk_assistant_page_get_type
gtk_at_context_get_type
gtk_bin_layout_get_type
gtk_bitset_get_type
gtk_expression_get_type
@@ -90,6 +90,7 @@ gtk_expander_get_type
gtk_file_chooser_button_get_type
gtk_file_chooser_dialog_get_type
gtk_file_chooser_get_type
gtk_file_chooser_native_get_type
gtk_file_chooser_widget_get_type
gtk_file_filter_get_type
gtk_filter_get_type

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Some files were not shown because too many files have changed in this diff Show More