Fix and add menu accelerators (#15532)
* Fix and add menu accelerators: menus common to all workbenches I use menu accelerators fairly often, so I find it very frustrating when they are missing, or worse, they don't work due to the same letter being assigned to several commands. This patch adds accelerators to lots of menu entries missing them and fixes broken accelerators. Wherever possible, standard accelerator keys are used: https://doc.qt.io/qt-5/accelerators.html This commit covers accelerator fixes that are common to all workbenches. Accelerator fixes for specific workbenches will be done in separate commits. * Add missing accelerators: Spreadsheet workbench
This commit is contained in:
@@ -86,7 +86,7 @@ StdCmdSetAppearance::StdCmdSetAppearance()
|
||||
: Command("Std_SetAppearance")
|
||||
{
|
||||
sGroup = "Standard-View";
|
||||
sMenuText = QT_TR_NOOP("Appearance...");
|
||||
sMenuText = QT_TR_NOOP("&Appearance...");
|
||||
sToolTipText = QT_TR_NOOP("Sets the display properties of the selected object");
|
||||
sWhatsThis = "Std_SetAppearance";
|
||||
sStatusTip = QT_TR_NOOP("Sets the display properties of the selected object");
|
||||
@@ -115,7 +115,7 @@ StdCmdSetMaterial::StdCmdSetMaterial()
|
||||
: Command("Std_SetMaterial")
|
||||
{
|
||||
sGroup = "Standard-View";
|
||||
sMenuText = QT_TR_NOOP("Material...");
|
||||
sMenuText = QT_TR_NOOP("&Material...");
|
||||
sToolTipText = QT_TR_NOOP("Sets the material of the selected object");
|
||||
sWhatsThis = "Std_SetMaterial";
|
||||
sStatusTip = QT_TR_NOOP("Sets the material of the selected object");
|
||||
|
||||
@@ -2081,7 +2081,7 @@ CmdColorPerFace::CmdColorPerFace()
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = QT_TR_NOOP("Part");
|
||||
sMenuText = QT_TR_NOOP("Appearance per face");
|
||||
sMenuText = QT_TR_NOOP("Appearance per &face");
|
||||
sToolTipText = QT_TR_NOOP("Set the appearance of each individual face "
|
||||
"of the selected object.");
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -2183,7 +2183,7 @@ CmdPartSectionCut::CmdPartSectionCut()
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = "View";
|
||||
sMenuText = QT_TR_NOOP("Persistent section cut");
|
||||
sMenuText = QT_TR_NOOP("Persiste&nt section cut");
|
||||
sToolTipText = QT_TR_NOOP("Creates a persistent section cut of visible part objects");
|
||||
sWhatsThis = "Part_SectionCut";
|
||||
sStatusTip = sToolTipText;
|
||||
|
||||
@@ -606,7 +606,7 @@ CmdPartDesignDuplicateSelection::CmdPartDesignDuplicateSelection()
|
||||
{
|
||||
sAppModule = "PartDesign";
|
||||
sGroup = QT_TR_NOOP("PartDesign");
|
||||
sMenuText = QT_TR_NOOP("Duplicate selected object");
|
||||
sMenuText = QT_TR_NOOP("Duplicate selected &object");
|
||||
sToolTipText = QT_TR_NOOP("Duplicates the selected object and adds it to the active body");
|
||||
sWhatsThis = "PartDesign_DuplicateSelection";
|
||||
sStatusTip = sToolTipText;
|
||||
|
||||
@@ -58,7 +58,7 @@ CmdSpreadsheetMergeCells::CmdSpreadsheetMergeCells()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Merge cells");
|
||||
sMenuText = QT_TR_NOOP("&Merge cells");
|
||||
sToolTipText = QT_TR_NOOP("Merge selected cells");
|
||||
sWhatsThis = "Spreadsheet_MergeCells";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -119,7 +119,7 @@ CmdSpreadsheetSplitCell::CmdSpreadsheetSplitCell()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Split cell");
|
||||
sMenuText = QT_TR_NOOP("Sp&lit cell");
|
||||
sToolTipText = QT_TR_NOOP("Split previously merged cells");
|
||||
sWhatsThis = "Spreadsheet_SplitCell";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -140,7 +140,7 @@ void CmdSpreadsheetSplitCell::activated(int iMsg)
|
||||
|
||||
if (current.isValid()) {
|
||||
std::string address = CellAddress(current.row(), current.column()).toString();
|
||||
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Split cell"));
|
||||
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Sp&lit cell"));
|
||||
Gui::Command::doCommand(Gui::Command::Doc,
|
||||
"App.ActiveDocument.%s.splitCell('%s')",
|
||||
sheet->getNameInDocument(),
|
||||
@@ -181,7 +181,7 @@ CmdSpreadsheetImport::CmdSpreadsheetImport()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Import spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("&Import spreadsheet");
|
||||
sToolTipText = QT_TR_NOOP("Import CSV file into spreadsheet");
|
||||
sWhatsThis = "Spreadsheet_Import";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -234,7 +234,7 @@ CmdSpreadsheetExport::CmdSpreadsheetExport()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Export spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("&Export spreadsheet");
|
||||
sToolTipText = QT_TR_NOOP("Export spreadsheet to CSV file");
|
||||
sWhatsThis = "Spreadsheet_Export";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -280,7 +280,7 @@ CmdSpreadsheetAlignLeft::CmdSpreadsheetAlignLeft()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Align left");
|
||||
sMenuText = QT_TR_NOOP("Align &left");
|
||||
sToolTipText = QT_TR_NOOP("Left-align contents of selected cells");
|
||||
sWhatsThis = "Spreadsheet_AlignLeft";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -337,7 +337,7 @@ CmdSpreadsheetAlignCenter::CmdSpreadsheetAlignCenter()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Align center");
|
||||
sMenuText = QT_TR_NOOP("Align ¢er");
|
||||
sToolTipText = QT_TR_NOOP("Center-align contents of selected cells");
|
||||
sWhatsThis = "Spreadsheet_AlignCenter";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -394,7 +394,7 @@ CmdSpreadsheetAlignRight::CmdSpreadsheetAlignRight()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Align right");
|
||||
sMenuText = QT_TR_NOOP("Align &right");
|
||||
sToolTipText = QT_TR_NOOP("Right-align contents of selected cells");
|
||||
sWhatsThis = "Spreadsheet_AlignRight";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -451,7 +451,7 @@ CmdSpreadsheetAlignTop::CmdSpreadsheetAlignTop()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Align top");
|
||||
sMenuText = QT_TR_NOOP("Align &top");
|
||||
sToolTipText = QT_TR_NOOP("Top-align contents of selected cells");
|
||||
sWhatsThis = "Spreadsheet_AlignTop";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -508,7 +508,7 @@ CmdSpreadsheetAlignBottom::CmdSpreadsheetAlignBottom()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Align bottom");
|
||||
sMenuText = QT_TR_NOOP("Align &bottom");
|
||||
sToolTipText = QT_TR_NOOP("Bottom-align contents of selected cells");
|
||||
sWhatsThis = "Spreadsheet_AlignBottom";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -565,7 +565,7 @@ CmdSpreadsheetAlignVCenter::CmdSpreadsheetAlignVCenter()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Vertically center-align");
|
||||
sMenuText = QT_TR_NOOP("&Vertically center-align");
|
||||
sToolTipText = QT_TR_NOOP("Vertically center-align contents of selected cells");
|
||||
sWhatsThis = "Spreadsheet_AlignVCenter";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -622,7 +622,7 @@ CmdSpreadsheetStyleBold::CmdSpreadsheetStyleBold()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Bold text");
|
||||
sMenuText = QT_TR_NOOP("&Bold text");
|
||||
sToolTipText = QT_TR_NOOP("Set text in selected cells bold");
|
||||
sWhatsThis = "Spreadsheet_StyleBold";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -706,7 +706,7 @@ CmdSpreadsheetStyleItalic::CmdSpreadsheetStyleItalic()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Italic text");
|
||||
sMenuText = QT_TR_NOOP("&Italic text");
|
||||
sToolTipText = QT_TR_NOOP("Set text in selected cells italic");
|
||||
sWhatsThis = "Spreadsheet_StyleItalic";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -790,7 +790,7 @@ CmdSpreadsheetStyleUnderline::CmdSpreadsheetStyleUnderline()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Underline text");
|
||||
sMenuText = QT_TR_NOOP("&Underline text");
|
||||
sToolTipText = QT_TR_NOOP("Underline text in selected cells");
|
||||
sWhatsThis = "Spreadsheet_StyleUnderline";
|
||||
sStatusTip = sToolTipText;
|
||||
@@ -945,7 +945,7 @@ CmdCreateSpreadsheet::CmdCreateSpreadsheet()
|
||||
{
|
||||
sAppModule = "Spreadsheet";
|
||||
sGroup = QT_TR_NOOP("Spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("Create spreadsheet");
|
||||
sMenuText = QT_TR_NOOP("&Create spreadsheet");
|
||||
sToolTipText = QT_TR_NOOP("Create a new spreadsheet");
|
||||
sWhatsThis = "Spreadsheet_CreateSheet";
|
||||
sStatusTip = sToolTipText;
|
||||
|
||||
@@ -45,7 +45,7 @@ CmdStart::CmdStart()
|
||||
{
|
||||
sAppModule = "Start";
|
||||
sGroup = QT_TR_NOOP("Start");
|
||||
sMenuText = QT_TR_NOOP("Start Page");
|
||||
sMenuText = QT_TR_NOOP("&Start Page");
|
||||
sToolTipText = QT_TR_NOOP("Displays the Start Page");
|
||||
sWhatsThis = "Start_Start";
|
||||
sStatusTip = sToolTipText;
|
||||
|
||||
Reference in New Issue
Block a user