vcl/unx/gtk4/convert3to4.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
New commits: commit af1b9bf6e1a5d9622faa81ae2e2ddb1cf26153f8 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Nov 16 10:41:05 2021 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Nov 16 13:58:50 2021 +0100 avoid using always-show-arrow in gtk4 < 4.4 Change-Id: Ie2df9cd91a5ea857965d24dc669a6c1d94c965a4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125293 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk4/convert3to4.cxx b/vcl/unx/gtk4/convert3to4.cxx index 29b51a747ff7..d6f1e7e0fa29 100644 --- a/vcl/unx/gtk4/convert3to4.cxx +++ b/vcl/unx/gtk4/convert3to4.cxx @@ -731,7 +731,7 @@ ConvertResult Convert3To4(const css::uno::Reference<css::xml::dom::XNode>& xNode if (sName == "draw-indicator") { assert(toBool(xChild->getFirstChild()->getNodeValue())); - if (GetParentObjectType(xChild) == "GtkMenuButton") + if (GetParentObjectType(xChild) == "GtkMenuButton" && gtk_get_minor_version() >= 4) { auto xDoc = xChild->getOwnerDocument(); auto xAlwaysShowArrow = CreateProperty(xDoc, "always-show-arrow", "True"); @@ -1140,8 +1140,11 @@ ConvertResult Convert3To4(const css::uno::Reference<css::xml::dom::XNode>& xNode else if (sClass == "GtkMenuToolButton") { xClass->setNodeValue("GtkMenuButton"); - auto xAlwaysShowArrow = CreateProperty(xDoc, "always-show-arrow", "True"); - insertAsFirstChild(xChild, xAlwaysShowArrow); + if (gtk_get_minor_version() >= 4) + { + auto xAlwaysShowArrow = CreateProperty(xDoc, "always-show-arrow", "True"); + insertAsFirstChild(xChild, xAlwaysShowArrow); + } } else if (sClass == "GtkRadioToolButton") {