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