- Timestamp:
- Jan 19, 2011 4:13:31 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r35564 r35634 507 507 src/widgets/VBoxOSTypeSelectorWidget.cpp \ 508 508 src/widgets/VBoxWarningPane.cpp \ 509 src/selector/UISelectorShortcuts.cpp \ 509 510 src/selector/UIVMDesktop.cpp \ 510 511 src/selector/UIVMItem.cpp \ … … 525 526 src/runtime/UIMachineLogic.cpp \ 526 527 src/runtime/UIMachineMenuBar.cpp \ 528 src/runtime/UIMachineShortcuts.cpp \ 527 529 src/runtime/UIMachineView.cpp \ 528 530 src/runtime/UIMachineWindow.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxHelpActions.cpp
r30677 r35634 22 22 #else /* !VBOX_WITH_PRECOMPILED_HEADERS */ 23 23 #include "VBoxHelpActions.h" 24 #include "UIExtraDataEventHandler.h" 25 #include "UIIconPool.h" 26 #include "UISelectorShortcuts.h" 24 27 #include "VBoxGlobal.h" 25 28 #include "VBoxProblemReporter.h" 26 #include "UIIconPool.h"27 #include "UIExtraDataEventHandler.h"28 29 29 30 /* Qt includes */ … … 106 107 107 108 contentsAction->setText (VBoxProblemReporter::tr ("&Contents...")); 108 contentsAction->setShortcut ( QKeySequence::HelpContents);109 contentsAction->setShortcut (gSS->keySequence(UISelectorShortcuts::HelpShortcut)); 109 110 contentsAction->setStatusTip (VBoxProblemReporter::tr ( 110 111 "Show the online help contents")); 111 112 112 113 webAction->setText (VBoxProblemReporter::tr ("&VirtualBox Web Site...")); 114 webAction->setShortcut (gSS->keySequence(UISelectorShortcuts::WebShortcut)); 113 115 webAction->setStatusTip (VBoxProblemReporter::tr ( 114 116 "Open the browser and go to the VirtualBox product web site")); 115 117 116 118 resetMessagesAction->setText (VBoxProblemReporter::tr ("&Reset All Warnings")); 119 resetMessagesAction->setShortcut (gSS->keySequence(UISelectorShortcuts::ResetWarningsShortcut)); 117 120 resetMessagesAction->setStatusTip (VBoxProblemReporter::tr ( 118 121 "Go back to showing all suppressed warnings and messages")); 119 122 123 #ifdef VBOX_WITH_REGISTRATION 120 124 registerAction->setText (VBoxProblemReporter::tr ("R&egister VirtualBox...")); 125 registerAction->setShortcut (gSS->keySequence(UISelectorShortcuts::RegisterShortcut)); 121 126 registerAction->setStatusTip (VBoxProblemReporter::tr ( 122 127 "Open VirtualBox registration form")); 128 #endif /* VBOX_WITH_REGISTRATION */ 123 129 124 130 updateAction->setText (VBoxProblemReporter::tr ("C&heck for Updates...")); 131 updateAction->setShortcut (gSS->keySequence(UISelectorShortcuts::UpdateShortcut)); 125 132 updateAction->setStatusTip (VBoxProblemReporter::tr ( 126 133 "Check for a new VirtualBox version")); 127 134 128 135 aboutAction->setText (VBoxProblemReporter::tr ("&About VirtualBox...")); 136 aboutAction->setShortcut (gSS->keySequence(UISelectorShortcuts::AboutShortcut)); 129 137 aboutAction->setStatusTip (VBoxProblemReporter::tr ( 130 138 "Show a dialog with product information")); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.cpp
r34961 r35634 50 50 const char* VBoxDefs::GUI_DetailsPageBoxes = "GUI/DetailsPageBoxes"; 51 51 const char* VBoxDefs::GUI_SelectorVMPositions = "GUI/SelectorVMPositions"; 52 const char* VBoxDefs::GUI_Input_MachineShortcuts = "GUI/Input/MachineShortcuts"; 53 const char* VBoxDefs::GUI_Input_SelectorShortcuts = "GUI/Input/SelectorShortcuts"; 52 54 #ifdef Q_WS_X11 53 55 const char* VBoxDefs::GUI_LicenseKey = "GUI/LicenseAgreed"; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h
r34961 r35634 125 125 static const char* GUI_DetailsPageBoxes; 126 126 static const char* GUI_SelectorVMPositions; 127 static const char* GUI_Input_MachineShortcuts; 128 static const char* GUI_Input_SelectorShortcuts; 127 129 #ifdef Q_WS_X11 128 130 static const char* GUI_LicenseKey; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r35564 r35634 4206 4206 4207 4207 /* static */ 4208 QString VBoxGlobal::insertKeyToActionText (const QString &aText, const QString &aKey)4208 QString VBoxGlobal::insertKeyToActionText(const QString &strText, const QString &strKey) 4209 4209 { 4210 4210 #ifdef Q_WS_MAC 4211 QString key("%1 (Host+%2)");4211 QString pattern("%1 (Host+%2)"); 4212 4212 #else 4213 QString key("%1 \tHost+%2");4213 QString pattern("%1 \tHost+%2"); 4214 4214 #endif 4215 return key.arg (aText).arg (QKeySequence (aKey).toString (QKeySequence::NativeText)); 4215 if (strKey.isEmpty()) 4216 return strText; 4217 else 4218 return pattern.arg(strText).arg(QKeySequence(strKey).toString(QKeySequence::NativeText)); 4216 4219 } 4217 4220 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp
r34158 r35634 21 21 #include "UIActionsPool.h" 22 22 #include "UIIconPool.h" 23 #include "UIMachineShortcuts.h" 23 24 #include "VBoxGlobal.h" 24 25 … … 240 241 void retranslateUi() 241 242 { 242 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "Switch to &Fullscreen"), "F"));243 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Switch to &Fullscreen"), gMS->shortcut(UIMachineShortcuts::FullscreenModeShortcut))); 243 244 setStatusTip(QApplication::translate("UIActionsPool", "Switch between normal and fullscreen mode")); 244 245 } … … 263 264 void retranslateUi() 264 265 { 265 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "Switch to Seam&less Mode"), "L"));266 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Switch to Seam&less Mode"), gMS->shortcut(UIMachineShortcuts::SeamlessModeShortcut))); 266 267 setStatusTip(QApplication::translate("UIActionsPool", "Switch between normal and seamless desktop integration mode")); 267 268 } … … 286 287 void retranslateUi() 287 288 { 288 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "Switch to &Scale Mode"), "C"));289 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Switch to &Scale Mode"), gMS->shortcut(UIMachineShortcuts::ScaleModeShortcut))); 289 290 setStatusTip(QApplication::translate("UIActionsPool", "Switch between normal and scale mode")); 290 291 } … … 309 310 void retranslateUi() 310 311 { 311 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "Auto-resize &Guest Display"), "G"));312 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Auto-resize &Guest Display"), gMS->shortcut(UIMachineShortcuts::GuestAutoresizeShortcut))); 312 313 setStatusTip(QApplication::translate("UIActionsPool", "Automatically resize the guest display when the window is resized (requires Guest Additions)")); 313 314 } … … 331 332 void retranslateUi() 332 333 { 333 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "&Adjust Window Size"), "A"));334 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Adjust Window Size"), gMS->shortcut(UIMachineShortcuts::WindowAdjustShortcut))); 334 335 setStatusTip(QApplication::translate("UIActionsPool", "Adjust window size and position to best fit the guest display")); 335 336 } … … 373 374 void retranslateUi() 374 375 { 375 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "Disable &Mouse Integration"), "I"));376 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Disable &Mouse Integration"), gMS->shortcut(UIMachineShortcuts::MouseIntegrationShortcut))); 376 377 setStatusTip(QApplication::translate("UIActionsPool", "Temporarily disable host mouse pointer integration")); 377 378 } … … 395 396 void retranslateUi() 396 397 { 397 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "&Insert Ctrl-Alt-Del"), "Del"));398 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Insert Ctrl-Alt-Del"), gMS->shortcut(UIMachineShortcuts::TypeCADShortcut))); 398 399 setStatusTip(QApplication::translate("UIActionsPool", "Send the Ctrl-Alt-Del sequence to the virtual machine")); 399 400 } … … 418 419 void retranslateUi() 419 420 { 420 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "&Insert Ctrl-Alt-Backspace"), "Backspace"));421 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Insert Ctrl-Alt-Backspace"), gMS->shortcut(UIMachineShortcuts::TypeCABSShortcut))); 421 422 setStatusTip(QApplication::translate("UIActionsPool", "Send the Ctrl-Alt-Backspace sequence to the virtual machine")); 422 423 } … … 441 442 void retranslateUi() 442 443 { 443 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "Take &Snapshot..."), "S"));444 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Take &Snapshot..."), gMS->shortcut(UIMachineShortcuts::TakeSnapshotShortcut))); 444 445 setStatusTip(QApplication::translate("UIActionsPool", "Take a snapshot of the virtual machine")); 445 446 } … … 463 464 void retranslateUi() 464 465 { 465 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "Session I&nformation"), "N"));466 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Session I&nformation"), gMS->shortcut(UIMachineShortcuts::InformationDialogShortcut))); 466 467 setStatusTip(QApplication::translate("UIActionsPool", "Show Session Information Dialog")); 467 468 } … … 485 486 void retranslateUi() 486 487 { 487 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "&Pause"), "P"));488 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Pause"), gMS->shortcut(UIMachineShortcuts::PauseShortcut))); 488 489 setStatusTip(QApplication::translate("UIActionsPool", "Suspend the execution of the virtual machine")); 489 490 } … … 507 508 void retranslateUi() 508 509 { 509 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "&Reset"), "R"));510 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Reset"), gMS->shortcut(UIMachineShortcuts::ResetShortcut))); 510 511 setStatusTip(QApplication::translate("UIActionsPool", "Reset the virtual machine")); 511 512 } … … 529 530 void retranslateUi() 530 531 { 531 #ifdef Q_WS_MAC 532 /* Host+H is Hide on the mac */ 533 setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "ACPI Sh&utdown"), "U")); 534 #else /* Q_WS_MAC */ 535 setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "ACPI S&hutdown"), "H")); 536 #endif /* !Q_WS_MAC */ 537 532 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "ACPI Sh&utdown"), gMS->shortcut(UIMachineShortcuts::ShutdownShortcut))); 538 533 setStatusTip(QApplication::translate("UIActionsPool", "Send the ACPI Power Button press event to the virtual machine")); 539 534 } … … 558 553 void retranslateUi() 559 554 { 560 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "&Close..."), "Q"));555 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Close..."), gMS->shortcut(UIMachineShortcuts::CloseShortcut))); 561 556 setStatusTip(QApplication::translate("UIActionsPool", "Close the virtual machine")); 562 557 } … … 703 698 void retranslateUi() 704 699 { 705 setText( QApplication::translate("UIActionsPool", "&Network Adapters..."));700 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Network Adapters..."), gMS->shortcut(UIMachineShortcuts::NetworkAdaptersDialogShortcut))); 706 701 setStatusTip(QApplication::translate("UIActionsPool", "Change the settings of network adapters")); 707 702 } … … 744 739 void retranslateUi() 745 740 { 746 setText( QApplication::translate("UIActionsPool", "&Shared Folders..."));741 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Shared Folders..."), gMS->shortcut(UIMachineShortcuts::SharedFoldersDialogShortcut))); 747 742 setStatusTip(QApplication::translate("UIActionsPool", "Create or modify shared folders")); 748 743 } … … 767 762 void retranslateUi() 768 763 { 769 setText( QApplication::translate("UIActionsPool", "Enable R&emote Display"));764 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Enable R&emote Display"), gMS->shortcut(UIMachineShortcuts::VRDPServerShortcut))); 770 765 setStatusTip(QApplication::translate("UIActionsPool", "Enable remote desktop (RDP) connections to this machine")); 771 766 } … … 789 784 void retranslateUi() 790 785 { 791 setText( VBoxGlobal::insertKeyToActionText(QApplication::translate("UIActionsPool", "&Install Guest Additions..."), "D"));786 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Install Guest Additions..."), gMS->shortcut(UIMachineShortcuts::InstallGuestAdditionsShortcut))); 792 787 setStatusTip(QApplication::translate("UIActionsPool", "Mount the Guest Additions installation image")); 793 788 } … … 831 826 void retranslateUi() 832 827 { 833 setText( QApplication::translate("UIActionsPool", "&Statistics...", "debug action"));828 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Statistics...", "debug action"), gMS->shortcut(UIMachineShortcuts::StatisticWindowShortcut))); 834 829 } 835 830 }; … … 851 846 void retranslateUi() 852 847 { 853 setText( QApplication::translate("UIActionsPool", "&Command Line...", "debug action"));848 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "&Command Line...", "debug action"), gMS->shortcut(UIMachineShortcuts::CommandLineWindowShortcut))); 854 849 } 855 850 }; … … 871 866 void retranslateUi() 872 867 { 873 setText( QApplication::translate("UIActionsPool", "Enable &Logging...", "debug action"));868 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("UIActionsPool", "Enable &Logging...", "debug action"), gMS->shortcut(UIMachineShortcuts::LoggingShortcut))); 874 869 } 875 870 }; … … 913 908 void retranslateUi() 914 909 { 915 setShortcut( QKeySequence::HelpContents);910 setShortcut(gMS->shortcut(UIMachineShortcuts::HelpShortcut)); 916 911 setText(QApplication::translate("VBoxProblemReporter", "&Contents...")); 917 912 setStatusTip(QApplication::translate("VBoxProblemReporter", "Show the online help contents")); … … 936 931 void retranslateUi() 937 932 { 938 setText( QApplication::translate("VBoxProblemReporter", "&VirtualBox Web Site..."));933 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("VBoxProblemReporter", "&VirtualBox Web Site..."), gMS->shortcut(UIMachineShortcuts::WebShortcut))); 939 934 setStatusTip(QApplication::translate("VBoxProblemReporter", "Open the browser and go to the VirtualBox product web site")); 940 935 } … … 958 953 void retranslateUi() 959 954 { 960 setText( QApplication::translate("VBoxProblemReporter", "&Reset All Warnings"));955 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("VBoxProblemReporter", "&Reset All Warnings"), gMS->shortcut(UIMachineShortcuts::ResetWarningsShortcut))); 961 956 setStatusTip(QApplication::translate("VBoxProblemReporter", "Go back to showing all suppressed warnings and messages")); 962 957 } … … 983 978 void retranslateUi() 984 979 { 985 setText( QApplication::translate("VBoxProblemReporter", "R&egister VirtualBox..."));980 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("VBoxProblemReporter", "R&egister VirtualBox..."), gMS->shortcut(UIMachineShortcuts::RegisterShortcut))); 986 981 setStatusTip(QApplication::translate("VBoxProblemReporter", "Open VirtualBox registration form")); 987 982 } … … 1007 1002 void retranslateUi() 1008 1003 { 1009 setText( QApplication::translate("VBoxProblemReporter", "C&heck for Updates..."));1004 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("VBoxProblemReporter", "C&heck for Updates..."), gMS->shortcut(UIMachineShortcuts::UpdateShortcut))); 1010 1005 setStatusTip(QApplication::translate("VBoxProblemReporter", "Check for a new VirtualBox version")); 1011 1006 } … … 1030 1025 void retranslateUi() 1031 1026 { 1032 setText( QApplication::translate("VBoxProblemReporter", "&About VirtualBox..."));1027 setText(vboxGlobal().insertKeyToActionText(QApplication::translate("VBoxProblemReporter", "&About VirtualBox..."), gMS->shortcut(UIMachineShortcuts::AboutShortcut))); 1033 1028 setStatusTip(QApplication::translate("VBoxProblemReporter", "Show a dialog with product information")); 1034 1029 } … … 1298 1293 * menu data posted along with the event will remain valid in 1299 1294 * the event handler, at least until the main window is closed. */ 1300 QApplication::postEvent(this, new ActivateActionEvent(pAction));1295 // QApplication::postEvent(this, new ActivateActionEvent(pAction)); 1301 1296 return true; 1302 1297 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSelectorWnd.cpp
r35555 r35634 38 38 #include "VBoxVMLogViewer.h" 39 39 #include "QIFileDialog.h" 40 #include "UISelectorShortcuts.h" 40 41 #include "UIDesktopServices.h" 41 42 #include "UIGlobalSettingsExtension.h" /* extension pack installation */ … … 1202 1203 1203 1204 mFileMediaMgrAction->setText(tr("&Virtual Media Manager...")); 1204 mFileMediaMgrAction->setShortcut( QKeySequence("Ctrl+D"));1205 mFileMediaMgrAction->setShortcut(gSS->keySequence(UISelectorShortcuts::VirtualMediaManagerShortcut)); 1205 1206 mFileMediaMgrAction->setStatusTip(tr("Display the Virtual Media Manager dialog")); 1206 1207 1207 1208 mFileApplianceImportAction->setText(tr("&Import Appliance...")); 1208 mFileApplianceImportAction->setShortcut( QKeySequence("Ctrl+I"));1209 mFileApplianceImportAction->setShortcut(gSS->keySequence(UISelectorShortcuts::ImportApplianceShortcut)); 1209 1210 mFileApplianceImportAction->setStatusTip(tr("Import an appliance into VirtualBox")); 1210 1211 1211 1212 mFileApplianceExportAction->setText(tr("&Export Appliance...")); 1212 mFileApplianceExportAction->setShortcut( QKeySequence("Ctrl+E"));1213 mFileApplianceExportAction->setShortcut(gSS->keySequence(UISelectorShortcuts::ExportApplianceShortcut)); 1213 1214 mFileApplianceExportAction->setStatusTip(tr("Export one or more VirtualBox virtual machines as an appliance")); 1214 1215 1215 #ifdef Q_WS_MAC1216 /*1217 * Macification: Getting the right menu as application preference menu item.1218 *1219 * QMenuBar::isCommand() in qmenubar_mac.cpp doesn't recognize "Setting"(s)1220 * unless it's in the first position. So, we use the Mac term here to make1221 * sure we get picked instead of the VM settings.1222 *1223 * Now, since both QMenuBar and we translate these strings, it's going to1224 * be really interesting to see how this plays on non-english systems...1225 */1226 1216 mFileSettingsAction->setText(tr("&Preferences...", "global settings")); 1227 #else 1228 /* 1229 * ...and on other platforms we use "Preferences" as well. The #ifdef is 1230 * left because of the possible localization problems on Mac we first need 1231 * to figure out. 1232 */ 1233 mFileSettingsAction->setText(tr("&Preferences...", "global settings")); 1234 #endif 1235 mFileSettingsAction->setShortcut(QKeySequence("Ctrl+G")); 1217 mFileSettingsAction->setShortcut(gSS->keySequence(UISelectorShortcuts::PreferencesShortcut)); 1236 1218 mFileSettingsAction->setStatusTip(tr("Display the global settings dialog")); 1237 1219 1238 1220 mFileExitAction->setText(tr("E&xit")); 1239 mFileExitAction->setShortcut( QKeySequence("Ctrl+Q"));1221 mFileExitAction->setShortcut(gSS->keySequence(UISelectorShortcuts::ExitShortcut)); 1240 1222 mFileExitAction->setStatusTip(tr("Close application")); 1241 1223 1242 1224 mVmNewAction->setText(tr("&New...")); 1243 mVmNewAction->setShortcut( QKeySequence("Ctrl+N"));1225 mVmNewAction->setShortcut(gSS->keySequence(UISelectorShortcuts::NewVMShortcut)); 1244 1226 mVmNewAction->setStatusTip(tr("Create a new virtual machine")); 1245 1227 mVmNewAction->setToolTip(mVmNewAction->text().remove('&').remove('.') + 1246 QString("(%1)").arg(mVmNewAction->shortcut().toString()));1228 (mVmNewAction->shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(mVmNewAction->shortcut().toString()))); 1247 1229 1248 1230 mVmAddAction->setText(tr("&Add...")); 1249 mVmAddAction->setShortcut( QKeySequence("Ctrl+A"));1231 mVmAddAction->setShortcut(gSS->keySequence(UISelectorShortcuts::AddVMShortcut)); 1250 1232 mVmAddAction->setStatusTip(tr("Add an existing virtual machine")); 1251 mVmAddAction->setToolTip(mVmAddAction->text().remove('&').remove('.') +1252 QString("(%1)").arg(mVmAddAction->shortcut().toString()));1253 1233 1254 1234 mVmConfigAction->setText(tr("&Settings...")); 1255 mVmConfigAction->setShortcut( QKeySequence("Ctrl+S"));1235 mVmConfigAction->setShortcut(gSS->keySequence(UISelectorShortcuts::SettingsVMShortcut)); 1256 1236 mVmConfigAction->setStatusTip(tr("Configure the selected virtual machine")); 1257 1237 mVmConfigAction->setToolTip(mVmConfigAction->text().remove('&').remove('.') + 1258 QString("(%1)").arg(mVmConfigAction->shortcut().toString()));1238 (mVmConfigAction->shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(mVmConfigAction->shortcut().toString()))); 1259 1239 1260 1240 mVmDeleteAction->setText(tr("&Remove")); 1261 mVmDeleteAction->setShortcut( QKeySequence("Ctrl+R"));1241 mVmDeleteAction->setShortcut(gSS->keySequence(UISelectorShortcuts::RemoveVMShortcut)); 1262 1242 mVmDeleteAction->setStatusTip(tr("Remove the selected virtual machine")); 1263 1243 … … 1265 1245 1266 1246 mVmDiscardAction->setText(tr("D&iscard")); 1247 mVmDiscardAction->setShortcut(gSS->keySequence(UISelectorShortcuts::DiscardVMShortcut)); 1267 1248 mVmDiscardAction->setStatusTip( 1268 1249 tr("Discard the saved state of the selected virtual machine")); 1250 mVmDiscardAction->setToolTip(mVmDiscardAction->text().remove('&').remove('.') + 1251 (mVmDiscardAction->shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(mVmDiscardAction->shortcut().toString()))); 1269 1252 1270 1253 mVmPauseAction->setText(tr("&Pause")); … … 1273 1256 1274 1257 mVmRefreshAction->setText(tr("Re&fresh")); 1258 mVmRefreshAction->setShortcut(gSS->keySequence(UISelectorShortcuts::RefreshVMShortcut)); 1275 1259 mVmRefreshAction->setStatusTip( 1276 1260 tr("Refresh the accessibility state of the selected virtual machine")); … … 1278 1262 mVmShowLogsAction->setText(tr("Show &Log...")); 1279 1263 mVmShowLogsAction->setIconText(tr("Log", "icon text")); 1280 mVmShowLogsAction->setShortcut( QKeySequence("Ctrl+L"));1264 mVmShowLogsAction->setShortcut(gSS->keySequence(UISelectorShortcuts::ShowVMLogShortcut)); 1281 1265 mVmShowLogsAction->setStatusTip( 1282 1266 tr("Show the log files of the selected virtual machine")); … … 1298 1282 mVmCreateShortcut->setStatusTip(tr("Creates an Shortcut file to the VirtualBox Machine Definition file on your Desktop.")); 1299 1283 #endif 1284 mVmOpenInFileManagerAction->setShortcut(gSS->keySequence(UISelectorShortcuts::ShowVMInFileManagerShortcut)); 1285 mVmCreateShortcut->setShortcut(gSS->keySequence(UISelectorShortcuts::CreateVMAliasShortcut)); 1300 1286 1301 1287 mHelpActions.retranslateUi(); … … 1375 1361 { 1376 1362 mVmStartAction->setText(tr("S&tart")); 1363 mVmStartAction->setShortcut(gSS->keySequence(UISelectorShortcuts::StartVMShortcut)); 1364 mVmStartAction->setToolTip(mVmStartAction->text().remove('&').remove('.') + 1365 (mVmStartAction->shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(mVmStartAction->shortcut().toString()))); 1377 1366 #ifdef QT_MAC_USE_COCOA 1378 1367 /* There is a bug in Qt Cocoa which result in showing a "more arrow" when … … 1390 1379 { 1391 1380 mVmStartAction->setText(tr("S&how")); 1381 mVmStartAction->setShortcut(gSS->keySequence(UISelectorShortcuts::StartVMShortcut)); 1382 mVmStartAction->setToolTip(mVmStartAction->text().remove('&').remove('.') + 1383 (mVmStartAction->shortcut().toString().isEmpty() ? "" : QString(" (%1)").arg(mVmStartAction->shortcut().toString()))); 1392 1384 #ifdef QT_MAC_USE_COCOA 1393 1385 /* There is a bug in Qt Cocoa which result in showing a "more arrow" when … … 1409 1401 { 1410 1402 mVmPauseAction->setText(tr("R&esume")); 1411 mVmPauseAction->setShortcut( QKeySequence("Ctrl+P"));1403 mVmPauseAction->setShortcut(gSS->keySequence(UISelectorShortcuts::PauseVMShortcut)); 1412 1404 mVmPauseAction->setStatusTip( 1413 1405 tr("Resume the execution of the virtual machine")); … … 1419 1411 { 1420 1412 mVmPauseAction->setText(tr("&Pause")); 1421 mVmPauseAction->setShortcut( QKeySequence("Ctrl+P"));1413 mVmPauseAction->setShortcut(gSS->keySequence(UISelectorShortcuts::PauseVMShortcut)); 1422 1414 mVmPauseAction->setStatusTip( 1423 1415 tr("Suspend the execution of the virtual machine"));
Note:
See TracChangeset
for help on using the changeset viewer.