Benjamin Otte
052962a760
treeview: Use gtk_snapshot_append_border()
...
No need to construct the node manually.
2020-08-07 02:52:22 +02:00
Matthias Clasen
a712ffa2ab
widgetpaintable: Clear an idle in dispose
...
We were not removing the pending_update idle
in dispose, which is at least suspicious, if
not deadly. Move the idle cleanup code into
unset_widget(), which we are already calling
in dispose().
2020-08-06 20:02:33 -04:00
Matthias Clasen
c13d70479b
gridview: Work around unexpected focus changes
...
As things currently stand, we get events for focus changes
before the widget is allocated, and try to scroll in response.
Therefore, leaving n_columns at 0 until size-allocate leads
to plenty of division-by-zero. Just set it to 1 initially
to avoid that. This is a workaround for #3025 .
2020-08-06 14:35:19 -04:00
Carlos Garnacho
bb3675b3c7
gtkspinbutton: Claim button gestures when starting to spin
...
The gesture should be acknowledged by the spin button, in order to
guarantee it will also receive the button release.
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3016
2020-08-06 00:01:34 +02:00
Carlos Garnacho
36711b6691
gtkbutton: Don't claim gesture till emission
...
That means waiting till button release.
2020-08-06 00:01:18 +02:00
Carlos Garnacho
dc8adcda0e
gtkgesture: ::cancel if a claimed sequence goes denied
...
The regular paths just emit ::end, which isn't the whole thing.
This gives an opportunity to gestures that are stolen the sequence
to clean themselves up.
2020-08-06 00:01:18 +02:00
Christian Hergert
5ff2b8535f
textview: properly remove anchored widgets
...
Fixes #3021
2020-08-05 14:08:07 -07:00
Matthias Clasen
6dfd92b191
aspectframe: Fix use in ui files
...
GtkAspectFrame code assumes that its child will be in
self->child, but that is only the case if we arrange
for <child> in ui files to end up calling
gtk_aspect_frame_set_child(). Therefore, implement
GtkBuildable.
Fixes : #3020
2020-08-05 14:05:47 -04:00
Matthias Clasen
d7c4f93c76
Merge branch 'wip/compute-size' into 'master'
...
Compute size via signal
See merge request GNOME/gtk!2325
2020-08-05 16:19:19 +00:00
Matthias Clasen
df19049dde
inspector: Stop showing settings bindings
...
We were playing fast-and-loose with private GIO data
when showing settings bindings in the property editor,
and this was causing crashes.
We can show this information again if GIO ever gets
api to introspect it.
Fixes : #3015
2020-08-05 11:11:58 -04:00
Jonas Ådahl
2ff74eb667
gdk/toplevel: Negotiate surface size via a compute-size signal
...
GTK will not up front know how to correctly calculate a size, since it
will not be able to reliably predict the constraints that may exist
where it will be mapped.
Thus, to handle this, calculate the size of the toplevel by having GDK
emitting a signal called 'compute-size' that will contain information
needed for computing a toplevel window size.
This signal may be emitted at any time, e.g. during
gdk_toplevel_present(), or spontaneously if constraints change.
This also drops the max size from the toplevel layout, while moving the
min size from the toplevel layout struct to the struct passed via the
signal,
This needs changes to a test case where we make sure we process
GDK_CONFIGURE etc, which means we also needs to show the window and
process all pending events in the test-focus-chain test case.
2020-08-05 15:49:00 +02:00
Matthias Clasen
d44d9ad40d
Adwaita: Reduce the solid csd borders
...
Reduce the borders we draw ourselves for solid csd
to 1 pixel. It still doesn't look great, but at least
it doesn't look outright broken.
Fixes : #2997
2020-08-05 08:47:00 -04:00
Matthias Clasen
e60d6f70bf
Merge branch 'drop-accel-label' into 'master'
...
Drop accel label
See merge request GNOME/gtk!2368
2020-08-05 03:44:43 +00:00
Matthias Clasen
8562c623d3
Drop GtkAccelLabel
...
We no longer use this widget anywhere.
2020-08-04 23:05:18 -04:00
Matthias Clasen
2b8aeed4d8
Drop GtkCallback
...
It is no longer used in any of our public APIs.
2020-08-04 22:24:33 -04:00
Matthias Clasen
ce89f1eda1
selectionfiltermodel: Drop a leftover symbol
...
We decided not to do new_for_type() for list model
wrappers, so this function does not exist.
2020-08-04 22:11:34 -04:00
Matthias Clasen
f561000124
docs: Clean up many dangling links
...
In many cases, these were references to no longer
existing api, so some rewording was necessary.
2020-08-04 22:11:34 -04:00
Matthias Clasen
0e1afbbdad
Merge branch 'popoverflow' into 'master'
...
popover: Set overflow: hidden
Closes #3012
See merge request GNOME/gtk!2365
2020-08-04 15:47:50 +00:00
Matthias Clasen
d6e352e862
popover: Set overflow: hidden
...
This keeps overlay scrollbars from wrecking our
nice rounded corners.
Fixes : #3012
2020-08-04 11:10:49 -04:00
Matthias Clasen
f7eb5f8897
a11y: Don't do unnecessary work
...
Only serialize all the attributes if we are actually
going to print them.
2020-08-04 11:02:00 -04:00
Matthias Clasen
7398323b82
scrolledwindow: Fix a11y support code
...
This error was introduced by me in 971ee2d28a
and causes a crash in the scrolling benchmark in gtk-demo.
Fixes : #3014
2020-08-04 11:00:32 -04:00
Jonas Ådahl
cebe469898
gtk/window: Don't remember size from GdkSurface
...
If we're maximized, and try to remember the non-maximized size, we'd
still get the maximized size.
2020-08-04 15:04:24 +02:00
Matthias Clasen
e818e98187
Merge branch 'pagesetup-leftover' into 'master'
...
Pagesetup leftover
See merge request GNOME/gtk!2362
2020-08-04 03:47:13 +00:00
Matthias Clasen
942a90cd64
pagesetupdialog: Fix leftover tree model code
...
This was overlooked when the rest of the dialog
was ported to use list models.
2020-08-03 20:25:00 -04:00
Matthias Clasen
20c1fb0a0a
docs: Tweak documentation for list widgets
...
Fix numerous cases of : vs :: for signal references,
add some more details here and there.
2020-08-03 18:43:25 -04:00
Matthias Clasen
7972dc8776
docs: Unify docs around incremental operations
...
Sync up the wording around incremental filtering
and sorting to be more similar.
2020-08-03 18:43:25 -04:00
Matthias Clasen
7cb0dd9039
docs: Fix signal references
...
It is :: for signals, : for properties, | for actions.
2020-08-03 18:43:25 -04:00
Alex
c8d51a7b98
show: remove obsolete comment
...
g_app_info_launch_default_for_uri supports x-scheme-handler directly since at least 2.27.1, released almost 10 years ago.
Link: https://bugzilla.gnome.org/show_bug.cgi?id=631410
Link: 9b262f1c5f
2020-08-03 15:36:36 +00:00
Matthias Clasen
83682d919f
treeview: Don't react to clicks on cell editables
...
We need to let these pass through, otherwise we
interfere with the entries that are used for editing.
Fixes : #3008
2020-08-03 07:51:09 -04:00
Matthias Clasen
348a38a876
textview: Make insert-emoji replace the selection
...
This is the expected behavior, and matches what
GtkText does.
Fixes : #2996
2020-08-02 20:48:14 -04:00
Matthias Clasen
0d98bab82b
Merge branch 'filechooser-completions' into 'master'
...
filechooser: Prevent over-eager completions
Closes #2995
See merge request GNOME/gtk!2347
2020-08-03 00:23:28 +00:00
Matthias Clasen
992c5fade7
Merge branch 'wip/chergert/gtk4-textview-fix-selections' into 'master'
...
textlinedisplaycache: short-circuit y_range invalidation
Closes #2975
See merge request GNOME/gtk!2348
2020-08-03 00:23:13 +00:00
Christian Hergert
94d17a6809
textlinedisplaycache: short-circuit y_range invalidation
...
If we have a y==-1 then we are generally invalidating the whole textview.
For this case, we can just discard the entire GtkTextLineDisplay cache.
Fixes #2975
2020-08-02 16:35:50 -07:00
Matthias Clasen
9605e49fbf
filechooser: Prevent over-eager completions
...
We don't want the completions to pop up after we call
gtk_file_chooser_set_current_name(). This used to be
handled by gtk_entry_set_text() blocking the completion
signal handler. We don't have that anymore, so block
popup completion around the call to gtk_editable_set_text()
instead.
Fixes : #2995
2020-08-02 19:18:11 -04:00
Matthias Clasen
71be1751c6
builder-tool: Rewrite top/left-attach
...
Rewrite the GtkGrid:top/left-attach child properties
to the GtkGridLayoutChild:row/column layout properties.
Update expected test output to match.
2020-08-02 17:58:03 -04:00
Matthias Clasen
ed13e6a41e
grid layout: Rename some properties
...
Rename GtkGridLayoutChild:left-attach/top-attach to
GtkGridLayoutChild:column/row. Update all users.
Fixes : #2967
2020-08-02 17:58:03 -04:00
Matthias Clasen
4340f75304
textbuffer: Fix a test failure
...
The previous change to gtktextbuffer.c was breaking
the textiter testcase.
2020-08-02 17:23:26 -04:00
Matthias Clasen
0add626822
textbuffer: Be careful with tags when copying
...
We can only insert tags in the buffer if they come
from the same GtkTextTagTable as the buffer uses.
If that is not the case, paste the text without tags.
Fixes : #2991
2020-08-02 13:54:06 -04:00
Matthias Clasen
793ea05f4a
Merge branch 'text-drag-select' into 'master'
...
textview: Only claim the event when appropriate
Closes #2999
See merge request GNOME/gtk!2344
2020-08-02 17:45:30 +00:00
Matthias Clasen
c959f9c701
textview: Only claim the event when appropriate
...
Don't claim the event unconditionally for the click gesture,
since we may want to start a drag selection.
Fixes : #2999
2020-08-02 13:32:37 -04:00
Matthias Clasen
f8a303b0e5
popovermenu: Avoid a critical
...
While we guarantee that the widget that a controller
is attached to stays around while it is handling an event,
the same is not true for the root that the widget belongs
to. In corner cases (such as clicking "Close" in the
fallback window menu), it may already be gone.
Avoid a critical in that case.
Fixes : #2998
2020-08-02 13:09:00 -04:00
Matthias Clasen
ddda963f81
Merge branch 'selectable-label-draw' into 'master'
...
label: Redraw when focus changes
See merge request GNOME/gtk!2342
2020-08-02 16:40:12 +00:00
Matthias Clasen
9bf50e5650
Merge branch 'linked-button-fixes' into 'master'
...
Adwaita: Add linked styling for particular button widgets
Closes #2939 and #1903
See merge request GNOME/gtk!2339
2020-08-02 16:39:59 +00:00
Matthias Clasen
1c8471c38f
label: Redraw when focus changes
...
When focus changes in a selectable label, we need to
redraw to make the text caret (dis)appear.
2020-08-02 12:11:38 -04:00
Matthias Clasen
17208ca7fa
Go back to keeping a list of event controllers
...
This reverts 4b9e5304cc
. It caused a number of regressions,
such as event controller ordering changes.
2020-08-02 12:01:06 -04:00
Matthias Clasen
1c16cb751f
Revert "Add gtk_widget_prepend_controller"
...
This reverts commit 692cc42e10
.
2020-08-02 12:01:06 -04:00
Matthias Clasen
127612d213
Revert "entry completion: Make keynav work again"
...
This reverts commit 53a30eaa12
.
2020-08-02 12:01:06 -04:00
Matthias Clasen
888a65c1fb
shortcutswindow: Clear search entry on unmap
...
Otherwise, the search term will linger around until
somebody clicks the search button again.
Fixes : #2981
2020-08-02 09:33:52 -04:00
nana-4
891027f0c3
Adwaita: Add linked styling for particular button widgets
...
Those button widgets need some special linked styling like what
combobox has.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/1903
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2939
2020-08-02 19:14:26 +09:00
nana-4
5f00675de4
appchooserbutton: Set a CSS name
...
Otherwise it has a CSS name "widget".
2020-08-02 18:26:40 +09:00