summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-05-12 13:58:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-05-12 16:30:26 +0200
commitb2fefcad3236970284e559ba8cd018511a8cacce (patch)
tree4c5aa86ef66bde8e1f9ad145b242fac5e6e094d0
parent346abdee0c61612c2a7639a7fea28313f8a7742b (diff)
gtk4: enable CreateBuilder but forward to generic one still
Change-Id: Ifba5d0de1606ed238a3e71c4149baf1c97848b1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115483 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/inc/unx/gtk/gtkinst.hxx2
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx10
2 files changed, 9 insertions, 3 deletions
diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx
index ce3e1232be6a..596f9c3feccb 100644
--- a/vcl/inc/unx/gtk/gtkinst.hxx
+++ b/vcl/inc/unx/gtk/gtkinst.hxx
@@ -244,8 +244,8 @@ public:
virtual css::uno::Reference< css::uno::XInterface > CreateDragSource() override;
virtual css::uno::Reference< css::uno::XInterface > CreateDropTarget() override;
virtual OpenGLContext* CreateOpenGLContext() override;
-#if !GTK_CHECK_VERSION(4, 0, 0)
virtual weld::Builder* CreateBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile) override;
+#if !GTK_CHECK_VERSION(4, 0, 0)
virtual weld::Builder* CreateInterimBuilder(vcl::Window* pParent, const OUString& rUIRoot, const OUString& rUIFile,
bool bAllowCycleFocusOut, sal_uInt64 nLOKWindowId = 0) override;
#endif
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 93c8197f75c1..906c94e8966d 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -14139,6 +14139,7 @@ std::unique_ptr<weld::Label> GtkInstanceFrame::weld_label_widget() const
return nullptr;
#endif
}
+
#if !GTK_CHECK_VERSION(4, 0, 0)
namespace {
@@ -17498,6 +17499,13 @@ bool IsAllowedBuiltInIcon(std::u16string_view iconName)
return VclBuilder::mapStockToSymbol(iconName) != SymbolType::DONTKNOW;
}
+}
+#endif
+
+#if !GTK_CHECK_VERSION(4, 0, 0)
+
+namespace {
+
class GtkInstanceBuilder : public weld::Builder
{
private:
@@ -18338,7 +18346,6 @@ void GtkInstanceWidget::help_hierarchy_foreach(const std::function<bool(const OS
}
}
-#if !GTK_CHECK_VERSION(4, 0, 0)
weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile)
{
#if !GTK_CHECK_VERSION(4, 0, 0)
@@ -18351,7 +18358,6 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
return SalInstance::CreateBuilder(pParent, rUIRoot, rUIFile);
#endif
}
-#endif
#if !GTK_CHECK_VERSION(4, 0, 0)
// tdf#135965 for the case of native widgets inside a GtkSalFrame and F1 pressed, run help