Matthias Clasen
65052a5d6c
Rename gtk_window_set_default
...
Call it gtk_window_set_default_widget, to match
the getter, and the property name. Update all
callers.
2019-04-28 23:20:13 +00:00
Matthias Clasen
1364eb2f62
window: Add a default-widget property
...
This is a part of redoing default widget handling.
2019-04-28 23:20:13 +00:00
Matthias Clasen
aa8ada3fed
widget: Add a convenience api to activate actions
...
Since actions are used increasingly, we should
have a convenient way to trigger an action in
the context of a widget.
2019-04-28 23:19:05 +00:00
Matthias Clasen
3643a9fe86
Merge branch 'focus-cleanup' into 'master'
...
Focus cleanup
See merge request GNOME/gtk!788
2019-04-28 23:17:46 +00:00
Matthias Clasen
25f4bb2e17
Avoid critical warnings
...
These critical warnings break the tests, otherwise.
2019-04-28 22:55:43 +00:00
Matthias Clasen
3b62d9c027
Drop gtk_window_activate_focus
...
This api wasn't used anywhere in GTK. And since
we've dropped the variant for the default widget,
this one should go too. If it is needed, it should
become and action too.
2019-04-28 22:21:09 +00:00
Matthias Clasen
c92938b378
widget: Remove special handling of has-focus
...
We used to handle has-focus in ui files specially.
It was awkward, so stop doing that. If you need
to influence the initial focus of a window, you
can just set the focus-widget property.
2019-04-28 22:21:03 +00:00
Matthias Clasen
c98313016e
window: Fix up the buildable implementation
...
We were assuming that the parent class has a custom
set_property, which may not be the case. Be more
careful.
2019-04-28 22:20:55 +00:00
Matthias Clasen
e43839114d
Merge branch 'inspector-prop-sort' into 'master'
...
inspector: Make property list sortable again
See merge request GNOME/gtk!787
2019-04-28 22:03:31 +00:00
Matthias Clasen
b6c1786165
inspector: Make property list sortable again
...
We lost this when moving from a treeview to
a listbox. Bring it back, with homegrown list
headers.
2019-04-28 21:56:10 +00:00
Matthias Clasen
3a40555202
Merge branch 'file-chooser-location-escape' into 'master'
...
file chooser: Stay focused
Closes #1851
See merge request GNOME/gtk!785
2019-04-28 16:16:31 +00:00
Matthias Clasen
ff604e1906
file chooser: Stay focused
...
When hitting Escape in the location entry,
we were not moving the focus anywhere,
causing focus to be NULL, and key bindings
to stop working. The visible effect was
that Ctrl-L / Escape / Ctrl-L would not
get back to the location entry, as expected.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1851
2019-04-28 16:08:21 +00:00
Matthias Clasen
34974a8a66
Merge branch 'wip/baedert/filechooser2' into 'master'
...
Assorted filechooser improvements
See merge request GNOME/gtk!783
2019-04-28 15:33:07 +00:00
Matthias Clasen
7c15daf99e
Merge branch 'file-chooser-escape' into 'master'
...
file chooser: Prevent accidental search
Closes #1850
See merge request GNOME/gtk!784
2019-04-28 15:27:51 +00:00
Matthias Clasen
b9467a4dc7
file chooser: Prevent accidental search
...
When hitting Escape, the file chooser will go
into search mode, because the search entry
consumes the key to emit the ::search-stopped
signal. Recognize this situation and avoid
switching to search mode in this case.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1850
2019-04-28 15:20:07 +00:00
Timm Bäder
5a1c37a8c8
filechooserwidget: Use a center box for the search entry
...
This way we can avoid a slight position offset when we show or hide the
spinner during a search.
2019-04-28 11:30:13 +02:00
Timm Bäder
b75bc8aa64
filechooserwidget: Allow keynav from the treeview to the search entry
2019-04-28 11:27:42 +02:00
Timm Bäder
ed4c08d9b3
window: Check whether the new focus widget is the old one
...
We generally do that for all properties.
2019-04-28 11:27:21 +02:00
Timm Bäder
929cdd9259
treeview: Don't always grab_focus() when moving the cursor
...
This doesn't really make sense, we can assume that the treeview already
has the focus when it receives key events.
2019-04-28 11:26:40 +02:00
Timm Bäder
78049f452a
filechooserwidget: Remove unneeded function prototype
2019-04-28 11:08:09 +02:00
Timm Bäder
cf2ef4863b
filechooserwidget: Don't focus treeview when searching
...
It's just weird that the search entry does not have focus while we type.
2019-04-28 11:07:14 +02:00
Timm Bäder
2bd348558e
filechooserwidget: Remove some GdkEvent usage
2019-04-28 11:05:37 +02:00
Timm Bäder
0f6d83bb5f
filechooserbutton: Remove some dead code
2019-04-28 11:02:59 +02:00
Timm Bäder
7e20232607
colorbutton: Remove unneeded snapshot implementation
2019-04-28 10:55:10 +02:00
Timm Bäder
dcc55e3a73
Adwaita: Bring filechooserbutton spacing back
...
Add some space between the icons and the text, like there was in gtk3.
2019-04-28 10:40:54 +02:00
Timm Bäder
59fd48cee0
entry: Fix primary icon allocation in RTL entries
...
The primary icon is on the right in RTL, so don't offset the text child
to the right for it.
Fixes the text and icon overlapping in the second entry
in tests/testentryicons
2019-04-28 08:36:36 +02:00
Timm Bäder
c848b9014b
gl renderer: Add simple blend node implementation
2019-04-28 07:58:31 +02:00
Timm Bäder
1e16cb088a
treeview: Always update expand when allocating columns
...
It doesn't make sense to keep track of all the last_* values anymore now
that widgets only get allocated when their size changes anyway.
Remove all the associated (and thus now unused) flags as well.
2019-04-28 06:54:10 +02:00
Timm Bäder
f4cf43359d
treeview: Remove a useless check
2019-04-28 06:50:57 +02:00
Timm Bäder
6c8a5f5e2f
treeview: Remove unused member
2019-04-28 06:45:33 +02:00
Matthias Clasen
da64d687d1
Merge branch 'popover-demos' into 'master'
...
Popover demos
See merge request GNOME/gtk!782
2019-04-27 18:09:57 +00:00
Matthias Clasen
aab803b7ae
widget-factory: Make a resizing popover
...
Add an expander to a popover to test how
changing sizes works with popovers.
2019-04-27 18:00:22 +00:00
Matthias Clasen
936aba884a
Merge branch 'file-chooser-search' into 'master'
...
file chooser: Fix Ctrl-L
Closes #1829
See merge request GNOME/gtk!781
2019-04-27 17:52:02 +00:00
Matthias Clasen
e1200230c4
widget-factory: Add some nested popovers
...
These are mainly for stress-testing our
popover implementations.
2019-04-27 17:50:22 +00:00
Matthias Clasen
d3ad816d63
widget-factory: Add non-modal popovers
...
This makes is easy to test moving the toplevel
or repositioning the parent while the popover
is shown.
2019-04-27 17:50:14 +00:00
Matthias Clasen
eea1388cf4
file chooser: Fix Ctrl-L
...
We were forwarding key events to the search entry
and unconditionally considered search started
afterwards. That is not correct, since things
like a Ctrl key press should not trigger search.
Fix this by only switching to search mode when
the event was actually consumed.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1829
2019-04-27 17:43:59 +00:00
Matthias Clasen
f3747d1776
Merge branch 'font-chooser-search' into 'master'
...
fontchooser: Fix type-to-search
Closes #1842
See merge request GNOME/gtk!780
2019-04-27 16:08:53 +00:00
Matthias Clasen
6277f2fccc
fontchooser: Fix type-to-search
...
The key capture was interfering with other
entries in the dialog, so be smarter about
when we want to capture keys and when we
don't.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1842
2019-04-27 15:59:45 +00:00
Timm Bäder
cc4b3798e5
searchentry: Always measure and allocate icon
...
Just measuring it (so the warning goes away) but then not using the
values will later underallocate the text widget.
Instead, always reserve space for the icon (which will inevitable be
visible as soon as the searchentry is actually being used).
Fixes #1831
2019-04-27 08:40:33 +02:00
Timm Bäder
8634a51aa5
Adwaita: separate '.view text' from textview>text
...
The first rule breaks GtkText inside GtkSearchEntry inside something
that has .view applied, as found in the file chooser when searching.
2019-04-27 08:40:33 +02:00
Benjamin Otte
7420f9c34a
testsuite: Rewrite text diff to use GSubprocess
...
... instead of g_spawn(). Avoids having to create a temp file, too.
2019-04-27 06:20:30 +02:00
Timm Bäder
1a7c280ebb
gl renderer: bind the texture framebuffer before rendering
...
When rendering to a texture, collecting the render ops might bind a
different framebuffer, so bind the one we want again before doing the
actual rendering.
2019-04-26 18:05:32 +02:00
Timm Bäder
4bb6e70d01
tooltip: Initialize tooltip coords to given event coords
...
Otherwise the coordinates passed to the query-tooltip signal are always
0.
2019-04-26 18:05:32 +02:00
Matthias Clasen
2bd9b42479
Merge branch 'wip/surface-transform-data' into 'master'
...
Surface transform listener fixes
See merge request GNOME/gtk!776
2019-04-25 16:42:42 +00:00
Chun-wei Fan
b8127670df
Merge branch 'fix-gdkwin32-move-drag' into 'master'
...
gdksurface-win32.c: Acquire root coordinates on drag/move
See merge request GNOME/gtk!693
2019-04-25 15:44:59 +00:00
Jonas Ådahl
3a1ef7aa2c
widget: Move surface relative transform fields into its own struct
...
The purpose being to reduce the size of GtkWidgetPrivate. What is left
is a pointer to the allocated struct.
2019-04-25 16:02:19 +02:00
Daniel Mustieles
8dd26b6b8a
Updated Spanish translation
2019-04-25 15:58:58 +02:00
Matthias Clasen
0526775ff4
Merge branch 'wip/alexl/gl-debug' into 'master'
...
Add GL debugging integration
See merge request GNOME/gtk!771
2019-04-25 13:16:09 +00:00
Jonas Ådahl
1ad406e15d
widget: Remove leftover parent-changed handler removal
...
It was never added, as the listener was replaced by explicit code in
gtk_widget_(un)root(), but the removal code was left in place in error.
2019-04-25 14:29:19 +02:00
Alexander Larsson
249f6a85b3
gdkglcontext: Only emit opengl debug calls if GDK_DEBUG=gl-debug
...
This avoids a potential performance cost in the non-debug case.
2019-04-25 11:36:23 +02:00