Matthias Clasen [Thu, 16 Jan 2020 01:27:12 +0000 (20:27 -0500)]
css: Track selected state separately
Like the previous change, this reduces the number of
css nodes reacting to parent-state changes. The remaining
parent-state cases here are due to :link.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
parent-backdrop 4
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
selected 579
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 115
parent-hover 5
parent-disabled 91
parent-backdrop 4
parent-selected 144
Matthias Clasen [Thu, 16 Jan 2020 01:05:44 +0000 (20:05 -0500)]
css: Track backdrop state separately
Like the previous change, this reduces the number of
css nodes reacting to parent-state changes.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 562
disabled 859
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
parent-backdrop 4
Matthias Clasen [Thu, 16 Jan 2020 00:19:38 +0000 (19:19 -0500)]
css: Track disabled state separately
Significantly reduces the number of nodes that react to
parent-state changes.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 2247
sibling-name 63
sibling-state 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 2226
parent-hover 5
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 562
disabled 859
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
Matthias Clasen [Wed, 15 Jan 2020 20:10:06 +0000 (15:10 -0500)]
css: Track hover state changes separately
The idea is that this reduce the amount of frequently
changing state that css nodes are sensitive to.
This is going to reduce the amount of style recomputation.
Matthias Clasen [Mon, 13 Jan 2020 00:36:53 +0000 (19:36 -0500)]
Speed up gtk_widget_pick
Add early exits, and avoid as much work as
possible.
Matthias Clasen [Wed, 15 Jan 2020 15:58:54 +0000 (10:58 -0500)]
Fix the filetransfer portal initialization
Reusing the cancellable only works if you don't throw
it away after first use.
Matthias Clasen [Tue, 14 Jan 2020 22:38:20 +0000 (17:38 -0500)]
Try harder to make ci not timeout
Make getting the file transfer portal proxy more
async, and avoid leaking a bus connection. This
causes GTestDBus to hang at the end of the test
run.
Matthias Clasen [Tue, 14 Jan 2020 21:44:31 +0000 (16:44 -0500)]
css: Drop unsused bitmasks
GtkCssProvider was maintaining bitmasks for the
set properties in each ruleset. The masks are never
used, so drop them.
Matthias Clasen [Tue, 14 Jan 2020 21:42:31 +0000 (16:42 -0500)]
css: Remove an unused function
_gtk_css_style_property_get_mask_affecting was superseded
by GtkCssStyleChange back in 2015.
Matthias Clasen [Tue, 14 Jan 2020 00:32:40 +0000 (19:32 -0500)]
testsuite: Improve --generate support
We don't want annoying spew from GTest when
using --generate, since it interferes with just
piping the output to a text file.
Matthias Clasen [Mon, 13 Jan 2020 17:42:29 +0000 (12:42 -0500)]
quiet a compiler warning in release builds
Alex Samorukov [Tue, 14 Jan 2020 22:15:05 +0000 (22:15 +0000)]
Use bundle id instead of package name for the macOS preview as filename is now changed
Matthias Clasen [Tue, 14 Jan 2020 20:42:01 +0000 (15:42 -0500)]
fontchooser: Fix up the previous commit
Matthias Clasen [Tue, 14 Jan 2020 20:25:27 +0000 (15:25 -0500)]
fontchooser: Fix objects-finalize test
The treeview is evil and keeps reference cycles in the
form of various tree row references. That gets cleaned up
if you explicitly gtk_widget_destroy the treeview. But since
07f2024bfca22331121, the scrolled window no longer destroys
its child, exposing this issue as a reference leak in
the objects-finalize test.
The font chooser widget is affected here because it calls
gtk_tree_view_scroll_to_path from init(), which creates one
of those reference cycles. Work around this in the font
chooser by unsetting the tree view model in dispose, which
clears up this cycle.
Matthias Clasen [Tue, 14 Jan 2020 19:12:33 +0000 (14:12 -0500)]
Fix encoding symbolic pixbufs
This was broken in
1a931da0465966b62b56e145b82e691ece67af91.
Sucipto [Tue, 14 Jan 2020 15:11:27 +0000 (15:11 +0000)]
Update Indonesian translation
Matthias Clasen [Tue, 14 Jan 2020 14:20:18 +0000 (09:20 -0500)]
testsuite: Skip GtkDragIcon
GtkDragIcon needs a special surface, so skip it
in the notify tests.
Daniel Mustieles [Tue, 14 Jan 2020 11:39:44 +0000 (12:39 +0100)]
Updated Spanish translation
Kukuh Syafaat [Tue, 14 Jan 2020 06:27:18 +0000 (06:27 +0000)]
Update Indonesian translation
Matthias Clasen [Tue, 14 Jan 2020 06:08:24 +0000 (06:08 +0000)]
Merge branch 'adwaita-cross-fade-fix-gtk4' into 'master'
Adwaita: Fix syntax error in cross-fade() (GTK4)
Closes #2371
See merge request GNOME/gtk!1308
Matthias Clasen [Tue, 14 Jan 2020 06:06:35 +0000 (06:06 +0000)]
Merge branch 'wip/chergert/fix-dragicon-installation' into 'master'
build: fix gtkdragicon header installation
See merge request GNOME/gtk!1306
Matthias Clasen [Tue, 14 Jan 2020 06:03:48 +0000 (01:03 -0500)]
Handle lack of file transfer portal
Don't block for 25 seconds trying to get a bus
connection. Give up after 1 second.
Matthias Clasen [Fri, 10 Jan 2020 00:01:59 +0000 (19:01 -0500)]
gtk-demo: Use a default action in the infobars demo
This makes the question infobar activatable by clicking
anywhere in it.
Matthias Clasen [Thu, 9 Jan 2020 21:13:33 +0000 (16:13 -0500)]
Adwaita: Add hover for clickable infobars
Matthias Clasen [Thu, 9 Jan 2020 21:11:36 +0000 (16:11 -0500)]
infobar: Activate default action on clicks
When we have a default action set on the infobar, activate it
for clicks anywhere in the infobar. Also add an .action style
class in this case, so we can add a hover highlight to the infobar
just for this case.
Matthias Clasen [Tue, 14 Jan 2020 01:59:22 +0000 (01:59 +0000)]
Merge branch 'wip/chergert/textview-propagate-undo-state' into 'master'
textview: propagate GtkTextBuffer can-undo/redo action state
See merge request GNOME/gtk!1311
Christian Hergert [Tue, 14 Jan 2020 01:26:18 +0000 (17:26 -0800)]
textview: propagate GtkTextBuffer can-undo/redo action state
This ensures the action state for undo and redo are propagated from the
buffer. Doing so means menu items now properly show sensitivity.
Matthias Clasen [Mon, 13 Jan 2020 23:51:40 +0000 (23:51 +0000)]
Merge branch 'wip/chergert/textview-undo-menu-item' into 'master'
textview: add undo/redo menu actions
See merge request GNOME/gtk!1310
Christian Hergert [Mon, 13 Jan 2020 23:25:05 +0000 (15:25 -0800)]
textview: add undo/redo menu actions
nana-4 [Mon, 13 Jan 2020 21:19:12 +0000 (06:19 +0900)]
Adwaita: Fix syntax error in cross-fade()
cross-fade() requires two images.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2371
Christian Hergert [Mon, 13 Jan 2020 17:07:24 +0000 (09:07 -0800)]
build: fix gtkdragicon header installation
Daniel Mustieles [Mon, 13 Jan 2020 15:51:22 +0000 (16:51 +0100)]
Updated Spanish translation
Daniel Mustieles [Mon, 13 Jan 2020 15:50:21 +0000 (16:50 +0100)]
Updated Spanish translation
Timm Bäder [Mon, 13 Jan 2020 14:12:51 +0000 (14:12 +0000)]
Merge branch 'wip/jimmac/updated-checkmark' into 'master'
Adwaita: update checkbox & radio
Closes #2291
See merge request GNOME/gtk!1289
Jakub Steiner [Mon, 6 Jan 2020 13:41:00 +0000 (14:41 +0100)]
Adwaita: update checkbox & radio
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2291
Matthias Clasen [Mon, 13 Jan 2020 05:00:12 +0000 (05:00 +0000)]
Merge branch 'closure-annotations' into 'master'
Fix incorrect use of GIR closure annotations.
See merge request GNOME/gtk!1305
Robert Ancell [Mon, 13 Jan 2020 01:26:50 +0000 (14:26 +1300)]
Add missing (closure) GIR annotations
Robert Ancell [Mon, 13 Jan 2020 01:11:15 +0000 (14:11 +1300)]
Fix incorrect use of GIR closure annotations.
They were being applied to the callback function, not the data that is passed
to that function.
Matthias Clasen [Mon, 13 Jan 2020 00:51:24 +0000 (00:51 +0000)]
Merge branch 'textbuffer-missing-api-docs' into 'master'
Add missing public API documentation.
See merge request GNOME/gtk!1301
Matthias Clasen [Mon, 13 Jan 2020 00:50:58 +0000 (00:50 +0000)]
Merge branch 'menutoolbutton-missing-api-docs' into 'master'
menutoolbutton: Add missing public API documentation.
See merge request GNOME/gtk!1303
Matthias Clasen [Mon, 13 Jan 2020 00:50:16 +0000 (00:50 +0000)]
Merge branch 'docstring-typos' into 'master'
Fix docstring errors with drag and drop code
See merge request GNOME/gtk!1304
Matthias Clasen [Mon, 13 Jan 2020 00:49:25 +0000 (00:49 +0000)]
Merge branch 'missing-transfer-notation' into 'master'
Add missing transfer notation for function return types.
See merge request GNOME/gtk!1302
Robert Ancell [Sun, 12 Jan 2020 23:30:17 +0000 (12:30 +1300)]
Fix docstring errors with drag and drop code
Robert Ancell [Sun, 12 Jan 2020 23:07:15 +0000 (12:07 +1300)]
textbuffer: Add missing public API documentation.
This API was added in
a52757874ee.
Robert Ancell [Sun, 12 Jan 2020 23:17:55 +0000 (12:17 +1300)]
menutoolbutton: Add missing public API documentation.
This API was added in
03e30431a8a
Robert Ancell [Sun, 12 Jan 2020 23:14:08 +0000 (12:14 +1300)]
Add missing transfer notation for function return types.
Matthias Clasen [Sun, 12 Jan 2020 01:13:05 +0000 (20:13 -0500)]
Adwaita: Fix needs-attention
Stack switchers are now stackswitcher, no longer .stack-switcher.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2370
Piotr Drąg [Sat, 11 Jan 2020 15:07:48 +0000 (16:07 +0100)]
Update POTFILES.in
Matthias Clasen [Sat, 11 Jan 2020 06:09:58 +0000 (06:09 +0000)]
Merge branch 'dnd-gestures-2' into 'master'
Add new dnd api
See merge request GNOME/gtk!1278
Matthias Clasen [Sat, 11 Jan 2020 05:31:40 +0000 (00:31 -0500)]
dragdest: More documentation
Matthias Clasen [Sat, 11 Jan 2020 02:56:26 +0000 (21:56 -0500)]
Update all callers
Matthias Clasen [Sat, 11 Jan 2020 02:50:21 +0000 (21:50 -0500)]
Reshuffle droptarget api a little bit
Add a ::drag-motion signal back, remove x,y from
the ::accept signal, and only emit ::accept once.
Matthias Clasen [Sat, 11 Jan 2020 04:41:46 +0000 (04:41 +0000)]
Merge branch 'wip/chergert/gtk4-gtk-main-sync' into 'master'
Rubustness fixes for gtk_main_sync()
See merge request GNOME/gtk!1299
Christian Hergert [Fri, 10 Jan 2020 23:04:44 +0000 (15:04 -0800)]
gtkmain: be deterministic in source removal
Fixes gtk_main_sync() to only remove a source if it has not
already executed (and been removed). The previous code was
using gtk_main_quit() directly which would be non-determinstic
based on the previous value in the return register.
Christian Hergert [Fri, 10 Jan 2020 23:00:10 +0000 (15:00 -0800)]
gtkmain: short-circuit gtk_main_sync() where no display
If there is no display, we will hit the slow path here which
can introduce long latencies in unit tests. This checks for
a NULL list of displays and simply short-circuits.
Matthias Clasen [Fri, 10 Jan 2020 22:47:41 +0000 (22:47 +0000)]
Merge branch 'css-font-values' into 'master'
Css font values
See merge request GNOME/gtk!1298
Matthias Clasen [Fri, 10 Jan 2020 21:59:56 +0000 (16:59 -0500)]
css: Simplify font features
Don't store numbers as GtkCssValues needlessly.
Alex Samorukov [Fri, 10 Jan 2020 21:18:24 +0000 (22:18 +0100)]
gdk_quartz_keymap_translate_keyboard_state fills consumed_modifiers
incorrectly (closes #2102)
See merge request GNOME/gtk!1225
Matthias Clasen [Fri, 10 Jan 2020 06:36:23 +0000 (01:36 -0500)]
css: Simplify compute for font variations
Just like font features, font variations are stored
as a hash table mapping strings to pure number values,
which never change during compute.
Matthias Clasen [Fri, 10 Jan 2020 06:27:49 +0000 (01:27 -0500)]
css: Simplify compute for font features
Font features consist of a hash table of number
values, which will never change during compute,
so there is no point in recreating a new value
with a copy of the hash table, constaining the
same string->number mapping.
Matthias Clasen [Fri, 10 Jan 2020 19:43:14 +0000 (19:43 +0000)]
Merge branch 'kill-builtin-image' into 'master'
Kill builtin image
See merge request GNOME/gtk!1297
Matthias Clasen [Fri, 10 Jan 2020 18:11:59 +0000 (13:11 -0500)]
Remove builtin icons altogether
This removes support for GtkCssImageBuiltin and
GtkCssImageBuiltinType from everywhere.
Matthias Clasen [Fri, 10 Jan 2020 17:56:47 +0000 (12:56 -0500)]
css: Stop supporting builtin images
Change the default value of -gtk-icon-source to 'none',
and stop parsing 'builtin' as a value.
Dušan Kazik [Fri, 10 Jan 2020 06:47:50 +0000 (06:47 +0000)]
Update Slovak translation
Matthias Clasen [Thu, 9 Jan 2020 15:29:33 +0000 (10:29 -0500)]
testdnd: Fix up for current api
Matthias Clasen [Thu, 9 Jan 2020 12:47:28 +0000 (07:47 -0500)]
docs: Expand the dnd migration hints
Matthias Clasen [Thu, 9 Jan 2020 05:50:33 +0000 (00:50 -0500)]
dragicon: Add docs
Matthias Clasen [Thu, 9 Jan 2020 05:31:13 +0000 (00:31 -0500)]
docs: Fix a typo
Matthias Clasen [Thu, 9 Jan 2020 05:30:41 +0000 (00:30 -0500)]
Properly export GtkDragIcon
The get_type function was missing.
Matthias Clasen [Wed, 8 Jan 2020 22:07:30 +0000 (17:07 -0500)]
Update all users
Matthias Clasen [Wed, 8 Jan 2020 21:43:52 +0000 (16:43 -0500)]
dragdest: Rename ::drag-motion to ::accept
Matthias Clasen [Wed, 8 Jan 2020 21:30:44 +0000 (16:30 -0500)]
dragdest: Allow denying drops asynchronously
Add an api to deny a drop, this is meant to be used
when delaying the decision on whether to accept a
drop until after reading the data.
Matthias Clasen [Wed, 8 Jan 2020 21:08:26 +0000 (16:08 -0500)]
remove debug spew
Matthias Clasen [Wed, 8 Jan 2020 21:06:57 +0000 (16:06 -0500)]
dragdest: Add a ::drag-enter signal
Mainly for symmetry with ::drag-leave.
Matthias Clasen [Wed, 8 Jan 2020 20:59:38 +0000 (15:59 -0500)]
testdnd2: Fix the text case
We must take mime types into account when checking.
Matthias Clasen [Wed, 8 Jan 2020 20:58:52 +0000 (15:58 -0500)]
content provider impl: Take mime types into account
Matthias Clasen [Wed, 8 Jan 2020 05:25:51 +0000 (00:25 -0500)]
dragdest: Steps towards allowing nested drop sites
Matthias Clasen [Wed, 8 Jan 2020 15:34:56 +0000 (10:34 -0500)]
Add another dnd testcase
This one tests nested drop sites and interaction between
DND and other gestures.
Matthias Clasen [Wed, 8 Jan 2020 04:31:48 +0000 (23:31 -0500)]
Update all callers
Matthias Clasen [Wed, 8 Jan 2020 04:45:27 +0000 (23:45 -0500)]
Add GdkDrop back to signal signatures
Matthias Clasen [Wed, 8 Jan 2020 00:20:32 +0000 (19:20 -0500)]
Drop gtk_drag_(un)highlight
Matthias Clasen [Wed, 8 Jan 2020 00:12:40 +0000 (19:12 -0500)]
filechooser: Remove code for sidebar pre-arming
This is just not a feature we can support currently.
Doing it properly would require infrastructure for
a generalized :drag(sensitive) state highlighting
potential drag sites everywhere.
Matthias Clasen [Tue, 7 Jan 2020 23:45:53 +0000 (18:45 -0500)]
listbox: Stop using gtk_drag_(un)highlight
This api is going away, so just do what needs to
be done manually.
Matthias Clasen [Tue, 7 Jan 2020 23:24:03 +0000 (18:24 -0500)]
calendar: Remove drag highlighting calls
This is happening unconditionally, anyway.
Matthias Clasen [Tue, 7 Jan 2020 23:19:06 +0000 (18:19 -0500)]
textview: Remove unnecessary drag highlighting
GTK does this unconditionally anyway, now.
Matthias Clasen [Tue, 7 Jan 2020 23:18:43 +0000 (18:18 -0500)]
text: Remove unnecessary drag highlighting
GTK does this unconditionally anyway, now.
Matthias Clasen [Tue, 7 Jan 2020 23:08:25 +0000 (18:08 -0500)]
notebook: Receive tab dnd on the tabs
Don't make the whole notebook a drop target
for tab dnd, but just the tab bar. This will
help with drag highlighting, and it arguably
more correct anyway.
Matthias Clasen [Tue, 7 Jan 2020 22:40:49 +0000 (17:40 -0500)]
Adwaita: No drag highlight for placessidebar
It does its own custom thing.
Matthias Clasen [Tue, 7 Jan 2020 22:30:08 +0000 (17:30 -0500)]
Adwaita: No dnd highlight for iconviews
We only want to highlight the drop location
that is rendered with a separate css node now.
Matthias Clasen [Tue, 7 Jan 2020 22:29:44 +0000 (17:29 -0500)]
iconview: Use a named subnode for dnd highlight
This is necessary because we want to style the
iconview itself and the item highlighting differently.
Matthias Clasen [Tue, 7 Jan 2020 22:13:32 +0000 (17:13 -0500)]
Adwaita: No dnd highlight for treeviews
We only want to highlight the drop location
that is rendered with a separate css node now.
Matthias Clasen [Tue, 7 Jan 2020 22:12:37 +0000 (17:12 -0500)]
treeview: Use a named subnode for dnd highlight
This is necessary because we want to style the
treeview itself and the row highlighting differently.
Matthias Clasen [Tue, 7 Jan 2020 21:16:05 +0000 (16:16 -0500)]
Adwaita: No drag highlight for stack switchers
Matthias Clasen [Tue, 7 Jan 2020 20:43:50 +0000 (15:43 -0500)]
Adwaita: No drag highlight for expanders
This is pretty ugly, because Adwaita has a very
generic drop-highlight implementaiton that we
need to overrule.
Matthias Clasen [Tue, 7 Jan 2020 20:39:19 +0000 (15:39 -0500)]
dragdest: Rename ::armed to ::contains
Matthias Clasen [Tue, 7 Jan 2020 19:48:09 +0000 (14:48 -0500)]
gtk-demo: Update the ::prepare handler
Matthias Clasen [Tue, 7 Jan 2020 19:46:11 +0000 (14:46 -0500)]
dragsource: Change the ::prepare return type
Make it return the content provider to use for
the next drag. This allows just-in-time provision
of the content provider. The default handler just
returns the value of the ::content property.
Matthias Clasen [Tue, 7 Jan 2020 07:15:22 +0000 (02:15 -0500)]
docs: Expand the GDK dnd docs
Matthias Clasen [Tue, 7 Jan 2020 06:50:41 +0000 (01:50 -0500)]
docs: Add GtkDragIcon
Matthias Clasen [Tue, 7 Jan 2020 06:48:15 +0000 (01:48 -0500)]
docs: Add GtkDropTarget section