Use menu names for the keyboard preferences. Fixes #411.

This commit is contained in:
Leonardo Zide 2020-01-26 11:03:41 -08:00
parent 3e3e7135f8
commit 59098436b7
2 changed files with 45 additions and 45 deletions

View file

@ -797,112 +797,112 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
// LC_VIEW_CAMERA1 // LC_VIEW_CAMERA1
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera01"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera01"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 1"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA2 // LC_VIEW_CAMERA2
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera02"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera02"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 2"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA3 // LC_VIEW_CAMERA3
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera03"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera03"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 3"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA4 // LC_VIEW_CAMERA4
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera04"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera04"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 4"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA5 // LC_VIEW_CAMERA5
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera05"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera05"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 5"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA6 // LC_VIEW_CAMERA6
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera06"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera06"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 6"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA7 // LC_VIEW_CAMERA7
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera07"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera07"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 7"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA8 // LC_VIEW_CAMERA8
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera08"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera08"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 8"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA9 // LC_VIEW_CAMERA9
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera09"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera09"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 9"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA10 // LC_VIEW_CAMERA10
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera10"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera10"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 10"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA11 // LC_VIEW_CAMERA11
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera11"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera11"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 11"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA12 // LC_VIEW_CAMERA12
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera12"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera12"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 12"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA13 // LC_VIEW_CAMERA13
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera13"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera13"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 13"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA14 // LC_VIEW_CAMERA14
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera14"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera14"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 14"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA15 // LC_VIEW_CAMERA15
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera15"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera15"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 15"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
// LC_VIEW_CAMERA16 // LC_VIEW_CAMERA16
{ {
QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera16"), QT_TRANSLATE_NOOP("Action", "View.Cameras.Camera16"),
QT_TRANSLATE_NOOP("Menu", "Camera"), QT_TRANSLATE_NOOP("Menu", "Camera 16"),
QT_TRANSLATE_NOOP("Status", "Use this camera"), QT_TRANSLATE_NOOP("Status", "Use this camera"),
"" ""
}, },
@ -1329,168 +1329,168 @@ lcCommand gCommands[LC_NUM_COMMANDS] =
// LC_MODEL_01 // LC_MODEL_01
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model01"), QT_TRANSLATE_NOOP("Action", "Model.Model01"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 1"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_02 // LC_MODEL_02
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model02"), QT_TRANSLATE_NOOP("Action", "Model.Model02"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 2"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_03 // LC_MODEL_03
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model03"), QT_TRANSLATE_NOOP("Action", "Model.Model03"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 3"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_04 // LC_MODEL_04
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model04"), QT_TRANSLATE_NOOP("Action", "Model.Model04"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 4"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_05 // LC_MODEL_05
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model05"), QT_TRANSLATE_NOOP("Action", "Model.Model05"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 5"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_06 // LC_MODEL_06
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model06"), QT_TRANSLATE_NOOP("Action", "Model.Model06"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 6"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_07 // LC_MODEL_07
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model07"), QT_TRANSLATE_NOOP("Action", "Model.Model07"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 7"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_08 // LC_MODEL_08
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model08"), QT_TRANSLATE_NOOP("Action", "Model.Model08"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 8"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_09 // LC_MODEL_09
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model09"), QT_TRANSLATE_NOOP("Action", "Model.Model09"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 9"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_10 // LC_MODEL_10
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model10"), QT_TRANSLATE_NOOP("Action", "Model.Model10"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 10"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_11 // LC_MODEL_11
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model11"), QT_TRANSLATE_NOOP("Action", "Model.Model11"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 11"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_12 // LC_MODEL_12
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model12"), QT_TRANSLATE_NOOP("Action", "Model.Model12"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 12"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_13 // LC_MODEL_13
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model13"), QT_TRANSLATE_NOOP("Action", "Model.Model13"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 13"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_14 // LC_MODEL_14
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model14"), QT_TRANSLATE_NOOP("Action", "Model.Model14"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 14"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_15 // LC_MODEL_15
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model15"), QT_TRANSLATE_NOOP("Action", "Model.Model15"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 15"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_16 // LC_MODEL_16
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model16"), QT_TRANSLATE_NOOP("Action", "Model.Model16"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 16"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_17 // LC_MODEL_17
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model17"), QT_TRANSLATE_NOOP("Action", "Model.Model17"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 17"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_18 // LC_MODEL_18
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model18"), QT_TRANSLATE_NOOP("Action", "Model.Model18"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 18"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_19 // LC_MODEL_19
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model19"), QT_TRANSLATE_NOOP("Action", "Model.Model19"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 19"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_20 // LC_MODEL_20
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model20"), QT_TRANSLATE_NOOP("Action", "Model.Model20"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 20"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_21 // LC_MODEL_21
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model21"), QT_TRANSLATE_NOOP("Action", "Model.Model21"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 21"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_22 // LC_MODEL_22
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model22"), QT_TRANSLATE_NOOP("Action", "Model.Model22"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 22"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_23 // LC_MODEL_23
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model23"), QT_TRANSLATE_NOOP("Action", "Model.Model23"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 23"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },
// LC_MODEL_24 // LC_MODEL_24
{ {
QT_TRANSLATE_NOOP("Action", "Model.Model24"), QT_TRANSLATE_NOOP("Action", "Model.Model24"),
QT_TRANSLATE_NOOP("Menu", ""), QT_TRANSLATE_NOOP("Menu", "Model 24"),
QT_TRANSLATE_NOOP("Status", "Switch to this submodel"), QT_TRANSLATE_NOOP("Status", "Switch to this submodel"),
"" ""
}, },

View file

@ -658,7 +658,7 @@ void lcQPreferencesDialog::updateCommandList()
QTreeWidgetItem *item = new QTreeWidgetItem; QTreeWidgetItem *item = new QTreeWidgetItem;
QKeySequence sequence(mOptions->KeyboardShortcuts.mShortcuts[actionIdx]); QKeySequence sequence(mOptions->KeyboardShortcuts.mShortcuts[actionIdx]);
item->setText(0, subId); item->setText(0, qApp->translate("Menu", gCommands[actionIdx].MenuName).remove('&').remove(QLatin1String("...")));
item->setText(1, sequence.toString(QKeySequence::NativeText)); item->setText(1, sequence.toString(QKeySequence::NativeText));
item->setData(0, Qt::UserRole, qVariantFromValue(actionIdx)); item->setData(0, Qt::UserRole, qVariantFromValue(actionIdx));