[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - vcl/unx
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 24 09:33:42 UTC 2021
vcl/unx/gtk3/gtkinst.cxx | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
New commits:
commit 7f1ded9d814f6558ae9b2e6e85063c355950200e
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 23 09:32:03 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri Sep 24 11:33:04 2021 +0200
Related: tdf#142704 ReadStringHook may not be set in testing configurations
Change-Id: Iab2cd0cccb781a39af7b9315ccf8c242a2cc49a9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122438
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 53ab57ae32dd..38205154be22 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -21396,14 +21396,17 @@ private:
}
#if !GTK_CHECK_VERSION(4, 0, 0)
- // tdf#142704 %PRODUCTNAME shown in extended tips
- AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget);
- const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
- if (pDesc && pDesc[0])
+ if (m_pStringReplace)
{
- OUString aDesc(pDesc, strlen(pDesc), RTL_TEXTENCODING_UTF8);
- aDesc = (*m_pStringReplace)(aDesc);
- atk_object_set_description(pAtkObject, OUStringToOString(aDesc, RTL_TEXTENCODING_UTF8).getStr());
+ // tdf#142704 %PRODUCTNAME shown in extended tips
+ AtkObject* pAtkObject = gtk_widget_get_accessible(pWidget);
+ const char* pDesc = pAtkObject ? atk_object_get_description(pAtkObject) : nullptr;
+ if (pDesc && pDesc[0])
+ {
+ OUString aDesc(pDesc, strlen(pDesc), RTL_TEXTENCODING_UTF8);
+ aDesc = (*m_pStringReplace)(aDesc);
+ atk_object_set_description(pAtkObject, OUStringToOString(aDesc, RTL_TEXTENCODING_UTF8).getStr());
+ }
}
#endif
@@ -21411,7 +21414,7 @@ private:
if (GTK_IS_BUTTON(pWidget))
{
GtkButton* pButton = GTK_BUTTON(pWidget);
- if (m_pStringReplace != nullptr)
+ if (m_pStringReplace)
{
OUString aLabel(get_label(pButton));
if (!aLabel.isEmpty())
@@ -21424,7 +21427,7 @@ private:
else if (GTK_IS_CHECK_BUTTON(pWidget))
{
GtkCheckButton* pButton = GTK_CHECK_BUTTON(pWidget);
- if (m_pStringReplace != nullptr)
+ if (m_pStringReplace)
{
OUString aLabel(get_label(pButton));
if (!aLabel.isEmpty())
@@ -21437,7 +21440,7 @@ private:
else if (GTK_IS_LABEL(pWidget))
{
GtkLabel* pLabel = GTK_LABEL(pWidget);
- if (m_pStringReplace != nullptr)
+ if (m_pStringReplace)
{
OUString aLabel(get_label(pLabel));
if (!aLabel.isEmpty())
@@ -21449,7 +21452,7 @@ private:
else if (GTK_IS_TEXT_VIEW(pWidget))
{
GtkTextView* pTextView = GTK_TEXT_VIEW(pWidget);
- if (m_pStringReplace != nullptr)
+ if (m_pStringReplace)
{
GtkTextBuffer* pBuffer = gtk_text_view_get_buffer(pTextView);
GtkTextIter start, end;
@@ -21467,7 +21470,8 @@ private:
}
else if (GTK_IS_WINDOW(pWidget))
{
- if (m_pStringReplace != nullptr) {
+ if (m_pStringReplace)
+ {
GtkWindow* pWindow = GTK_WINDOW(pWidget);
set_title(pWindow, (*m_pStringReplace)(get_title(pWindow)));
if (GTK_IS_MESSAGE_DIALOG(pWindow))
More information about the Libreoffice-commits
mailing list