Changeset 103579 in vbox
- Timestamp:
- Feb 26, 2024 5:35:20 PM (13 months ago)
- svn:sync-xref-src-repo-rev:
- 161931
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r103551 r103579 748 748 749 749 /* Create shortcut pool: */ 750 UIShortcutPool::create( );750 UIShortcutPool::create(uiType()); 751 751 752 752 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp
r103578 r103579 111 111 const QString UIShortcutPool::s_strShortcutKeyTemplateRuntime = s_strShortcutKeyTemplate.arg(GUI_Input_MachineShortcuts); 112 112 113 void UIShortcutPool::create( )113 void UIShortcutPool::create(UIType enmType) 114 114 { 115 115 /* Check that instance do NOT exists: */ … … 118 118 119 119 /* Create instance: */ 120 new UIShortcutPool ;120 new UIShortcutPool(enmType); 121 121 122 122 /* Prepare instance: */ … … 204 204 pAction->retranslateUi(); 205 205 /* Copy default and standard sequences from the action to the shortcut: */ 206 existingShortcut.setDefaultSequence(pAction->defaultShortcut(pActionPool->type())); 207 existingShortcut.setStandardSequence(pAction->standardShortcut(pActionPool->type())); 206 if (pActionPool->type() == m_enmType) 207 { 208 existingShortcut.setDefaultSequence(pAction->defaultShortcut(pActionPool->type())); 209 existingShortcut.setStandardSequence(pAction->standardShortcut(pActionPool->type())); 210 } 208 211 } 209 212 /* If shortcut key is NOT known yet: */ … … 292 295 } 293 296 294 UIShortcutPool::UIShortcutPool() 297 UIShortcutPool::UIShortcutPool(UIType enmType) 298 : m_enmType(enmType) 295 299 { 296 300 /* Prepare instance: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.h
r103578 r103579 37 37 /* GUI includes: */ 38 38 #include "QIWithRetranslateUI.h" 39 #include "UIDefs.h" 39 40 #include "UILibraryDefs.h" 40 41 … … 139 140 static UIShortcutPool *instance() { return s_pInstance; } 140 141 /** Creates singleton instance. */ 141 static void create( );142 static void create(UIType enmType); 142 143 /** Destroys singleton instance. */ 143 144 static void destroy(); … … 173 174 174 175 /** Constructs shortcut pool. */ 175 UIShortcutPool( );176 UIShortcutPool(UIType enmType); 176 177 /** Destructs shortcut pool. */ 177 ~UIShortcutPool();178 virtual ~UIShortcutPool() RT_OVERRIDE; 178 179 179 180 /** Prepares all. */ … … 208 209 static const QString s_strShortcutKeyTemplateRuntime; 209 210 211 /** Holds the pool type. */ 212 UIType m_enmType; 210 213 /** Holds the pool shortcuts. */ 211 QMap<QString, UIShortcut> m_shortcuts;214 QMap<QString, UIShortcut> m_shortcuts; 212 215 }; 213 216
Note:
See TracChangeset
for help on using the changeset viewer.