Strip mnemonics from the label in wxGTK wxToolBar
For consistency with the other platforms, don't show mnemonics in the toolbar label even if they're defined in the label string.
This commit is contained in:
committed by
Vadim Zeitlin
parent
d45ba8ce62
commit
82060f816a
@@ -535,8 +535,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
|
|||||||
}
|
}
|
||||||
if (!tool->GetLabel().empty())
|
if (!tool->GetLabel().empty())
|
||||||
{
|
{
|
||||||
|
wxString const
|
||||||
|
label = wxControl::RemoveMnemonics(tool->GetLabel());
|
||||||
|
|
||||||
gtk_tool_button_set_label(
|
gtk_tool_button_set_label(
|
||||||
GTK_TOOL_BUTTON(tool->m_item), wxGTK_CONV(tool->GetLabel()));
|
GTK_TOOL_BUTTON(tool->m_item), wxGTK_CONV(label));
|
||||||
// needed for labels in horizontal toolbar with wxTB_HORZ_LAYOUT
|
// needed for labels in horizontal toolbar with wxTB_HORZ_LAYOUT
|
||||||
gtk_tool_item_set_is_important(tool->m_item, true);
|
gtk_tool_item_set_is_important(tool->m_item, true);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user