Manager: Add keyboard mnemonics and ellipses to menu entries

This commit is contained in:
Alexander Babikov
2025-07-27 04:36:21 +05:00
parent 8c88d6257b
commit 04966d609b
29 changed files with 67 additions and 66 deletions

View File

@@ -30,7 +30,7 @@ msgstr ""
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "" msgstr ""
msgid "&View" msgid "&View"

View File

@@ -30,8 +30,8 @@ msgstr "&Pausa"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Sortir ..." msgstr "&Sortir"
msgid "&View" msgid "&View"
msgstr "&Vista" msgstr "&Vista"

View File

@@ -30,7 +30,7 @@ msgstr "P&ozastavit"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Ukončit" msgstr "&Ukončit"
msgid "&View" msgid "&View"

View File

@@ -30,8 +30,8 @@ msgstr "&Pause"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "Be&enden..." msgstr "Be&enden"
msgid "&View" msgid "&View"
msgstr "&Ansicht" msgstr "&Ansicht"

View File

@@ -30,8 +30,8 @@ msgstr "&Pausa"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Salir..." msgstr "&Salir"
msgid "&View" msgid "&View"
msgstr "&Vista" msgstr "&Vista"

View File

@@ -30,8 +30,8 @@ msgstr "&Tauko"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Poistu..." msgstr "&Poistu"
msgid "&View" msgid "&View"
msgstr "&Näytä" msgstr "&Näytä"

View File

@@ -30,8 +30,8 @@ msgstr "&Pause"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Quitter..." msgstr "&Quitter"
msgid "&View" msgid "&View"
msgstr "&Vue" msgstr "&Vue"

View File

@@ -30,8 +30,8 @@ msgstr "&Pauza"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "Iz&laz..." msgstr "Iz&laz"
msgid "&View" msgid "&View"
msgstr "&Pogled" msgstr "&Pogled"

View File

@@ -30,8 +30,8 @@ msgstr "&Szüneteltetés"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Kilépés..." msgstr "&Kilépés"
msgid "&View" msgid "&View"
msgstr "&Nézet" msgstr "&Nézet"

View File

@@ -30,8 +30,8 @@ msgstr "&Pausa"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "E&sci..." msgstr "E&sci"
msgid "&View" msgid "&View"
msgstr "&Visualizza" msgstr "&Visualizza"

View File

@@ -30,8 +30,8 @@ msgstr "一時停止(&P)"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "終了(&X)..." msgstr "終了(&X)"
msgid "&View" msgid "&View"
msgstr "表示(&V)" msgstr "表示(&V)"

View File

@@ -30,8 +30,8 @@ msgstr "일시정지(&P)"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "끝내기(&X)..." msgstr "끝내기(&X)"
msgid "&View" msgid "&View"
msgstr "표시(&V)" msgstr "표시(&V)"

View File

@@ -30,8 +30,8 @@ msgstr "&Pauze"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Afsluiten..." msgstr "&Afsluiten"
msgid "&View" msgid "&View"
msgstr "&Beeld" msgstr "&Beeld"

View File

@@ -30,8 +30,8 @@ msgstr "&Pauza"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "W&yjdź..." msgstr "W&yjdź"
msgid "&View" msgid "&View"
msgstr "&Widok" msgstr "&Widok"

View File

@@ -30,8 +30,8 @@ msgstr "&Pausar"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Sair..." msgstr "&Sair"
msgid "&View" msgid "&View"
msgstr "&Exibir" msgstr "&Exibir"

View File

@@ -30,8 +30,8 @@ msgstr "&Pausa"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Sair..." msgstr "&Sair"
msgid "&View" msgid "&View"
msgstr "&Ver" msgstr "&Ver"

View File

@@ -30,8 +30,8 @@ msgstr "&Пауза"
msgid "Re&sume" msgid "Re&sume"
msgstr "В&озобновить" msgstr "В&озобновить"
msgid "E&xit..." msgid "E&xit"
msgstr "&Выход..." msgstr "&Выход"
msgid "&View" msgid "&View"
msgstr "&Вид" msgstr "&Вид"

View File

@@ -30,7 +30,7 @@ msgstr "P&ozastaviť"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Ukončiť" msgstr "&Ukončiť"
msgid "&View" msgid "&View"

View File

@@ -30,8 +30,8 @@ msgstr "&Premor"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "Iz&hod..." msgstr "Iz&hod"
msgid "&View" msgid "&View"
msgstr "&Pogled" msgstr "&Pogled"

View File

@@ -30,8 +30,8 @@ msgstr "&Pausa"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "A&vsluta..." msgstr "A&vsluta"
msgid "&View" msgid "&View"
msgstr "&Visa" msgstr "&Visa"

View File

@@ -30,8 +30,8 @@ msgstr "&Duraklat"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Çıkış yap..." msgstr "&Çıkış yap"
msgid "&View" msgid "&View"
msgstr "&Görünüm" msgstr "&Görünüm"

View File

@@ -30,8 +30,8 @@ msgstr "&Пауза"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "&Вихід..." msgstr "&Вихід"
msgid "&View" msgid "&View"
msgstr "&Вигляд" msgstr "&Вигляд"

View File

@@ -30,8 +30,8 @@ msgstr "Tạm &dừng"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "Th&oát..." msgstr "Th&oát"
msgid "&View" msgid "&View"
msgstr "&Xem" msgstr "&Xem"

View File

@@ -30,8 +30,8 @@ msgstr "暂停(&P)"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "退出(&X)..." msgstr "退出(&X)"
msgid "&View" msgid "&View"
msgstr "查看(&V)" msgstr "查看(&V)"

View File

@@ -30,8 +30,8 @@ msgstr "暫停(&P)"
msgid "Re&sume" msgid "Re&sume"
msgstr "" msgstr ""
msgid "E&xit..." msgid "E&xit"
msgstr "退出(&X)..." msgstr "退出(&X)"
msgid "&View" msgid "&View"
msgstr "檢視(&V)" msgstr "檢視(&V)"

View File

@@ -354,7 +354,7 @@
</action> </action>
<action name="actionExit"> <action name="actionExit">
<property name="text"> <property name="text">
<string>Exit</string> <string>E&amp;xit</string>
</property> </property>
<property name="menuRole"> <property name="menuRole">
<enum>QAction::QuitRole</enum> <enum>QAction::QuitRole</enum>

View File

@@ -53,7 +53,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) :
if (indexAt.isValid()) { if (indexAt.isValid()) {
QMenu contextMenu(tr("Context Menu"), ui->listView); QMenu contextMenu(tr("Context Menu"), ui->listView);
QAction nameChangeAction(tr("Change display name")); QAction nameChangeAction(tr("Change &display name..."));
contextMenu.addAction(&nameChangeAction); contextMenu.addAction(&nameChangeAction);
// Use a lambda to call a function so indexAt can be passed // Use a lambda to call a function so indexAt can be passed
connect(&nameChangeAction, &QAction::triggered, ui->listView, [this, indexAt] { connect(&nameChangeAction, &QAction::triggered, ui->listView, [this, indexAt] {
@@ -61,7 +61,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) :
}); });
nameChangeAction.setEnabled(!selected_sysconfig->window_obscured); nameChangeAction.setEnabled(!selected_sysconfig->window_obscured);
QAction openSystemFolderAction(tr("Open folder")); QAction openSystemFolderAction(tr("&Open folder..."));
contextMenu.addAction(&openSystemFolderAction); contextMenu.addAction(&openSystemFolderAction);
connect(&openSystemFolderAction, &QAction::triggered, [indexAt] { connect(&openSystemFolderAction, &QAction::triggered, [indexAt] {
if (const auto configDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString(); !configDir.isEmpty()) { if (const auto configDir = indexAt.data(VMManagerModel::Roles::ConfigDir).toString(); !configDir.isEmpty()) {
@@ -73,7 +73,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) :
} }
}); });
QAction setSystemIcon(tr("Set icon")); QAction setSystemIcon(tr("Set &icon..."));
contextMenu.addAction(&setSystemIcon); contextMenu.addAction(&setSystemIcon);
connect(&setSystemIcon, &QAction::triggered, [this] { connect(&setSystemIcon, &QAction::triggered, [this] {
IconSelectionDialog dialog(":/systemicons/"); IconSelectionDialog dialog(":/systemicons/");
@@ -98,7 +98,7 @@ VMManagerMain::VMManagerMain(QWidget *parent) :
contextMenu.addSeparator(); contextMenu.addSeparator();
QAction showRawConfigFile(tr("Show config file")); QAction showRawConfigFile(tr("Show &config file"));
contextMenu.addAction(&showRawConfigFile); contextMenu.addAction(&showRawConfigFile);
connect(&showRawConfigFile, &QAction::triggered, [this, indexAt] { connect(&showRawConfigFile, &QAction::triggered, [this, indexAt] {
if (const auto configFile = indexAt.data(VMManagerModel::Roles::ConfigFile).toString(); !configFile.isEmpty()) { if (const auto configFile = indexAt.data(VMManagerModel::Roles::ConfigFile).toString(); !configFile.isEmpty()) {

View File

@@ -46,11 +46,11 @@ VMManagerMainWindow(QWidget *parent)
setCentralWidget(vmm); setCentralWidget(vmm);
// Set up the buttons // Set up the buttons
connect(ui->actionNew_Machine, &QAction::triggered, vmm, &VMManagerMain::newMachineWizard);
connect(ui->actionStartPause, &QAction::triggered, vmm, &VMManagerMain::startButtonPressed); connect(ui->actionStartPause, &QAction::triggered, vmm, &VMManagerMain::startButtonPressed);
connect(ui->actionSettings, &QAction::triggered, vmm, &VMManagerMain::settingsButtonPressed); connect(ui->actionSettings, &QAction::triggered, vmm, &VMManagerMain::settingsButtonPressed);
connect(ui->actionHard_Reset, &QAction::triggered, vmm, &VMManagerMain::restartButtonPressed); connect(ui->actionHard_Reset, &QAction::triggered, vmm, &VMManagerMain::restartButtonPressed);
connect(ui->actionForce_Shutdown, &QAction::triggered, vmm, &VMManagerMain::shutdownForceButtonPressed); connect(ui->actionForce_Shutdown, &QAction::triggered, vmm, &VMManagerMain::shutdownForceButtonPressed);
connect(ui->actionNew_Machine, &QAction::triggered, vmm, &VMManagerMain::newMachineWizard);
// Set up menu actions // Set up menu actions
// (Disable this if the EMU_BUILD_NUM == 0) // (Disable this if the EMU_BUILD_NUM == 0)

View File

@@ -25,14 +25,14 @@
</property> </property>
<widget class="QMenu" name="menuTools"> <widget class="QMenu" name="menuTools">
<property name="title"> <property name="title">
<string>Tools</string> <string>&amp;Tools</string>
</property> </property>
<addaction name="actionPreferences"/> <addaction name="actionPreferences"/>
<addaction name="actionCheck_for_updates"/> <addaction name="actionCheck_for_updates"/>
</widget> </widget>
<widget class="QMenu" name="menuFile"> <widget class="QMenu" name="menuFile">
<property name="title"> <property name="title">
<string>File</string> <string>&amp;File</string>
</property> </property>
<addaction name="actionNew_Machine"/> <addaction name="actionNew_Machine"/>
<addaction name="separator"/> <addaction name="separator"/>
@@ -73,12 +73,13 @@
<attribute name="toolBarBreak"> <attribute name="toolBarBreak">
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
<addaction name="actionNew_Machine"/>
<addaction name="separator"/>
<addaction name="actionStartPause"/> <addaction name="actionStartPause"/>
<addaction name="actionHard_Reset"/> <addaction name="actionHard_Reset"/>
<addaction name="actionForce_Shutdown"/> <addaction name="actionForce_Shutdown"/>
<addaction name="actionCtrl_Alt_Del"/> <addaction name="actionCtrl_Alt_Del"/>
<addaction name="actionSettings"/> <addaction name="actionSettings"/>
<addaction name="actionNew_Machine"/>
</widget> </widget>
<action name="actionStartPause"> <action name="actionStartPause">
<property name="checkable"> <property name="checkable">
@@ -89,7 +90,7 @@
<normaloff>:/menuicons/qt/icons/run.ico</normaloff>:/menuicons/qt/icons/run.ico</iconset> <normaloff>:/menuicons/qt/icons/run.ico</normaloff>:/menuicons/qt/icons/run.ico</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Start</string> <string>&amp;Start</string>
</property> </property>
<property name="iconVisibleInMenu"> <property name="iconVisibleInMenu">
<bool>false</bool> <bool>false</bool>
@@ -116,7 +117,7 @@
<normaloff>:/menuicons/qt/icons/acpi_shutdown.ico</normaloff>:/menuicons/qt/icons/acpi_shutdown.ico</iconset> <normaloff>:/menuicons/qt/icons/acpi_shutdown.ico</normaloff>:/menuicons/qt/icons/acpi_shutdown.ico</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Force shutdown</string> <string>&amp;Force shutdown</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Force shutdown</string> <string>Force shutdown</string>
@@ -173,18 +174,18 @@
<normaloff>:/settings/qt/icons/86Box-yellow.ico</normaloff>:/settings/qt/icons/86Box-yellow.ico</iconset> <normaloff>:/settings/qt/icons/86Box-yellow.ico</normaloff>:/settings/qt/icons/86Box-yellow.ico</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>New Machine</string> <string>&amp;New machine...</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>New Machine</string> <string>New machine...</string>
</property> </property>
</action> </action>
<action name="actionPreferences"> <action name="actionPreferences">
<property name="text"> <property name="text">
<string>Preferences</string> <string>&amp;Preferences...</string>
</property> </property>
<property name="toolTip"> <property name="toolTip">
<string>Preferences</string> <string>Preferences...</string>
</property> </property>
<property name="menuRole"> <property name="menuRole">
<enum>QAction::PreferencesRole</enum> <enum>QAction::PreferencesRole</enum>
@@ -199,7 +200,7 @@
<normaloff>:/menuicons/qt/icons/run.ico</normaloff>:/menuicons/qt/icons/run.ico</iconset> <normaloff>:/menuicons/qt/icons/run.ico</normaloff>:/menuicons/qt/icons/run.ico</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Start</string> <string>&amp;Start</string>
</property> </property>
<property name="iconVisibleInMenu"> <property name="iconVisibleInMenu">
<bool>false</bool> <bool>false</bool>
@@ -207,7 +208,7 @@
</action> </action>
<action name="actionCheck_for_updates"> <action name="actionCheck_for_updates">
<property name="text"> <property name="text">
<string>Check for updates</string> <string>&amp;Check for updates...</string>
</property> </property>
</action> </action>
<action name="actionExit"> <action name="actionExit">
@@ -215,7 +216,7 @@
<iconset theme="QIcon::ApplicationExit"/> <iconset theme="QIcon::ApplicationExit"/>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Exit</string> <string>E&amp;xit</string>
</property> </property>
<property name="menuRole"> <property name="menuRole">
<enum>QAction::QuitRole</enum> <enum>QAction::QuitRole</enum>
@@ -236,7 +237,7 @@
</action> </action>
<action name="actionAbout_Qt"> <action name="actionAbout_Qt">
<property name="text"> <property name="text">
<string>About Qt</string> <string>About &amp;Qt</string>
</property> </property>
<property name="visible"> <property name="visible">
<bool>false</bool> <bool>false</bool>