summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-11-05 11:46:09 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-11-05 15:16:31 +0100
commit1e5992c1059866186b5e75a0beb7dd7b892352cf (patch)
tree67afd649dcaa79b587aecea6cba21140b8fad55b /vcl
parent95b283da72eb0cbf85d379bced053e1890d7fabe (diff)
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 <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk3/gtkinst.cxx4
1 files changed, 0 insertions, 4 deletions
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());
}