Matthias Clasen
3f55bfe2cb
Merge branch 'matthiasc/for-master' into 'master'
...
main: Avoid a warning
Closes #2894
See merge request GNOME/gtk!2153
2020-06-26 14:31:20 +00:00
Matthias Clasen
4185ba242b
docs: Some tweaks to the list widget overview
2020-06-26 09:05:56 -04:00
Matthias Clasen
e04191a5ea
Merge branch 'wip/otte/bitset' into 'master'
...
Improve selection handling API for rubberbanding
See merge request GNOME/gtk!2086
2020-06-26 12:43:49 +00:00
Matthias Clasen
f07d304f19
main: Avoid a warning
...
transient-for relationships only exist between
windows, so check that both candidates are such.
Fixes : #2894
2020-06-26 08:19:32 -04:00
Emmanuele Bassi
1d1f618a13
Merge branch 'tintou/dropdown-annotations' into 'master'
...
dropdown: Annotate the get_selected_item method
See merge request GNOME/gtk!2152
2020-06-26 08:48:51 +00:00
Emmanuele Bassi
e20610cdc6
Merge branch 'wip/ricotz/annotations' into 'master'
...
gtk: Add some g-i annotations to GtkStringList
See merge request GNOME/gtk!2150
2020-06-26 08:46:35 +00:00
Corentin Noël
721396b6d6
dropdown: Annotate the get_selected_item method
...
We need to specify the type as we already know that it is at least a GObject and in case of no selection, NULL is returned.
2020-06-26 10:00:59 +02:00
Benjamin Otte
dc1dbe6158
listbase: Make rubberbanding a threshold drag
2020-06-26 07:13:32 +02:00
Benjamin Otte
30488e60e2
listbase: Only compute the modifiers when releasing the rubberband
...
... and do the right things:
nothing: selection = rubberband
ctrl: selection = selection OR rubberband
shift: selection = selection AND (NOT rubberband)
ctrl+shift: selection = selection XOR rubberband
(not sure this one makes sense, but toggling is fun)
2020-06-26 07:13:32 +02:00
Benjamin Otte
a5949960bc
listbase: Compute rubberband region on-demand
...
Instead of storing the active items as we go, compute the affected items
whenever the rubberband changes and in particular when the rubberband
ends.
That way, the rubberband is guaranteed to select a rectangle even
after scrolling very far.
This is achieved by having a get_items_in_rect() vfunc that selects all
the items in the rubberbanded rectangle and returns them as a bitset.
2020-06-26 07:13:32 +02:00
Benjamin Otte
ec4a489093
listview: Allocate rubberband at end of size_allocate()
...
Otherwise the rubberband uses the wrong scroll offsets.
2020-06-26 07:13:32 +02:00
Benjamin Otte
7c52e03815
listbase: Flip autoscroll deltas if adjustments are flipped
...
Fixes autoscroll on RTL languages.
2020-06-26 07:13:32 +02:00
Benjamin Otte
724c9361f3
listbase: Allocate gridview items properly on RTL
...
We need to flip the items.
2020-06-26 07:13:32 +02:00
Benjamin Otte
147388e69a
multiselection: Implement get_selection_in_range()
2020-06-26 07:13:32 +02:00
Benjamin Otte
64aa281c97
listbase: Allocate rubberband according to list coords
...
The rubberband is now handled on the list coordinate system.
When starting the rubberband, we track the item under the pointer and
follow it when it is moving.
This may lead to the rubberband start position changing position and
while this may be confusing, it alerts users to the fact that something
crazy is going on.
2020-06-26 07:13:32 +02:00
Benjamin Otte
c2b0330c56
listbase: Move a common function from the children into GtkListBase
...
We want to use it for the rubberband later.
2020-06-26 07:13:32 +02:00
Benjamin Otte
de4803bb21
listbase: Don't do extra work
...
Scrolling causes a queue_resize() which will update the rubberband in
size_allocate() and queue a draw.
2020-06-26 07:13:32 +02:00
Benjamin Otte
e574dcb091
Fix indentation
2020-06-26 07:13:32 +02:00
Benjamin Otte
488b0cbb69
gtk: Remove GtkPropertySelection
...
GtkMultiSelection is so much faster than this that it isn't needed.
2020-06-26 07:13:32 +02:00
Benjamin Otte
6ceab55148
gtk-demo: Port listview-colors demo to multiselection again
2020-06-26 07:13:32 +02:00
Benjamin Otte
3d8b6f6b79
multiselection: Track items across resorts
...
In particular, track which items remain in ::items-changed
signal emissions.
But the main use case is sorting, which causes items-changed(0, n, n)
to be emitted.
2020-06-26 07:13:32 +02:00
Benjamin Otte
58d3213eef
Remove GtkSet
...
It's been superceded by GtkBitset.
2020-06-26 07:13:32 +02:00
Benjamin Otte
006dfdc55a
selectionmodel: Remove select_callback() functions
...
gtk_selection_model_set_selection() takes care of those now.
2020-06-26 07:13:32 +02:00
Benjamin Otte
a38c423ddb
listbase: Port rubberband to gtk_selection_model_set_selection()
2020-06-26 07:13:32 +02:00
Benjamin Otte
fa0295629b
selectionmodel: Add gtk_selection_model_set_selection()
...
Also port the testsuite.
2020-06-26 07:13:32 +02:00
Benjamin Otte
8395698090
selectionmodel: Replace query_range() with get_selection()
2020-06-26 07:13:32 +02:00
Benjamin Otte
277a91dbf8
multiselection: Port to GtkBitset
2020-06-26 07:13:32 +02:00
Benjamin Otte
ff36cfb5be
testsuite: Add tests for GtkBitset
2020-06-26 07:13:32 +02:00
Benjamin Otte
db452f0c45
Add GtkBitset
2020-06-26 07:13:32 +02:00
Rico Tzschichholz
5b1195f874
gtk: Add some g-i annotations to GtkStringList
2020-06-26 06:36:23 +02:00
Benjamin Otte
d830724d4f
Add amalgamated roaring bitmaps source code
...
Taken from https://github.com/RoaringBitmap/CRoaring and fixed to
not spew warnings.
2020-06-26 06:19:56 +02:00
Matthias Clasen
0ef0edfa9a
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2149
2020-06-25 22:28:07 +00:00
Matthias Clasen
0ec868bd69
inspector: Adapt to dropdown api change
...
The suppported syntax for dropdowns in ui files
has changed. Get with the program.
2020-06-25 16:42:30 -04:00
Matthias Clasen
30e79e8412
docs: Fix a typo
2020-06-25 14:29:24 -04:00
Matthias Clasen
c9b032acab
gtk-demo: Fix a typo in the listbox demo
2020-06-25 14:28:29 -04:00
Matthias Clasen
1f410faccb
searchentry: Update the docs slightly
...
Update the docs to get closer to describing reality.
2020-06-25 14:27:44 -04:00
Matthias Clasen
d0e56106fe
Drop unused includes
...
Don't include gtkfilechooserentry.h where it
isn't used.
2020-06-25 14:27:31 -04:00
Matthias Clasen
3d3d7dbc59
stringfilter: Fix a typo
2020-06-25 14:27:23 -04:00
Emin Tufan Çetin
c0cbf9db5f
Update Turkish translation
2020-06-25 01:05:12 +00:00
Matthias Clasen
db82eaec0a
Merge branch 'wip/carlosg/input-cleanups' into 'master'
...
Some input cleanups
Closes #2851
See merge request GNOME/gtk!2147
2020-06-24 21:32:30 +00:00
Matthias Clasen
f4e200708d
Merge branch 'scrolled-window-api' into 'master'
...
scrolledwindow: Don't take adjustments in new()
See merge request GNOME/gtk!2146
2020-06-24 19:58:03 +00:00
Matthias Clasen
ba1944ded2
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!2145
2020-06-24 19:50:37 +00:00
Carlos Garnacho
8eeef54b2e
gtktextview: Remove child textview items last
...
The function tries to go through every child, so it's convenient
to remove all internal ones first.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
8e549d73a0
gtkwidget: Drop _gtk_widget_[gs]et_shadowed()
...
This API is meaningless now, with grab-notify being handled internally.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
102d2a36f3
gtkwidget: Avoid use of shadowed flag
...
This is going away, look up whether there is a grab, and whether
the widget is within it, instead.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
f046e27bb4
gtkwidget: Drop gtk_widget_device_is_shadowed()
...
A widget no longer needs updating on GTK grabs on itself, drop
this miscellaneous and no longer used API.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
1c5cf17f1c
gtkwidget: Drop internal checks in grab-notify
...
There's no need to check if the widget is already shadowed, we
implicitly have that from the signal argument.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
ddb3a4be3e
gtkmain: Make grab-notify notifications more targeted
...
We only want to send grab-notify to widgets that might have been
interacting with devices via events. Instead of going through all
widgets in all toplevels, we have the window/pointer focus information,
so we can just traverse the widget stacks for every involved foci.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
994f32704b
gtkwidget: Drop ::grab-notify signal and vfunc
...
We don't expect widgets to react directly to these anymore.
Internally we still reset the controllers.
2020-06-24 20:35:23 +02:00
Carlos Garnacho
1f798643c8
gtkprintoperation-win32: Don't track grab-notify
...
Further grabs could presumably only come from events handled within
the dialog itself. It seems overeager to do this.
2020-06-24 20:35:23 +02:00