vcl/unx/gtk3/gtkinst.cxx | 4 ----
1 file changed, 4 deletions(-)
New commits:
commit 1e5992c1059866186b5e75a0beb7dd7b892352cf
Author: Caolán McNamara <[email protected]>
AuthorDate: Fri Nov 5 11:46:09 2021 +0000
Commit: Caolán McNamara <[email protected]>
CommitDate: Fri Nov 5 15:16:31 2021 +0100
gtk[3|4] do the same thing to set/get buttons labels for both gtks
Change-Id: I0046f4221ab73d9f9b6801e3794410d88a6887fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124744
Tested-by: Caolán McNamara <[email protected]>
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 0e504200917e..3d518a8cbaad 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -4620,24 +4620,20 @@ namespace
OUString button_get_label(GtkButton* pButton)
{
-#if GTK_CHECK_VERSION(4, 0, 0)
if (GtkLabel* pLabel = get_label_widget(GTK_WIDGET(pButton)))
return ::get_label(pLabel);
-#endif
const gchar* pStr = gtk_button_get_label(pButton);
return OUString(pStr, pStr ? strlen(pStr) : 0, RTL_TEXTENCODING_UTF8);
}
void button_set_label(GtkButton* pButton, const OUString& rText)
{
-#if GTK_CHECK_VERSION(4, 0, 0)
if (GtkLabel* pLabel = get_label_widget(GTK_WIDGET(pButton)))
{
::set_label(pLabel, rText);
gtk_widget_set_visible(GTK_WIDGET(pLabel), true);
return;
}
-#endif
gtk_button_set_label(pButton, MapToGtkAccelerator(rText).getStr());
}