Commit Graph

58495 Commits

Author SHA1 Message Date
Matthias Clasen
441a9dfa80 gtk-demo: Rewrite the search entry demo
Port this from ::populate-popup to the new context
menu api. At the same time, fix some parts of the demo
that were broken since it was changed to use GtkStearchEntry.
2019-06-13 11:59:50 +00:00
Matthias Clasen
f12057b9dc textview: Support toggle actions
When creating a touch selection bubble, create toggle
buttons for toggle actions.
2019-06-13 11:59:50 +00:00
Matthias Clasen
037e205da0 textview: Redo context menus
Drop the ::populate-popup signal and implement
the new context menu api.
2019-06-13 11:59:50 +00:00
Matthias Clasen
964b2574cf label: Redo context menus
Drop the ::populate-popup signal and implement
the new context menu api. Things are a bit more
complicated here, since we have different menus
on links and selectable text.
2019-06-13 11:59:50 +00:00
Matthias Clasen
1b21d6ecba password entry: Adapt to new context menu api 2019-06-13 11:59:50 +00:00
Matthias Clasen
6030465cdf text: Add a context action for visibility
This will be used by GtkPasswordEntry for amending
the context menu.
2019-06-13 11:59:50 +00:00
Matthias Clasen
a28d5d1888 text, entry: Implement context menu api
Drop the ::populate-popup signal and implement
the new context menu api.
2019-06-13 11:59:50 +00:00
Matthias Clasen
cbc0a8447d popover menu: Unify hover and focus
Menus traditionally don't have separate
hover and focus locations. Make the same
change here that we already did for
popover menubars: Track the active item
and set its selected state. Both keynav
and mouse change the active item.
2019-06-12 21:50:46 -04:00
Matthias Clasen
a7e121384c popover menubar: Use a pseudo state
Use :selected instead of .active to
mark the active item.
2019-06-12 21:50:37 -04:00
Matthias Clasen
6c7cb8d862 popover: Improve the move-focus fix
Avoid breaking menubar keynav (we still
need the focus change to be propagated
down from the root).
2019-06-12 21:50:29 -04:00
Matthias Clasen
5b0002a9dc popover menu bar: Don't leave active item behind
When the mouse leaves the bar, turn the lights off.
2019-06-12 21:50:22 -04:00
Matthias Clasen
ed9b874d2e wayland: Fix the popover race workaround
The Wayland backend has a hack to work around
a race with popover mapping: If the surface size
changes before the initial configure, we hide and
show the surface. Unfortunately, the code was doing
this in a way that is externally observable (by
listening for surface state changes), and popovers
were observing it and hiding themselves in response.

Avoid this by not going through the GDK frontend
code for this.
2019-06-12 21:50:16 -04:00
Matthias Clasen
c16f10abea popover menu: Add our own activate key bindings
This solves issues with parent widgets, like combobox
or entry, installing their own bindings for these
keys, overriding the activation behavior that
is implemented in gtkwindow.
2019-06-12 21:50:08 -04:00
Matthias Clasen
d0a38c677c popover: Bring back the activate-default signal
As long as key bindings only work via action
signals, we need a signal here in order to
override the Enter/Space bindings for popover
menus.
2019-06-12 21:49:59 -04:00
Matthias Clasen
a56f99355a popover menu: Add our own focus key bindings
This solves issues with parent widgets, like textview
or scrolled window or combobox installing their own
bindings for these keys, overriding the focus behavior
that is implemented in gtkwindow.
2019-06-12 21:49:52 -04:00
Matthias Clasen
5df592d33e color editor: Don't leak adjustments 2019-06-12 21:38:39 -04:00
Matthias Clasen
aa69ca4ef4 color editor: Fix numerical oddities
This is probably ue to a pass through gtk-builder-tool.
2019-06-12 21:38:28 -04:00
Matthias Clasen
28c40a4c3d Merge branch 'wip/dboles/scrolledwindow-annotations' into 'master'
ScrolledWindow: Replace deprecated annotations; add (nullable) to set_[hvadjustment]()

See merge request GNOME/gtk!868
2019-06-12 16:18:36 +00:00
Emmanuele Bassi
0269d670b5 Merge branch 'layout-avoid-native' into 'master'
layout managers: Handle native children

See merge request GNOME/gtk!926
2019-06-12 11:18:05 +00:00
Jakub Steiner
af7b3df659 Adwaita: update treeview progressbars
- The style resembles Clearlooks and is way outdated.

https://gitlab.gnome.org/GNOME/gtk/issues/1938
2019-06-12 12:40:41 +02:00
Matthias Clasen
f5ce5a0abd Merge branch 'wip/chergert/profiler-gtk4-dbus-api' into 'master'
gtkapplication: track changes to profiler D-Bus API

See merge request GNOME/gtk!919
2019-06-12 01:04:53 +00:00
Matthias Clasen
21a5c7f0eb layout managers: Handle native children
Add a convenience api to skip children
that should not be included in the layout,
and call gtk_native_check_resize on all
native children outside of the vfunc.
2019-06-11 14:52:30 -04:00
Matthias Clasen
f03c7c379a text: Fix selection bubble handling
Same fix as the previous commit.
2019-06-11 17:46:01 +00:00
Matthias Clasen
67c82e8bd9 text view: Fix selection bubble handling
We can't call gtk_widget_destroy on something
that wasn't added as a child to a container -
it ends up calling gtk_container_remove, which
asserts if it doesn't find the child.
2019-06-11 17:45:55 +00:00
Matthias Clasen
37090a7ab4 popover menu: Set autohide
This is the expected behavior for menus.
2019-06-11 17:38:22 +00:00
Matthias Clasen
714eadfdb5 Merge branch 'focusable-containers' into 'master'
Focusable containers

See merge request GNOME/gtk!929
2019-06-11 17:36:40 +00:00
Matthias Clasen
f63cec30a4 Add a focus-chain test for focusable containers 2019-06-11 17:15:02 +00:00
Matthias Clasen
ddee5cfc43 widget: Improve focus handling
Make gtk_widget_real_focus do the right
thing for focusable widgets with children.

A case where this is (now) relevant is
an entry with a context popover.
2019-06-11 17:14:49 +00:00
Matthias Clasen
1d93e38456 testsuite: Be robust against broken focus
When we start cycling on a subset, abort
after a while.
2019-06-11 17:14:42 +00:00
Matthias Clasen
cfebff5dcf testsuite: more focus-chain output
Differentiate between wrapping around and
stopping at the end of the focus chain.

Update the existing tests, and add two
new ones where the difference matters.
2019-06-11 14:56:38 +00:00
Matthias Clasen
d2cde1fb2d Merge branch 'focus-chain-test' into 'master'
Focus chain test

See merge request GNOME/gtk!927
2019-06-11 14:28:04 +00:00
Matthias Clasen
436d7cc0d1 Add a focus chain test
Add a test that enumerates the focus chain by
emitting move-focus repeatedly, and compares
the result to expected output.

The test expects a ui file and a reference
file as input. The reference file can be created
using the --generate option.
2019-06-11 10:14:23 -04:00
Matthias Clasen
31066a697b window: Fix focus wraparound
If tab focus falls off the end, and we have an empty headerbar,
we end up with window->focus == NULL. Don't let that happen
2019-06-11 10:14:14 -04:00
Daniel Mustieles
4c65868643 Updated Spanish translation 2019-06-11 12:56:08 +02:00
Yuras Shumovich
0e075a876f Update Belarusian translation 2019-06-10 17:19:08 +00:00
Matthias Clasen
f1b9e7c23b Rename a bunch of private headers
We want to follow the convention that all
private headers have names ending in private.h
2019-06-10 03:10:13 +00:00
Matthias Clasen
9182f0fe9d Adwaita: Make selection in menus visible 2019-06-10 02:27:56 +00:00
Benjamin Otte
ec5854bb9b Merge branch 'for-master' into 'master'
testsuite: Make creating the output dir not racy

Closes #1942

See merge request GNOME/gtk!924
2019-06-09 21:35:15 +00:00
Benjamin Otte
062244ab71 testsuite: Make creating the output dir not racy
Fixes #1942
2019-06-09 23:17:10 +02:00
Georges Basile Stavracas Neto
df8340e0cf Merge branch 'gbsneto/install-gtkpopovermenubar-h' into 'master'
Install gtkpopovermenubar.h

See merge request GNOME/gtk!923
2019-06-09 18:50:43 +00:00
Georges Basile Stavracas Neto
c82dcc8e3a
build: Install gtkpopovermenubar.h
It is not listed in 'gtk_public_headers', so it is not
installed, and breaks anyone including gtk.h
2019-06-09 15:40:55 -03:00
Matthias Clasen
2248980c6b Merge branch 'new-style-menu' into 'master'
New style menu

See merge request GNOME/gtk!916
2019-06-09 18:13:55 +00:00
Matthias Clasen
3c1163e7f4 popovermenubar: Add docs 2019-06-09 17:42:11 +00:00
Matthias Clasen
8e5985d05e Typo fix 2019-06-09 17:42:10 +00:00
Matthias Clasen
17ec958f30 Rename GtkPopoverBar to GtkPopoverMenuBar
Clarity over beauty.
2019-06-09 17:42:07 +00:00
Matthias Clasen
65f71cdbae popover bar: Add setters
Add setters/getters for the menu-model property.
2019-06-09 17:40:51 +00:00
Matthias Clasen
d936967b7a Adwaita: Adapt to popover bar changes
Add some initial styling for popover bars
and popover menus. This needs revision.
2019-06-09 17:40:08 +00:00
Matthias Clasen
d78b6451b3 popoverbar: Use a box layout
Its the cool way to do layout these days.
2019-06-09 17:40:00 +00:00
Matthias Clasen
bc4f744562 main: Warn if GDK sends us bad focus events
The new rule for focus events from the windowing
system is: We only want them for toplevels. If you
put focus on popups, we don't want to know about
it, and you still need to deliver key events to
the toplevel.
2019-06-09 17:38:54 +00:00
Matthias Clasen
6342287288 popover menu: Disappear on focus out
We try to keep focus inside by wrapping arrow keynav.
But focus can still escape. If it does, we want to
disappear, like any good menu should.
2019-06-09 17:38:54 +00:00