Commit Graph

40579 Commits

Author SHA1 Message Date
Matthias Clasen
73ba043b02 text: Make editable API irreversible
Programmatic changes to the entry contents should
not become part of the undo history.

Sadly, the editable implementations are also used
in the code paths that we use for user-initiated changes,
so we have to be careful to only set them as
irreversible if we are not already in a user action.

Fixes: #5622
2023-02-27 19:43:11 -05:00
Matthias Clasen
61e4eadbce text: Fix disabling of history
Keep a separate boolean for enable-undo, and
disable the history if it is false, or the entry
is not using visible text, or isn't editable.

Related to: #5622
2023-02-27 19:17:08 -05:00
Lukáš Tyrychtr
c57d6c5575 a11y: Expose GTK_ACCESSIBLE_PROPERTY_AUTOCOMPLETE
Previously, it was not exposed at all, now it at least somewhat is.
2023-02-27 15:27:07 +01:00
Lukáš Tyrychtr
9d4bb77263 a11y: Expose GTK_ACCESSIBLE_PROPERTY_HAS_POPUP
This property was not exposed before, not it is.
2023-02-27 14:10:11 +01:00
Lukáš Tyrychtr
b33bfe26fe a11y: Expose GTK_ACCESSIBLE_PROPERTY_MULTI_SELECTABLE to at-spi2
Previously, this property was not exposed to the a11y backend, now, it is.
2023-02-27 13:24:56 +01:00
Lukáš Tyrychtr
cbf4a546b4 a11y: Expose GTK_ACCESSIBLE_PROPERTY_REQUIRED to at-spi2
Up until now, this property was silently not exposed to assistive technologies.
2023-02-27 12:17:58 +01:00
Lukáš Tyrychtr
568cf21486 a11y: Map GTK_ACCESSIBLE_STATE_INVALID to ATSPI_STATE_INVALID_ENTRY
Previously, it was mapped to ATSPI_STATE_INVALID. However, that state
is used for some internal errors, and not user errors, so use the correct
one for that purpose.
2023-02-27 11:40:46 +01:00
Emmanuele Bassi
1e599c9141 Remove unused code in GtkButton
GtkButton still has some code checking if the instance passed to
gtk_button_set_label() is a GtkCheckButton; GtkCheckButton is not a
GtkButton any more.
2023-02-24 14:38:39 +00:00
Matthias Clasen
b0fc2f99ba Merge branch 'mcatanzaro/#5619' into 'main'
filesystemmodel: fix crash when file is removed

Closes #5619

See merge request GNOME/gtk!5550
2023-02-23 16:24:06 +00:00
Michael Catanzaro
c141d0a70a filesystemmodel: fix crash when file is removed
In 32247bc50e node_get_for_file() was
changed to return GTK_INVALID_LIST_POSITION rather than 0 when the file
is untracked. Most call sites were updated accordingly, but this one was
missed.

Fixes #5619
2023-02-23 09:20:03 -06:00
Lukáš Tyrychtr
6fa8033c7c Use the correct role for GtkToggleButton 2023-02-23 15:02:29 +01:00
Lukáš Tyrychtr
de80f503e4 a11y: Introduce a dedicated role for toggle buttons
Up until now, toggle buttons were presented as regular push buttons.
That's the approach used by the ARIA specification, however, our platform
accessibility backend, at-spi2, can not represent accessibe states with values,
so we can not represent the design pattern precisely enough for screen readers.
If, in future, the a11y backends gain this capability, we might consider again
removing this role.
2023-02-23 14:22:20 +01:00
Lukáš Tyrychtr
d906b456a8 GtkNotebook: Improve the labels of notebook pages for a11y 2023-02-21 15:29:00 +01:00
Philipp Hörist
a209a73c69 button: Remove nullable annotation for new_from_icon_name()
This makes it more consistent with set_icon_name() which
does also not accept NULL.

Fixes #5606
2023-02-20 20:33:42 +01:00
Matthias Clasen
07b9a6fb75 filechooser: Fix paned limits
The intention of the ui file was to not let
the paned shrink both children down to nothing,
but using <child> for the children effectively
overrides the setting of the shrink properties.
Fix that by using child properties instead of
<child>.
2023-02-19 19:12:30 -05:00
Matthias Clasen
aaee1ee5bd Merge branch 'fix_custom_accessible_hierarchy' into 'main'
Allow setting accessible parent and next sibling

See merge request GNOME/gtk!5517
2023-02-19 16:15:49 +00:00
Matthias Clasen
70a711882c Fix the build 2023-02-19 15:26:27 +00:00
Matthias Clasen
5717b95cad Miscellaneous formatting and documentation fixes 2023-02-19 15:09:25 +00:00
Sebastian Dröge
ca93512106 Add two missing Since markers 2023-02-19 11:18:15 +02:00
Benjamin Otte
d553f6941d Merge branch 'wip/otte/for-main' into 'main'
listview: Measure children only, not self

See merge request GNOME/gtk!5535
2023-02-19 05:33:59 +00:00
Matthias Clasen
ca6642deed Drop some unnecessary includes 2023-02-18 23:42:04 -05:00
Benjamin Otte
be6a4722c0 listview: Measure children only, not self
The previous code would include CSS padding/margin/border in the
measurement and that is wrong.

Until commit a96c75ff02 this was not actually visible, but afterwards
listitems were allocated 16px too wide.

Test included
2023-02-19 05:41:29 +01:00
Matthias Clasen
3b3b63062d Revert "Merge branch 'inscription-single-line' into 'main'"
This reverts commit 7ec90abf24, reversing
changes made to ec49a912aa.

We did not have agreement on this after all.
2023-02-18 19:04:00 -05:00
Matthias Clasen
7ec90abf24 Merge branch 'inscription-single-line' into 'main'
inscription: Add single-line-mode property

Closes #5444

See merge request GNOME/gtk!5504
2023-02-18 23:34:17 +00:00
Automeris naranja
4073371416 gtksearchentry: Apply header capitalization to the "Clear entry" tooltip
HIG advises to use header capitalization in tooltip texts.

https://developer.gnome.org/hig/patterns/feedback/tooltips.html
2023-02-18 15:53:54 -05:00
Matthias Clasen
19c362f638 securememory: use function checks
Checking for getpagesize in meson.build is
useless if we don't check the resulting define
in the code. So do that.
2023-02-18 09:34:50 -05:00
Sebastian Dröge
ad7d9bc409 Add missing Since marker to GtkScaleButton:active 2023-02-17 19:41:55 +02:00
Matthias Clasen
b261f7f533 Merge branch 'nielsdg/set-action-enabled-doc-ref' into 'main'
widget: mention action_set_enabled in install_action

See merge request GNOME/gtk!5524
2023-02-16 11:24:15 +00:00
Niels De Graef
779f9e5071 widget: mention action_set_enabled in install_action
When looking at `gtk_widget_class_install_action()`, it isn't
immediately obvious how actions can be enabled or disabled. Add a
reference to the `gtk_widget_action_set_enabled()` method so people have
a quick link to that.
2023-02-16 08:47:06 +01:00
Emmanuele Bassi
1f4adb60bb Merge branch 'fix-annotations' into 'main'
Fix a couple incorrect annotations for optional parameters

See merge request GNOME/gtk!5503
2023-02-15 16:27:11 +00:00
Lukáš Tyrychtr
f507dd4962 Allow updating the next accessible sibling for a GtkAccessible 2023-02-15 12:29:16 +01:00
Matthias Clasen
9a539cec57 Merge branch 'mask-modes' into 'main'
Make mask nodes more versatile

See merge request GNOME/gtk!5521
2023-02-15 00:57:17 +00:00
Matthias Clasen
724cf6bd70 Merge branch 'wip/cdavis/menubutton-active' into 'main'
menubutton: Add `active` property and getter/setter

See merge request GNOME/gtk!5506
2023-02-15 00:44:17 +00:00
Matthias Clasen
0eb791eaaa Make mask nodes more versatile
Add a GskMaskMode enumeration and implement it
in the GL and cairo renderers.
2023-02-14 19:07:01 -05:00
Matthias Clasen
0a0a03d913 Merge branch 'fix_4258' into 'main'
Don't tell the screen reader that a button is related to an image which has no useful label

Closes #4258

See merge request GNOME/gtk!4665
2023-02-14 23:50:18 +00:00
Lukáš Tyrychtr
d43724f5fc Don't tell the screen reader that a button is related to an image which has no useful label 2023-02-14 23:50:18 +00:00
Lukáš Tyrychtr
d566771262 Preserve the correct a11y tree in GtkStack
Now, when we can, ensure that the GtkStackPage is the parent of its widget.
2023-02-14 14:44:20 +01:00
Lukáš Tyrychtr
5f72b51105 Allow setting accessible parent and sibling explicitly
This allows to maintain the correct a11y hierarchy even when it contains
objects which are only GtkAccessibles.
2023-02-14 14:43:57 +01:00
Matthias Clasen
730593fab5 Merge branch 'texttag_textview_documentation' into 'main'
Update TextTag and TextView indent Documentation

See merge request GNOME/gtk!5507
2023-02-14 00:08:39 +00:00
Akira TAGOH
4532c3020b Fix an assertion in GtkFontChooserWidget when setting a filter. 2023-02-13 12:49:02 +09:00
Jacob Mealey
272a40a01a Update TextTag and TextView indent Documentation
Change the documentation for both to be in line with Pango documentation
specifically regarding hanging indentation.
2023-02-12 23:12:51 +00:00
Matthias Clasen
f121f607ae Merge branch 'search_entry_placeholder' into 'main'
gtksearchentry: Add getter/setter for placeholder text

See merge request GNOME/gtk!4312
2023-02-12 22:06:36 +00:00
Christopher Davis
ff45145eac menubutton: Add active property and getter/setter
GtkMenuButton currently does not provide a way to tell
if it's open programmatically. The existing methods,
`popup()` and `popdown()`, do not expose any state
to callers. If someone wanted to know whether or not
a menubutton was open, they needed the popover. Given
that GtkMenuButton can manage the popovers itself,
that's not always an option for app developers.

This commit adds the `active` property and associated
methods, where `gtk_menu_button_set_active ()` replaces
both `gtk_menu_popup ()` and `gtk_menu_popdown ()`.
This addition also mirrors changes in other places,
Such as `GtkWidget:visible` vs `show()`/`hide()`.
2023-02-12 16:47:59 -05:00
Matthias Clasen
83c5f5ff0f
Apply 4 suggestion(s) to 2 file(s) 2023-02-13 06:47:06 +09:00
Alexandros Theodotou
87d21dc5c9
gtksearchentry: Add getter/setter for placeholder text 2023-02-13 06:46:31 +09:00
Matthias Clasen
cef7e6b741 Merge branch 'mark-deprecations' into 'main'
docs: Mark various deprecations

See merge request GNOME/gtk!5502
2023-02-12 21:44:00 +00:00
Matthias Clasen
679d510059 Merge branch 'template-child-dispose-order' into 'main'
gtk: Set widget template children to NULL before destroy unref

See merge request GNOME/gtk!4611
2023-02-12 16:36:52 +00:00
Marco Melorio
d2755e0385 inscription: Add single-line-mode property
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5444.
2023-02-12 17:35:56 +01:00
Matthias Clasen
0c2b437643 Merge branch 'main' into 'main'
Add note about widgets implementing the interface adding the `horizontal`/`vertical` CSS classes

See merge request GNOME/gtk!5391
2023-02-12 16:28:12 +00:00
madmurphy
0764cf0c9c Add note about widgets implementing the interface adding the horizontal/vertical CSS classes 2023-02-12 16:28:12 +00:00