Matthias Clasen
96d42cf1cc
actionmuxer: Stop implementing GActionGroup
...
Instead of implementing the GActionGroup interface
and using its signals for propagating changes up
and down the muxer hierarchy, use the GtkActionObserver
mechanism. This cuts down on the signal emission
overhead.
2020-07-20 08:24:53 -04:00
Matthias Clasen
4786a16696
actionmuxer: Port internal users
...
Port all internal users of the action muxer
from the GActionGroup interface to the new
action muxer apis.
2020-07-20 08:24:52 -04:00
Matthias Clasen
14bb12125f
actionmuxer: Add some more api
...
We want to drop the GActionGroup interface from
GtkActionMuxer, so add the necessary api directly
to GtkActionMuxer itself.
2020-07-20 08:24:14 -04:00
Matthias Clasen
07e8dafcea
inspector: Remove action support temporarily
...
This is using the action muxer as a GActionGroup,
and we want to remove that interface from GtkActionMuxer.
The support will come back later.
2020-07-20 08:24:14 -04:00
Matthias Clasen
ab67a81f11
Speed up action muxer setup more
...
Don't emit signals for group insertion/removal
if nobody is listening.
2020-07-20 08:24:14 -04:00
Matthias Clasen
aa76f7e210
Speed up action muxer setup
...
We don't need to duplicate all these action names and
emit all these signals if nobody is listening.
2020-07-20 08:24:14 -04:00
Matthias Clasen
95fc81c565
inspector: Add a few more debug flags
...
Add check buttons for GTK_DEBUG=constraints and
GTK_DEBUG=layout in the logs page.
2020-07-20 07:03:08 -04:00
Matthias Clasen
378e594f75
Tweak the GTK_DEBUG=help output
...
I got the layout flag wrong when I added the
improved help output. It is about layout managers,
not about showing layout borders.
2020-07-20 07:03:08 -04:00
Matthias Clasen
86c7fceb09
Merge branch 'list-model-docs' into 'master'
...
List model docs
See merge request GNOME/gtk!2182
2020-07-19 23:50:09 +00:00
Matthias Clasen
75a30b1f98
windowhandle: Don't use an action muxer needlessly
...
The api that is meant to be used here is
gtk_widget_activate_action.
2020-07-19 13:50:23 -04:00
Matthias Clasen
9b64635925
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2264
2020-07-18 17:31:31 +00:00
Matthias Clasen
7b76be5360
button: Add explicit key bindings for activation
...
We should not rely on GtkWindow to have global
"activate-default" key bindings that happen to
fall back to activating the focus widget. This is
unreliable, since the bubbling up from the button
to the toplevel may run across other widgets that
may want to use Enter for their own purpose, and
then the button loses out. By adding our own
key bindings, the button gets to handle it before
its ancestors.
This fixes check buttons in the inspector property
list not reacting to Enter despite having focus.
2020-07-18 12:53:10 -04:00
Matthias Clasen
2e2336ffce
text: Claim clicks when grabbing focus
...
If we don't, an ancestor (such a GtkListItemWidget)
may interpret the click as "I should grab focus!",
and still our focus away. This was causing hard-to-focus
entries in the property list in the inspector.
2020-07-18 12:47:47 -04:00
Matthias Clasen
76d80ef516
inspector: Add focus handling to the property editor
...
We want to focus the actual control here.
2020-07-18 11:55:19 -04:00
Matthias Clasen
287d80bd36
editablelabel: Stop editing on focus-out
...
This is the expected behavior for the main use case,
treeview-like 'edit one cell at a time'.
2020-07-18 10:45:27 -04:00
Matthias Clasen
77072b3eaa
fixup editing style class
2020-07-18 10:10:28 -04:00
Matthias Clasen
c7833bb090
editablelabel: Document css nodes
...
Just the usual.
2020-07-18 09:55:46 -04:00
Matthias Clasen
899024cef7
editablelabel: Add a style class while editing
...
Add the .editing style class to the editable label
while it is editing. The idea is that themes can
show a frame around the entry.
2020-07-18 09:54:55 -04:00
Rico Tzschichholz
6b59626817
gtk: Improve g-i annotations for methods of GtkExpression subclasses
2020-07-18 12:30:05 +02:00
Matthias Clasen
7c02ae00c2
inspector: Clean up GtkInspectorGeneral
...
Drop the Private struct.
2020-07-18 00:31:04 -04:00
Matthias Clasen
80e29a3627
inspector: Clean up GtkInspectorMiscInfo
...
Drop the Private struct.
2020-07-18 00:25:46 -04:00
Matthias Clasen
26163a4f30
inspector: Clean up GtkInspectorVisual
...
Drop the Private struct, and do all cleanup in dispose.
2020-07-18 00:17:42 -04:00
Matthias Clasen
dbd88fc210
inspector: Clean up GtkInspectorActions
...
Drop the Private struct, dispose properly,
and don't derive from GtkBox.
2020-07-17 23:59:49 -04:00
Matthias Clasen
2de31e4cac
inspector: Clean up GtkInspectorActionEditor
...
Drop the Private struct, dispose properly,
and don't derive from GtkBox.
2020-07-17 23:36:05 -04:00
Matthias Clasen
1bff328895
inspector: Clean up GtkInspectorLogs
...
Drop the Private struct, dispose properly,
and don't derive from GtkBox.
2020-07-17 23:24:14 -04:00
Matthias Clasen
facf78a5b6
inspector: Allow disposing the inspector
...
We were hiding the inspector when the window
is closed, but that has the side-effect of
keeping references to application windows,
so we would keep them artificially alive,
which can have side-effects.
So, make the inspector go away when closed.
2020-07-17 23:15:42 -04:00
Matthias Clasen
6b19fcd859
inspector: Properly dispose GtkInspectorWindow
2020-07-17 23:15:25 -04:00
Matthias Clasen
ca784e3e1a
inspector: Properly dispose GtkInspectorShortcuts
2020-07-17 23:13:29 -04:00
Matthias Clasen
314c8558d7
inspector: Properly dispose GtkInspectorListData
2020-07-17 23:13:07 -04:00
Matthias Clasen
af30a7fe06
inspector: Dispose tree data properly
...
Another place where we were leaking children.
2020-07-17 22:54:19 -04:00
Matthias Clasen
9ffd7d1970
inspector: Dispose the recorder properly
...
We were leaking children here.
2020-07-17 22:54:10 -04:00
Matthias Clasen
cb906c80eb
inspector: Drop the recorder Private struct
2020-07-17 22:37:24 -04:00
Emmanuele Bassi
671435e07f
Fix typo in the GtkStrinFilter constructor declaration
2020-07-17 14:16:46 +01:00
Emmanuele Bassi
0385f1aaf4
Fix typo in the gtk-doc stanza for gtk_string_filter_new()
2020-07-17 12:03:17 +01:00
Timm Bäder
c1f5153f6d
boxlayout: Remove unnecessary checks
...
The pointers passed to GtkLayoutManager::measure() are never NULL. The
ones passed to gtk_layout_manager_measure() can be, however.
2020-07-17 06:31:57 +02:00
Timm Bäder
2bd87ce771
boxlayout: Remove unused include
2020-07-17 06:27:50 +02:00
Timm Bäder
14589c2a59
widget: Save a gtk_css_node_get_style call
2020-07-17 05:49:12 +02:00
Timm Bäder
f678b3804d
widget: Remove useless if statement
...
filter_value is never NULL anyway.
2020-07-17 05:49:12 +02:00
Timm Bäder
720c298786
snapshot: Use collect_default directoy in push_debug()
...
Instead of going through collect_debug and then doing a collect_default
anyway if the message is NULL.
2020-07-17 05:49:12 +02:00
Timm Bäder
f721d2de15
debug: Remove resize highlighting
...
This has been broken ever since the debug highlighting moved to
inspector overlays.
2020-07-17 05:49:12 +02:00
Timm Bäder
4e4207457f
adwaita: Remove header bar border radius
...
We get this from the window node these days.
2020-07-17 05:49:11 +02:00
Timm Bäder
46bb3e3046
icontheme: Indentation
2020-07-17 05:49:11 +02:00
Matthias Clasen
9742200ff6
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2257
2020-07-17 03:20:20 +00:00
Matthias Clasen
353d4d161c
Cosmetic docs change
2020-07-16 22:08:15 -04:00
Matthias Clasen
bcd650f169
docs: Revise the filter docs a bit
2020-07-16 21:48:08 -04:00
Matthias Clasen
72d66dfcdd
docs: Revise sorter docs a bit
2020-07-16 21:45:11 -04:00
Matthias Clasen
5e97df5058
bitset: try again
2020-07-16 21:44:31 -04:00
Matthias Clasen
b9e8935037
docs: Document GtkBitsetIter
2020-07-16 20:28:21 -04:00
Matthias Clasen
5f33f4ae8e
docs: Add an example
...
Add a small example for setting up columnview sorting.
2020-07-16 20:21:21 -04:00
Matthias Clasen
adf0e8b1e6
docs: Fix examples
...
The formatting for examples in the GtkExpression
long description was messed up.
2020-07-16 20:21:21 -04:00
Christian Hergert
7500f9b255
treeview: allow subclassing GtkTreeView
...
Porting code from GTK 3 without the ability to subclass GtkTreeView
directly can cause an extreme amount of pain on application developers.
It can also complicate performance when it comes to dealing with
encapsulation as the outer widget would also encapsulate the GtkScrollable
implementation from GtkTreeView, typically through GtkViewport.
Fixes #2936
2020-07-16 17:06:15 -07:00
Matthias Clasen
31a7cac4a6
Merge branch 'matthiasc/arrays' into 'master'
...
Matthiasc/arrays
See merge request GNOME/gtk!2253
2020-07-16 23:31:31 +00:00
Matthias Clasen
5eec736b07
multifilter: Use GdkArray for the filters
2020-07-16 18:44:25 -04:00
Matthias Clasen
cf4a8e2152
multisorter: Use GdkArray for the sorters
2020-07-16 18:44:25 -04:00
Benjamin Otte
495069c868
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
See merge request GNOME/gtk!2251
2020-07-16 19:43:45 +00:00
Matthias Clasen
dfe470475b
Merge branch 'missing-exports' into 'master'
...
Add missing exports for GtkColumnView methods.
See merge request GNOME/gtk!2252
2020-07-16 18:52:22 +00:00
Benjamin Otte
de56e892aa
listitemmanager: Do a better job on double items
...
Previously, we would unparent the existing item that we were about
to reuse, and not the duplicate one.
Change that.
2020-07-16 20:43:16 +02:00
Benjamin Otte
e518c1f2f3
stringfilter: Make the constructor take an expression
...
An expression is critically important for a string filter and people
should be made aware of it when constructing the filter.
2020-07-16 20:43:16 +02:00
Matthias Clasen
6b89148487
Merge branch 'wip/otte/vector' into 'master'
...
Arrays
See merge request GNOME/gtk!2197
2020-07-16 18:05:43 +00:00
Andreas Persson
b7fa353db2
Add missing exports for GtkColumnView methods.
...
GDK_AVAILABLE_IN_ALL was missing for one method in GtkColumnView and one
in GtkColumnViewColumn.
2020-07-16 18:58:41 +02:00
Benjamin Otte
60a09e59e8
stringlist: Convert to array
...
Stringlists are usually built and then never modified, and accessing
items through an array is faster.
2020-07-16 18:09:58 +02:00
Benjamin Otte
6f8e9bf3a9
snapshot: Use GdkArray for the state stack
2020-07-16 18:09:58 +02:00
Benjamin Otte
088b5fc57f
icontheme: Use GdkArray
2020-07-16 18:09:58 +02:00
Benjamin Otte
65359dcc59
snapshot: Port node list to GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
ac8b398c50
snapshot: Move structs into .c file
...
They aren't used anywhere else.
2020-07-16 18:09:57 +02:00
Benjamin Otte
aac2417893
Remove preallocated array code
...
Now with GdkArray, we can use that one instead.
2020-07-16 18:09:57 +02:00
Benjamin Otte
ad8892df10
main: Use a GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
edc7977c4e
cssselector: Use GdkArray
2020-07-16 18:09:57 +02:00
Benjamin Otte
c36cbd5140
sortlistmodel: Remove forgotten G_PARAM_CONSTRUCT_ONLY
2020-07-16 17:33:29 +02:00
Matthias Clasen
edb792503b
printunixdialog: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
3a43859286
Cosmetics
2020-07-16 08:54:36 -04:00
Matthias Clasen
c55dd104d4
placessidebar: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
497d137fb8
filechoosernativewin32: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
df01c5c7a4
columnlistitemfactory: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
2d1135fba6
applicationaccels: Plug a leak
...
g_list_model_get_item is transfer full.
2020-07-16 08:54:36 -04:00
Matthias Clasen
f54ed6f7dc
columviewsorter: Add an assertion
2020-07-16 08:54:36 -04: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
Matthias Clasen
3e16ef33b0
Merge branch 'fix-levelbar-layout' into 'master'
...
levelbar: Chainup to parent buildable when handling custom tags
See merge request GNOME/gtk!2200
2020-07-09 11:42:33 +00:00
Matthias Clasen
2746a2d929
filechooser: Drop the ::selection-changed signal
...
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 02:06:31 -04:00
Matthias Clasen
e31bacf7be
filechooser: Drop the ::current-folder-changed signal
...
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 01:48:33 -04:00
Matthias Clasen
911ae64931
filechoosernative: Update docs
...
Remove mention of things that are no longer
in the filechooser api.
2020-07-09 01:44:09 -04:00
Matthias Clasen
99a0b35705
filechooser: Drop the ::file-activated signal
...
This signal does not work on native file choosers,
and it exposes internals of the widget that should
not be public. And it is just not very interesting.
2020-07-09 01:40:08 -04:00
Matthias Clasen
89bf8af878
filechooser: Make get_files return a list model
...
Like the other list getters in this interface,
make gtk_file_chooser_get_files() return a
list model.
2020-07-09 01:29:20 -04:00
Matthias Clasen
f3744c991a
Cosmetics
2020-07-09 01:02:21 -04:00
Matthias Clasen
dcee15c0f1
filechooser: Drop gtk_file_chooser_[un]select_file
...
Most use cases for these apis can be handled with
gtk_file_chooser_set_file and/or
gtk_file_chooser_set_current_folder.
2020-07-09 00:50:03 -04:00
Matthias Clasen
2321e9de05
filechooser: Drop gtk_file_chooser_[un]_select_all
...
For now, we just remove them as public api, they are
still used internally.
2020-07-09 00:50:03 -04:00
Casey Jao
cc8bb5fc54
Remember to call print_cb even if print operation is cancelled.
...
Closes #2917 .
2020-07-08 23:32:43 -04:00
Matthias Clasen
26a23d3e56
shortcuttrigger: Fix some leaks in error paths
...
Found while running the testsuite under asan.
2020-07-08 17:44:42 -04:00
Matthias Clasen
766f4bc8fe
css: Fix some memory leaks in error paths
...
Found while running the testsuite under asan.
2020-07-08 17:44:36 -04:00
Matthias Clasen
3d008d5929
picture: Don't leak alternative-test
...
This leak showed up while running the testsuite
under asan.
2020-07-08 17:44:29 -04:00
Matthias Clasen
0546e26434
bookmarklist: Don't leak uris
...
This leak showed up in multiple places while
running the testsuite under asan.
2020-07-08 17:44:23 -04:00
Matthias Clasen
e376d638fb
directorylist: Fix file monitoring implementation
...
The while loops were never advancing the iterator.
Oops.
2020-07-08 15:08:53 -04:00
Matthias Clasen
463f3d3a52
directorylist: Add monitoring
...
Add a GtkDirectoryList:monitored property, and
keep a file monitor if it is set to TRUE. To ensure
that the list reflects reality, we reload the directory
when monitoring is turned on after the fact. This means
that turning monitoring is expensive, while turning it
off is cheap, so we default to monitoring being on.
2020-07-07 21:21:41 -04:00
Matthias Clasen
86f800e11d
Merge branch 'inspector-navigation' into 'master'
...
Inspector navigation
See merge request GNOME/gtk!2201
2020-07-07 17:04:51 +00:00
Matthias Clasen
4d371b2b16
inspector: Fix property list styling
...
We use dropdowns here now, so style them.
Also, avoid the swoosh when switching to the
property list, when everything shrinks.
2020-07-07 11:21:42 -04:00
Emmanuele Bassi
18c87faaa5
Annotate string array
...
Fixes : #2915
2020-07-07 12:06:28 +01:00
Emmanuele Bassi
fdeda388bf
Fix "not nullable" annotation
2020-07-07 12:03:44 +01:00
Stefano Facchini
ea2c27c640
levelbar: Chainup to parent buildable when handling custom tags
...
This is necessary to handle <layout> tags.
2020-07-07 09:34:00 +02:00
Matthias Clasen
dfc04a590d
inspector: Reshuffle the sidebar
...
Move the sidebar in the object page below the
object header, for a more logical hierarchy.
2020-07-07 02:05:18 -04:00
Matthias Clasen
fe5b364675
inspector: Drop unused properties
...
The individual pages no longer need the object tree
to show object details, this works with the window
now.
2020-07-07 01:25:21 -04:00
Matthias Clasen
0b38a0663d
inspector: Add dom-like navigation controls
...
Maintain a stack of objects, and add ˂˅˄˃ buttons
that navigate this stack, as well as the widget
tree and list models.
2020-07-07 00:51:18 -04:00
Matthias Clasen
e5c0716293
inspector: Remove an unused field
2020-07-07 00:48:43 -04:00
Matthias Clasen
54a3293cad
stack: Fix handling of GtkStackPage:visible
...
The stack wasn't updating its visible-child when
the stack pages visible property changes. This
showed up in the inspector, when showing the details
for a list model item.
2020-07-07 00:48:43 -04:00
Yuri Chornoivan
59119cd898
Fix typo: Filer -> Filter
2020-07-07 04:41:44 +00:00
Matthias Clasen
729ba44297
Merge branch 'wip/otte/filterlistmodel' into 'master'
...
Improve GtkFilterListModel
See merge request GNOME/gtk!2199
2020-07-06 15:42:44 +00:00
Matthias Clasen
e7b773b031
filechooser: Add a readonly :shortcut-folders property
...
This makes the shortcut folders list accessible in the
the inspector.
2020-07-06 11:03:48 -04:00
Matthias Clasen
57a225681c
filechooser: Add gtk_file_chooser_get_shortcuts
...
Replace gtk_file_chooser_list_shortcuts with a new
api that returns a list model.
Update all callers.
2020-07-06 11:03:48 -04:00
Matthias Clasen
ea07a92366
filechooser: Add a readonly :filters property
...
This makes the filters list accessible in the
the inspector.
2020-07-06 11:03:48 -04:00
Matthias Clasen
76290e8ddb
filechooser: Add gtk_file_chooser_get_filters
...
Replace gtk_file_chooser_list_filters with a new
api that returns a list model.
Update all callers.
2020-07-06 10:36:35 -04:00
Benjamin Otte
3162e25671
bitset: Fix typo: gtk_bitset_slice() => gtk_bitset_splice()
2020-07-06 03:42:43 +02:00
Benjamin Otte
3d931b4fe2
bitset: Don't overflow when splicing
...
Testcase added.
2020-07-06 03:42:43 +02:00
Benjamin Otte
66fa9380b5
filterlistmodel: Look at type of change
...
This way we can avoid refiltering most of an already filtered list when
the change becomes more strict.
2020-07-06 03:42:43 +02:00
Benjamin Otte
9b2d8ac362
filterlistmodel: Add gtk_filter_list_model_get_pending()
...
This allows tracking if the model is busy filtering.
2020-07-06 03:42:43 +02:00
Benjamin Otte
2a90bc1a9b
filterlistmodel: Add incremental filtering
2020-07-06 03:42:43 +02:00
Benjamin Otte
d4b868d9bc
filterlistmodel: Rewrite with bitset data structure
...
Bitsets are more powerful, less memory intensive and faster than the old
GtkRbTree version.
2020-07-06 03:42:43 +02:00
Matthias Clasen
1a613de2f6
filefilter: Cosmetics
2020-07-05 19:54:20 -04:00
Matthias Clasen
665df37703
filefilter: Header file cosmetics
2020-07-05 19:36:45 -04:00
Matthias Clasen
acad5e4e3d
filefilter: Fix an embarrassing oversight
...
I forgot to remove some dead code, and left the
pixbuf_formats list in the rule union. Oops.
2020-07-05 19:32:36 -04:00
Matthias Clasen
5a2f791bdd
filefilter: Cleanups and optimizations
...
Make mime-type rules hold multiple types. Store the
content types, so we don't have to do mime-type -> content-type
conversion in the match function. Store content types for the
pixbuf-formats rule as well, so we can avoid memory allocation
in the match function altogether.
2020-07-05 15:12:07 -04:00
Matthias Clasen
286a00a1db
docs: Cleanups for the file filter docs
...
Now that GtkFileFilter is a GtkFilter, move it to the
filter section of the docs. While we are at it, touch
up the docs in some places.
2020-07-05 15:10:18 -04:00
Matthias Clasen
11dd602b28
Drop gtk_file_filter_filter
...
It has been superseded by gtk_filter_match.
2020-07-05 15:10:18 -04:00
Matthias Clasen
35988d659d
Stop using gtk_file_filter_filter
...
Make all users of GtkFileFilter use it via the
GtkFilter api. This is in preparation for dropping
gtk_filter_filter_filter.
2020-07-05 15:10:18 -04:00
Matthias Clasen
be3449b3ce
filefilter: Convert to a GtkFilter
...
Make GtkFileFilter implement GtkFilter.
2020-07-05 15:10:18 -04:00
Matthias Clasen
2d8fddc1e9
filefilter: Drop GtkFileFilterFlags
...
Replace gtk_file_filter_get_needed by gtk_file_filter_get_attributes,
which directly returns the attributes that are needed.
Update all callers.
2020-07-05 15:10:13 -04:00
Matthias Clasen
644d522d19
filefilter: Drop custom filters
...
These don't work with native file choosers.
2020-07-05 14:34:33 -04:00
Matthias Clasen
a8b0125da1
filefilter: Drop GtkFileFilterInfo
...
We can just make the filter operate on GFileInfo.
This is in preparation for making GtkFileFilter a
GtkFilter.
Update all users.
2020-07-05 13:55:42 -04:00
Matthias Clasen
acccac516e
filefiler: No more floating
...
Make GtkFileFilter not be initially unowned anymore.
This is in preparation for deriving GtkFileFilter
from GtkFilter. Update all callers.
2020-07-05 12:36:47 -04:00
Benjamin Otte
1dbb8df95f
stringlist: Export gtk_string_object_new()
...
There are various use cases where it makes sense to construct these -
from our internal testing to using them in flatten- or mapmodels.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f6c2c2edbd
stringlist: Call splice() for adding items after construction
...
This has the benefit of actually allowing NULL to be passed.
2020-07-05 02:59:21 +02:00
Benjamin Otte
c4e4de36f6
stringlist: Remove n_additions argument from gtk_string_list_splice()
...
char ** arrays are null-terminated everywhere, so make sure they are in
splice(), too.
Also fix the argument to be a const char * const * like in the
constructor.
2020-07-05 02:59:21 +02:00
Benjamin Otte
67cbb2a7d3
stringlist: Clarify docs for gtk_string_list_get_string()
...
Make sure it's obvious that it behaves like g_list_model_get_item() and
returns NULL for pos >= n_items.
2020-07-05 02:59:21 +02:00
Benjamin Otte
a979daa8ea
stringlist: Make one constructor call the other
...
Simplifies code.
2020-07-05 02:59:21 +02:00
Benjamin Otte
fb14f50ec1
stringlist: Make property not construct-only
...
Massively speeds up creation of long stringlists.
2020-07-05 02:59:21 +02:00
Benjamin Otte
6099fbafc1
bitset: Add gtk_bitset_new_range()
...
It's a common use.
2020-07-05 02:59:21 +02:00
Benjamin Otte
795d3122cc
selectionmodels: Add set_model() support
...
Now that we don't care about item types anymore, we can make the child
models settable.
We try to retain the selection, even when the model changes.
2020-07-05 02:59:21 +02:00
Benjamin Otte
5080730728
listmodels: Stop respecting item-type
...
Simplify all view model APIs and always return G_TYPE_OBJECT as the
item-type for every model.
It turns out nobody uses item-type anyway.
So instead of adding lots of APIs, forcing people to think about it and
trying to figure out how to handle filter or map models that modify item
types, just having an easy life is a better approach.
All the models need to be able to deal with any type of object going
through anyway.
2020-07-05 02:59:21 +02:00
Benjamin Otte
f75a3a0e95
stringlist: Take a const char const * argument
...
Sucks that we need to cast a char**, but otherwise we need to cast
{"foo", "bar", "baz" } arrays.
2020-07-05 02:34:42 +02:00
Benjamin Otte
b75db7d1c6
stringfilter: Don't crash if the expression returns ""
2020-07-05 00:34:21 +02:00
Benjamin Otte
b03069bdf6
a11y: Remove double initialization of variables
2020-07-05 00:34:21 +02:00
Matthias Clasen
9332d0dcc8
Merge branch 'typo' into 'master'
...
Fixes typos
See merge request GNOME/gtk!2188
2020-07-04 15:48:29 +00:00
Matthias Clasen
69975627e9
filechooser: Make filtering work again
...
One too many lines were dropped when this filter combo
was converted to a dropdown. Bring it back, to make
filtering work again.
2020-07-04 10:28:10 -04:00
Jordi Mas
599b807726
Fixes typos
2020-07-04 10:00:25 +02:00
Matthias Clasen
c2da2f7ecd
selectionfilter: Fix bugs in signal translation
...
When the position is 0, we can't check for unchanged
elements below with gtk_bitset_size_in_range. And
we don't need to, either.
And be careful when translating [start,length]
intervals to [first,last] ones. Off-by-one errors
lurk everywhere.
2020-07-03 11:12:55 -04:00
Matthias Clasen
130bd5937c
docs: Add guidance about list model performance
...
Add a section about the performance tradeoffs between
different list model implementations.
2020-07-03 09:29:19 -04:00
Matthias Clasen
f01d695e6c
Merge branch 'matthiasc/for-master' into 'master'
...
inspector: Fix the monitor list width
Closes #2909
See merge request GNOME/gtk!2185
2020-07-03 05:51:29 +00:00
Matthias Clasen
619b2465c1
inspector: Fix the monitor list width
...
Fixes #2909
2020-07-03 01:07:13 -04:00
Matthias Clasen
cc18191a8e
Merge branch 'wip/exalm/show-title-buttons' into 'master'
...
headerbar: Show title buttons by default
See merge request GNOME/gtk!2175
2020-07-03 05:05:24 +00:00
Matthias Clasen
76533513c2
Add a selection filter model
...
This model presents the selection of a GtkSelectionModel
as its own list model.
2020-07-02 22:59:03 -04:00
Matthias Clasen
0d3988365b
filterlistmodel: Make model not construct-only
...
This property wasn't meant to be construct-only.
2020-07-02 22:59:03 -04:00
Benjamin Otte
0966636803
bitset: Add APIs needed for a filterlistmodel
2020-07-02 17:19:16 -04:00
Alexander Mikhaylenko
7c3b30036e
headerbar: Show title buttons by default
...
Most of the time show-title-buttons is set to TRUE. Go ahead and make that
the default.
2020-07-02 23:51:16 +05:00
Matthias Clasen
988901294d
Merge branch 'matthiasc/for-master' into 'master'
...
Add gtk_multi_selection_get_model
See merge request GNOME/gtk!2179
2020-07-01 01:36:47 +00:00