Commit Graph

38772 Commits

Author SHA1 Message Date
Matthias Clasen
bee58fd09d composetable: Introduce a parser struct
This will be used in the following commits to
beef up Compose file parsing.
2021-07-13 22:02:33 -04:00
Matthias Clasen
d25557a5ef Clean up the GtkComposeTable api
Keep the list of composetables private to GtkIMContextSimple,
and just have an api that creates new GtkComposeTables, either
from a file or from data.

Update tests to use the new api.
2021-07-13 22:02:33 -04:00
Matthias Clasen
9885bedb7d Merge branch 'matthiasc/for-master' into 'master'
widget-factory: Add a default button

Closes #3975

See merge request GNOME/gtk!3725
2021-07-04 13:46:13 +00:00
Matthias Clasen
f023695f31 docs: Fix various link formatting
Make links that gi-docgen can undestand.

Fixes: #3975
2021-07-03 23:11:48 -04:00
Matthias Clasen
c79f289d67 text: Update placeholder visibility more often
We need to update the visibility of the placeholder
label when we create it, otherwise we can end up
with placeholder text on top of entry content.

Fixes: #4066
2021-07-03 22:15:38 -04:00
Matthias Clasen
e516ce428a Merge branch 'fix-filechooser-critical' into 'master'
filechooser: Avoid a critical

Closes #4077

See merge request GNOME/gtk!3722
2021-07-03 21:48:41 +00:00
Matthias Clasen
8ff9c851ce filechooser: Avoid a critical
This was showing up when calling some filechooser api on
a native filechooser, where we use a filechooser dialog
behind the scenes, but it does not have focus.

Fixes: #4077
2021-07-03 15:15:06 -04:00
Matthias Clasen
511dc7a182 Merge branch 'fix-gir' into 'master'
meson: Fix generate_gir() dependencies

See merge request GNOME/gtk!3701
2021-07-03 13:35:22 +00:00
Matthias Clasen
c668586caf Merge branch 'scrolling-menus' into 'master'
popovermenu: Scroll when necessary

See merge request GNOME/gtk!3717
2021-07-03 13:31:23 +00:00
Matthias Clasen
3227aa2c45 mediastream: Rename apis one more time
Before we end up with names that we are unhappy with,
rename things one more time, and update all callers.
2021-07-03 09:05:33 -04:00
Matthias Clasen
804d9ee828 popovermenu: Scroll when necessary
Add a scrolled window to GtkPopoverMenu, so we can scroll
long menus when there is not enough room.
2021-07-02 13:19:02 -04:00
Christian Hergert
d8ab2e6d03 texthistory: hoist single actions from group
In many cases across GtkTextBuffer, we end up with operations performed
inside of a begin/end user action. Those can be coalesced into a single
sub-action within the group, and hoisted out of the group. Doing so
increases the chances that we chain similar actions together for words.

Additionally, this fixes an issue introduced in
6179886b14 for #3977 where GNOME Text Editor
started to group all possible actions into a single group.

Fixes GNOME/gnome-text-editor#97
2021-06-30 16:40:54 -07:00
Benjamin Otte
e9d3d3e3cf icontheme: Fix binding annotation 2021-06-30 18:55:25 +00:00
Matthias Clasen
bf97dfd998 Merge branch 'wip/exalm/buttons' into 'master'
GtkMenuButton icon+arrow support + fixes

Closes #3501

See merge request GNOME/gtk!3694
2021-06-28 19:10:57 +00:00
Adrien Plazas
0ea73c384f gtk: Define the GtkListItemFactory autocleanup func 2021-06-28 14:01:57 +02:00
Emmanuele Bassi
d8c416e8b2 Merge branch 'ebassi/issues-4076' into 'master'
docs: Use code blocks for inline XML

Closes #4076

See merge request GNOME/gtk!3702
2021-06-27 15:10:15 +00:00
Emmanuele Bassi
9bf3724d25 docs: Use code blocks for inline XML
Otherwise the markdown renderer will just ignore them.

Fixes: #4076
2021-06-27 15:25:18 +01:00
Xavier Claessens
0fd790eb8d Meson: Only g-ir-scanner warnings fatal when buit with -Dwerror=true
Also fix deprecation warning that requires using fatal_warnings kwarg
from Meson 0.55.0.

Fixes: #4072.
2021-06-25 11:38:11 -04:00
Xavier Claessens
b18e95d6b3 meson: Fix generate_gir() dependencies
There is no need to search for gir variables into subprojects, they are
part of dependencies objects, meson will find them there.
2021-06-25 10:08:36 -04:00
Alexander Mikhaylenko
47b5c68df4 menubutton: Don't hardcode label<->arrow spacing
This should come from the theme instead, as it does for icon<->arrow.
2021-06-24 23:13:01 +05:00
Alexander Mikhaylenko
ac3b246858 menubutton: Add a way to always show arrow with image buttons
Make sure the button still has the .image-button style class with an icon,
also add it to the initial state with only an arrow. Add a new
.arrow-button style class for the icon+arrow state so it's possible to
style it.

Remove spacing from the label+arrow variant to match, re-add it from the
stylesheet for both.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3501
2021-06-24 23:12:26 +05:00
Alexander Mikhaylenko
51a754547e menubutton: Remove a random g_return_if_fail()
There's already one above.
2021-06-24 23:11:57 +05:00
Alexander Mikhaylenko
76df60db2b menubutton: Reset label when setting icon name and vice versa
Match GtkButton.
2021-06-24 23:06:46 +05:00
Alexander Mikhaylenko
f3befe530b button: Reset style classes when setting arbitrary children
Don't leave leftover .image-button or .text-button.
2021-06-24 23:06:46 +05:00
Matthias Clasen
59d4333e23 Merge branch 'wip/sadiq/reveal-controls-on-touch' into 'master'
video: Reveal controls on tap

See merge request GNOME/gtk!3648
2021-06-24 15:11:33 +00:00
Matthias Clasen
6a29b64850 Merge branch 'dnd-fixes' into 'master'
dnd: Add another assertion

See merge request GNOME/gtk!3689
2021-06-24 15:01:29 +00:00
Matthias Clasen
73cb60d053 Merge branch 'ebassi/filechooser-no-trash' into 'master'
Never show the Trash in the FileChooserWidget side bar

Closes #674

See merge request GNOME/gtk!3692
2021-06-24 14:59:43 +00:00
Matthias Clasen
47bd998e94 Merge branch 'checkbutton-release-outside' into 'master'
checkbutton: Match GtkButton behavior

Closes #4061

See merge request GNOME/gtk!3691
2021-06-24 14:58:42 +00:00
Matthias Clasen
006633082d Merge branch 'macos-input-method' into 'master'
macos: fix the position of curosr of input method for macos.

Closes #4063

See merge request GNOME/gtk!3699
2021-06-24 14:50:59 +00:00
Zhi
1dbb5188ba macos: fix the position of curosr of input method for macos.
In the refactoring from GdkWindow to GdkSurface, GtkWidget no longer
corresponds to a GdkSurface. We have to calculate the relative position
from GtkWidget to the GdkSurface.

Closes #4063.
2021-06-22 22:57:34 +08:00
Adrien Plazas
a4d35ace78 gtk: Define the GtkListItem autocleanup func 2021-06-22 09:43:16 +02:00
Emmanuele Bassi
889709213e Never show the Trash in the FileChooserWidget side bar
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.

Fixes: #674
2021-06-20 15:44:22 +01:00
Emmanuele Bassi
333a92bcff Revert "Never show the Trash in the FileChooserWidget side bar"
This reverts commit cd39e417e1.
2021-06-20 15:41:43 +01:00
Emmanuele Bassi
cd39e417e1 Never show the Trash in the FileChooserWidget side bar
The Trash is a special location: files cannot be copied or moved, there,
and the file selection dialog is not able to restore files from the
Trash.

Fixes: #674
2021-06-20 15:39:41 +01:00
Matthias Clasen
1cebf406aa docs: Fix a typo 2021-06-19 14:14:57 -07:00
Matthias Clasen
3b70cd3226 checkbutton: Match GtkButton behavior
When leaving the widget before releasing the button,
we should not activate the checkbutton, to match the
way GtkButton behaves.

Fixes: #4061
2021-06-19 13:30:31 -07:00
Christian Hergert
a6101f0181 textview: give application developers access to RTL and LTR context
This allows developers to modify the pango context that is used when
rendering text within the text view.

Such access can be useful to alter how rounding occurs with API such as
pango_context_set_round_glyph_positions() and is needed by GtkSourceView
for proper placement of glyphs within the overview map.
2021-06-19 12:28:18 -07:00
Matthias Clasen
92c6485adf docs: Tweak wording
Instead of drag'n'drop, say drag-and-drop. That is easier
to read, and less unclear on the markdown syntax implications.
2021-06-19 08:03:47 -07:00
Matthias Clasen
d92f8a1b8e treeviewcolumn: Clip header buttons
We don't want to overdraw when dragging a narrow column
around, and we also need the clipping to avoid picking
the wrong column, when a later column button overlaps
an earlier one.

Fixes: #4045
2021-06-17 17:14:14 -07:00
Christian Hergert
352898ae9e inspector: fix compilation with broadway 2021-06-17 11:54:00 -07:00
Matthias Clasen
1bda665662 Merge branch 'matthiasc/for-master' into 'master'
action muxer fixes

See merge request GNOME/gtk!3678
2021-06-17 17:53:16 +00:00
Matthias Clasen
7344a03aa3 shortcutcontroller: Don't reinject menu accels
The normal way to associate accels with actions is
to attach a shortcut controller to the widget. The shorcut
controller will inject the accel into the action muxer
tree, so that it can get displayed in widgets that activate
the action (say, in menus.

This approach does not works for generated menus, since the
widgets are not in the hands of the app developer, so attaching
shortcut controllers to them is impractical.

Instead, GtkModelButton has an accel property that gets
bound to the accel coming from the action muxer tree (most
likely put there via gtk_application_set_accel_for_action),
and creates a shortcut controller itself.

The change in this commit is to prevent the shortcut controller
from injecting the accel into the action muxer tree in this case.
Otherwise, the accels get 'stuck' and we won't update them if the
global accels are later changed.

This is a hack, and needs a better solution.
2021-06-17 08:50:26 -04:00
Matthias Clasen
64af90111e window: Propagate accel changes
When the global accels change, tell the
shortcut controller to re-inject them into
the action muxer hierarchy.
2021-06-17 08:50:26 -04:00
Matthias Clasen
3254a3feab shortcutcontroller: Add a way to update accels
This will be used to make accel changes propagate.
2021-06-17 08:50:26 -04:00
Matthias Clasen
d5054f9b99 action muxer: Propagate registrations further up
We were pretty aggressive about not registering
observers further than necessary, stopping at the
first muxer that provides an action.

But even though action changes further up in the tree
won't be relevant in that case, we need to listen to
accel changes, since they may come from higher up
in the tree (e.g. when using
gtk_application_set_accels_for_action with an action
that is defined on a widget.

So, register all the way to the top, and stop propagating
action changes when we hit a muxer that provides the action.
2021-06-17 08:50:26 -04:00
Matthias Clasen
db93090ea8 menutrackeritem: Be more careful with accel changes
In some cases (such as when getting a new parent), the
action muxer doesn't know exactly which detailed actions
have changed accels, so we call primary_accel_changed with
just an action name.

Make the menu tracker item handle that case by matching
either against the detailed name or the the action name.
2021-06-17 08:50:26 -04:00
Matthias Clasen
15c65595b8 action muxer: Propagate accel changes
When we set a new parent on an action muxer,
accels may change, so call primary_accel_changed
for involved actions.
2021-06-17 08:50:26 -04:00
Benjamin Otte
e59e9ad6a9 Merge branch 'wip/otte/for-master' into 'master'
spinner: Behave like any other icon

See merge request GNOME/gtk!3677
2021-06-17 11:47:28 +00:00
Benjamin Otte
e6c4dbfc6d spinner: Behave like any other icon
Take the size from -gtk-icon-size.

Note that min-width/height still works, as those properties are handled
by the generic widget sizing machinery in GTK4.
2021-06-17 12:54:56 +02:00
Matthias Clasen
424dd8a463 actionobserver: Clarify primary_accel_changed docs
Either action_name or action_and_target may be NULL
here, and observer implementations should be careful
when checking those values.
2021-06-16 10:34:37 -04:00