[Libreoffice-commits] core.git: vcl/unx
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Jul 17 20:11:47 UTC 2018
vcl/unx/gtk3/gtk3gtkinst.cxx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 74318dbeffb9536ac3b4215ae9369a05f2ac7228
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 17 16:05:35 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jul 17 22:11:24 2018 +0200
Resolves: tdf#118801 icons go missing on text-less buttons
Change-Id: I003a59643518e60948d71b335dfcd7e20ba8fee5
Reviewed-on: https://gerrit.libreoffice.org/57572
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index f890a4f0c862..0f2c6568dd75 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -4989,8 +4989,11 @@ private:
if (GTK_IS_BUTTON(pWidget))
{
GtkButton* pButton = GTK_BUTTON(pWidget);
- if (m_pStringReplace != nullptr) {
- set_label(pButton, (*m_pStringReplace)(get_label(pButton)));
+ if (m_pStringReplace != nullptr)
+ {
+ OUString aLabel(get_label(pButton));
+ if (!aLabel.isEmpty())
+ set_label(pButton, (*m_pStringReplace)(aLabel));
}
if (gtk_button_get_use_underline(pButton) && !gtk_button_get_use_stock(pButton))
m_aMnemonicButtons.push_back(pButton);
@@ -4998,8 +5001,11 @@ private:
else if (GTK_IS_LABEL(pWidget))
{
GtkLabel* pLabel = GTK_LABEL(pWidget);
- if (m_pStringReplace != nullptr) {
- set_label(pLabel, (*m_pStringReplace)(get_label(pLabel)));
+ if (m_pStringReplace != nullptr)
+ {
+ OUString aLabel(get_label(pLabel));
+ if (!aLabel.isEmpty())
+ set_label(pLabel, (*m_pStringReplace)(aLabel));
}
if (gtk_label_get_use_underline(pLabel))
m_aMnemonicLabels.push_back(pLabel);
More information about the Libreoffice-commits
mailing list