Commit Graph

36120 Commits

Author SHA1 Message Date
Benjamin Otte
c36cbd5140 sortlistmodel: Remove forgotten G_PARAM_CONSTRUCT_ONLY 2020-07-16 17:33:29 +02:00
Matthias Clasen
46eb51bc30 inspector: Avoid losing a reference
This was copying the example in the treelistrowsorter
docs that the previous commit fixed, so we apply
the same fix here.
2020-07-16 07:14:01 -04:00
Matthias Clasen
500dbaabc3 treelistrowsorter: Fix a faulty example
gtk_tree_list_row_sorter_new() consumes the
sorter, so we can't pass gtk_column_view_get_sorter(),
since that is transfer none.
2020-07-16 07:14:01 -04:00
Matthias Clasen
594ec3d822 inspector: Don't derive from GtkBox
We don't do that anymore. A bin layout
is sufficient here.
2020-07-16 07:14:01 -04:00
Matthias Clasen
f280508209 inspector: Drop a Private struct
These are really not needed in the inspector.
2020-07-16 07:14:01 -04:00
Matthias Clasen
480b88c776 inspector: Drop an unused field 2020-07-16 07:14:01 -04:00
Matthias Clasen
5666127dbc Merge branch 'matthiasc/for-master' into 'master'
inspector: Use substring matching in the property list

See merge request GNOME/gtk!2247
2020-07-15 16:52:05 +00:00
Matthias Clasen
c1c110ba65 inspector: Use substring matching in the property list
This is convenient for things like "set both hexpand and
vexpand", since you can then search for "expand"
2020-07-15 11:29:06 -04:00
Matthias Clasen
1c537a6d2e Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
Adwaita: sidebar color for file picker

See merge request GNOME/gtk!2242
2020-07-15 01:41:35 +00:00
Matthias Clasen
5af7d6bff3 Merge branch 'idle-inhibit' into 'master'
Add support for idle inhibition on Wayland

Closes #2202

See merge request GNOME/gtk!2226
2020-07-15 01:38:55 +00:00
Emmanuel Gil Peyrot
966ab1152d gtk/wayland: Add support for idle inhibition in GtkApplication
This feature was previously only supported on DBus compositors, such as
Mutter, this adds support for other compositors such as all of those
based on wlroots.

This implementation prefers the idle-inhibit Wayland protocol to the
DBus version if it is available, since the inhibitor is per-surface
instead of global it allows a finer control over which displays get
dimmed for instance.  For every case not supported by this protocol, a
fallback to the DBus version is used.

It can’t do anything if the GtkWindow isn’t passed, which might warrant
some documentation change to encourage users to not use NULL for this
argument.

This has been tested on Sway.

Fixes #2202.
2020-07-14 21:47:22 +02:00
Matthias Clasen
115d0cdc07 Fix shortcuts section reflow
When this code was ported from gtk_container_get_children
to the dom api, we inadvertendly inverted the order of the
list in one place. With the dom api, we can just avoid
reversing lists altogether, so do that.

Fixes: #2928
2020-07-14 14:48:32 -04:00
Jakub Steiner
be07153efa Adwaita: revert letter-spacing for large-title
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2932
2020-07-14 12:24:25 +02:00
Jakub Steiner
627ec82e60 Adwaita: sidebar color for file picker
- use menu like hovers and desaturated selected_bg_color

Partially addresses https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
2020-07-14 11:37:29 +02:00
Matthias Clasen
2b5dd0082d inspector: Show some information about expressions
This is not too useful, but better than nothing.
2020-07-13 20:49:56 -04:00
Matthias Clasen
7b36b339aa expression: Add some introspection
Add a few apis to peek inside expressions, mainly
for the benefit of GtkInspector and similar uses.
2020-07-13 20:19:07 -04:00
Matthias Clasen
1b28353be5 inspector: Ellipsize in the object tree
We don't want a long label to blow up the width
of the inspector window.
2020-07-13 17:32:52 -04:00
Matthias Clasen
a07c030d02 inspector: Fix up input enum names
We've recently added and removed a few values in these
enumerations. Keep the names in sync, so we don't show
nonsense.
2020-07-13 17:13:43 -04:00
Matthias Clasen
125ea5ee4a treeexpander: Be focusable
We need to be focusable so that we can take focus
if the child doesn't.
2020-07-13 15:06:35 -04:00
Matthias Clasen
3c5afc06d1 searchbar: Set a focus vfunc
We don't want to take focus ourselves here.
2020-07-13 15:06:08 -04:00
Matthias Clasen
f87c15f4f9 Merge branch 'wip/jimmac/file-dialog-sidebar-color' into 'master'
Adwaita: sidebar color for file picker

Closes #1586

See merge request GNOME/gtk!2238
2020-07-13 16:31:07 +00:00
Jakub Steiner
fe5c0e2fe3 Adwaita: sidebar color for file picker
- avoid using the selected blue for the sidebar

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1586
2020-07-13 17:03:55 +02:00
Matthias Clasen
c8421cfd82 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!2236
2020-07-13 14:38:03 +00:00
Carlos Garnacho
35d2539ef8 gtkwindowhandle: Only claim gesture on action
The press gesture does not need to set claimed state just for n-press
tracking, it will however reset all other click gestures on each press
if the event gets propagated all the way up.

Fixes tracking of multi-press in gestures in widgets that are children
of the window handle. E.g. the headerbar listview in the "File browser"
gtk4-demo demo.
2020-07-13 15:48:12 +02:00
Matthias Clasen
08a4f4552c Give the inspector a devel header too
Lets clearly communicate that we're unstable.
2020-07-13 08:28:02 -04:00
Matthias Clasen
f32239df1f searchbar: Add a key-capture-widget property
This is handy to set up this relationship in ui files,
and also makes it accessible in the inspector.
2020-07-12 16:25:48 -04:00
Matthias Clasen
f1188aaeac Fix gtk_file_chooser_error_stack_set_custom_error
This never worked, due to a typo.
2020-07-12 12:15:08 -04:00
Matthias Clasen
4dac5c222f Drop GtkFileChooserEmbed
This private interface is no longer used.
2020-07-12 12:15:08 -04:00
Matthias Clasen
0145809a94 filechooserdialog: Stop using ::response-requested
Replace the ::response-requested signal by an action.
2020-07-12 12:15:08 -04:00
Matthias Clasen
2e6b8810c0 filechooserdialog: Stop using the embed interface
Just call private GtkFileChooserWidget api. There
is no real justification for diverting this through
an extra interface.
2020-07-12 10:59:49 -04:00
Matthias Clasen
d8abcdb5a1 Remove unused includes
Only GtkFileChooserWidget and GtkFileChooserDialog
use the GtkFileChooserEmbed interface.
2020-07-12 10:59:31 -04:00
Matthias Clasen
65ecfa20dd filechooserwidget: Use dropdown api better
We now have GtkStringList, so we can implement
the choice api a little cleaner with it.
2020-07-12 10:58:33 -04:00
Matthias Clasen
aa5ab02166 filechooserwidget: Remove homegrown profiling
We have sysprof support now, so we no longer have
to use this homegrown profiler.
2020-07-12 10:58:33 -04:00
Matthias Clasen
8a8b96bf4b Drop GtkFileSystem
It is no longer used.
2020-07-12 09:49:31 -04:00
Matthias Clasen
bdcda2d8f0 filechooserwidget: Stop using GtkFileSystem
Just use gio directly.
2020-07-12 09:49:31 -04:00
Matthias Clasen
ef3f997d55 filechooser: Drop get_file_system from the interface
This is no longer used.
2020-07-12 09:49:31 -04:00
Matthias Clasen
b41d380230 filechooserbutton: Stop using GtkFileSystem
Just use gio directly.
2020-07-12 09:49:31 -04:00
Matthias Clasen
0210850e86 Reduce includes of gtkfilesystem.h
Move a few non-filesystem helpers to gtkfileutils.h,
and drop the include in all the places where it isn't needed.
2020-07-12 09:12:43 -04:00
Matthias Clasen
053223bf65 pathbar: Stop using GtkFileSystem
This is just a thin wrapper around some gio functionality
these days, and we want to get rid of it.
2020-07-12 09:12:43 -04:00
Matthias Clasen
f1ad883e00 pathbar: Drop the Private struct 2020-07-11 17:23:55 -04:00
Matthias Clasen
55217e2181 Fix the build with clang
clang doesn't allow G_GNUC_FALLBACK in dead code.
Seems silly, but what can we do.
2020-07-10 13:21:23 -04:00
Benjamin Otte
4cd92f979c Merge branch 'wip/otte/for-master' into 'master'
Wip/otte/for master

See merge request GNOME/gtk!2221
2020-07-09 21:34:02 +00:00
Benjamin Otte
d1a068e5b1 sorter: Remove a return_if_fail()
It's too expsensive.
2020-07-09 22:29:36 +02:00
Benjamin Otte
986f721938 filterlistmodel: Don't filter out every 513th element
Incremental filtering would skip every 513th element due to an
off-by-one error.

Test included
2020-07-09 22:29:36 +02:00
Carlos Garnacho
e1a0171094 gtkrange: group gestures the right way around
The gtk_gesture_group() call is not a commutative operation, it
takes two gestures, maybe detaches the first one from its current
group, and adds it to the same group than the second gesture.

With the flipped argument order here, GtkRange was actually detaching
the same gesture in order to group it with a second one two times, so
the desired effect to group all 3 gestures was not achieved.

Fixes autoscroll as the drag gesture is now actually grouped with the
click one, so drag offsets can be accessed from the autoscroll
timeout.
2020-07-09 20:49:25 +02:00
Matthias Clasen
8c95a84ea4 Merge branch 'matthiasc/for-master' into 'master'
css: Plug a memory leak

Closes #2921

See merge request GNOME/gtk!2219
2020-07-09 17:19:57 +00:00
Matthias Clasen
75db19c789 css: Plug a memory leak
When a rule has no styles, we don't add it
to our ruleset. Since we are not adopting
the selectors in this case, we must free them.

Fixes: #2921
2020-07-09 12:14:18 -04:00
Matthias Clasen
f00d2b30bb Merge branch 'wip/carlosg/scrollbar-fixes' into 'master'
Scrollbar fixes

Closes #2879

See merge request GNOME/gtk!2216
2020-07-09 15:56:13 +00:00
Matthias Clasen
be12131d74 Merge branch 'file-chooser-api-cleanup-2' into 'master'
File chooser api cleanup 2

See merge request GNOME/gtk!2213
2020-07-09 14:31:14 +00:00
Carlos Garnacho
896ebdc9d7 gtkscrolledwindow: Look up correctly target in captured motion events
Check correctly that the captured motion events are emitted towards the
content or one of the scrollbars, in order to have it set the expected
"over" state depending on whether the drag begins from the scrolledwindow
content or one of the scrollbars.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/2879
2020-07-09 16:10:55 +02:00