Commit Graph

61739 Commits

Author SHA1 Message Date
Benjamin Otte
a232107122 shortcutcontroller: Introduce
This is a very barebones controller that currently does nothing but
activate the binding signals. Yay.

And because we have bindings on every widget (Yes, a GtkGrid has a
keybinding - 2 in fact), we need that controller everywhere.
2020-03-25 22:36:03 -04:00
Benjamin Otte
27834b04ae bindings: Make gtk_binding_parse_signal() use GVariantBuilder
And because it's the last user of GtkBindingArg and
gtk_binding_entry_add_signall(), also remove those two.
2020-03-25 22:36:03 -04:00
Benjamin Otte
cbe207a8de bindings: Parse into GVariantBuilder directly
Avoids the indirection via GtkBindingArg
2020-03-25 22:36:03 -04:00
Benjamin Otte
1cab5e03ca bindings: Add gtk_binding_entry_add_signal_variant()
This function is the replacement for
gtk_binding_entry_add_signall().

The GVariant will be demarshalled and passed to the action signal upon
binding activation. The same rules apply as used to apply for
GtkBindingArg, in that long, double and string args are now replaced by
"x", "d" and "s" variant types.
2020-03-25 22:36:03 -04:00
Benjamin Otte
f8c523fa72 bindings: Replace GtkBindingArg arguments with GVariant
So far, this only replaces invocation, not yet parsing.
2020-03-25 22:36:03 -04:00
Matthias Clasen
e17db0abde Merge branch 'matthiasc/for-master2' into 'master'
Matthiasc/for master2

See merge request GNOME/gtk!1568
2020-03-26 02:30:54 +00:00
Matthias Clasen
cc9c45a47a Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1567
2020-03-26 01:54:30 +00:00
Emmanuele Bassi
a9c3a33620 passwordentry: Remove unused include 2020-03-25 21:53:12 -04:00
Emmanuele Bassi
f61d520ab1 entry: Remove unused include 2020-03-25 21:53:06 -04:00
Matthias Clasen
7672e6c833 text view: Fix touch selection
We forgot to allocated that popover.
2020-03-25 18:48:01 -04:00
Matthias Clasen
faf61cd112 event controller focus: drop include
This header is not needed here, and it is going away.
2020-03-25 18:47:54 -04:00
Matthias Clasen
1308ecb0ae flattenlistmodel: Give access to child models
Add an api to retrieve the model containing a given
item in a flatten listmodel. This is useful when the
individual items in the list don't have backpointers.
2020-03-25 18:47:46 -04:00
Matthias Clasen
4f6096947e Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1565
2020-03-25 21:48:38 +00:00
Matthias Clasen
dc18572a59 Merge branch 'wip/chergert/muxer-robustness-fix' into 'master'
muxer: force muxer dispoal as part of widget dispose

See merge request GNOME/gtk!1564
2020-03-25 21:34:56 +00:00
Matthias Clasen
8493ebfe98 filechoosererrorstack: Fix object life-cycle
Unparent children in dispose, not in finalize.
2020-03-25 17:04:29 -04:00
Matthias Clasen
5870d9d72a testsuite: Set NO_AT_BRIDGE for gtk tests
The a11y stack insists on spewing hard to control warnings
that make our tests fail. So, no accessibility for gtk tests :(
2020-03-25 17:03:58 -04:00
Christian Hergert
b5b836668a muxer: force muxer dispoal as part of widget dispose
We need to cleanup state here immediately so that we do not potentially
access the g_class private data after it been finalized. This ensures that
the borrowed reference is dropped by the muxer.
2020-03-25 14:02:59 -07:00
Timm Bäder
c155ac98c8 Merge branch 'wip/sadiq/fix-leak' into 'master'
singleselection: Fix a memory leak

See merge request GNOME/gtk!1554
2020-03-25 09:13:50 +00:00
Timm Bäder
600952e295 magnifier: Don't try to use a null widget paintable
We destroy the paintable in dispose, which can be called multiple times.
2020-03-24 10:44:06 +01:00
Timm Bäder
3b2adf5d1f inspector: Fix child widget life cycle
unparent them in dispose
2020-03-24 10:44:06 +01:00
Timm Bäder
56d99ab5cd Merge branch 'patch-2' into 'master'
gtkfilechoosernative: Remove duplicate "the" in the documentation

See merge request GNOME/gtk!1557
2020-03-24 06:08:26 +00:00
LingMan
29c9776daa gtkfilechoosernative: Remove duplicate "the" in the documentation 2020-03-24 04:58:13 +00:00
Marc-Antoine Perennou
eb8e0910c3 testsuite/gtk/flattenlistmodel.c: fix build
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2020-03-22 10:53:59 +01:00
Mohammed Sadiq
cfc44e09a0 singleselection: Fix a memory leak 2020-03-22 14:05:56 +05:30
Matthias Clasen
92b50c5e2a 3.98.1 2020-03-21 21:44:23 -04:00
Matthias Clasen
dabd09bc42 a11y: Don't re turn uninitialized memory
For some reason, this was now showing up in the
a11y tests as random image sizes in the about
dialog test.
2020-03-21 21:44:23 -04:00
Matthias Clasen
d7e5f5b368 Merge branch 'filechooser-popover-fixes' into 'master'
Filechooser popover fixes

See merge request GNOME/gtk!1553
2020-03-22 00:40:15 +00:00
Matthias Clasen
95209290c4 file chooser: Fix the rename file popover
Make this popover work again by attaching it
to the file chooser itself.
2020-03-21 20:14:23 -04:00
Matthias Clasen
90197240d3 filechooser: Fix the file list popover
Make this popover work again.
2020-03-21 20:00:15 -04:00
Matthias Clasen
6555a2f661 filechooser: Fix the new folder popover
We were listening for change notification on a
no-longer-existing property.
2020-03-21 19:32:08 -04:00
Matthias Clasen
a197b202b8 places sidebar: Fix the popovers
We need to check-resize the popovers.
2020-03-21 18:28:57 -04:00
Matthias Clasen
84e58aa393 Merge branch 'portal-dir-chooser' into 'master'
filechoosernativeportal: Allowing selecting folder(s)

See merge request GNOME/gtk!1552
2020-03-21 20:29:11 +00:00
Bastien Nocera
e99d1605dc filechoosernativeportal: Allowing selecting folder(s)
Use the "directory" portal option when asked to select folders.
2020-03-21 15:46:05 -04:00
Matthias Clasen
bf988f8d07 Merge branch 'portal-chooser-fail' into 'master'
portal file chooser: Handle errors

Closes #2527

See merge request GNOME/gtk!1551
2020-03-21 18:34:07 +00:00
Matthias Clasen
245851a6bb portal file chooser: Handle errors
Fall back to showing a local file chooser
if we get DBus errors from the portal.

Closes: #2527
2020-03-21 13:16:43 -04:00
Matthias Clasen
bb3dc16680 Merge branch 'fix-inspector-picking' into 'master'
inspector: Make picking work again

Closes #2528

See merge request GNOME/gtk!1549
2020-03-21 16:21:51 +00:00
Matthias Clasen
fceac594ae Merge branch 'fix-inspector-key' into 'master'
x11: Fix key event state translation

See merge request GNOME/gtk!1550
2020-03-21 14:47:29 +00:00
Matthias Clasen
abeabc39e8 x11: Fix key event state translation
In the event refactoring, a bit was lost.

This makes Ctrl-Shift-i work again to open
the inspector.
2020-03-21 10:26:11 -04:00
Matthias Clasen
fd58b116cf inspector: Make picking work again
We used to either make the inspector see- and click-thru
or lower it, but sadly translucency broke after we
removed surface opacity, and lowering doesn't work
on Wayland. So just hide the inspector window while
we are picking.

Fixes: #2528
2020-03-21 09:42:58 -04:00
Matthias Clasen
a67893fe5a Merge branch 'new-text-attributes' into 'master'
New text attributes

See merge request GNOME/gtk!1547
2020-03-21 05:56:22 +00:00
Matthias Clasen
9259efb5d7 Make overline support conditional
The ci image does not have Pango 1.45, so for the
time being, make the overline support conditional
on Pango being new enough.
2020-03-21 01:18:54 -04:00
Matthias Clasen
72f06abd13 Require pango 1.44.4
This lets use use the insert-hyphen attribute
unconditionally.
2020-03-21 00:39:17 -04:00
Matthias Clasen
923a245a80 gtk-demo: Add hyphenation control to the markup demo 2020-03-20 23:58:33 -04:00
Matthias Clasen
38f1dbaba3 gtk-demo: Allow word breaking in the markup demo
We want to show hyphenation control here.
2020-03-20 23:58:33 -04:00
Matthias Clasen
795ef5b4e3 textbuffer: Parse overline and hyphenation attributes
When inserting Pango markup into a text buffer, translate
Pango attributes for overlines and hyphenation control
into the corresponding text tag properties.
2020-03-20 23:58:23 -04:00
Matthias Clasen
fd9c911c3a textlayout: Handle new text tag properties
Translate tag properties for overlines and
hyphenation control into Pango attributes.
2020-03-20 23:58:23 -04:00
Matthias Clasen
a8c6ae6085 texttag: Support overline and hyphenation control
Add support for recently added Pango attributes
for overlines and hyphenation control. The new
properties of GtkTextTag are
overline, overline-rgba, allow-breaks, show-spaces
and insert-hyphens.
2020-03-20 23:58:23 -04:00
Carlos Garnacho
28e7a0a565 Merge branch 'master_MR1290' into 'master'
Copy of !1290 for master

Closes #2365

See merge request GNOME/gtk!1546
2020-03-20 20:20:41 +00:00
Matthias Clasen
7088bd18e6 Merge branch 'wip/chergert/fix-class-private-data-usage' into 'master'
Fix GtkWidgetClassPrivate data usage

See merge request GNOME/gtk!1545
2020-03-20 18:49:58 +00:00
Christian Hergert
ccac404f28 widget: fix class private data usage to be _init() safe
Before this commit, adding GtkWidgetAction to class private data would
require copying the actions to each subclass as they were built or
modified. This was convenient in that it is a sort of "copy on write"
semantic.

However, due to the way that GTypeInstance works with base _init()
functions, the "g_class" pointer in GTypeInstance is updated as each
_init() function is called. That means you cannot access the subclasses
class private data, but only the parent class private data.

If instead we use a singly linked list of GtkWidgetAction, each subclass
has their own "head" yet all subclasses share the tail of the
GtkWidgetAction chain.

This creates one bit of complexity though. You need a stable way to know
which "bit" is the "enabled" bit of the action so we can track enabled
GAction state. That is easily solved by calculating the distance to the
end of the chain for a given action so that base classes sort ahead of
subclasses. Since the parent class always knows its parent's actions, the
position is stable.

A new dynamic bitarray helper also helps us avoid allocations in all the
current cases (up to 64 actions per widget) and dynamically switches to
malloc if that is to ever be exceeded.
2020-03-20 11:17:56 -07:00