Commit Graph

34645 Commits

Author SHA1 Message Date
Matthias Clasen
22211f29fb colorbutton: Don't add a customize menu
The color swatch in the button does not need a
context menu. Turn it off.
2020-04-04 00:28:52 -04:00
Matthias Clasen
8991275fbd colorbutton: Fix focus
The colorbutton contains a button which contains a colorswatch.
We want the focus to go straight to the button, nowhere else,
so mark the swatch as !can-focus.

Adapt tests to match.
2020-04-04 00:28:45 -04:00
Matthias Clasen
e43eb951d6 Merge branch 'scrollbar-a11y' into 'master'
Add GtkScrollbarAccessible

See merge request GNOME/gtk!1623
2020-04-04 04:03:40 +00:00
Matthias Clasen
5205fa0ff7 scrollbar: Be more defensive
Somehow the scrollbar accessible manages to call
gtk_scrollbar_get_adjustment when priv->range is NULL.
Survive taht.
2020-04-03 23:31:45 -04:00
Matthias Clasen
1424dd9786 Add an api to parse shortcut actions
This is so we can test this code. While doing it
I also fixed the missing else that was caused it
not to work.
2020-04-03 22:41:15 -04:00
Matthias Clasen
339d3e41b0 Add GtkScrollbarAccessible
When GtkScrollbar stopped being a GtkRange,
GtkRangeAccessible stopped working for scrollbars.

Update a11y tests to match.
2020-04-03 15:20:27 -04:00
Carlos Garnacho
e5d23aaaaf imwayland: Clamp the surrounding string end correctly
In the paths where len > MAX_LEN and cursor/anchor are separated by
at least MAX_LEN from text edges, we were clamping the right end of
the surrounding string at MAX_LEN. Oops.

This end anchor may go as far as the string length, although just
up to len - MAX_LEN in real terms (due to the condition above that
caches cursor/anchor positions being near enough the text end).

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2565

(cherry-picked from commit d7fb15c822)
2020-04-03 19:55:55 +02:00
Emmanuele Bassi
4e264a74be Annotation fixes
Match the arguments name in the declaration and the definition, and make
sure we have the proper transfer annotations.
2020-04-03 15:30:56 +01:00
Timm Bäder
fb325afc79 shortcutcontroller: fix transfer full annotation 2020-04-03 08:03:32 +02:00
Timm Bäder
046190cb8a window: Don't leak toplevel layout 2020-04-03 07:37:54 +02:00
Matthias Clasen
8a0035333a a11y: Set focus-related states properly
Entries and menubuttons are no longer focusable themselves,
they have focusable children. Since we don't have accessible
objects for those, transfer the focus-related state (focusable
and focused) from the children to the main accessible object.
2020-04-02 17:35:09 -04:00
Matthias Clasen
1f8e633fff window: tie focus to surface state changes
We don't get a focus-out on the event controller, when
the surface is losing keyboard focus, since we are not
moving our focus to some other widget, so we are never
unsetting the mnemonics-visible property. Do that in
response to surface state changes instead.
2020-04-02 17:21:01 -04:00
Matthias Clasen
aaa4e40a1f imcontexsimple: Move Compose file loading to class_init
This ensures that it is done only once.
2020-04-02 09:04:23 -04:00
Matthias Clasen
8ec254e2bb imcontextsimple: Simpify Compose file loading
We are not loading the Compose file for individual contexts,
it just gets added to a global list. So don't pass an im context
along. This will let us move the loading out of the initialization
of individual contexts, and only do it once.
2020-04-02 09:02:05 -04:00
Matthias Clasen
2a9911724f imcontextsimple: Load ~/.Compose unconditionally
There is nothing display-specific in the ~/.Compose file,
so we can just try to load it without looking at the
display we are on.
2020-04-02 09:02:05 -04:00
Matthias Clasen
a9b4ac3d59 imcontextsimple: Add a profiler mark for IO
We are loading a file here, thankfully in a thread, but
we do it every time an entry is created. Add a profiler
mark, to make this visible.
2020-04-02 09:02:05 -04:00
Matthias Clasen
fcd36e59b1 Fix crossing event generation
We were not properly setting the new_descendent field
in Crossing structs for GTK_CROSSING_OUT events. This
was causing extraneous ::leave signals to be emitted,
and make model buttons in popover menus flicker when
hovered.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2536
2020-04-02 00:39:46 -04:00
Philip Withnall
544b8d5a7f gtkflowbox: Fix a minor typo in the documentation
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-04-01 14:04:46 +01:00
Matthias Clasen
6ae5d9ac22 Merge branch 'matthiasc/for-master' into 'master'
keynav: Fix Shift-Tab

See merge request GNOME/gtk!1598
2020-04-01 05:04:02 +00:00
Matthias Clasen
dc3d778e01 keynav: Fix Shift-Tab
This was broken by the shortcuts branch merge.
2020-04-01 00:21:19 -04:00
Matthias Clasen
2154b8e745 Add a cursor-aspect-ratio setting
Add a setting that controls how thick the text caret is drawn.
The default value is 0.04.
2020-03-31 23:30:20 -04:00
Carlos Garnacho
fa7f6ad910 gtkmain: Do not try to coalesce/ignore crossing events
Under grabbing circumstances we used to get several crossing events,
some corresponding to the grab itself and some corresponding to
pointer motion.

The backends now do a better job at keeping those simple, which
means we sit listening for events that don't actually arrive. This
triggers pointer focus issues when dragging windows or opening
grabbing popups.

Actually obey those events, they will be the only ones we get now.
2020-04-01 00:40:17 +02:00
Matthias Clasen
5432f73095 window: Fix residual resizing issues
After the GdkToplevel split, GtkWindow occasionally
forgets its minimum size. Fix this by keeping a GdkToplevelLayout
around and reusing it.
2020-03-31 13:07:44 -04:00
Matthias Clasen
15eb3bbbf1 shortcutcontroller: Document buildable support 2020-03-30 20:09:29 -04:00
Matthias Clasen
ace183f38f shortcutcontroller: Fix builder support
The GtkBuilder support was not working anymore after
triggers and actions have been turned into objects.

Fix this.
2020-03-30 19:02:35 -04:00
Bastien Nocera
8cf41c1b66 filechoosernativeportal: Fall back if portal is too old
Add portal version checking as originally implemented for the GTK 3.x
branch.

See: 35fec1c6b2
2020-03-30 18:31:24 +02:00
Bastien Nocera
027ca22def Add portal version checking helper
Add gtk_get_portal_interface_version() to check the version of a portal.
2020-03-30 18:31:23 +02:00
Bastien Nocera
bd55c5842e colorpickerportal: Simplify version fetching code
Simplify version checking code by using a function to fetch the uint out
of the GVariant and don't throw a warning if it can't be fetched.
2020-03-30 18:31:23 +02:00
Matthias Clasen
de31bb59a1 window: Remove initial-focus leftovers
We removed the way to set initial_focus a year ago,
time to get rid of the leftovers.
2020-03-29 23:39:54 -04:00
Matthias Clasen
07bb29153b widget: Remove a leftover vfunc
The popup-menu signal is gone, so we can remove the vfunc.
2020-03-29 23:18:56 -04:00
Timm Bäder
785b33f169 widget: Return an array from list_controllers
Minimize the GList usage throughout the code base.
2020-03-29 15:32:54 +02:00
Matthias Clasen
47982ae272 coloreditor: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
0020b735d9 colorchooserdialog: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
e05c1b0244 colorchooserwidget: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
d0b4f9eb29 notebook: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
03375b723a listbox: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
e2beb6ec50 levelbar: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
ef32cff771 spinbutton: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
366b007024 filechooserwidget: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
40337aa1b3 printunixdialog: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
0bb38b903e printjob: Drop the Private struct 2020-03-29 09:04:19 -04:00
Matthias Clasen
173b1333ca printing: Avoid a crash
When no printer has been selected (e.g. because we don't
find any printers), the 'print at' radio group should be
insensitive, except for the 'now' choice. Selecting another
option in this situation will lead to a crash.
2020-03-28 15:36:15 -04:00
Matthias Clasen
784d6f8d0c printing: Fix initial page range radio group
Only set one radio button as active in the ui file.
Otherwise we end up with multiple options appearing
as selected initially.
2020-03-28 15:36:15 -04:00
Matthias Clasen
7916b95bc5 gesture: Fix gtk_gesture_get_bounding_box
When we stopped translating event coordinates in-place,
this function inadvertently started returning surface-relative
bounding boxes instead of widget-relative ones, as expected.

Fix this by using the widget-relative coordinates that we
already store.
2020-03-28 15:03:33 -04:00
Matthias Clasen
7b135c96e4 cellarea: Fix cell editing
We need to translate the event coordinates to
widget-relative coordinates. This broke when
we stopped translating event coordinates in-place.
2020-03-28 14:56:26 -04:00
Matthias Clasen
e662438675 button: Fix an event handling gotcha
We no longer translate event coordinates in-place,
so gdk_event_get_position() returns surface-relative
coordinates, not widget-relative ones. Just use the
coordinates we are given.
2020-03-28 14:33:01 -04:00
Matthias Clasen
aa2ca80817 imcontextsimple: Don't use g_object_unref on events
Events are not objects anymore.
2020-03-28 14:29:08 -04:00
Matthias Clasen
ceef86895f appchooserdialog: Drop the Private struct 2020-03-28 10:59:12 -04:00
Matthias Clasen
001d076e61 image: Drop the Private struct 2020-03-28 10:49:54 -04:00
Matthias Clasen
408dd37944 infobar: Drop the Private struct 2020-03-28 10:48:15 -04:00