Changeset 103578 in vbox
- Timestamp:
- Feb 26, 2024 5:29:33 PM (13 months ago)
- svn:sync-xref-src-repo-rev:
- 161930
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UITakeSnapshotDialog.cpp
r101560 r103578 41 41 #include "UIDesktopWidgetWatchdog.h" 42 42 #include "UIHelpBrowserDialog.h" 43 #include "UIShortcutPool.h" 43 44 #include "UITakeSnapshotDialog.h" 44 45 … … 118 119 m_pButtonBox->button(QDialogButtonBox::Help)->setStatusTip(tr("Show dialog help")); 119 120 120 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut( QKeySequence::HelpContents);121 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 121 122 122 123 if (m_pButtonBox->button(QDialogButtonBox::Ok)->shortcut().toString().isEmpty()) … … 304 305 connect(m_pButtonBox->button(QIDialogButtonBox::Help), &QPushButton::pressed, 305 306 m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 306 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut( QKeySequence::HelpContents);307 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 307 308 uiCommon().setHelpKeyword(m_pButtonBox->button(QIDialogButtonBox::Help), "snapshots"); 308 309 -
trunk/src/VBox/Frontends/VirtualBox/src/cloud/profilemanager/UICloudProfileManager.cpp
r102269 r103578 46 46 #include "UIMessageCenter.h" 47 47 #include "UINotificationCenter.h" 48 #include "UIShortcutPool.h" 48 49 #include "UIVirtualBoxEventHandler.h" 49 50 … … 966 967 button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return")); 967 968 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 968 button(ButtonType_Help)->setShortcut( QKeySequence::HelpContents);969 button(ButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 969 970 button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString())); 970 971 button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString())); -
trunk/src/VBox/Frontends/VirtualBox/src/extensionpackmanager/UIExtensionPackManager.cpp
r102269 r103578 45 45 #include "UIMessageCenter.h" 46 46 #include "UINotificationCenter.h" 47 #include "UIShortcutPool.h" 47 48 #include "UIVirtualBoxEventHandler.h" 48 49 … … 615 616 button(ButtonType_Help)->setStatusTip(tr("Show dialog help")); 616 617 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 617 button(ButtonType_Help)->setShortcut( QKeySequence::HelpContents);618 button(ButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 618 619 button(ButtonType_Close)->setToolTip(tr("Close Window (%1)").arg(button(ButtonType_Close)->shortcut().toString())); 619 620 button(ButtonType_Help)->setToolTip(tr("Show Help (%1)").arg(button(ButtonType_Help)->shortcut().toString())); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.cpp
r102731 r103578 39 39 #include "UIHelpBrowserDialog.h" 40 40 #include "UIMessageCenter.h" 41 #include "UIShortcutPool.h" 41 42 #ifdef VBOX_WS_MAC 42 43 # include "QIToolBar.h" … … 195 196 /* Assign shortcuts: */ 196 197 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 197 button(ButtonType_Help)->setShortcut( QKeySequence::HelpContents);198 button(ButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 198 199 199 200 /* Hide some of buttons initially: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r103577 r103578 702 702 switch (enmActionPoolType) 703 703 { 704 case UIType_ManagerUI: return QKeySequence(QKeySequence::HelpContents);704 case UIType_ManagerUI: return UIShortcutPool::standardSequence(QKeySequence::HelpContents); 705 705 case UIType_RuntimeUI: break; 706 706 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp
r103552 r103578 3243 3243 virtual QKeySequence standardShortcut(UIType) const RT_OVERRIDE 3244 3244 { 3245 return actionPool()->isTemporary() ? QKeySequence() : QKeySequence(QKeySequence::HelpContents); 3245 return actionPool()->isTemporary() 3246 ? QKeySequence() 3247 : UIShortcutPool::standardSequence(QKeySequence::HelpContents); 3246 3248 } 3247 3249 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp
r98103 r103578 227 227 } 228 228 229 /* static */ 230 QKeySequence UIShortcutPool::standardSequence(QKeySequence::StandardKey enmKey) 231 { 232 /* We have some overrides: */ 233 switch (enmKey) 234 { 235 #ifdef VBOX_WS_MAC 236 /* So called Apple default sequence for HelpContents action (CMD+?) 237 * is no more the default one on macOS for many years. 238 * Instead they have redesigned this shortcut to open 239 * system-wide Help menu with native search field. 240 * But the Contents action has no shortcut anymore. 241 * We could leave it empty or make it CMD+/ instead. */ 242 case QKeySequence::HelpContents: 243 return QKeySequence("Ctrl+/"); 244 #endif 245 default: 246 break; 247 } 248 249 /* Use QKeySequence constructor by default: */ 250 return QKeySequence(enmKey); 251 } 252 229 253 void UIShortcutPool::retranslateUi() 230 254 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.h
r98103 r103578 155 155 void applyShortcuts(UIActionPool *pActionPool); 156 156 157 /** Returns standard QKeySequence for passed QKeySequence::StandardKey. */ 158 static QKeySequence standardSequence(QKeySequence::StandardKey enmKey); 159 157 160 protected: 158 161 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp
r103538 r103578 38 38 #include "UIFileManagerDialog.h" 39 39 #include "UILoggingDefs.h" 40 #include "UIShortcutPool.h" 40 41 #ifdef VBOX_WS_MAC 41 42 # include "VBoxUtils-darwin.h" … … 109 110 button(ButtonType_Help)->setText(UIFileManager::tr("Help")); 110 111 button(ButtonType_Help)->setStatusTip(UIFileManager::tr("Show dialog help")); 111 button(ButtonType_Help)->setShortcut( QKeySequence::HelpContents);112 button(ButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 112 113 button(ButtonType_Help)->setToolTip(UIFileManager::tr("Show Help (%1)").arg(button(ButtonType_Help)->shortcut().toString())); 113 114 } -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerDialog.cpp
r103538 r103578 40 40 #include "UIIconPool.h" 41 41 #include "UILoggingDefs.h" 42 #include "UIShortcutPool.h" 42 43 #include "UIVMLogViewerDialog.h" 43 44 #include "UIVMLogViewerWidget.h" … … 110 111 button(ButtonType_Embed)->setStatusTip(UIVMLogViewerWidget::tr("Embed to manager window")); 111 112 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 112 button(ButtonType_Help)->setShortcut( QKeySequence::HelpContents);113 button(ButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 113 114 button(ButtonType_Close)->setToolTip(UIVMLogViewerWidget::tr("Close Window (%1)").arg(button(ButtonType_Close)->shortcut().toString())); 114 115 button(ButtonType_Help)->setToolTip(UIVMLogViewerWidget::tr("Show Help (%1)").arg(button(ButtonType_Help)->shortcut().toString())); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r103538 r103578 50 50 #include "UIMediumManager.h" 51 51 #include "UIMediumSearchWidget.h" 52 #include "UIMessageCenter.h" 52 53 #include "UINotificationCenter.h" 54 #include "UIShortcutPool.h" 53 55 #include "UIWizardCloneVD.h" 54 #include "UIMessageCenter.h"55 56 #include "QIToolBar.h" 56 57 #include "UIIconPool.h" … … 1740 1741 button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return")); 1741 1742 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 1742 button(ButtonType_Help)->setShortcut( QKeySequence::HelpContents);1743 button(ButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 1743 1744 button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString())); 1744 1745 button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString())); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoCreator.cpp
r103538 r103578 51 51 #include "UIModalWindowManager.h" 52 52 #include "UIPaneContainer.h" 53 #include "UIShortcutPool.h" 53 54 #include "UIVisoCreator.h" 54 55 #include "UIVisoContentBrowser.h" … … 831 832 m_pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 832 833 833 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut( QKeySequence::HelpContents);834 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 834 835 835 836 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIVisoCreatorDialog::close); -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp
r103362 r103578 37 37 #include "QITabWidget.h" 38 38 #include "QITreeWidget.h" 39 #include "QIToolBar.h" 39 40 #include "UIActionPoolManager.h" 41 #include "UICommon.h" 40 42 #include "UIConverter.h" 41 43 #include "UIDetailsWidgetCloudNetwork.h" … … 48 50 #include "UINetworkManagerUtils.h" 49 51 #include "UINotificationCenter.h" 50 #include " QIToolBar.h"52 #include "UIShortcutPool.h" 51 53 #ifdef VBOX_WS_MAC 52 54 # include "UIWindowMenuManager.h" 53 55 #endif 54 #include "UICommon.h"55 56 56 57 /* COM includes: */ … … 2577 2578 button(ButtonType_Apply)->setShortcut(QString("Ctrl+Return")); 2578 2579 button(ButtonType_Close)->setShortcut(Qt::Key_Escape); 2579 button(ButtonType_Help)->setShortcut( QKeySequence::HelpContents);2580 button(ButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 2580 2581 button(ButtonType_Reset)->setToolTip(tr("Reset Changes (%1)").arg(button(ButtonType_Reset)->shortcut().toString())); 2581 2582 button(ButtonType_Apply)->setToolTip(tr("Apply Changes (%1)").arg(button(ButtonType_Apply)->shortcut().toString())); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
r101563 r103578 47 47 #include "UIMachine.h" 48 48 #include "UIMessageCenter.h" 49 #include "UIShortcutPool.h" 49 50 #include "UIVMCloseDialog.h" 50 51 … … 528 529 connect(pButtonBox->button(QIDialogButtonBox::Help), &QPushButton::pressed, 529 530 pButtonBox, &QIDialogButtonBox::sltHandleHelpRequest); 530 pButtonBox->button(QIDialogButtonBox::Help)->setShortcut( QKeySequence::HelpContents);531 pButtonBox->button(QIDialogButtonBox::Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 531 532 532 533 /* Add into layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp
r103538 r103578 48 48 #include "UIVMActivityMonitor.h" 49 49 #include "UISession.h" 50 #include "UIShortcutPool.h" 50 51 #include "UIVirtualBoxEventHandler.h" 51 52 #include "UIVMInformationDialog.h" … … 85 86 m_pButtonBox->button(QDialogButtonBox::Help)->setStatusTip(tr("Show dialog help")); 86 87 m_pButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape); 87 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut( QKeySequence::HelpContents);88 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 88 89 m_pButtonBox->button(QDialogButtonBox::Close)->setToolTip(tr("Close this dialog (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Close)->shortcut().toString())); 89 90 m_pButtonBox->button(QDialogButtonBox::Help)->setToolTip(tr("Show Help (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Help)->shortcut().toString())); … … 260 261 m_pButtonBox->setStandardButtons(QDialogButtonBox::Close | QDialogButtonBox::Help); 261 262 m_pButtonBox->button(QDialogButtonBox::Close)->setShortcut(Qt::Key_Escape); 262 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut( QKeySequence::HelpContents);263 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 263 264 uiCommon().setHelpKeyword(m_pButtonBox->button(QDialogButtonBox::Help), "vm-session-information"); 264 265 connect(m_pButtonBox, &QIDialogButtonBox::rejected, this, &UIVMInformationDialog::sigClose); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialog.cpp
r103538 r103578 1425 1425 m_pButtonBox->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | 1426 1426 QDialogButtonBox::NoButton | QDialogButtonBox::Help); 1427 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut( QKeySequence::HelpContents);1427 m_pButtonBox->button(QDialogButtonBox::Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 1428 1428 #else 1429 1429 // WORKAROUND: -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp
r101561 r103578 37 37 /* GUI includes: */ 38 38 #include "UIIconPool.h" 39 #include "UIShortcutPool.h" 39 40 #include "UISpecialControls.h" 40 41 … … 69 70 : QPushButton(pParent) 70 71 { 71 setShortcut( QKeySequence(QKeySequence::HelpContents));72 setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 72 73 m_pButton = new UICocoaButton(this, UICocoaButton::HelpButton); 73 74 connect(m_pButton, SIGNAL(clicked()), this, SIGNAL(clicked())); … … 140 141 QPushButton::setText(tr("&Help")); 141 142 if (QPushButton::shortcut().isEmpty()) 142 QPushButton::setShortcut( QKeySequence::HelpContents);143 QPushButton::setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 143 144 } 144 145 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp
r101559 r103578 46 46 #include "UINativeWizardPage.h" 47 47 #include "UINotificationCenter.h" 48 #include "UIShortcutPool.h" 48 49 49 50 … … 578 579 connect(wizardButton(WizardButtonType_Help), &QPushButton::clicked, 579 580 this, &UINativeWizard::sltHandleHelpRequest); 580 wizardButton(WizardButtonType_Help)->setShortcut( QKeySequence::HelpContents);581 wizardButton(WizardButtonType_Help)->setShortcut(UIShortcutPool::standardSequence(QKeySequence::HelpContents)); 581 582 uiCommon().setHelpKeyword(this, m_strHelpKeyword); 582 583 }
Note:
See TracChangeset
for help on using the changeset viewer.