Benjamin Otte [Mon, 3 Feb 2020 04:17:23 +0000 (05:17 +0100)]
css: Remove .inline-toolbar
It's not used anywhere anymore.
Benjamin Otte [Mon, 3 Feb 2020 04:07:45 +0000 (05:07 +0100)]
widget-factory: Get rid of toolbars
Benjamin Otte [Mon, 3 Feb 2020 03:52:15 +0000 (04:52 +0100)]
gtk-demo: Get rid of toolbars
Benjamin Otte [Mon, 3 Feb 2020 03:29:10 +0000 (04:29 +0100)]
bloatpad: Use a box, not a toolbar
Benjamin Otte [Mon, 3 Feb 2020 00:10:55 +0000 (01:10 +0100)]
print: Don't use a toolbar in the custom paper dialog
Use a regular linked box instead.
Benjamin Otte [Thu, 6 Feb 2020 16:42:56 +0000 (17:42 +0100)]
cssnode: Remove leftover vfunc
Matthias Clasen [Fri, 7 Feb 2020 13:05:45 +0000 (08:05 -0500)]
Remove accidentally added files
Matthias Clasen [Fri, 7 Feb 2020 12:59:14 +0000 (07:59 -0500)]
Add a forgotten word
Matthias Clasen [Fri, 7 Feb 2020 12:50:02 +0000 (07:50 -0500)]
Fix syntax
Matthias Clasen [Fri, 7 Feb 2020 12:48:04 +0000 (07:48 -0500)]
Updates for 3.98
Matthias Clasen [Fri, 7 Feb 2020 07:06:45 +0000 (07:06 +0000)]
Merge branch 'wip/carlosg/implicit-grabs-on-leave' into 'master'
Handle implicit grabs on leave events
Closes #13
See merge request GNOME/gtk!1397
Carlos Garnacho [Fri, 7 Feb 2020 00:02:47 +0000 (01:02 +0100)]
gtkmain: Wait for GDK_CROSSING_UNGRAB leave event with implicit grabs
If there is a passive grab and the pointer leaves the window we would
receive a GDK_CROSSING_NORMAL event when the pointer moves outside
the window, and a GDK_CROSSING_UNGRAB event when we do release the
button and the implicit grab.
We currently would react to the first, but want to react to the
second. In the time between both events, the client would still receive
pointer motion that will reach the implicitly grabbed widget.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/13
Carlos Garnacho [Fri, 7 Feb 2020 00:00:52 +0000 (01:00 +0100)]
gtkroot: Make enum a typedef
Seems a typo, and prevents building as GtkRootProperties is deemed
to be defined multiple times.
Matthias Clasen [Thu, 6 Feb 2020 23:54:39 +0000 (23:54 +0000)]
Merge branch 'a11y-fixes' into 'master'
A11y fixes
See merge request GNOME/gtk!1396
Matthias Clasen [Thu, 6 Feb 2020 22:21:22 +0000 (17:21 -0500)]
testsuite: Misc. updates of expected output
The a11y dumps for action and header bars
have changed in harmless ways.
Matthias Clasen [Thu, 6 Feb 2020 23:03:28 +0000 (18:03 -0500)]
infobar: Implement forall
As a container, that is what you have to do.
Matthias Clasen [Thu, 6 Feb 2020 22:12:34 +0000 (17:12 -0500)]
testsuite: Clean up a11y menu tests
We don't need some of the tests anymore, since
we just have popovers now.
Matthias Clasen [Thu, 6 Feb 2020 21:50:09 +0000 (16:50 -0500)]
testsuite: Improve --generate support
When using the test binary to generate expected
output, don't initialize the test machinery, since
that pollutes the output with noise.
Matthias Clasen [Thu, 6 Feb 2020 05:47:13 +0000 (00:47 -0500)]
tests: Fix infobars in ui files
GtkInfoBar no longer exposes the content_area
as internal child.
Matthias Clasen [Thu, 6 Feb 2020 05:46:48 +0000 (00:46 -0500)]
testsuite: Update expected output
Matthias Clasen [Thu, 6 Feb 2020 05:16:18 +0000 (00:16 -0500)]
colorchooser: Use a composite accessible
This makes the content show up in the a11y tree again.
Matthias Clasen [Thu, 6 Feb 2020 04:17:17 +0000 (23:17 -0500)]
tests: Update expected output
The stackswitcher is no longer a box, so it doesn't
have the horizontal state anymore.
Matthias Clasen [Thu, 6 Feb 2020 04:09:23 +0000 (23:09 -0500)]
testsuite: Update some a11y tests
GtkMenuButton::use-popover no longer exists, remove it
from test files.
Matthias Clasen [Thu, 6 Feb 2020 04:06:47 +0000 (23:06 -0500)]
stackswitcher: Use a composite accessible
This makes the buttons show up in the a11y tree again.
Matthias Clasen [Thu, 6 Feb 2020 04:05:01 +0000 (23:05 -0500)]
a11y: Add an accessible for widgets with children
We've started to turns containers into widgets which
just happen to have children, and some of these need
to be exposed to the a11y stack.
This adds a very minimal implementation, it does not
currently emit change notification when children are
added or removed.
Matthias Clasen [Thu, 6 Feb 2020 04:07:33 +0000 (23:07 -0500)]
a11y: Report children of widgets
We want children of composite accessibles to be
reported.
Matthias Clasen [Thu, 6 Feb 2020 20:09:29 +0000 (20:09 +0000)]
Merge branch 'flatpak-build-sassc' into 'master'
Flatpak build sassc
See merge request GNOME/gtk!1392
Matthias Clasen [Thu, 6 Feb 2020 04:47:13 +0000 (23:47 -0500)]
Build sassc as a dependency for flatpaks
Downloading the subproject during the GTK build fails
in a flatpak build due to lack of network access.
flatpak-builder insists on having these things explicitly
spelled out as dependencies.
Matthias Clasen [Thu, 6 Feb 2020 13:07:13 +0000 (13:07 +0000)]
Merge branch 'WindowsPrintDriverPreferencesMaster' into 'master'
Fixed bug that prevented GTK from storing printer driver preferences in the…
See merge request GNOME/gtk!397
Matthias Clasen [Thu, 6 Feb 2020 07:07:22 +0000 (02:07 -0500)]
notebook: Update arrows when text direction changes
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/103
Matthias Clasen [Thu, 6 Feb 2020 06:38:17 +0000 (06:38 +0000)]
Merge branch 'kill-simple-search' into 'master'
Remove simple search engine
See merge request GNOME/gtk!1393
Matthias Clasen [Thu, 6 Feb 2020 04:53:07 +0000 (04:53 +0000)]
Merge branch 'better-test-isolation-2' into 'master'
Better test isolation
See merge request GNOME/gtk!1391
Matthias Clasen [Thu, 6 Feb 2020 04:35:39 +0000 (23:35 -0500)]
css tests: Ignore ".csd" vs ".solid-csd"
It it hard to control which of the csd style classes we get,
since it depends on details of the X server or compositor.
Explicitly ignore this difference by replacing .solid-csd
with .csd in the output.
Matthias Clasen [Thu, 6 Feb 2020 03:24:39 +0000 (22:24 -0500)]
testsuite: Make tests run without a11y bus
Not having an a11y bus around causes warnings from
at-spi, which make tests fail. Explicitly ignore those
warnings.
Matthias Clasen [Thu, 6 Feb 2020 03:23:52 +0000 (22:23 -0500)]
testsuite: Fix bloomfilter style tests
The results were expecting solid-csd, which is not what
we usually have.
Matthias Clasen [Wed, 5 Feb 2020 18:26:22 +0000 (18:26 +0000)]
Merge branch 'master.msvc' into 'master'
Fix building recent GTK master on Visual Studio
See merge request GNOME/gtk!1369
Matthias Clasen [Wed, 5 Feb 2020 18:04:42 +0000 (18:04 +0000)]
Merge branch 'public-emojichooser' into 'master'
emojichooser: Make public
See merge request GNOME/gtk!1382
Benjamin Otte [Wed, 5 Feb 2020 14:04:12 +0000 (14:04 +0000)]
Merge branch 'wip/otte/css' into 'master'
Some CSS cleanup
See merge request GNOME/gtk!1389
Matthias Clasen [Tue, 4 Feb 2020 23:47:42 +0000 (00:47 +0100)]
emojichooser: Add profiler marks for loading
This is a long-running operation, and worth showing
in traces.
Matthias Clasen [Tue, 4 Feb 2020 23:25:15 +0000 (00:25 +0100)]
icontheme: Fix various memory leaks
Tasks need to be unreffed too.
Matthias Clasen [Tue, 4 Feb 2020 23:24:14 +0000 (00:24 +0100)]
widget: Fix a memory leak with class actions
This code was doing the wrong thing even if the parent class
doesn't have actions.
Matthias Clasen [Tue, 4 Feb 2020 23:23:36 +0000 (00:23 +0100)]
Add a lib64 variant of gtk.supp
Matthias Clasen [Tue, 4 Feb 2020 22:41:00 +0000 (23:41 +0100)]
icontheme: Remove some dead code
Matthias Clasen [Tue, 4 Feb 2020 22:07:43 +0000 (23:07 +0100)]
frameclock: cosmetics
Redo the profiler marks for the frame clock signals
to look more uniform.
Matthias Clasen [Tue, 4 Feb 2020 21:54:19 +0000 (22:54 +0100)]
gdk: Silence some compiler warnings
These cause unused variable warnings in release builds.
Matthias Clasen [Tue, 4 Feb 2020 21:45:29 +0000 (22:45 +0100)]
treestore: Silence compiler warnings
This was causing compiler warnings in release builds.
Matthias Clasen [Tue, 4 Feb 2020 21:42:44 +0000 (22:42 +0100)]
notebook: Don't trigger criticals in dispose
When we dismantle our children in dispose, we
trigger a11y children-changed signals which end
up calling back into the notebook. Handle this
without critical warnings.
Matthias Clasen [Tue, 4 Feb 2020 21:40:11 +0000 (22:40 +0100)]
textview: Don't update action state in dispose
Only update the action state when we have a text buffer,
there is no need to do it otherwise, since we are going
to get a buffer before we get shown. This avoids triggering
the action state updates from finalize, which is a bad
time to be recreating the action muxer.
Matthias Clasen [Tue, 4 Feb 2020 21:15:32 +0000 (22:15 +0100)]
entry: Avoid criticals in dispose
The accessible gets properties of the entry, and
resetting the entry icons triggers accessible change
notification, so do that before we dismantle the entry
too far to respond to a g_object_get () call.
Matthias Clasen [Tue, 4 Feb 2020 19:01:56 +0000 (20:01 +0100)]
Don't export color picker functions
This is not public API, so it shouldn't be exported.
Matthias Clasen [Tue, 4 Feb 2020 16:54:30 +0000 (17:54 +0100)]
Read bookmarks async
Do not block the main thread while reading the bookmarks file.
This speeds up initial setup of a GtkPlacesSidebar.
Matthias Clasen [Tue, 4 Feb 2020 15:26:40 +0000 (16:26 +0100)]
placessidebar: Change some initial property values
Giving these properties the initial value that the file
chooser wants for them avoids some calls to update_places
in the setup code.
Matthias Clasen [Wed, 5 Feb 2020 05:45:35 +0000 (00:45 -0500)]
testperf: More flexible mark selection
Allow selecting marks not just by their name, but
also by the message detail.
Matthias Clasen [Wed, 5 Feb 2020 05:23:13 +0000 (00:23 -0500)]
testperf: Allow measuring start time
This can be used e.g. to measure how long it takes us
to get the first frame on screen.
Benjamin Otte [Wed, 5 Feb 2020 03:02:57 +0000 (04:02 +0100)]
stylecontext: Remove unused typedef
Timm Bäder [Tue, 4 Feb 2020 09:17:15 +0000 (10:17 +0100)]
css: Make some local variables const
Timm Bäder [Tue, 28 Jan 2020 13:48:10 +0000 (14:48 +0100)]
css: Remove unused function
Timm Bäder [Mon, 3 Feb 2020 09:59:21 +0000 (10:59 +0100)]
style context: Remove parent relationship
We don't have foreign drawing anymore, so we don't need this.
Benjamin Otte [Wed, 5 Feb 2020 02:12:40 +0000 (03:12 +0100)]
stylecontext: Remove gtk_style_context_new()
It's private now, no more foreign drawing of any sort.
To be fair, it was entirely useless without widget paths already.
Benjamin Otte [Wed, 5 Feb 2020 01:59:11 +0000 (02:59 +0100)]
testsuite: Remove the stylecontext test
Stylecontexts are on their way out and I'm removing API that the
testsuite was relying on, so remove the tests.
Put the useful parts of the tests elsewhere.
Benjamin Otte [Wed, 5 Feb 2020 01:54:32 +0000 (02:54 +0100)]
stylecontext: Remove the "changed" signal
Instead, always go directly to the GtkWidget::css_changed() call.
Benjamin Otte [Wed, 5 Feb 2020 01:46:13 +0000 (02:46 +0100)]
widget: Replace style-updated signal with css_changed vfunc
1. Rename the thing
2. Turn it from a signal to a vfunc
3. Pass the GtkCssStyleChange to it
We don't export any public API about the GtkCssStyleChange yet, it's
just a boring opaque struct.
Benjamin Otte [Tue, 4 Feb 2020 23:18:41 +0000 (00:18 +0100)]
pathbar: Remove unneeded code
The icons here are GIcons, they don't depend on the theme.
Benjamin Otte [Tue, 4 Feb 2020 22:24:50 +0000 (23:24 +0100)]
cssnode: Remove redundant check
We assert that cssnode->parent is NULL, no need to check it again.
Benjamin Otte [Tue, 4 Feb 2020 17:48:58 +0000 (17:48 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master
See merge request GNOME/gtk!1388
Timm Bäder [Mon, 27 Jan 2020 13:21:44 +0000 (14:21 +0100)]
widget: Skip not-drawable widgets in snapshot_child
Otherwise we transform the snapshot just to not do anything.
Matthias Clasen [Thu, 19 Dec 2019 02:56:57 +0000 (21:56 -0500)]
maplistmodel: Add an example to the docs
Matthias Clasen [Thu, 19 Dec 2019 03:41:41 +0000 (22:41 -0500)]
treelistmodel: Small documentation tweaks
Benjamin Otte [Tue, 4 Feb 2020 16:33:14 +0000 (17:33 +0100)]
widgetfocus: Remove unnecessary check
Mapped widgets are always realized.
Benjamin Otte [Tue, 4 Feb 2020 16:31:18 +0000 (17:31 +0100)]
widget: Remove _gtk_widget_is_drawable()
Use _gtk_widget_get_mapped() instead.
Drawable checked visible && mapped and mapped widgets are always
visible, so that was an unnecessary check.
Benjamin Otte [Tue, 4 Feb 2020 16:36:46 +0000 (16:36 +0000)]
Merge branch 'wip/otte/icontheme' into 'master'
Do simple icontheme API cleanups
See merge request GNOME/gtk!1378
Alexander Larsson [Tue, 4 Feb 2020 16:19:22 +0000 (17:19 +0100)]
Rename GtkIcon to GtkIconPaintable
Benjamin Otte [Tue, 4 Feb 2020 16:07:38 +0000 (17:07 +0100)]
tooltip: Don't css-validate
That's a job for toplevels now.
See
17ca95a1617b009a76b27a8572671855435985e7 for the same comit on
popovers.
Benjamin Otte [Tue, 4 Feb 2020 03:26:19 +0000 (04:26 +0100)]
icontheme: Remove GENERIC_FALLBACKS
Instead, rely on people passing fallbacks explicitly.
Alternatively, GThemedIcon provides the functionality to create
fallbacks, which is what GtkImage and the testsuite now use.
That method is slightly better, too, so the expected test results
have been updated accordingly.
Benjamin Otte [Tue, 4 Feb 2020 02:53:22 +0000 (03:53 +0100)]
icontheme: Pass fallbacks as optional argument to lookup_icon()
This way, we can remove gtk_icon_theme_choose_icon() completely.
Benjamin Otte [Sun, 2 Feb 2020 00:19:50 +0000 (01:19 +0100)]
icontheme: Remove contexts
There is no way to query contexts or do anything useful with them.
So don't keep track of them and don't make them an argument in public
APIs with the docs saying "I don't know what to use here, maybe read
some spec somewhere".
Benjamin Otte [Sun, 2 Feb 2020 00:13:27 +0000 (01:13 +0100)]
icontheme: Clean up includes
Benjamin Otte [Sun, 2 Feb 2020 00:05:42 +0000 (01:05 +0100)]
icontheme: Remove gtk_icon_get_base_size() and gtk_icon_get_base_dir()
Those functions are unused and the documentation says "Returns some
random number that the icon theme creator chose" which does not seem at
all useful and an implementation detail.
So get rid of it.
Benjamin Otte [Sat, 1 Feb 2020 23:56:39 +0000 (00:56 +0100)]
Revert "Break out cairo color matrix recoloring to gdk_cairo_image_surface_recolor()"
We're not in the business of adding Cairo APIs. That's Cairo's job.
Also, we don't need this API anywhere like the original commit claimed,
so there's no need to make it available in any way.
This reverts commit
afa6cc23692f83f0d38de24c9cf58a7a494c01d2.
Benjamin Otte [Sat, 1 Feb 2020 23:48:24 +0000 (00:48 +0100)]
icontheme: Remove crayon APIs
We expose no API to get at any colors for drawing symbolics, so we
shouldn't have APIs to draw with them.
Apart from that, those APIs look like a box of crayons, not like an
icontheme.
Benjamin Otte [Sat, 1 Feb 2020 23:44:01 +0000 (00:44 +0100)]
icontheme: Remove gtk_icon_theme_rescan_if_needed()
If the icon theme needs to be rescanned, it should just do it.
If it doesn't, there's no need for this function.
Ergo: Don't have the function.
Benjamin Otte [Sat, 1 Feb 2020 23:42:43 +0000 (00:42 +0100)]
icontheme: Remove NO_SVG and FORCE_SVG flags
If the icon theme loads SVGs or not is an implementation detail and
should not be exposed in public API.
Benjamin Otte [Sat, 1 Feb 2020 23:35:42 +0000 (00:35 +0100)]
icontheme: Remove GTK_ICON_LOOKUP_USE_BUILTIN
It's unused.
Benjamin Otte [Sat, 1 Feb 2020 23:27:14 +0000 (00:27 +0100)]
icontheme: Make text direction a lookup argument
Most users were just forgetting to set the proper flags.
And flags aren't the right way to set this anyway, it was just
acceptable as a workaround during GTK3 to not break API.
Benjamin Otte [Sat, 1 Feb 2020 22:51:04 +0000 (23:51 +0100)]
icontheme: Remove async APIs
Widgets would not use them properly. In fact, the only user was using
them wrong.
As icons are loaded async by default, this call isn't necessary.
Benjamin Otte [Sat, 1 Feb 2020 22:38:49 +0000 (23:38 +0100)]
icontheme: Remove gtk_icon_theme_get_default()
The API encouraged wrong usage - most of the users were indeed wrong.
Use the correct version instead:
gtk_icon_theme_get_for_display (gtk_widget_get_display ())
Alexander Larsson [Tue, 4 Feb 2020 14:01:48 +0000 (15:01 +0100)]
a11y tests: Ignore "active" flag on toplevel
All the a11y tests were failing for me with a window state diff
like this:
- state: active enabled resizable sensitive showing visible
+ state: enabled resizable sensitive showing visible
I guess the windows in the CI always gets the focus, but not when
I run it here. Generally focus seems asynchronous and hard to rely
on so I just made the test ignore the active state on toplevels.
Alexander Larsson [Tue, 4 Feb 2020 13:13:33 +0000 (14:13 +0100)]
tests: Initialize dbus before gtk
These days initilizing gtk may create a connection to the sesson bus,
so we have to initialize GTestDBus before initalizing gtk, or we'll
use the address of the "real" session bus (and remember that in the
global).
To further muck things up, g_test_dbus_up() resets important env
vars like DISPLAY and XDG_RUNTIME_DIR, which we have to re-set.
Alexander Larsson [Tue, 4 Feb 2020 13:08:10 +0000 (14:08 +0100)]
filechooser portal: Free portal proxy when bus connection closes
This was blocking the clean exit from the testdbus shutdown in
the defaultvalues test. The proxy was keeping the connection alive
which blocks g_test_dbus_down().
Matthias Clasen [Tue, 4 Feb 2020 11:19:23 +0000 (12:19 +0100)]
css: Fix the initial values optimization
Fix up the index computation. We have duplicate entries
in the type enum, so to go from one of the 'initial' types
to it corresponding type you subtract one, but to find
the size array entry for a type, you divide by 2.
Matthias Clasen [Tue, 4 Feb 2020 10:51:27 +0000 (10:51 +0000)]
Merge branch 'faster-theme-lookup' into 'master'
Faster icon theme lookup
See merge request GNOME/gtk!1381
Alexander Larsson [Tue, 4 Feb 2020 08:35:20 +0000 (09:35 +0100)]
icon-theme: Only have one copy of the icon flags enum
It turns out with the icon cache now using the virtual SYMBOLIC_PNG_SUFFIX
flag the two enums are now identical, so lets just use one of them, the
one GtkIconCache (so we move it to the header).
Alexander Larsson [Mon, 3 Feb 2020 14:11:35 +0000 (15:11 +0100)]
Don't use xsettings or xft defaults in testsuite
This adds a GDK_DEBUG=default-settings flag which disables reads
from xsettings and Xft resources, and enables this for the testsuite.
This is one less way to get different testresults depending on the
environment. In particular, it was failing the css tests for me
due to getting the wrong font size because i have a different dpi.
Matthias Clasen [Mon, 3 Feb 2020 11:49:36 +0000 (12:49 +0100)]
emojichooser: Make public
This is a useful widget to have, and it has minimal api.
Not having it public forces apps to recreate a lot of
complicated machinery for not good reason, if they need
an Emoji chooser in a different context.
Alexander Larsson [Mon, 3 Feb 2020 10:01:48 +0000 (11:01 +0100)]
GtkIconCache: Remove unused code
We're not really using the icon theme cache much anymore, as the
individual per-directory hashes are no longer used, so delete all the
unused code.
Alexander Larsson [Mon, 3 Feb 2020 09:35:45 +0000 (10:35 +0100)]
IconTheme: Make icon lookups faster
Traditionally the icon lookup for a theme has been:
lookup (icon_name, size):
best_directory = NULL
forearch theme
foreach directory in theme
if dir_size_matches (directory, size) && dir_has_icon (directory, icon-name)
best_directory = chose_best_size_dir (best_directory, directory)
if best_directory
return icon from best_directory
However, it turns out that there are a lot of subdirectories which have the same
size, as they differ only in the (essentially useless) "context" value. For example
the "16x16/apps" subdirectory is essentially the same as the "16x16/actions" one.
So, instead rathern than keeping all the directories as separate we store the
all the directories with the same size as a single entity (DirSize) and the
icon lookup in that DirSize looks up not only which suffix to use for that icon
but also which subdir it is in.
Additionally we keep a hashtable with all icon names that are
available in the entire theme (i.e. all DirSizes), which allows use
both to store each icon name only once, but also to do a quick
negative lookup and early exit in case we're looking up an icon that
doesn't exist. This is pretty common because we often look up sets of
icons like "image-png-symbolic", "image-png", "image", expecting some
to fail.
This brings down the time of the initial css validation from 20msec to 15msec for
me when running icon-factory.
Alexander Larsson [Mon, 3 Feb 2020 09:00:17 +0000 (10:00 +0100)]
icon-cache: Add new function to list all the icons in a directory
This lists the icons in a particular director, with their flags in a
hashtable. We also convert from "icon.symbolic" + SUFFIX_PNG to
"icon" + SUFFIX_SYMBOLIC_PNG.
Chun-wei Fan [Wed, 15 Jan 2020 07:27:59 +0000 (15:27 +0800)]
meson/MSVC builds: Use -utf-8 where available
This avoids the build from erroring out on C4819 (Unicode handling issue in
Visual Studio compiler), notably when running on Chinese, Japanese and
Korean locales.
Also apply -D_USE_MATH_DEFINES, -FImsvc_recommended_pragmas.h and -utf-8 to
the C++ compiler options as well.
Rico Tzschichholz [Mon, 3 Feb 2020 09:51:50 +0000 (10:51 +0100)]
Remove last GtkWidgetPath reference
See
49b47c913389dc395a48c2b19ac409412623c524
Chun-wei Fan [Thu, 30 Jan 2020 14:35:54 +0000 (22:35 +0800)]
demos/widget-factory/widget-factory.c: Include stdlib.h
Include it for exit().