[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 21 16:27:08 UTC 2021
vcl/unx/gtk3/gtkinst.cxx | 35 ++++++++++++++++++++++++-----------
1 file changed, 24 insertions(+), 11 deletions(-)
New commits:
commit dea9c444ab139dd53d44203bbcb88b29c95ceb96
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed May 19 09:10:03 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri May 21 18:26:13 2021 +0200
gtk4: reenable CheckButton and RadioButton
Change-Id: I29dc430222bb6dcb44bca0c2f26939a925c69c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115787
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index a00cb56f56b6..9171de7f2f50 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -9834,6 +9834,12 @@ public:
}
};
+}
+
+#endif
+
+namespace {
+
class GtkInstanceCheckButton : public GtkInstanceWidget, public virtual weld::CheckButton
{
private:
@@ -9941,12 +9947,23 @@ public:
class GtkInstanceRadioButton : public GtkInstanceCheckButton, public virtual weld::RadioButton
{
public:
+#if GTK_CHECK_VERSION(4, 0, 0)
+ GtkInstanceRadioButton(GtkCheckButton* pButton, GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
+ : GtkInstanceCheckButton(pButton, pBuilder, bTakeOwnership)
+#else
GtkInstanceRadioButton(GtkRadioButton* pButton, GtkInstanceBuilder* pBuilder, bool bTakeOwnership)
: GtkInstanceCheckButton(GTK_CHECK_BUTTON(pButton), pBuilder, bTakeOwnership)
+#endif
{
}
};
+}
+
+namespace {
+
+#if !GTK_CHECK_VERSION(4, 0, 0)
+
class GtkInstanceScale : public GtkInstanceWidget, public virtual weld::Scale
{
private:
@@ -10208,10 +10225,11 @@ public:
g_signal_handler_disconnect(m_pCalendar, m_nDaySelectedSignalId);
}
};
-}
#endif
+}
+
namespace
{
void set_entry_message_type(GtkEntry* pEntry, weld::EntryMessageType eType)
@@ -18943,30 +18961,24 @@ public:
virtual std::unique_ptr<weld::RadioButton> weld_radio_button(const OString &id) override
{
-#if !GTK_CHECK_VERSION(4, 0, 0)
+#if GTK_CHECK_VERSION(4, 0, 0)
+ GtkCheckButton* pRadioButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilder, id.getStr()));
+#else
GtkRadioButton* pRadioButton = GTK_RADIO_BUTTON(gtk_builder_get_object(m_pBuilder, id.getStr()));
+#endif
if (!pRadioButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pRadioButton));
return std::make_unique<GtkInstanceRadioButton>(pRadioButton, this, false);
-#else
- (void)id;
- return nullptr;
-#endif
}
virtual std::unique_ptr<weld::CheckButton> weld_check_button(const OString &id) override
{
-#if !GTK_CHECK_VERSION(4, 0, 0)
GtkCheckButton* pCheckButton = GTK_CHECK_BUTTON(gtk_builder_get_object(m_pBuilder, id.getStr()));
if (!pCheckButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pCheckButton));
return std::make_unique<GtkInstanceCheckButton>(pCheckButton, this, false);
-#else
- (void)id;
- return nullptr;
-#endif
}
virtual std::unique_ptr<weld::Scale> weld_scale(const OString &id) override
@@ -19343,6 +19355,7 @@ weld::Builder* GtkInstance::CreateBuilder(weld::Widget* pParent, const OUString&
rUIFile != "cui/ui/percentdialog.ui" &&
rUIFile != "sfx/ui/querysavedialog.ui" &&
rUIFile != "svt/ui/javadisableddialog.ui" &&
+ rUIFile != "modules/smath/ui/alignmentdialog.ui" &&
rUIFile != "modules/smath/ui/fontsizedialog.ui" &&
rUIFile != "modules/smath/ui/savedefaultsdialog.ui" &&
rUIFile != "modules/swriter/ui/gotopagedialog.ui" &&
More information about the Libreoffice-commits
mailing list