Commit Graph

35413 Commits

Author SHA1 Message Date
Matthias Clasen
58a88a88b8 shortcutssection: Drop container bits
When GtkBox stops being a container, GtkShortcutsSection
will also no longer be a container. So, stop overriding
container vfuncs, and instead add a buildable implementation
that does the right thing.
2020-05-11 22:38:21 -04:00
Matthias Clasen
537d21155f shortcutsgroup: Drop container bits
When GtkBox stops being a container, GtkShortcutsGroup
will also no longer be a container. So, stop overriding
container vfuncs, and instead add a buildable implementation
that does the right thing.
2020-05-11 22:38:21 -04:00
Matthias Clasen
2a24b8c653 Replace most remaining uses of container api
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
665edcba53 box: Add gtk_box_append/prepend/remove
Add replacement api for gtk_container_add/remove.
2020-05-11 22:38:21 -04:00
Matthias Clasen
a0437628e3 notebook: Derive from GtkWidget 2020-05-11 22:38:21 -04:00
Matthias Clasen
0daa1f3daa Stop using container api on GtkNotebook 2020-05-11 22:38:21 -04:00
Matthias Clasen
c7b7d78ae1 headerbar: Derive from GtkWidget 2020-05-11 22:38:21 -04:00
Matthias Clasen
abfa4d4a5c Stop using container api on GtkHeaderBar 2020-05-11 22:21:39 -04:00
Matthias Clasen
d59d9d4bd5 headerbar: Add gtk_header_bar_remove
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
3d100abea8 listbox: Derive from GtkWidget 2020-05-11 22:21:39 -04:00
Matthias Clasen
88141103cd Don't use container api on GtkListBox 2020-05-11 22:21:39 -04:00
Matthias Clasen
ff91ce9eb4 listbox: Add gtk_list_box_remove
This is a gtk_container_remove replacement.
2020-05-11 22:21:39 -04:00
Matthias Clasen
7af15ae277 buildable: Cosmetics
Don't refer to GtkContainer in the docs.
2020-05-11 22:21:39 -04:00
Matthias Clasen
001d62381a customlayout: Cosmetics
Don't refer to GtkContainer in the docs.
2020-05-11 22:21:39 -04:00
Matthias Clasen
47139bc506 textviewchild: Derive from GtkWidget
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bf543e0367 text: Fix popover use
There were some leftover gtk_container_add calls here
on popovers on buttons, but these are no longer containers.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5c34b30819 textview: Fix popover use
There were some leftover gtk_container_add calls here
on popovers on buttons, but these are no longer containers.
2020-05-11 22:21:39 -04:00
Matthias Clasen
ddcc9db568 flowbox: Derive from GtkWidget 2020-05-11 22:21:39 -04:00
Matthias Clasen
3bff7d3a37 Stop using container api on GtkFlowBox
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
2f7f6e6a37 flowbox: Add gtk_flow_box_remove
This is the replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5907ecebfc stack: Derive from GtkWidget 2020-05-11 22:21:39 -04:00
Matthias Clasen
a7769c9c88 treepopover: Stop using container api 2020-05-11 22:21:39 -04:00
Matthias Clasen
b490800949 shortcutswindow: Stop using container api 2020-05-11 22:21:39 -04:00
Matthias Clasen
ee5587d516 shortcutssection: Stop using container api 2020-05-11 22:21:39 -04:00
Matthias Clasen
01c3e2ce0d Don't use container api on GtkStack 2020-05-11 22:21:39 -04:00
Matthias Clasen
5e0c1e6a86 stack: Add gtk_stack_remove
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
741a9cb320 fixed: Derive from GtkWidget 2020-05-11 22:21:39 -04:00
Matthias Clasen
96d707444d fixed: Add gtk_fixed_remove
This is the replacement for gtk_container_reomve.
2020-05-11 22:21:39 -04:00
Matthias Clasen
3852661865 grid: Derive from GtkWidget
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
932aa58237 Avoid container api on grids
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
5cda824784 grid: Add gtk_grid_remove
This is a replacement for gtk_container_remove.
2020-05-11 22:21:39 -04:00
Matthias Clasen
1a33278703 infobar: Derive from GtkWidget
GtkContainer is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
12ca08c382 infobar: Add gtk_info_bar_add/remove_child
This is a replacement for container api that is going away.
2020-05-11 22:21:39 -04:00
Matthias Clasen
78d20b9301 infobar: Add gtk_info_bar_remove_action_widget
This is mainly for completeness, since gtk_container_remove
will not work for those anymore.
2020-05-11 22:21:39 -04:00
Matthias Clasen
bc6643f3c2 paned: Redo the api
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.

Update all users.

See #2719
2020-05-11 22:21:33 -04:00
Matthias Clasen
fc9873e9ef paned: Drop some dead code 2020-05-11 22:21:14 -04:00
Matthias Clasen
253a39c6e9 iconview: Derive from GtkWidget
GtkIconView is not a container.
2020-05-11 22:21:14 -04:00
Matthias Clasen
825e98dcca expander: Derive from GtkWidget
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.

See #2719
2020-05-11 22:21:14 -04:00
Matthias Clasen
6b80d90db5 expander: Add a child property 2020-05-11 22:21:14 -04:00
Matthias Clasen
e2b23e8fde actionbar: Derive from GtkWidget
GtkContainer is going away.
2020-05-11 22:21:09 -04:00
Matthias Clasen
c0f090627a actionbar: Add gtk_action_bar_remove
This is a replacement for gtk_container_remove.
2020-05-11 20:33:23 -04:00
Matthias Clasen
3697c57e56 treeview: Derive from GtkWidget
Drop the GtkContainer vfuncs.
2020-05-11 20:33:23 -04:00
Matthias Clasen
52b1a347d8 treeview: Stop using container api 2020-05-11 20:33:23 -04:00
Matthias Clasen
aeef59fda9 textview: Derive from GtkWidget
Drop the GtkContainer vfuncs. As a replacement for
gtk_container_remove, make gtk_text_view_remove public.
2020-05-11 20:33:23 -04:00
Matthias Clasen
84632b0901 dragicon: drop gtkcontainer.h include
We don't need it anymore here.
2020-05-11 20:33:23 -04:00
Matthias Clasen
e516616cca textviewchild: Don't leak children
Like everybody else, GtkTextViewChild must
unparent its children in dispose.
2020-05-11 20:33:23 -04:00
Matthias Clasen
501eda2956 window: Fix accessible implementation
Now that GtkWindow is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
7fac7c2d28 statusbar: Fix accessible implementation
Now that GtkStatusBar is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
295c5594ce scrolledwindow: Fix accessible implementation
Now that GtkScrolledWindow is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
a65f70ac23 popover: Fix accessible implementation
Now that GtkPopover is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
2e615d8c20 frame: Fix accessible implementation
Now that GtkFrame is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:52 -04:00
Matthias Clasen
ce5b51b017 flowboxchild: Fix accessible implementation
Now that GtkFlowBoxChild is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
cca73c436d combobox: Fix accessible implementation
Now that GtkComboBox is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
840a5e35f4 listboxrow: Fix the accessible implementation
GtkListBoxRow is no longer a container, update
the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
af19c7275b button: Fix accessible implementation
Now that GtkButton is no longer a container,
update the accessible implementation to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
d7b1ecdf52 Cosmetics: Replace GtkContainer in an error message
GtkWidget is not that much better here, unfortunately.

Adapt the testsuite to match.
2020-05-11 15:42:51 -04:00
Matthias Clasen
ba0579c670 Merge branch 'matthiasc/for-master' into 'master'
print-editor: Bring back the menubar

See merge request GNOME/gtk!1875
2020-05-11 19:08:53 +00:00
Matthias Clasen
cc28a7b0ef Merge branch 'wip/tintou/doc-fixes' into 'master'
docs: Fix several missing references in the documentation

See merge request GNOME/gtk!1874
2020-05-11 18:40:34 +00:00
Matthias Clasen
58fd969b2d printeroptionwidget: Avoid a critical
The new_location can be NULL, as we clearly
knew earlier in the function. We've forgotten
about that by the time we unref it :(
2020-05-11 14:26:31 -04:00
Matthias Clasen
495b9caf63 headerbar: Don't clean up other widget children
The parent of the title_widget is the center box,
it needs to call gtk_widget_unparent on it.
2020-05-11 14:25:57 -04:00
Matthias Clasen
ea53b445a8 filechooserdialog: Be more careful with widgets
We were stepping on our own toes, by first setting
up a save entry and telling the filechooserwidget
about it, and then nuking it by setting a title
on the headerbar. The filechooserwidget wasn't
ready for the entry to die without anybody telling
it.

This fixes a crash when using the filechooser for
print-to-file in the print dialog.
2020-05-11 14:23:58 -04:00
Simon McVittie
6451250b2e aboutdialog: Update precondition checks for new licenses added in 3.24.20
To avoid making this mistake again, add a static assertion that the
enum is in sync with gtk_license_info, and use the length of
gtk_license_info for the precondition check.

Signed-off-by: Simon McVittie <smcv@debian.org>
Resolves: #2734
2020-05-11 18:37:22 +01:00
Corentin Noël
076b2f11d2 docs: Fix several missing references in the documentation
This fixes several typos and missing references
2020-05-11 19:26:20 +02:00
Matthias Clasen
6d969d1026 Update the docs
Remove various references to gtk_widget_destroy in the docs.
2020-05-11 12:20:59 -04:00
Matthias Clasen
177c0eb9e2 Unset tooltip window earlier
This avoids a crash when the tooltip window tries
to update its action muxers.
2020-05-11 12:20:59 -04:00
Matthias Clasen
1306727fb1 window: Remove _set_has_user_ref_count 2020-05-11 12:20:59 -04:00
Matthias Clasen
0f10b170f4 widget: Drop gtk_widget_destroy 2020-05-11 12:20:59 -04:00
Matthias Clasen
6aebedb8bc window: Implement gtk_window_destroy
Don't call gtk_widget_destroy; instead implement
gtk_window_destroy outselves by removing the window
from the toplevel lista and dropping the reference that
GTK holds.
2020-05-11 12:20:59 -04:00
Matthias Clasen
025375ff5f Replace gtk_widget_destroy everywhere
Replace all remaining uses of gtk_widget_destroy
by gtk_container_remove or g_object_unref.
2020-05-11 12:20:59 -04:00
Matthias Clasen
cd0081d08a Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Matthias Clasen
48821a64d0 window: Add gtk_window_destroy
This is a replacement for gtk_widget_destroy for toplevels.
For now, it is just a wrapper.
2020-05-11 12:19:39 -04:00
Matthias Clasen
81340da8b6 nativedialog: Do not ref the transient_for parent
gtk_window_set_transient_for does not ref its parent either. This is
important because a child widget of the parent might be the one calling
this function.

This was showing up as widget-factory not existing on close after
opening the file chooser.
2020-05-11 12:19:39 -04:00
Matthias Clasen
ddebf07236 popover: Fix a reference leak
Don't leak the reference to the default widget.
2020-05-11 12:19:39 -04:00
Matthias Clasen
0ba1aad4e3 filechooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
2020-05-11 12:19:39 -04:00
Matthias Clasen
4b144855b9 colorchooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
2020-05-11 12:19:39 -04:00
Matthias Clasen
b6bfeb786f fontchooserdialog: Fix disposing
We need to drop our widgetry in dispose to prevent
leakage.
2020-05-11 12:19:39 -04:00
Matthias Clasen
573b20a8f8 Drop gtk_widget_destroyed
Use g_object_add_weak_pointer or a weak reference instead.
2020-05-11 12:19:39 -04:00
Matthias Clasen
8f9c3ed44a Stop using gtk_widget_destroyed
Replace all internal use of gtk_widget_destroyed
by g_object_add_weak_pointer.
2020-05-11 12:19:37 -04:00
Matthias Clasen
d061bcad52 treeview: Break reference cycles on unroot
It is a bad idea to have such cycles in the first place,
and there is no need to let them linger past unroot.

This stop the treeview depending on run_dispose to get
freed, a simple unparent will work now.
2020-05-11 10:30:03 -04:00
Matthias Clasen
329994291a Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

See merge request GNOME/gtk!1867
2020-05-11 14:24:45 +00:00
Matthias Clasen
9f3fb69dce Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

Closes #2729 and #2730

See merge request GNOME/gtk!1870
2020-05-11 12:51:08 +00:00
Matthias Clasen
0e18e52f00 menubutton: Cosmetics
Fix a few typos in the docs.
2020-05-11 08:15:56 -04:00
Matthias Clasen
4de4957aa3 applicationswindow: Make show-menubar FALSE by default
The fallback to the menubar is not a good sight,
we should not do that by default.
2020-05-11 08:15:56 -04:00
Matthias Clasen
d798527290 treeviewcolumn: Another case of box <> frame confusion
Don't call your boxes frames, folks!
2020-05-11 08:15:55 -04:00
Matthias Clasen
6140dafecf builderscope: Fix finalize <> dispose confusion
Don't chain up to dispose if you implement finalize.

This fix s courtesy of GOBJECT_DEBUG=objects.
2020-05-11 08:15:55 -04:00
Matthias Clasen
3a5cf61a4d print dialog: Fix frame <> box confusion
It is a bad idea to have a GtkBox called frame, event
if it started out its existence as a GtkFrame.
2020-05-11 08:15:55 -04:00
Matthias Clasen
a11119d317 treeview: Ensure search popover is properly inserted
The css tree and the widget tree are not in sync, so we need
to explicitly set the parent of the css node before inserting
the widget, or else we end up with critical warnings and a
non-working popover.

This can be seen in the print dialog, when moving the focus
to the printer list.
2020-05-11 08:15:55 -04:00
Matthias Clasen
6372a33838 Clarify docs around focus. 2020-05-11 00:29:41 -04:00
Matthias Clasen
b93631164f Remove lots of focus vfuncs
In many cases, the default widget vfuncs work just fine,
combined with setting focusable.
2020-05-11 00:11:37 -04:00
Matthias Clasen
46bad5d513 widget: Fix gtk_widget_focus_all for !focusable
This was a case that wasn't handle properly when
the focus is entering from the outside, in forward
direction.
2020-05-11 00:11:04 -04:00
Matthias Clasen
edc31a264c widget: Add a :focusable property
Add back a property that determines whether an individual
widget will accept focus or not. :can-focus prevents the
focus from ever entering the entire widget hierarchy
below a widget, and :focusable just determines if grabbing
the focus to the widget itself will succeed.

See #2686
2020-05-10 23:24:48 -04:00
Matthias Clasen
10921aa237 textview: Ensure popup menu is properly inserted
In the presence of attached children, the css tree and the
widget tree are not in sync, so we need to explicitly set
the parent of the css node before inserting the widget, or
else we end up with critical warnings and a non-working
menu.

This can be seen in testtextview.
2020-05-10 16:25:28 -04:00
Matthias Clasen
3f548327b5 textview: Give attached children a different css name
If we use "text" for the children that are attached to the
text view, they end up rendering the same background as the
main text content, causing that content to be covered up.

Fixes: #2729
2020-05-10 16:25:28 -04:00
Matthias Clasen
eae4a194b8 Merge branch 'wip/exalm/headerbar-dragging' into 'master'
Extract GtkWindow dragging and titlebar actions

Closes #2689

See merge request GNOME/gtk!1814
2020-05-10 18:15:57 +00:00
Timm Bäder
d015b1b29e scrolledwindow: Always keep the main child first
Otherwise we can't pick the scrollbars, which are allocated behind it.
2020-05-10 09:30:15 +02:00
Timm Bäder
343d294bfb stylecontext: Remove _save_named
Now unused.
2020-05-10 09:30:15 +02:00
Timm Bäder
6566fdc1e3 scrolledwindwo: Add a permanent junction node
Use that instead of save_named'ing a junction node.
2020-05-10 09:30:15 +02:00
Timm Bäder
bcdd6d5425 printunixdialog: Use two "paper" css nodes
Instead of save_named'ing to a temporary "paper" node.
2020-05-10 09:30:15 +02:00
Timm Bäder
cbbbf44dd4 cellrenderertoggle: Replace save_named with a css node 2020-05-10 09:30:13 +02:00
Timm Bäder
2455978c78 widget: Move {dis,}connect_frame_clock into their only caller
Makes sense to have these only in (un)realize.
2020-05-10 08:44:20 +02:00
Timm Bäder
343707e0a2 stylecontext: Remove some unused private API 2020-05-10 08:44:20 +02:00
Timm Bäder
1b10020b6e css: Make GtkStyleAnimation and subclasses non-objects
Making them GObjects is unnecessary. This enables further optimizations
down the road. The only place we use them in is gtkcssanimatedstyle.c
after all.
2020-05-10 08:44:20 +02:00
Timm Bäder
06460ea50c css: Drop a few dynamic type checks
We hit these code paths a lot
2020-05-10 08:44:20 +02:00
Timm Bäder
e12c9de5df csstransiton: Save finished state
Once a transtion is finished it can't change to unfinished again, so we
don't have to consult the progress tracker all the time.
2020-05-10 08:44:20 +02:00
Timm Bäder
f38bbb9bc2 gtkarray: memcpy() directly into the GPtrArray 2020-05-10 08:44:20 +02:00
Timm Bäder
75cfe3c6ae gtkarray: Create GPtrArray in insert() if we have to 2020-05-10 08:44:20 +02:00
Timm Bäder
24608d5c23 gtkarray: Fix a typo 2020-05-10 08:44:20 +02:00
Timm Bäder
b25f93e24c Make dimension values and calc values just number values 2020-05-10 08:44:20 +02:00
Timm Bäder
df08387e35 csscalcvalue: Avoid allocating memory in compute()
We already know how many values we're going to have, it's
value->n_terms.
2020-05-10 08:44:20 +02:00
Matthias Clasen
78343ef61a placesview: Don't do the same thing twice
When the schema is supported, we want to remove
the error style class, not add it again. Pointed
out by Rafał Mikrut.

Fixes: #2724
2020-05-09 19:41:30 -04:00
Matthias Clasen
0cd0ef2d26 widget: Don't leak a reference when reordering
When reordering a widget that is alrady under the
same parent, we must not take another reference.
2020-05-09 19:27:56 -04:00
Matthias Clasen
c4514e7eb4 window: Remove some dead code
We are not attaching windows anymore.
2020-05-09 19:27:56 -04:00
Matthias Clasen
61d39a09a5 Merge branch 'gbsneto/css-dequeue-fix' into 'master'
csswidgetnode: Don't check for container

See merge request GNOME/gtk!1861
2020-05-08 14:55:46 +00:00
Georges Basile Stavracas Neto
2cc6c4d2d1 csswidgetnode: Don't check for container
The conditions to queue and dequeue a CSS validation
are different; while queueing checks if the widget is
a root, dequeueing checks that AND if the widget is
a container.

GtkWindow is not a GtkContainer anymore, and that is
causing validations to be queued, but never dequeued.

Don't require the widget to be a GtkContainer for
dequeuing.
2020-05-08 10:57:41 -03:00
Matthias Clasen
6efdaa9ffd placeview: Hide the protocols grid when its empty
Seeing just the bold headings at the bottom of the
popover is confusing, so just hide the entire grid
in this case.
2020-05-08 09:20:02 -04:00
Matthias Clasen
d06cdf6318 droptarget: Fix confusion around ::leave signal
The leave signal should not take any arguments,
don't pass the GdkDrop. Update the documentation,
fix the emission and update users to match.

This was showing up as crash when dragging files
over the places sidebar.
2020-05-08 08:50:44 -04:00
Alexander Mikhaylenko
f4538839d4 window: Stop handling dragging and titlebar actions
Since GtkWindowHandle and GtkHeaderBar do it now, it can be removed from
GtkWindow, along with GTK_WINDOW_REGION_TITLE which at this point doesn't
differ from GTK_WINDOW_REGION_CONTENT.

Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2689, since
GtkWindowHandle doesn't do that anymore.
2020-05-08 00:02:08 +05:00
Alexander Mikhaylenko
8ca1e0ddc3 headerbar: Include GtkWindowHandle
This allows it to continue being draggable when placed inside a window, and
will allow to remove the corresponding gestures from GtkWindow.
2020-05-07 23:58:16 +05:00
Alexander Mikhaylenko
4135276252 headerbar: Use GtkCenterBox internally
This will allow to easily wrap it into another widget in the next commits.
2020-05-07 23:58:16 +05:00
Alexander Mikhaylenko
8bd44cb3eb Add GtkWindowHandle
This will allow to move the titlebar handling logic out from GtkWindow.
2020-05-07 23:57:58 +05:00
Alexander Mikhaylenko
6c636642df widget: Pass parent to gtk_widget_consumes_motion()
Right now it assumes that the parent is a GtkWindow. This will break when
window dragging is handled by another widget.
2020-05-07 09:44:15 +05:00
Matthias Clasen
57d3719583 Fix an inspector crash
Fix the listmodel semantics of the controller model,
by making get_item return a reference.
This was broken in 4b9e5304cc.
2020-05-06 22:25:51 -04:00
Matthias Clasen
236fc57329 modelbutton: Unify activation code paths
Opening submenus by Enter or Space wasn't working,
because we had different code paths for activation
via keynav and via click. Unify them.
2020-05-06 20:27:04 -04:00
Emmanuele Bassi
56d3a79990 Annotate gtk_text_child_anchor_get_widgets() correctly
We switched from returning a list to returning a C array, which means we
need to update the introspection annotation and the documentation to
match the implementation.
2020-05-06 23:09:53 +01:00
Georges Basile Stavracas Neto
962de8f1ee Merge branch 'gbsneto/array-clear-func' into 'master'
icontheme: Don't free array element

Closes #2717

See merge request GNOME/gtk!1851
2020-05-06 22:02:17 +00:00
Matthias Clasen
2415c02bbd Merge branch 'wip/exalm/polish' into 'master'
Random polish

See merge request GNOME/gtk!1850
2020-05-06 21:47:47 +00:00
Georges Basile Stavracas Neto
6fc706f983 icontheme: Don't free array element
When setting a clear function on a GArray, unlike
most other places, this free func is expected to
*not* free the array element itself -- only its
contents.

Don't free the array element.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2717
2020-05-06 18:14:36 -03:00
Alexander Mikhaylenko
059cc3b818 video: Use more appropriate revealer transition 2020-05-07 01:21:26 +05:00
Matthias Clasen
68011e99ac Merge branch 'gbsneto/fix-text-child-header' into 'master'
textchild: Include <gtk/gtkwidget.h>

See merge request GNOME/gtk!1846
2020-05-06 20:13:22 +00:00
Matthias Clasen
d2b508d95c Merge branch 'master.struct.msvc' into 'master'
gtk/gtkaccelgroup.c: Fix build on Visual Studio

See merge request GNOME/gtk!1785
2020-05-06 20:02:27 +00:00
Matthias Clasen
433295127c Merge branch 'wip/exalm/row' into 'master'
placesview: Stop using gtk_container_add() for GtkListBoxRow

See merge request GNOME/gtk!1849
2020-05-06 20:01:45 +00:00
Alexander Mikhaylenko
24e3556c30 adwaita: Remove a redundant -gtk-icon-shadow: none
Buttons have no icon shadows anymore anyway.
2020-05-07 01:01:12 +05:00
Alexander Mikhaylenko
c17aa12235 adwaita: Don't style window menu button anymore
Those were removed with the introduction of GtkWindowControls, no need to
exclude them from the round style anymore.
2020-05-07 00:59:44 +05:00
Alexander Mikhaylenko
40c8d8ba9f adwaita: Use tabular figures where appropriate
Port 82b9be3297 from GTK3.
2020-05-07 00:37:55 +05:00
Matthias Clasen
92fc2156ff Merge branch 'drop-click-gesture-area' into 'master'
gestureclick: Drop the area

See merge request GNOME/gtk!1847
2020-05-06 19:25:32 +00:00
Jakub Steiner
5815604853 Merge branch 'wip/jimmac/HC-focus' into 'master'
HC: more contrasty focus rings

See merge request GNOME/gtk!1845
2020-05-06 19:22:27 +00:00
Alexander Mikhaylenko
f47aba05b0 adwaita: Make popover border transparent
Port 379669b153 from GTK3.
2020-05-07 00:19:27 +05:00
Matthias Clasen
8239186c26 Merge branch 'abolish-size-allocate' into 'master'
Abolish size allocate

Closes #2705

See merge request GNOME/gtk!1833
2020-05-06 19:15:31 +00:00
Alexander Mikhaylenko
3a5fdfcfda adwaita: Update app icon shadow
Port f95f3c707a from GTK3.
2020-05-07 00:15:19 +05:00
Alexander Mikhaylenko
8007891132 placesview: Stop using gtk_container_add() for GtkListBoxRow 2020-05-07 00:08:46 +05:00
Matthias Clasen
8efebbaf46 Merge branch 'wip/jimmac/dark-seuggested' into 'master'
Adwaita: tone down suggested focus ring for dark

See merge request GNOME/gtk!1843
2020-05-06 18:32:09 +00:00
Matthias Clasen
56e590bd31 widget: Drop the ::size-allocate signal
This signal is mainly used for bad things, and we
don't want to emit signals during layout if we can
avoid it.

If you are subclassing, you should either use a
layout manager or override the size_allocate vfunc.

If you are using a GtkDrawingArea or GtkGLArea,
use their ::resize signals to learn about size
changes.

Fixes: #2705
2020-05-06 14:27:45 -04:00
Matthias Clasen
64b673853b tooltipwindow: Stop using the ::size-allocate signal
Instead of connecting to ::size-allocate, call
gtk_native_set_tooltip and rely on the native
to allocate the tooltip window.
2020-05-06 14:27:45 -04:00
Matthias Clasen
3872da535f tooltipwindow: Drop some dead code 2020-05-06 14:27:45 -04:00
Matthias Clasen
1f0024a7f0 tooltip: Add private api to allocate the window
Add private gtk_tooltip_maybe_allocate() function
and use it from GtkWindow and GtkPopover.

This will let us stop using the ::size-allocate signal,
without having to redo all the tooltip management first.

That will happen later.
2020-05-06 14:27:45 -04:00
Emmanuele Bassi
cb94c7d69e Explicitly update widget a11y bounds when allocating
The a11y machinery is using signal subscription to get notified of size
changes and notify listeners in turn. This is suboptimal for a couple of
reasons:

 - if something connects to the GtkWidget::size-allocate signal we need
   to emit it; currently, we have an optimization in place that will
   skip the signal emission if there are no handlers, and it would be
   nice to go through the fast path
 - the accessibility implementation is part of GTK, and should not go
   through additional hoops like any out-of-tree API consumer
2020-05-06 14:27:45 -04:00
Matthias Clasen
92bcf4c7a7 inspector: Stop using ::size-allocate
This signal is going away. Currently, there is no
other way for the inspector to monitor the allocation.
2020-05-06 14:27:45 -04:00
Matthias Clasen
e4894a69d4 drawingarea: Add a ::resize signal
This can be used as a replacement for ::size-allocate
to prepare size-dependent resources, like a backing
surface. It mirrors the GtkGLArea::resize signal.
2020-05-06 14:27:45 -04:00
Matthias Clasen
0aec11f292 a11y: Avoid a gratitious use of ::size-allocate
The paned widget has a position property, just
use it.
2020-05-06 14:27:45 -04:00
Matthias Clasen
7280618c7d cellarea: Cosmetics
Remove an occurrence of size-allocate in a comment.
2020-05-06 14:27:45 -04:00
Matthias Clasen
6c8f5f9d17 treeview: Cosmetic change
Remove an occurrence of size-allocate in a comment.
2020-05-06 14:27:45 -04:00
Matthias Clasen
91d261a0b3 window: Remove some outdated info from the docs
Remove references to ::size-allocate and ::configure-event
from the docs.
2020-05-06 14:27:45 -04:00
Matthias Clasen
8ad49b33ed gestureclick: Drop the area
This is a rarely used api, and our general trend has been
to use widgets whenever we need an area singled out.
2020-05-06 14:19:50 -04:00
Georges Basile Stavracas Neto
79d6190684 textchild: Include <gtk/gtkwidget.h>
This header is exported, so it needs to include
the gtkwidget.h header with the gtk/ prefix.

This was broken in 289b157e32
2020-05-06 15:13:03 -03:00
Jakub Steiner
edc57e4282 HC: more contrasty focus rings 2020-05-06 19:28:05 +02:00
Jakub Steiner
3fa691a1ab Adwaita: tone down suggested focus ring for dark 2020-05-06 19:14:19 +02:00
Jakub Steiner
053617a283 Merge branch 'wip/exalm/focus-entries2' into 'master'
Adwaita: Make error/warning entry focus more subtle

See merge request GNOME/gtk!1842
2020-05-06 16:53:14 +00:00
Alexander Mikhaylenko
40926a28ee Adwaita: Make error/warning entry focus more subtle
Add 50% alpha to it like to the main focus color.
2020-05-06 20:23:26 +05:00
Jakub Steiner
e2058aaecd Merge branch 'wip/jimmac/suggested-destructive-focus' into 'master'
Adwaita: suggested destrictive button focus

Closes #2704

See merge request GNOME/gtk!1841
2020-05-06 15:23:01 +00:00
Jakub Steiner
efd009e6d8 Adwaita: suggested destrictive button focus
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2704
2020-05-06 16:12:57 +02:00
Jakub Steiner
b32519966f Merge branch 'wip/jimmac/global-var' into 'master'
Adwaita: make parser happy wrt global variables

Closes #2703

See merge request GNOME/gtk!1840
2020-05-06 13:29:29 +00:00
Matthias Clasen
8bb133072d Merge branch 'fix-inspector-popover' into 'master'
inspector: Fix css tree popovers

See merge request GNOME/gtk!1838
2020-05-06 12:55:18 +00:00
Jakub Steiner
926764be0d Adwaita: make parser happy wrt global variables
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2703
2020-05-06 14:12:44 +02:00
Matthias Clasen
b96509c030 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

See merge request GNOME/gtk!1828
2020-05-06 03:55:55 +00:00
Matthias Clasen
81c68b86ea inspector: Fix css tree popovers
Adding popovers to a treeview doesn't work. Instead,
attach them to the cssnodetree widget, which is using
a layout manager - popovers work in that case.
2020-05-05 23:51:37 -04:00
Matthias Clasen
a4cfbec5c2 widget: Drop the destroy vfunc
We still emit the ::destroy signal, but if you
want a vfunc, use dispose.
2020-05-05 18:25:29 -04:00
Matthias Clasen
1086acce92 container: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:25:29 -04:00
Matthias Clasen
d03b1524e6 placesview: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:25:28 -04:00
Matthias Clasen
82f4b1630c printunixdialog: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
77d15b1751 window: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
401f8a7f31 treeview: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
3d4bb76694 textview: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
327da3de9a statusbar: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
d46252ca21 notebook: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
d2cbc454f6 iconview: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
49fcf41693 shortcutssection: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
8baefaf4d8 radiobutton: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
c60ffeedfa range: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
c8066bcd8b spinbutton: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
9f4cea190a viewport: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
7639d3daa0 text: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
8683925fe0 modelbutton: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
4c7cafdba8 label: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
03f145e868 filechooserbutton: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
1b44a64ef7 expander: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
37e381e95d combobox: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
e0f95844c1 actionbar: Use dispose instead of destroy
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
539f06147a Merge branch 'misc-cleanups' into 'master'
Misc cleanups

See merge request GNOME/gtk!1832
2020-05-05 21:02:25 +00:00
Matthias Clasen
d2b55dff2d Merge branch 'wip/exalm/controls-dispose' into 'master'
windowcontrols: Unparent children in dispose rather than finalize

See merge request GNOME/gtk!1831
2020-05-05 18:19:00 +00:00
Matthias Clasen
e33da18577 window: Lower the visible focus timeout
Five seconds felt too long for some people in
initial feedback, so lets lower the timeout to
3 seconds.
2020-05-05 10:45:47 -04:00
Matthias Clasen
cda1a25a5a assistant: Drop the Private struct 2020-05-05 10:45:47 -04:00
Matthias Clasen
a9103ccd7c placesview: Drop the Private struct 2020-05-05 10:45:47 -04:00
Matthias Clasen
8effa10e79 searchbar: Drop the Private struct 2020-05-05 10:45:47 -04:00
Alexander Mikhaylenko
7906f09c75 windowcontrols: Unparent children in dispose rather than finalize 2020-05-05 19:43:55 +05:00
Jakub Steiner
4cdb9ed322 Merge branch 'wip/jimmac/notebook-tab-focus' into 'master'
Adwaita: notebook tab focus ring

See merge request GNOME/gtk!1830
2020-05-05 13:42:25 +00:00
Matthias Clasen
b74a3de299 Merge branch 'bin-removal' into 'master'
Bin removal

See merge request GNOME/gtk!1820
2020-05-05 12:55:50 +00:00
Jakub Steiner
774d61c682 Adwaita: notebook tab focus ring
- prelight the tab, not a label (visually)
2020-05-05 13:57:33 +02:00
Jakub Steiner
d827fe711d Adwaita: old style toolbar buttons
- style toolbar buttons
2020-05-05 10:55:14 +02:00
Timm Bäder
d328374c94 shortcutcontroller: Check for NULL GtkNative of widget
And just continue in that case.
2020-05-05 08:20:10 +02:00
Timm Bäder
7f009b9952 label: Be more defensive against non-existant focus_link 2020-05-05 08:20:10 +02:00