[Libreoffice-bugs] [Bug 140705] Some buttons has 'gtk-' before the text. Like 'gtk-cancel' instead of 'Cancel'

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Apr 4 14:11:27 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=140705

--- Comment #12 from Caolán McNamara <caolanm at redhat.com> ---
I can't reproduce this in my 7-1 linux gen version

cui/uiconfig/ui/aboutdialog.ui has...

<object class="GtkButton" id="btnClose">
  <property name="label">gtk-close</property>
  <property name="visible">True</property>
  <property name="can-focus">True</property>
  <property name="receives-default">True</property>
  <property name="use-underline">True</property>
  <property name="use-stock">True</property>
</object>

In 7.1, because of "use-stock", I expect vcl/source/window/builder.cxx:1301
extractStock to return true, and bLegacy to be false, and thus 

xWindow = VclPtr<PushButton>::Create(pParent, nBits);
xWindow->SetText(getStockText(sType));

to be called where getStockText is supposed to replace gtk-close with
VclResId(SV_BUTTONTEXT_CLOSE)

if getStockText was called at all, failure would result in an empty string, not
an unchanged string. The button is created so extractStockAndBuildPushButton
must be called, so I can only surmise that extractStock returns false for some
unknown reason and line 1323, xWindow = VclPtr<PushButton>::Create(pParent,
nBits) is called leaving the label of gtk-close unconverted.

maybe m.a.riosv can attach the aboutdialog.ui file from their
share/config/soffice.cfg/cui/ui directory to confirm it has the exected
"use-stock" property for that btnClose dialog. If anyone with a debugging build
can reproduce then putting a breakpoint in extractStockAndBuildPushButton is
the place to start

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210404/ae93033f/attachment.htm>


More information about the Libreoffice-bugs mailing list