vcl/unx/gtk3/gtkinst.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit a63dbd76888043bc12ae1b3b6780a10291a34b38 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Nov 15 12:11:55 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Nov 15 15:42:23 2021 +0100 gtk4: fill in more of the assistant code Change-Id: Ibcc4eca0abd37c733d60042025c0688a3932002b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx index 27429d2db702..45f3639a2a7f 100644 --- a/vcl/unx/gtk3/gtkinst.cxx +++ b/vcl/unx/gtk3/gtkinst.cxx @@ -7208,11 +7208,17 @@ private: GtkAllocation allocation; int nPageIndex = 0; -#if !GTK_CHECK_VERSION(4, 0, 0) + +#if GTK_CHECK_VERSION(4, 0, 0) + for (GtkWidget* pWidget = gtk_widget_get_first_child(m_pSidebar); + pWidget; pWidget = gtk_widget_get_next_sibling(pChild)) + { +#else GList* pChildren = gtk_container_get_children(GTK_CONTAINER(m_pSidebar)); for (GList* pChild = g_list_first(pChildren); pChild; pChild = g_list_next(pChild)) { GtkWidget* pWidget = static_cast<GtkWidget*>(pChild->data); +#endif if (!gtk_widget_get_visible(pWidget)) continue; @@ -7243,6 +7249,7 @@ private: ++nPageIndex; } +#if !GTK_CHECK_VERSION(4, 0, 0) g_list_free(pChildren); #endif