Changeset 52155 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 23, 2014 6:45:35 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.h
r52133 r52155 25 25 /** Runtime action-pool index enum. 26 26 * Naming convention is following: 27 * 1. Every simple-action index prepended with 'S', 28 * 2. Every toggle-action index presended with 'T', 29 * 3. Every menu index prepended with 'M', 30 * 4. Every sub-index contains full parent-index name. */ 27 * 1. Every menu index prepended with 'M', 28 * 2. Every simple-action index prepended with 'S', 29 * 3. Every toggle-action index presended with 'T', 30 * 4. Every polymorphic-action index presended with 'P', 31 * 5. Every sub-index contains full parent-index name. */ 31 32 enum UIActionIndexRT 32 33 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r52151 r52155 1009 1009 1010 1010 /* 'File' actions: */ 1011 m_pool[UIActionIndexS elector_Simple_File_MediumManagerDialog] = new UIActionSimpleMediumManagerDialog(this);1012 m_pool[UIActionIndexS elector_Simple_File_ImportApplianceWizard] = new UIActionSimpleImportApplianceWizard(this);1013 m_pool[UIActionIndexS elector_Simple_File_ExportApplianceWizard] = new UIActionSimpleExportApplianceWizard(this);1011 m_pool[UIActionIndexST_M_File_S_ShowMediumManager] = new UIActionSimpleMediumManagerDialog(this); 1012 m_pool[UIActionIndexST_M_File_S_ImportAppliance] = new UIActionSimpleImportApplianceWizard(this); 1013 m_pool[UIActionIndexST_M_File_S_ExportAppliance] = new UIActionSimpleExportApplianceWizard(this); 1014 1014 #ifdef DEBUG 1015 m_pool[UIActionIndexS elector_Simple_File_ExtraDataManagerWindow] = new UIActionSimpleExtraDataManagerWindow(this);1015 m_pool[UIActionIndexST_M_File_S_ShowExtraDataManager] = new UIActionSimpleExtraDataManagerWindow(this); 1016 1016 #endif /* DEBUG */ 1017 m_pool[UIActionIndexS elector_Simple_File_Exit] = new UIActionSimpleExit(this);1017 m_pool[UIActionIndexST_M_File_S_Close] = new UIActionSimpleExit(this); 1018 1018 1019 1019 /* 'Group' actions: */ 1020 m_pool[UIActionIndexSelector_Simple_Group_New] = new UIActionSimpleGroupNew(this); 1021 m_pool[UIActionIndexSelector_Simple_Group_Add] = new UIActionSimpleGroupAdd(this); 1022 m_pool[UIActionIndexSelector_Simple_Group_Rename] = new UIActionSimpleGroupRename(this); 1023 m_pool[UIActionIndexSelector_Simple_Group_Remove] = new UIActionSimpleGroupRemove(this); 1024 m_pool[UIActionIndexSelector_Simple_Group_Sort] = new UIActionSimpleGroupSort(this); 1025 m_pool[UIActionIndexSelector_Simple_Group_Close_Save] = new UIActionSimpleSave(this); 1026 m_pool[UIActionIndexSelector_Simple_Group_Close_ACPIShutdown] = new UIActionSimpleACPIShutdown(this); 1027 m_pool[UIActionIndexSelector_Simple_Group_Close_PowerOff] = new UIActionSimplePowerOff(this); 1020 m_pool[UIActionIndexST_M_Group_S_New] = new UIActionSimpleGroupNew(this); 1021 m_pool[UIActionIndexST_M_Group_S_Add] = new UIActionSimpleGroupAdd(this); 1022 m_pool[UIActionIndexST_M_Group_S_Rename] = new UIActionSimpleGroupRename(this); 1023 m_pool[UIActionIndexST_M_Group_S_Remove] = new UIActionSimpleGroupRemove(this); 1024 m_pool[UIActionIndexST_M_Group_P_StartOrShow] = new UIActionStateCommonStartOrShow(this); 1025 m_pool[UIActionIndexST_M_Group_T_Pause] = new UIActionToggleCommonPauseAndResume(this); 1026 m_pool[UIActionIndexST_M_Group_S_Reset] = new UIActionSimpleCommonReset(this); 1027 m_pool[UIActionIndexST_M_Group_M_Close_S_SaveState] = new UIActionSimpleSave(this); 1028 m_pool[UIActionIndexST_M_Group_M_Close_S_Shutdown] = new UIActionSimpleACPIShutdown(this); 1029 m_pool[UIActionIndexST_M_Group_M_Close_S_PowerOff] = new UIActionSimplePowerOff(this); 1030 m_pool[UIActionIndexST_M_Group_S_Discard] = new UIActionSimpleCommonDiscard(this); 1031 m_pool[UIActionIndexST_M_Group_S_Refresh] = new UIActionSimpleCommonRefresh(this); 1032 m_pool[UIActionIndexST_M_Group_S_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this); 1033 m_pool[UIActionIndexST_M_Group_S_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this); 1034 m_pool[UIActionIndexST_M_Group_S_Sort] = new UIActionSimpleGroupSort(this); 1028 1035 1029 1036 /* 'Machine' actions: */ 1030 m_pool[UIActionIndexSelector_Simple_Machine_New] = new UIActionSimpleMachineNew(this); 1031 m_pool[UIActionIndexSelector_Simple_Machine_Add] = new UIActionSimpleMachineAdd(this); 1032 m_pool[UIActionIndexSelector_Simple_Machine_Settings] = new UIActionSimpleMachineSettings(this); 1033 m_pool[UIActionIndexSelector_Simple_Machine_Clone] = new UIActionSimpleMachineClone(this); 1034 m_pool[UIActionIndexSelector_Simple_Machine_Remove] = new UIActionSimpleMachineRemove(this); 1035 m_pool[UIActionIndexSelector_Simple_Machine_AddGroup] = new UIActionSimpleMachineAddGroup(this); 1036 m_pool[UIActionIndexSelector_Simple_Machine_SortParent] = new UIActionSimpleMachineSortParent(this); 1037 m_pool[UIActionIndexSelector_Simple_Machine_Close_Save] = new UIActionSimpleSave(this); 1038 m_pool[UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown] = new UIActionSimpleACPIShutdown(this); 1039 m_pool[UIActionIndexSelector_Simple_Machine_Close_PowerOff] = new UIActionSimplePowerOff(this); 1040 1041 /* Common actions: */ 1042 m_pool[UIActionIndexSelector_State_Common_StartOrShow] = new UIActionStateCommonStartOrShow(this); 1043 m_pool[UIActionIndexSelector_Toggle_Common_PauseAndResume] = new UIActionToggleCommonPauseAndResume(this); 1044 m_pool[UIActionIndexSelector_Simple_Common_Reset] = new UIActionSimpleCommonReset(this); 1045 m_pool[UIActionIndexSelector_Simple_Common_Discard] = new UIActionSimpleCommonDiscard(this); 1046 m_pool[UIActionIndexSelector_Simple_Common_Refresh] = new UIActionSimpleCommonRefresh(this); 1047 m_pool[UIActionIndexSelector_Simple_Common_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this); 1048 m_pool[UIActionIndexSelector_Simple_Common_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this); 1037 m_pool[UIActionIndexST_M_Machine_S_New] = new UIActionSimpleMachineNew(this); 1038 m_pool[UIActionIndexST_M_Machine_S_Add] = new UIActionSimpleMachineAdd(this); 1039 m_pool[UIActionIndexST_M_Machine_S_Settings] = new UIActionSimpleMachineSettings(this); 1040 m_pool[UIActionIndexST_M_Machine_S_Clone] = new UIActionSimpleMachineClone(this); 1041 m_pool[UIActionIndexST_M_Machine_S_Remove] = new UIActionSimpleMachineRemove(this); 1042 m_pool[UIActionIndexST_M_Machine_S_AddGroup] = new UIActionSimpleMachineAddGroup(this); 1043 m_pool[UIActionIndexST_M_Machine_P_StartOrShow] = new UIActionStateCommonStartOrShow(this); 1044 m_pool[UIActionIndexST_M_Machine_T_Pause] = new UIActionToggleCommonPauseAndResume(this); 1045 m_pool[UIActionIndexST_M_Machine_S_Reset] = new UIActionSimpleCommonReset(this); 1046 m_pool[UIActionIndexST_M_Machine_M_Close_S_SaveState] = new UIActionSimpleSave(this); 1047 m_pool[UIActionIndexST_M_Machine_M_Close_S_Shutdown] = new UIActionSimpleACPIShutdown(this); 1048 m_pool[UIActionIndexST_M_Machine_M_Close_S_PowerOff] = new UIActionSimplePowerOff(this); 1049 m_pool[UIActionIndexST_M_Machine_S_Discard] = new UIActionSimpleCommonDiscard(this); 1050 m_pool[UIActionIndexST_M_Machine_S_Refresh] = new UIActionSimpleCommonRefresh(this); 1051 m_pool[UIActionIndexST_M_Machine_S_ShowInFileManager] = new UIActionSimpleCommonShowInFileManager(this); 1052 m_pool[UIActionIndexST_M_Machine_S_CreateShortcut] = new UIActionSimpleCommonCreateShortcut(this); 1053 m_pool[UIActionIndexST_M_Machine_S_SortParent] = new UIActionSimpleMachineSortParent(this); 1049 1054 } 1050 1055 … … 1055 1060 1056 1061 /* 'File' menu: */ 1057 m_pool[UIActionIndexS elector_Menu_File] = new UIActionMenuFile(this);1062 m_pool[UIActionIndexST_M_File] = new UIActionMenuFile(this); 1058 1063 1059 1064 /* 'Group' menu: */ 1060 m_pool[UIActionIndexS elector_Menu_Group] = new UIActionMenuGroup(this);1061 m_pool[UIActionIndexS elector_Menu_Group_Close] = new UIActionMenuClose(this);1065 m_pool[UIActionIndexST_M_Group] = new UIActionMenuGroup(this); 1066 m_pool[UIActionIndexST_M_Group_M_Close] = new UIActionMenuClose(this); 1062 1067 1063 1068 /* 'Machine' menu: */ 1064 m_pool[UIActionIndexS elector_Menu_Machine] = new UIActionMenuMachineSelector(this);1065 m_pool[UIActionIndexS elector_Menu_Machine_Close] = new UIActionMenuClose(this);1069 m_pool[UIActionIndexST_M_Machine] = new UIActionMenuMachineSelector(this); 1070 m_pool[UIActionIndexST_M_Machine_M_Close] = new UIActionMenuClose(this); 1066 1071 } 1067 1072 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.h
r51931 r52155 23 23 #include "UIActionPool.h" 24 24 25 /* Action keys: */ 26 enum UIActionIndexSelector 25 /** Runtime action-pool index enum. 26 * Naming convention is following: 27 * 1. Every menu index prepended with 'M', 28 * 2. Every simple-action index prepended with 'S', 29 * 3. Every toggle-action index presended with 'T', 30 * 4. Every polymorphic-action index presended with 'P', 31 * 5. Every sub-index contains full parent-index name. */ 32 enum UIActionIndexST 27 33 { 28 34 /* 'File' menu actions: */ 29 UIActionIndexS elector_Menu_File = UIActionIndex_Max + 1,30 UIActionIndexS elector_Simple_File_MediumManagerDialog,31 UIActionIndexS elector_Simple_File_ImportApplianceWizard,32 UIActionIndexS elector_Simple_File_ExportApplianceWizard,35 UIActionIndexST_M_File = UIActionIndex_Max + 1, 36 UIActionIndexST_M_File_S_ShowMediumManager, 37 UIActionIndexST_M_File_S_ImportAppliance, 38 UIActionIndexST_M_File_S_ExportAppliance, 33 39 #ifdef DEBUG 34 UIActionIndexS elector_Simple_File_ExtraDataManagerWindow,40 UIActionIndexST_M_File_S_ShowExtraDataManager, 35 41 #endif /* DEBUG */ 36 UIActionIndexS elector_Simple_File_Exit,42 UIActionIndexST_M_File_S_Close, 37 43 38 44 /* 'Group' menu actions: */ 39 UIActionIndexSelector_Menu_Group, 40 UIActionIndexSelector_Simple_Group_New, 41 UIActionIndexSelector_Simple_Group_Add, 42 UIActionIndexSelector_Simple_Group_Rename, 43 UIActionIndexSelector_Simple_Group_Remove, 44 UIActionIndexSelector_Simple_Group_Sort, 45 UIActionIndexSelector_Menu_Group_Close, 46 UIActionIndexSelector_Simple_Group_Close_Save, 47 UIActionIndexSelector_Simple_Group_Close_ACPIShutdown, 48 UIActionIndexSelector_Simple_Group_Close_PowerOff, 45 UIActionIndexST_M_Group, 46 UIActionIndexST_M_Group_S_New, 47 UIActionIndexST_M_Group_S_Add, 48 UIActionIndexST_M_Group_S_Rename, 49 UIActionIndexST_M_Group_S_Remove, 50 UIActionIndexST_M_Group_P_StartOrShow, // 51 UIActionIndexST_M_Group_T_Pause, // 52 UIActionIndexST_M_Group_S_Reset, // 53 UIActionIndexST_M_Group_M_Close, 54 UIActionIndexST_M_Group_M_Close_S_SaveState, 55 UIActionIndexST_M_Group_M_Close_S_Shutdown, 56 UIActionIndexST_M_Group_M_Close_S_PowerOff, 57 UIActionIndexST_M_Group_S_Discard, // 58 UIActionIndexST_M_Group_S_Refresh, // 59 UIActionIndexST_M_Group_S_ShowInFileManager, // 60 UIActionIndexST_M_Group_S_CreateShortcut, // 61 UIActionIndexST_M_Group_S_Sort, 49 62 50 63 /* 'Machine' menu actions: */ 51 UIActionIndexSelector_Menu_Machine, 52 UIActionIndexSelector_Simple_Machine_New, 53 UIActionIndexSelector_Simple_Machine_Add, 54 UIActionIndexSelector_Simple_Machine_Settings, 55 UIActionIndexSelector_Simple_Machine_Clone, 56 UIActionIndexSelector_Simple_Machine_Remove, 57 UIActionIndexSelector_Simple_Machine_AddGroup, 58 UIActionIndexSelector_Simple_Machine_SortParent, 59 UIActionIndexSelector_Menu_Machine_Close, 60 UIActionIndexSelector_Simple_Machine_Close_Save, 61 UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown, 62 UIActionIndexSelector_Simple_Machine_Close_PowerOff, 63 64 /* Common 'Group' / 'Machine' menu actions: */ 65 UIActionIndexSelector_State_Common_StartOrShow, 66 UIActionIndexSelector_Toggle_Common_PauseAndResume, 67 UIActionIndexSelector_Simple_Common_Reset, 68 UIActionIndexSelector_Simple_Common_Discard, 69 UIActionIndexSelector_Simple_Common_Refresh, 70 UIActionIndexSelector_Simple_Common_ShowInFileManager, 71 UIActionIndexSelector_Simple_Common_CreateShortcut, 64 UIActionIndexST_M_Machine, 65 UIActionIndexST_M_Machine_S_New, 66 UIActionIndexST_M_Machine_S_Add, 67 UIActionIndexST_M_Machine_S_Settings, 68 UIActionIndexST_M_Machine_S_Clone, 69 UIActionIndexST_M_Machine_S_Remove, 70 UIActionIndexST_M_Machine_S_AddGroup, 71 UIActionIndexST_M_Machine_P_StartOrShow, // 72 UIActionIndexST_M_Machine_T_Pause, // 73 UIActionIndexST_M_Machine_S_Reset, // 74 UIActionIndexST_M_Machine_M_Close, 75 UIActionIndexST_M_Machine_M_Close_S_SaveState, 76 UIActionIndexST_M_Machine_M_Close_S_Shutdown, 77 UIActionIndexST_M_Machine_M_Close_S_PowerOff, 78 UIActionIndexST_M_Machine_S_Discard, // 79 UIActionIndexST_M_Machine_S_Refresh, // 80 UIActionIndexST_M_Machine_S_ShowInFileManager, // 81 UIActionIndexST_M_Machine_S_CreateShortcut, // 82 UIActionIndexST_M_Machine_S_SortParent, 72 83 73 84 /* Maximum index: */ 74 UIActionIndexS elector_Max85 UIActionIndexST_Max 75 86 }; 76 87 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r52151 r52155 320 320 { 321 321 /* Check that we do NOT handling that already: */ 322 if ( m_pPreferencesDialogAction->data().toBool())322 if (gpActionPool->action(UIActionIndex_Simple_Preferences)->data().toBool()) 323 323 return; 324 324 /* Remember that we handling that already: */ 325 m_pPreferencesDialogAction->setData(true);325 gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(true); 326 326 327 327 /* Don't show the inaccessible warning … … 334 334 335 335 /* Remember that we do NOT handling that already: */ 336 m_pPreferencesDialogAction->setData(false);336 gpActionPool->action(UIActionIndex_Simple_Preferences)->setData(false); 337 337 } 338 338 … … 393 393 { 394 394 /* Check that we do NOT handling that already: */ 395 if ( m_pAction_Machine_Settings->data().toBool())395 if (gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->data().toBool()) 396 396 return; 397 397 /* Remember that we handling that already: */ 398 m_pAction_Machine_Settings->setData(true);398 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setData(true); 399 399 400 400 /* Process href from VM details / description: */ … … 430 430 431 431 /* Remember that we do NOT handling that already: */ 432 m_pAction_Machine_Settings->setData(false);432 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setData(false); 433 433 } 434 434 … … 457 457 { 458 458 /* Check if current item could be started/showed: */ 459 if (!isActionEnabled(UIActionIndexS elector_State_Common_StartOrShow, QList<UIVMItem*>() << pItem))459 if (!isActionEnabled(UIActionIndexST_M_Group_P_StartOrShow, QList<UIVMItem*>() << pItem)) 460 460 continue; 461 461 … … 476 476 QList<UIVMItem*> itemsToDiscard; 477 477 foreach (UIVMItem *pItem, items) 478 if (isActionEnabled(UIActionIndexS elector_Simple_Common_Discard, QList<UIVMItem*>() << pItem))478 if (isActionEnabled(UIActionIndexST_M_Group_S_Discard, QList<UIVMItem*>() << pItem)) 479 479 { 480 480 machineNames << pItem->name(); … … 519 519 520 520 /* Check if current item could be paused/resumed: */ 521 if (!isActionEnabled(UIActionIndexS elector_Toggle_Common_PauseAndResume, QList<UIVMItem*>() << pItem))521 if (!isActionEnabled(UIActionIndexST_M_Group_T_Pause, QList<UIVMItem*>() << pItem)) 522 522 continue; 523 523 … … 571 571 QList<UIVMItem*> itemsToReset; 572 572 foreach (UIVMItem *pItem, items) 573 if (isActionEnabled(UIActionIndexS elector_Simple_Common_Reset, QList<UIVMItem*>() << pItem))573 if (isActionEnabled(UIActionIndexST_M_Group_S_Reset, QList<UIVMItem*>() << pItem)) 574 574 { 575 575 machineNames << pItem->name(); … … 610 610 { 611 611 /* Check if current item could be saved: */ 612 if (!isActionEnabled(UIActionIndexS elector_Simple_Machine_Close_Save, QList<UIVMItem*>() << pItem))612 if (!isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_SaveState, QList<UIVMItem*>() << pItem)) 613 613 continue; 614 614 … … 655 655 QList<UIVMItem*> itemsToShutdown; 656 656 foreach (UIVMItem *pItem, items) 657 if (isActionEnabled(UIActionIndexS elector_Simple_Machine_Close_ACPIShutdown, QList<UIVMItem*>() << pItem))657 if (isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, QList<UIVMItem*>() << pItem)) 658 658 { 659 659 machineNames << pItem->name(); … … 696 696 QList<UIVMItem*> itemsToPowerOff; 697 697 foreach (UIVMItem *pItem, items) 698 if (isActionEnabled(UIActionIndexS elector_Simple_Machine_Close_PowerOff, QList<UIVMItem*>() << pItem))698 if (isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, QList<UIVMItem*>() << pItem)) 699 699 { 700 700 machineNames << pItem->name(); … … 763 763 { 764 764 /* Check if that item could be shown in file-browser: */ 765 if (!isActionEnabled(UIActionIndexS elector_Simple_Common_ShowInFileManager, QList<UIVMItem*>() << pItem))765 if (!isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, QList<UIVMItem*>() << pItem)) 766 766 continue; 767 767 … … 781 781 { 782 782 /* Check if shortcuts could be created for this item: */ 783 if (!isActionEnabled(UIActionIndexS elector_Simple_Common_CreateShortcut, QList<UIVMItem*>() << pItem))783 if (!isActionEnabled(UIActionIndexST_M_Group_S_CreateShortcut, QList<UIVMItem*>() << pItem)) 784 784 continue; 785 785 … … 798 798 AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n")); 799 799 800 m_pGroupACPIShutdownAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Close_ACPIShutdown, items)); 801 } 800 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items)); 801 } 802 802 803 void UISelectorWindow::sltMachineCloseMenuAboutToShow() 803 804 { … … 806 807 AssertMsgReturnVoid(!items.isEmpty(), ("At least one item should be selected!\n")); 807 808 808 m_pMachineACPIShutdownAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown, items));809 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items)); 809 810 } 810 811 … … 1096 1097 { 1097 1098 /* Prepare File-menu: */ 1098 m_pFileMenu = gpActionPool->action(UIActionIndexSelector_Menu_File)->menu(); 1099 prepareMenuFile(m_pFileMenu); 1100 menuBar()->addMenu(m_pFileMenu); 1099 prepareMenuFile(gpActionPool->action(UIActionIndexST_M_File)->menu()); 1100 menuBar()->addMenu(gpActionPool->action(UIActionIndexST_M_File)->menu()); 1101 1101 1102 1102 /* Prepare 'Group' / 'Close' menu: */ 1103 m_pGroupCloseMenuAction = gpActionPool->action(UIActionIndexSelector_Menu_Group_Close); 1104 m_pGroupCloseMenu = m_pGroupCloseMenuAction->menu(); 1105 prepareMenuGroupClose(m_pGroupCloseMenu); 1103 prepareMenuGroupClose(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu()); 1106 1104 1107 1105 /* Prepare 'Machine' / 'Close' menu: */ 1108 m_pMachineCloseMenuAction = gpActionPool->action(UIActionIndexSelector_Menu_Machine_Close); 1109 m_pMachineCloseMenu = m_pMachineCloseMenuAction->menu(); 1110 prepareMenuMachineClose(m_pMachineCloseMenu); 1111 1112 /* Create actions for 'Group' and 'Machine' menus: */ 1113 prepareCommonActions(); 1114 prepareGroupActions(); 1115 prepareMachineActions(); 1106 prepareMenuMachineClose(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu()); 1116 1107 1117 1108 /* Prepare Group-menu: */ 1118 m_pGroupMenu = gpActionPool->action(UIActionIndexSelector_Menu_Group)->menu(); 1119 prepareMenuGroup(m_pGroupMenu); 1120 m_pGroupMenuAction = menuBar()->addMenu(m_pGroupMenu); 1109 prepareMenuGroup(gpActionPool->action(UIActionIndexST_M_Group)->menu()); 1110 m_pGroupMenuAction = menuBar()->addMenu(gpActionPool->action(UIActionIndexST_M_Group)->menu()); 1121 1111 1122 1112 /* Prepare Machine-menu: */ 1123 m_pMachineMenu = gpActionPool->action(UIActionIndexSelector_Menu_Machine)->menu(); 1124 prepareMenuMachine(m_pMachineMenu); 1125 m_pMachineMenuAction = menuBar()->addMenu(m_pMachineMenu); 1113 prepareMenuMachine(gpActionPool->action(UIActionIndexST_M_Machine)->menu()); 1114 m_pMachineMenuAction = menuBar()->addMenu(gpActionPool->action(UIActionIndexST_M_Machine)->menu()); 1126 1115 1127 1116 #ifdef Q_WS_MAC … … 1130 1119 1131 1120 /* Prepare Help-menu: */ 1132 m_pHelpMenu = gpActionPool->action(UIActionIndex_Menu_Help)->menu(); 1133 prepareMenuHelp(m_pHelpMenu); 1134 menuBar()->addMenu(m_pHelpMenu); 1121 prepareMenuHelp(gpActionPool->action(UIActionIndex_Menu_Help)->menu()); 1122 menuBar()->addMenu(gpActionPool->action(UIActionIndex_Menu_Help)->menu()); 1135 1123 1136 1124 /* Setup menubar policy: */ … … 1145 1133 1146 1134 /* Populate File-menu: */ 1147 m_pMediumManagerDialogAction = gpActionPool->action(UIActionIndexSelector_Simple_File_MediumManagerDialog); 1148 pMenu->addAction(m_pMediumManagerDialogAction); 1149 m_pImportApplianceWizardAction = gpActionPool->action(UIActionIndexSelector_Simple_File_ImportApplianceWizard); 1150 pMenu->addAction(m_pImportApplianceWizardAction); 1151 m_pExportApplianceWizardAction = gpActionPool->action(UIActionIndexSelector_Simple_File_ExportApplianceWizard); 1152 pMenu->addAction(m_pExportApplianceWizardAction); 1135 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ShowMediumManager)); 1136 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ImportAppliance)); 1137 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ExportAppliance)); 1153 1138 #ifndef Q_WS_MAC 1154 1139 pMenu->addSeparator(); 1155 1140 #endif /* Q_WS_MAC */ 1156 1141 #ifdef DEBUG 1157 m_pExtraDataManagerWindowAction = gpActionPool->action(UIActionIndexSelector_Simple_File_ExtraDataManagerWindow); 1158 pMenu->addAction(m_pExtraDataManagerWindowAction); 1142 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_ShowExtraDataManager)); 1159 1143 #endif /* DEBUG */ 1160 m_pPreferencesDialogAction = gpActionPool->action(UIActionIndex_Simple_Preferences); 1161 pMenu->addAction(m_pPreferencesDialogAction); 1144 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Preferences)); 1162 1145 #ifndef Q_WS_MAC 1163 1146 pMenu->addSeparator(); 1164 1147 #endif /* Q_WS_MAC */ 1165 m_pExitAction = gpActionPool->action(UIActionIndexSelector_Simple_File_Exit); 1166 pMenu->addAction(m_pExitAction); 1167 } 1168 1169 void UISelectorWindow::prepareCommonActions() 1170 { 1171 m_pAction_Common_StartOrShow = gpActionPool->action(UIActionIndexSelector_State_Common_StartOrShow)->toActionPolymorphic(); 1172 m_pAction_Common_PauseAndResume = gpActionPool->action(UIActionIndexSelector_Toggle_Common_PauseAndResume); 1173 m_pAction_Common_Reset = gpActionPool->action(UIActionIndexSelector_Simple_Common_Reset); 1174 m_pAction_Common_Discard = gpActionPool->action(UIActionIndexSelector_Simple_Common_Discard); 1175 m_pAction_Common_Refresh = gpActionPool->action(UIActionIndexSelector_Simple_Common_Refresh); 1176 m_pAction_Common_ShowInFileManager = gpActionPool->action(UIActionIndexSelector_Simple_Common_ShowInFileManager); 1177 m_pAction_Common_CreateShortcut = gpActionPool->action(UIActionIndexSelector_Simple_Common_CreateShortcut); 1178 } 1179 1180 void UISelectorWindow::prepareGroupActions() 1181 { 1182 m_pAction_Group_New = gpActionPool->action(UIActionIndexSelector_Simple_Group_New); 1183 m_pAction_Group_Add = gpActionPool->action(UIActionIndexSelector_Simple_Group_Add); 1184 m_pAction_Group_Rename = gpActionPool->action(UIActionIndexSelector_Simple_Group_Rename); 1185 m_pAction_Group_Remove = gpActionPool->action(UIActionIndexSelector_Simple_Group_Remove); 1186 m_pAction_Group_Sort = gpActionPool->action(UIActionIndexSelector_Simple_Group_Sort); 1187 } 1188 1189 void UISelectorWindow::prepareMachineActions() 1190 { 1191 m_pAction_Machine_New = gpActionPool->action(UIActionIndexSelector_Simple_Machine_New); 1192 m_pAction_Machine_Add = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Add); 1193 m_pAction_Machine_Settings = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Settings); 1194 m_pAction_Machine_Clone = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Clone); 1195 m_pAction_Machine_Remove = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Remove); 1196 m_pAction_Machine_AddGroup = gpActionPool->action(UIActionIndexSelector_Simple_Machine_AddGroup); 1197 m_pAction_Machine_LogDialog = gpActionPool->action(UIActionIndex_Simple_LogDialog); 1198 m_pAction_Machine_SortParent = gpActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent); 1148 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_File_S_Close)); 1199 1149 } 1200 1150 … … 1206 1156 1207 1157 /* Populate Machine-menu: */ 1208 pMenu->addAction( m_pAction_Group_New);1209 pMenu->addAction( m_pAction_Group_Add);1158 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_New)); 1159 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Add)); 1210 1160 pMenu->addSeparator(); 1211 pMenu->addAction( m_pAction_Group_Rename);1212 pMenu->addAction( m_pAction_Group_Remove);1161 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Rename)); 1162 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Remove)); 1213 1163 pMenu->addSeparator(); 1214 pMenu->addAction( m_pAction_Common_StartOrShow);1215 pMenu->addAction( m_pAction_Common_PauseAndResume);1216 pMenu->addAction( m_pAction_Common_Reset);1217 pMenu->addMenu( m_pGroupCloseMenu);1164 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)); 1165 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_T_Pause)); 1166 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Reset)); 1167 pMenu->addMenu(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu()); 1218 1168 pMenu->addSeparator(); 1219 pMenu->addAction( m_pAction_Common_Discard);1220 pMenu->addAction( m_pAction_Common_Refresh);1169 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Discard)); 1170 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)); 1221 1171 pMenu->addSeparator(); 1222 pMenu->addAction( m_pAction_Common_ShowInFileManager);1223 pMenu->addAction( m_pAction_Common_CreateShortcut);1172 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager)); 1173 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut)); 1224 1174 pMenu->addSeparator(); 1225 pMenu->addAction( m_pAction_Group_Sort);1175 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Sort)); 1226 1176 1227 1177 /* Remember action list: */ 1228 m_groupActions << m_pAction_Group_New 1229 << m_pAction_Group_Add 1230 << m_pAction_Group_Rename 1231 << m_pAction_Group_Remove 1232 << m_pAction_Group_Sort; 1178 m_groupActions << gpActionPool->action(UIActionIndexST_M_Group_S_New) 1179 << gpActionPool->action(UIActionIndexST_M_Group_S_Add) 1180 << gpActionPool->action(UIActionIndexST_M_Group_S_Rename) 1181 << gpActionPool->action(UIActionIndexST_M_Group_S_Remove) 1182 << gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow) 1183 << gpActionPool->action(UIActionIndexST_M_Group_T_Pause) 1184 << gpActionPool->action(UIActionIndexST_M_Group_S_Reset) 1185 << gpActionPool->action(UIActionIndexST_M_Group_S_Discard) 1186 << gpActionPool->action(UIActionIndexST_M_Group_S_Refresh) 1187 << gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager) 1188 << gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut) 1189 << gpActionPool->action(UIActionIndexST_M_Group_S_Sort); 1233 1190 } 1234 1191 … … 1240 1197 1241 1198 /* Populate Machine-menu: */ 1242 pMenu->addAction( m_pAction_Machine_New);1243 pMenu->addAction( m_pAction_Machine_Add);1244 pMenu->addAction( m_pAction_Machine_Settings);1245 pMenu->addAction( m_pAction_Machine_Clone);1246 pMenu->addAction( m_pAction_Machine_Remove);1247 pMenu->addAction( m_pAction_Machine_AddGroup);1199 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_New)); 1200 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Add)); 1201 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)); 1202 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Clone)); 1203 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)); 1204 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)); 1248 1205 pMenu->addSeparator(); 1249 pMenu->addAction( m_pAction_Common_StartOrShow);1250 pMenu->addAction( m_pAction_Common_PauseAndResume);1251 pMenu->addAction( m_pAction_Common_Reset);1252 pMenu->addMenu( m_pMachineCloseMenu);1206 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)); 1207 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_T_Pause)); 1208 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Reset)); 1209 pMenu->addMenu(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu()); 1253 1210 pMenu->addSeparator(); 1254 pMenu->addAction( m_pAction_Common_Discard);1255 pMenu->addAction( m_pAction_Machine_LogDialog);1256 pMenu->addAction( m_pAction_Common_Refresh);1211 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)); 1212 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_LogDialog)); 1213 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh)); 1257 1214 pMenu->addSeparator(); 1258 pMenu->addAction( m_pAction_Common_ShowInFileManager);1259 pMenu->addAction( m_pAction_Common_CreateShortcut);1215 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager)); 1216 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut)); 1260 1217 pMenu->addSeparator(); 1261 pMenu->addAction( m_pAction_Machine_SortParent);1218 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)); 1262 1219 1263 1220 /* Remember action list: */ 1264 m_machineActions << m_pAction_Machine_New 1265 << m_pAction_Machine_Add 1266 << m_pAction_Machine_Settings 1267 << m_pAction_Machine_Clone 1268 << m_pAction_Machine_Remove 1269 << m_pAction_Machine_AddGroup 1270 << m_pAction_Machine_LogDialog 1271 << m_pAction_Machine_SortParent; 1221 m_machineActions << gpActionPool->action(UIActionIndexST_M_Machine_S_New) 1222 << gpActionPool->action(UIActionIndexST_M_Machine_S_Add) 1223 << gpActionPool->action(UIActionIndexST_M_Machine_S_Settings) 1224 << gpActionPool->action(UIActionIndexST_M_Machine_S_Clone) 1225 << gpActionPool->action(UIActionIndexST_M_Machine_S_Remove) 1226 << gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup) 1227 << gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow) 1228 << gpActionPool->action(UIActionIndexST_M_Machine_T_Pause) 1229 << gpActionPool->action(UIActionIndexST_M_Machine_S_Reset) 1230 << gpActionPool->action(UIActionIndexST_M_Machine_S_Discard) 1231 << gpActionPool->action(UIActionIndex_Simple_LogDialog) 1232 << gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh) 1233 << gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager) 1234 << gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut) 1235 << gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent); 1272 1236 } 1273 1237 … … 1279 1243 1280 1244 /* Populate 'Group' / 'Close' menu: */ 1281 m_pGroupSaveAction = gpActionPool->action(UIActionIndexSelector_Simple_Group_Close_Save); 1282 pMenu->addAction(m_pGroupSaveAction); 1283 m_pGroupACPIShutdownAction = gpActionPool->action(UIActionIndexSelector_Simple_Group_Close_ACPIShutdown); 1284 pMenu->addAction(m_pGroupACPIShutdownAction); 1285 m_pGroupPowerOffAction = gpActionPool->action(UIActionIndexSelector_Simple_Group_Close_PowerOff); 1286 pMenu->addAction(m_pGroupPowerOffAction); 1245 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState)); 1246 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)); 1247 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff)); 1287 1248 1288 1249 /* Remember action list: */ 1289 m_groupActions << m_pGroupSaveAction1290 << m_pGroupACPIShutdownAction1291 << m_pGroupPowerOffAction;1250 m_groupActions << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState) 1251 << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown) 1252 << gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff); 1292 1253 } 1293 1254 … … 1299 1260 1300 1261 /* Populate 'Machine' / 'Close' menu: */ 1301 m_pMachineSaveAction = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Close_Save); 1302 pMenu->addAction(m_pMachineSaveAction); 1303 m_pMachineACPIShutdownAction = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown); 1304 pMenu->addAction(m_pMachineACPIShutdownAction); 1305 m_pMachinePowerOffAction = gpActionPool->action(UIActionIndexSelector_Simple_Machine_Close_PowerOff); 1306 pMenu->addAction(m_pMachinePowerOffAction); 1262 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)); 1263 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)); 1264 pMenu->addAction(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)); 1307 1265 1308 1266 /* Remember action list: */ 1309 m_machineActions << m_pMachineSaveAction1310 << m_pMachineACPIShutdownAction1311 << m_pMachinePowerOffAction;1267 m_machineActions << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState) 1268 << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown) 1269 << gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff); 1312 1270 } 1313 1271 … … 1319 1277 1320 1278 /* Populate Help-menu: */ 1321 m_pHelpAction = gpActionPool->action(UIActionIndex_Simple_Contents); 1322 pMenu->addAction(m_pHelpAction); 1323 m_pWebAction = gpActionPool->action(UIActionIndex_Simple_WebSite); 1324 pMenu->addAction(m_pWebAction); 1279 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_Contents)); 1280 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_WebSite)); 1325 1281 pMenu->addSeparator(); 1326 m_pResetWarningsAction = gpActionPool->action(UIActionIndex_Simple_ResetWarnings); 1327 pMenu->addAction(m_pResetWarningsAction); 1282 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_ResetWarnings)); 1328 1283 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1329 1284 pMenu->addSeparator(); 1330 m_pNetworkAccessManager = gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager); 1331 pMenu->addAction(m_pNetworkAccessManager); 1332 m_pUpdateAction = gpActionPool->action(UIActionIndex_Simple_CheckForUpdates); 1285 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager)); 1333 1286 if (gEDataManager->applicationUpdateEnabled()) 1334 pMenu->addAction( m_pUpdateAction);1287 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_CheckForUpdates)); 1335 1288 else 1336 m_pUpdateAction->setEnabled(false);1289 gpActionPool->action(UIActionIndex_Simple_CheckForUpdates)->setEnabled(false); 1337 1290 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 1338 1291 #ifndef Q_WS_MAC 1339 1292 pMenu->addSeparator(); 1340 1293 #endif /* !Q_WS_MAC */ 1341 m_pAboutAction = gpActionPool->action(UIActionIndex_Simple_About); 1342 pMenu->addAction(m_pAboutAction); 1294 pMenu->addAction(gpActionPool->action(UIActionIndex_Simple_About)); 1343 1295 } 1344 1296 … … 1369 1321 mVMToolBar->setIconSize(QSize(32, 32)); 1370 1322 mVMToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 1371 mVMToolBar->addAction( m_pAction_Machine_New);1372 mVMToolBar->addAction( m_pAction_Machine_Settings);1373 mVMToolBar->addAction( m_pAction_Common_StartOrShow);1374 mVMToolBar->addAction( m_pAction_Common_Discard);1323 mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_New)); 1324 mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)); 1325 mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)); 1326 mVMToolBar->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)); 1375 1327 1376 1328 /* Prepare graphics VM list: */ … … 1386 1338 1387 1339 /* Prepare details and snapshots tabs: */ 1388 m_pVMDesktop = new UIVMDesktop(mVMToolBar, m_pAction_Common_Refresh, this);1340 m_pVMDesktop = new UIVMDesktop(mVMToolBar, gpActionPool->action(UIActionIndexST_M_Group_S_Refresh), this); 1389 1341 1390 1342 /* Crate container: */ … … 1430 1382 1431 1383 /* 'File' menu connections: */ 1432 connect( m_pMediumManagerDialogAction, SIGNAL(triggered()), this, SLOT(sltShowMediumManager()));1433 connect( m_pImportApplianceWizardAction, SIGNAL(triggered()), this, SLOT(sltShowImportApplianceWizard()));1434 connect( m_pExportApplianceWizardAction, SIGNAL(triggered()), this, SLOT(sltShowExportApplianceWizard()));1384 connect(gpActionPool->action(UIActionIndexST_M_File_S_ShowMediumManager), SIGNAL(triggered()), this, SLOT(sltShowMediumManager())); 1385 connect(gpActionPool->action(UIActionIndexST_M_File_S_ImportAppliance), SIGNAL(triggered()), this, SLOT(sltShowImportApplianceWizard())); 1386 connect(gpActionPool->action(UIActionIndexST_M_File_S_ExportAppliance), SIGNAL(triggered()), this, SLOT(sltShowExportApplianceWizard())); 1435 1387 #ifdef DEBUG 1436 connect( m_pExtraDataManagerWindowAction, SIGNAL(triggered()), this, SLOT(sltOpenExtraDataManagerWindow()));1388 connect(gpActionPool->action(UIActionIndexST_M_File_S_ShowExtraDataManager), SIGNAL(triggered()), this, SLOT(sltOpenExtraDataManagerWindow())); 1437 1389 #endif /* DEBUG */ 1438 connect(m_pPreferencesDialogAction, SIGNAL(triggered()), this, SLOT(sltShowPreferencesDialog())); 1439 connect(m_pExitAction, SIGNAL(triggered()), this, SLOT(sltPerformExit())); 1440 1441 /* 'Group'/'Machine' menu common connections: */ 1442 connect(m_pAction_Common_StartOrShow, SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1443 connect(m_pAction_Common_PauseAndResume, SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1444 connect(m_pAction_Common_Reset, SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1445 connect(m_pAction_Common_Discard, SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1446 connect(m_pAction_Common_ShowInFileManager, SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1447 connect(m_pAction_Common_CreateShortcut, SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1390 connect(gpActionPool->action(UIActionIndex_Simple_Preferences), SIGNAL(triggered()), this, SLOT(sltShowPreferencesDialog())); 1391 connect(gpActionPool->action(UIActionIndexST_M_File_S_Close), SIGNAL(triggered()), this, SLOT(sltPerformExit())); 1448 1392 1449 1393 /* 'Group' menu connections: */ 1450 connect(m_pAction_Group_Add, SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1394 connect(gpActionPool->action(UIActionIndexST_M_Group_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1395 connect(gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1396 connect(gpActionPool->action(UIActionIndexST_M_Group_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1397 connect(gpActionPool->action(UIActionIndexST_M_Group_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1398 connect(gpActionPool->action(UIActionIndexST_M_Group_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1399 connect(gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1400 connect(gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1451 1401 1452 1402 /* 'Machine' menu connections: */ 1453 connect(m_pAction_Machine_Add, SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1454 connect(m_pAction_Machine_Settings, SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog())); 1455 connect(m_pAction_Machine_Clone, SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard())); 1456 connect(m_pAction_Machine_LogDialog, SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1403 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Add), SIGNAL(triggered()), this, SLOT(sltShowAddMachineDialog())); 1404 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings), SIGNAL(triggered()), this, SLOT(sltShowMachineSettingsDialog())); 1405 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Clone), SIGNAL(triggered()), this, SLOT(sltShowCloneMachineWizard())); 1406 connect(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow), SIGNAL(triggered()), this, SLOT(sltPerformStartOrShowAction())); 1407 connect(gpActionPool->action(UIActionIndexST_M_Machine_T_Pause), SIGNAL(toggled(bool)), this, SLOT(sltPerformPauseResumeAction(bool))); 1408 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Reset), SIGNAL(triggered()), this, SLOT(sltPerformResetAction())); 1409 connect(gpActionPool->action(UIActionIndex_Simple_LogDialog), SIGNAL(triggered()), this, SLOT(sltShowLogDialog())); 1410 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard), SIGNAL(triggered()), this, SLOT(sltPerformDiscardAction())); 1411 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager), SIGNAL(triggered()), this, SLOT(sltShowMachineInFileManager())); 1412 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut), SIGNAL(triggered()), this, SLOT(sltPerformCreateShortcutAction())); 1457 1413 1458 1414 /* 'Group/Close' menu connections: */ 1459 connect( m_pGroupCloseMenu, SIGNAL(aboutToShow()), this, SLOT(sltGroupCloseMenuAboutToShow()));1460 connect( m_pGroupSaveAction, SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));1461 connect( m_pGroupACPIShutdownAction, SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));1462 connect( m_pGroupPowerOffAction, SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));1415 connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltGroupCloseMenuAboutToShow())); 1416 connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction())); 1417 connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction())); 1418 connect(gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction())); 1463 1419 1464 1420 /* 'Machine/Close' menu connections: */ 1465 connect( m_pMachineCloseMenu, SIGNAL(aboutToShow()), this, SLOT(sltMachineCloseMenuAboutToShow()));1466 connect( m_pMachineSaveAction, SIGNAL(triggered()), this, SLOT(sltPerformSaveAction()));1467 connect( m_pMachineACPIShutdownAction, SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction()));1468 connect( m_pMachinePowerOffAction, SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction()));1421 connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu(), SIGNAL(aboutToShow()), this, SLOT(sltMachineCloseMenuAboutToShow())); 1422 connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState), SIGNAL(triggered()), this, SLOT(sltPerformSaveAction())); 1423 connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown), SIGNAL(triggered()), this, SLOT(sltPerformACPIShutdownAction())); 1424 connect(gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SIGNAL(triggered()), this, SLOT(sltPerformPowerOffAction())); 1469 1425 1470 1426 /* 'Help' menu connections: */ 1471 connect( m_pHelpAction, SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpHelpDialog()));1472 connect( m_pWebAction, SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpWebDialog()));1473 connect( m_pResetWarningsAction, SIGNAL(triggered()), &msgCenter(), SLOT(sltResetSuppressedMessages()));1427 connect(gpActionPool->action(UIActionIndex_Simple_Contents), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpHelpDialog())); 1428 connect(gpActionPool->action(UIActionIndex_Simple_WebSite), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpWebDialog())); 1429 connect(gpActionPool->action(UIActionIndex_Simple_ResetWarnings), SIGNAL(triggered()), &msgCenter(), SLOT(sltResetSuppressedMessages())); 1474 1430 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1475 connect( m_pNetworkAccessManager, SIGNAL(triggered()), gNetworkManager, SLOT(show()));1476 connect( m_pUpdateAction, SIGNAL(triggered()), gUpdateManager, SLOT(sltForceCheck()));1431 connect(gpActionPool->action(UIActionIndex_Simple_NetworkAccessManager), SIGNAL(triggered()), gNetworkManager, SLOT(show())); 1432 connect(gpActionPool->action(UIActionIndex_Simple_CheckForUpdates), SIGNAL(triggered()), gUpdateManager, SLOT(sltForceCheck())); 1477 1433 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 1478 connect( m_pAboutAction, SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpAboutDialog()));1434 connect(gpActionPool->action(UIActionIndex_Simple_About), SIGNAL(triggered()), &msgCenter(), SLOT(sltShowHelpAboutDialog())); 1479 1435 1480 1436 /* Status-bar connections: */ … … 1611 1567 1612 1568 /* Enable/disable group actions: */ 1613 m_pAction_Group_Rename->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Rename, items)); 1614 m_pAction_Group_Remove->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Remove, items)); 1615 m_pAction_Group_Sort->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Sort, items)); 1569 gpActionPool->action(UIActionIndexST_M_Group_S_Rename)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Rename, items)); 1570 gpActionPool->action(UIActionIndexST_M_Group_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Remove, items)); 1571 gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_P_StartOrShow, items)); 1572 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_T_Pause, items)); 1573 gpActionPool->action(UIActionIndexST_M_Group_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Reset, items)); 1574 gpActionPool->action(UIActionIndexST_M_Group_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Discard, items)); 1575 gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Refresh, items)); 1576 gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_ShowInFileManager, items)); 1577 gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_CreateShortcut, items)); 1578 gpActionPool->action(UIActionIndexST_M_Group_S_Sort)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_S_Sort, items)); 1616 1579 1617 1580 /* Enable/disable machine actions: */ 1618 m_pAction_Machine_Settings->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Settings, items)); 1619 m_pAction_Machine_Clone->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Clone, items)); 1620 m_pAction_Machine_Remove->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Remove, items)); 1621 m_pAction_Machine_AddGroup->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_AddGroup, items)); 1622 m_pAction_Machine_LogDialog->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items)); 1623 m_pAction_Machine_SortParent->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_SortParent, items)); 1624 1625 /* Enable/disable common actions: */ 1626 m_pAction_Common_StartOrShow->setEnabled(isActionEnabled(UIActionIndexSelector_State_Common_StartOrShow, items)); 1627 m_pAction_Common_PauseAndResume->setEnabled(isActionEnabled(UIActionIndexSelector_Toggle_Common_PauseAndResume, items)); 1628 m_pAction_Common_Reset->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_Reset, items)); 1629 m_pAction_Common_Discard->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_Discard, items)); 1630 m_pAction_Common_Refresh->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_Refresh, items)); 1631 m_pAction_Common_ShowInFileManager->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_ShowInFileManager, items)); 1632 m_pAction_Common_CreateShortcut->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Common_CreateShortcut, items)); 1581 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Settings, items)); 1582 gpActionPool->action(UIActionIndexST_M_Machine_S_Clone)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Clone, items)); 1583 gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Remove, items)); 1584 gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_AddGroup, items)); 1585 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_P_StartOrShow, items)); 1586 gpActionPool->action(UIActionIndexST_M_Machine_T_Pause)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_T_Pause, items)); 1587 gpActionPool->action(UIActionIndexST_M_Machine_S_Reset)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Reset, items)); 1588 gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Discard, items)); 1589 gpActionPool->action(UIActionIndex_Simple_LogDialog)->setEnabled(isActionEnabled(UIActionIndex_Simple_LogDialog, items)); 1590 gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_Refresh, items)); 1591 gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_ShowInFileManager, items)); 1592 gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_CreateShortcut, items)); 1593 gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_S_SortParent, items)); 1633 1594 1634 1595 /* Enable/disable group-close actions: */ 1635 m_pGroupCloseMenuAction->setEnabled(isActionEnabled(UIActionIndexSelector_Menu_Group_Close, items));1636 m_pGroupSaveAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Close_Save, items));1637 m_pGroupACPIShutdownAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Close_ACPIShutdown, items));1638 m_pGroupPowerOffAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Group_Close_PowerOff, items));1596 gpActionPool->action(UIActionIndexST_M_Group_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close, items)); 1597 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_SaveState, items)); 1598 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_Shutdown, items)); 1599 gpActionPool->action(UIActionIndexST_M_Group_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Group_M_Close_S_PowerOff, items)); 1639 1600 1640 1601 /* Enable/disable machine-close actions: */ 1641 m_pMachineCloseMenuAction->setEnabled(isActionEnabled(UIActionIndexSelector_Menu_Machine_Close, items));1642 m_pMachineSaveAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Close_Save, items));1643 m_pMachineACPIShutdownAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Close_ACPIShutdown, items));1644 m_pMachinePowerOffAction->setEnabled(isActionEnabled(UIActionIndexSelector_Simple_Machine_Close_PowerOff, items));1602 gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close, items)); 1603 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_SaveState)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_SaveState, items)); 1604 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_Shutdown)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_Shutdown, items)); 1605 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff)->setEnabled(isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_PowerOff, items)); 1645 1606 1646 1607 /* Start/Show action is deremined by 1st item: */ 1647 1608 if (pItem && pItem->accessible()) 1648 m_pAction_Common_StartOrShow->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1); 1609 { 1610 gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1); 1611 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(UIVMItem::isItemPoweredOff(pItem) ? 0 : 1); 1612 } 1649 1613 else 1650 m_pAction_Common_StartOrShow->setState(0); 1614 { 1615 gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)->toActionPolymorphic()->setState(0); 1616 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->toActionPolymorphic()->setState(0); 1617 } 1651 1618 1652 1619 /* Pause/Resume action is deremined by 1st started item: */ … … 1656 1623 pFirstStartedAction = pSelectedItem; 1657 1624 /* Update the Pause/Resume action appearance: */ 1658 m_pAction_Common_PauseAndResume->blockSignals(true);1659 m_pAction_Common_PauseAndResume->setChecked(pFirstStartedAction && UIVMItem::isItemPaused(pFirstStartedAction));1660 m_pAction_Common_PauseAndResume->retranslateUi();1661 m_pAction_Common_PauseAndResume->blockSignals(false);1625 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(true); 1626 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->setChecked(pFirstStartedAction && UIVMItem::isItemPaused(pFirstStartedAction)); 1627 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->retranslateUi(); 1628 gpActionPool->action(UIActionIndexST_M_Group_T_Pause)->blockSignals(false); 1662 1629 1663 1630 #ifdef QT_MAC_USE_COCOA … … 1682 1649 switch (iActionIndex) 1683 1650 { 1684 case UIActionIndexS elector_Simple_Group_Rename:1685 case UIActionIndexS elector_Simple_Group_Remove:1651 case UIActionIndexST_M_Group_S_Rename: 1652 case UIActionIndexST_M_Group_S_Remove: 1686 1653 { 1687 1654 return !m_pChooser->isGroupSavingInProgress() && 1688 1655 isItemsPoweredOff(items); 1689 1656 } 1690 case UIActionIndexS elector_Simple_Group_Sort:1657 case UIActionIndexST_M_Group_S_Sort: 1691 1658 { 1692 1659 return !m_pChooser->isGroupSavingInProgress() && 1693 1660 m_pChooser->isSingleGroupSelected(); 1694 1661 } 1695 case UIActionIndexS elector_Simple_Machine_Settings:1662 case UIActionIndexST_M_Machine_S_Settings: 1696 1663 { 1697 1664 return !m_pChooser->isGroupSavingInProgress() && … … 1699 1666 pItem->configurationAccessLevel() != ConfigurationAccessLevel_Null; 1700 1667 } 1701 case UIActionIndexS elector_Simple_Machine_Clone:1668 case UIActionIndexST_M_Machine_S_Clone: 1702 1669 { 1703 1670 return !m_pChooser->isGroupSavingInProgress() && … … 1705 1672 UIVMItem::isItemEditable(pItem); 1706 1673 } 1707 case UIActionIndexS elector_Simple_Machine_Remove:1674 case UIActionIndexST_M_Machine_S_Remove: 1708 1675 { 1709 1676 return !m_pChooser->isGroupSavingInProgress() && 1710 1677 isAtLeastOneItemRemovable(items); 1711 1678 } 1712 case UIActionIndexS elector_Simple_Machine_AddGroup:1679 case UIActionIndexST_M_Machine_S_AddGroup: 1713 1680 { 1714 1681 return !m_pChooser->isGroupSavingInProgress() && … … 1716 1683 isItemsPoweredOff(items); 1717 1684 } 1718 case UIActionIndexSelector_State_Common_StartOrShow: 1685 case UIActionIndexST_M_Group_P_StartOrShow: 1686 case UIActionIndexST_M_Machine_P_StartOrShow: 1719 1687 { 1720 1688 return !m_pChooser->isGroupSavingInProgress() && 1721 1689 isAtLeastOneItemCanBeStartedOrShowed(items); 1722 1690 } 1723 case UIActionIndexSelector_Simple_Common_Discard: 1691 case UIActionIndexST_M_Group_S_Discard: 1692 case UIActionIndexST_M_Machine_S_Discard: 1724 1693 { 1725 1694 return !m_pChooser->isGroupSavingInProgress() && 1726 1695 isAtLeastOneItemDiscardable(items); 1727 1696 } 1728 case UIActionIndexSelector_Toggle_Common_PauseAndResume: 1697 case UIActionIndexST_M_Group_T_Pause: 1698 case UIActionIndexST_M_Machine_T_Pause: 1729 1699 { 1730 1700 return isAtLeastOneItemStarted(items); 1731 1701 } 1732 case UIActionIndexSelector_Simple_Common_Reset: 1702 case UIActionIndexST_M_Group_S_Reset: 1703 case UIActionIndexST_M_Machine_S_Reset: 1733 1704 { 1734 1705 return isAtLeastOneItemRunning(items); 1735 1706 } 1736 case UIActionIndexSelector_Simple_Common_Refresh: 1707 case UIActionIndexST_M_Group_S_Refresh: 1708 case UIActionIndexST_M_Machine_S_Refresh: 1737 1709 { 1738 1710 return isAtLeastOneItemInaccessible(items); … … 1742 1714 return items.size() == 1 && pItem->accessible(); 1743 1715 } 1744 case UIActionIndexSelector_Simple_Common_ShowInFileManager: 1716 case UIActionIndexST_M_Group_S_ShowInFileManager: 1717 case UIActionIndexST_M_Machine_S_ShowInFileManager: 1745 1718 { 1746 1719 return isAtLeastOneItemAccessible(items); 1747 1720 } 1748 case UIActionIndexS elector_Simple_Machine_SortParent:1721 case UIActionIndexST_M_Machine_S_SortParent: 1749 1722 { 1750 1723 return !m_pChooser->isGroupSavingInProgress(); 1751 1724 } 1752 case UIActionIndexSelector_Simple_Common_CreateShortcut: 1725 case UIActionIndexST_M_Group_S_CreateShortcut: 1726 case UIActionIndexST_M_Machine_S_CreateShortcut: 1753 1727 { 1754 1728 return isAtLeastOneItemSupportsShortcuts(items); 1755 1729 } 1756 case UIActionIndexS elector_Menu_Group_Close:1757 case UIActionIndexS elector_Menu_Machine_Close:1730 case UIActionIndexST_M_Group_M_Close: 1731 case UIActionIndexST_M_Machine_M_Close: 1758 1732 { 1759 1733 return isAtLeastOneItemStarted(items); 1760 1734 } 1761 case UIActionIndexS elector_Simple_Group_Close_Save:1762 case UIActionIndexS elector_Simple_Machine_Close_Save:1763 { 1764 return isActionEnabled(UIActionIndexS elector_Menu_Machine_Close, items);1765 } 1766 case UIActionIndexS elector_Simple_Group_Close_ACPIShutdown:1767 case UIActionIndexS elector_Simple_Machine_Close_ACPIShutdown:1768 { 1769 return isActionEnabled(UIActionIndexS elector_Menu_Machine_Close, items) &&1735 case UIActionIndexST_M_Group_M_Close_S_SaveState: 1736 case UIActionIndexST_M_Machine_M_Close_S_SaveState: 1737 { 1738 return isActionEnabled(UIActionIndexST_M_Machine_M_Close, items); 1739 } 1740 case UIActionIndexST_M_Group_M_Close_S_Shutdown: 1741 case UIActionIndexST_M_Machine_M_Close_S_Shutdown: 1742 { 1743 return isActionEnabled(UIActionIndexST_M_Machine_M_Close, items) && 1770 1744 isAtLeastOneItemAbleToShutdown(items); 1771 1745 } 1772 case UIActionIndexS elector_Simple_Group_Close_PowerOff:1773 case UIActionIndexS elector_Simple_Machine_Close_PowerOff:1774 { 1775 return isActionEnabled(UIActionIndexS elector_Menu_Machine_Close, items);1746 case UIActionIndexST_M_Group_M_Close_S_PowerOff: 1747 case UIActionIndexST_M_Machine_M_Close_S_PowerOff: 1748 { 1749 return isActionEnabled(UIActionIndexST_M_Machine_M_Close, items); 1776 1750 } 1777 1751 default: -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h
r52151 r52155 121 121 void prepareMenuBar(); 122 122 void prepareMenuFile(QMenu *pMenu); 123 void prepareCommonActions();124 void prepareGroupActions();125 void prepareMachineActions();126 123 void prepareMenuGroup(QMenu *pMenu); 127 124 void prepareMenuMachine(QMenu *pMenu); … … 179 176 UIVMDesktop *m_pVMDesktop; 180 177 181 /* 'File' menu action pointers: */182 QMenu *m_pFileMenu;183 UIAction *m_pMediumManagerDialogAction;184 UIAction *m_pImportApplianceWizardAction;185 UIAction *m_pExportApplianceWizardAction;186 UIAction *m_pPreferencesDialogAction;187 #ifdef DEBUG188 UIAction *m_pExtraDataManagerWindowAction;189 #endif /* DEBUG */190 UIAction *m_pExitAction;191 192 /* Common Group/Machine actions: */193 UIActionPolymorphic *m_pAction_Common_StartOrShow;194 UIAction *m_pAction_Common_PauseAndResume;195 UIAction *m_pAction_Common_Reset;196 UIAction *m_pAction_Common_Discard;197 UIAction *m_pAction_Common_Refresh;198 UIAction *m_pAction_Common_ShowInFileManager;199 UIAction *m_pAction_Common_CreateShortcut;200 201 178 /* 'Group' menu action pointers: */ 202 179 QList<UIAction*> m_groupActions; 203 180 QAction *m_pGroupMenuAction; 204 QMenu *m_pGroupMenu;205 UIAction *m_pAction_Group_New;206 UIAction *m_pAction_Group_Add;207 UIAction *m_pAction_Group_Rename;208 UIAction *m_pAction_Group_Remove;209 UIAction *m_pAction_Group_Sort;210 /* 'Group / Close' menu action pointers: */211 UIAction *m_pGroupCloseMenuAction;212 QMenu *m_pGroupCloseMenu;213 UIAction *m_pGroupSaveAction;214 UIAction *m_pGroupACPIShutdownAction;215 UIAction *m_pGroupPowerOffAction;216 181 217 182 /* 'Machine' menu action pointers: */ 218 183 QList<UIAction*> m_machineActions; 219 184 QAction *m_pMachineMenuAction; 220 QMenu *m_pMachineMenu;221 UIAction *m_pAction_Machine_New;222 UIAction *m_pAction_Machine_Add;223 UIAction *m_pAction_Machine_Settings;224 UIAction *m_pAction_Machine_Clone;225 UIAction *m_pAction_Machine_Remove;226 UIAction *m_pAction_Machine_AddGroup;227 UIAction *m_pAction_Machine_LogDialog;228 UIAction *m_pAction_Machine_SortParent;229 /* 'Machine / Close' menu action pointers: */230 UIAction *m_pMachineCloseMenuAction;231 QMenu *m_pMachineCloseMenu;232 UIAction *m_pMachineSaveAction;233 UIAction *m_pMachineACPIShutdownAction;234 UIAction *m_pMachinePowerOffAction;235 236 /* 'Help' menu action pointers: */237 QMenu *m_pHelpMenu;238 UIAction *m_pHelpAction;239 UIAction *m_pWebAction;240 UIAction *m_pResetWarningsAction;241 UIAction *m_pNetworkAccessManager;242 UIAction *m_pUpdateAction;243 UIAction *m_pAboutAction;244 185 245 186 /* Other variables: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r52151 r52155 1141 1141 1142 1142 connect(m_pSettingsButton, SIGNAL(sigButtonClicked()), 1143 gpActionPool->action(UIActionIndexS elector_Simple_Machine_Settings), SLOT(trigger()),1143 gpActionPool->action(UIActionIndexST_M_Machine_S_Settings), SLOT(trigger()), 1144 1144 Qt::QueuedConnection); 1145 1145 connect(m_pStartButton, SIGNAL(sigButtonClicked()), 1146 gpActionPool->action(UIActionIndexS elector_State_Common_StartOrShow), SLOT(trigger()),1146 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow), SLOT(trigger()), 1147 1147 Qt::QueuedConnection); 1148 1148 connect(m_pPauseButton, SIGNAL(sigButtonClicked()), 1149 gpActionPool->action(UIActionIndexS elector_Toggle_Common_PauseAndResume), SLOT(trigger()),1149 gpActionPool->action(UIActionIndexST_M_Machine_T_Pause), SLOT(trigger()), 1150 1150 Qt::QueuedConnection); 1151 1151 connect(m_pCloseButton, SIGNAL(sigButtonClicked()), 1152 gpActionPool->action(UIActionIndexS elector_Simple_Machine_Close_PowerOff), SLOT(trigger()),1152 gpActionPool->action(UIActionIndexST_M_Machine_M_Close_S_PowerOff), SLOT(trigger()), 1153 1153 Qt::QueuedConnection); 1154 1154 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r52151 r52155 530 530 void UIGChooserModel::activateMachineItem() 531 531 { 532 gpActionPool->action(UIActionIndexS elector_State_Common_StartOrShow)->activate(QAction::Trigger);532 gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)->activate(QAction::Trigger); 533 533 } 534 534 … … 699 699 { 700 700 /* Check if action is enabled: */ 701 if (!gpActionPool->action(UIActionIndexS elector_Simple_Group_Rename)->isEnabled())701 if (!gpActionPool->action(UIActionIndexST_M_Group_S_Rename)->isEnabled()) 702 702 return; 703 703 … … 713 713 { 714 714 /* Check if action is enabled: */ 715 if (!gpActionPool->action(UIActionIndexS elector_Simple_Group_Sort)->isEnabled())715 if (!gpActionPool->action(UIActionIndexST_M_Group_S_Sort)->isEnabled()) 716 716 return; 717 717 … … 727 727 { 728 728 /* Check if action is enabled: */ 729 if (!gpActionPool->action(UIActionIndexS elector_Simple_Group_Remove)->isEnabled())729 if (!gpActionPool->action(UIActionIndexST_M_Group_S_Remove)->isEnabled()) 730 730 return; 731 731 … … 803 803 { 804 804 /* Check if action is enabled: */ 805 if (!gpActionPool->action(UIActionIndexS elector_Simple_Machine_New)->isEnabled())805 if (!gpActionPool->action(UIActionIndexST_M_Machine_S_New)->isEnabled()) 806 806 return; 807 807 … … 827 827 { 828 828 /* Check if action is enabled: */ 829 if (!gpActionPool->action(UIActionIndexS elector_Simple_Machine_AddGroup)->isEnabled())829 if (!gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)->isEnabled()) 830 830 return; 831 831 … … 902 902 { 903 903 /* Check if action is enabled: */ 904 if (!gpActionPool->action(UIActionIndexS elector_Simple_Machine_SortParent)->isEnabled())904 if (!gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)->isEnabled()) 905 905 return; 906 906 … … 916 916 { 917 917 /* Check if action is enabled: */ 918 if (!gpActionPool->action(UIActionIndexS elector_Simple_Common_Refresh)->isEnabled())918 if (!gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)->isEnabled()) 919 919 return; 920 920 … … 957 957 { 958 958 /* Check if action is enabled: */ 959 if (!gpActionPool->action(UIActionIndexS elector_Simple_Machine_Remove)->isEnabled())959 if (!gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)->isEnabled()) 960 960 return; 961 961 … … 1126 1126 /* Context menu for group(s): */ 1127 1127 m_pContextMenuGroup = new QMenu; 1128 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Group_New));1129 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Group_Add));1128 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_New)); 1129 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Add)); 1130 1130 m_pContextMenuGroup->addSeparator(); 1131 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Group_Rename));1132 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Group_Remove));1131 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Rename)); 1132 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Remove)); 1133 1133 m_pContextMenuGroup->addSeparator(); 1134 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_State_Common_StartOrShow));1135 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Toggle_Common_PauseAndResume));1136 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_Reset));1137 m_pContextMenuGroup->addMenu(gpActionPool->action(UIActionIndexS elector_Menu_Group_Close)->menu());1134 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_P_StartOrShow)); 1135 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_T_Pause)); 1136 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Reset)); 1137 m_pContextMenuGroup->addMenu(gpActionPool->action(UIActionIndexST_M_Group_M_Close)->menu()); 1138 1138 m_pContextMenuGroup->addSeparator(); 1139 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_Discard));1140 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_Refresh));1139 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Discard)); 1140 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Refresh)); 1141 1141 m_pContextMenuGroup->addSeparator(); 1142 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_ShowInFileManager));1143 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_CreateShortcut));1142 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_ShowInFileManager)); 1143 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_CreateShortcut)); 1144 1144 m_pContextMenuGroup->addSeparator(); 1145 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Group_Sort));1145 m_pContextMenuGroup->addAction(gpActionPool->action(UIActionIndexST_M_Group_S_Sort)); 1146 1146 1147 1147 /* Context menu for machine(s): */ 1148 1148 m_pContextMenuMachine = new QMenu; 1149 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Machine_Settings));1150 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Machine_Clone));1151 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Machine_Remove));1152 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Machine_AddGroup));1149 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Settings)); 1150 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Clone)); 1151 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Remove)); 1152 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup)); 1153 1153 m_pContextMenuMachine->addSeparator(); 1154 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_State_Common_StartOrShow));1155 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Toggle_Common_PauseAndResume));1156 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_Reset));1157 m_pContextMenuMachine->addMenu(gpActionPool->action(UIActionIndexS elector_Menu_Machine_Close)->menu());1154 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_P_StartOrShow)); 1155 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_T_Pause)); 1156 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Reset)); 1157 m_pContextMenuMachine->addMenu(gpActionPool->action(UIActionIndexST_M_Machine_M_Close)->menu()); 1158 1158 m_pContextMenuMachine->addSeparator(); 1159 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_Discard));1159 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Discard)); 1160 1160 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndex_Simple_LogDialog)); 1161 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_Refresh));1161 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh)); 1162 1162 m_pContextMenuMachine->addSeparator(); 1163 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_ShowInFileManager));1164 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Common_CreateShortcut));1163 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_ShowInFileManager)); 1164 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_CreateShortcut)); 1165 1165 m_pContextMenuMachine->addSeparator(); 1166 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexS elector_Simple_Machine_SortParent));1166 m_pContextMenuMachine->addAction(gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent)); 1167 1167 1168 1168 connect(m_pContextMenuGroup, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*))); 1169 1169 connect(m_pContextMenuMachine, SIGNAL(hovered(QAction*)), this, SLOT(sltActionHovered(QAction*))); 1170 1170 1171 connect(gpActionPool->action(UIActionIndexS elector_Simple_Group_New), SIGNAL(triggered()),1171 connect(gpActionPool->action(UIActionIndexST_M_Group_S_New), SIGNAL(triggered()), 1172 1172 this, SLOT(sltCreateNewMachine())); 1173 connect(gpActionPool->action(UIActionIndexS elector_Simple_Machine_New), SIGNAL(triggered()),1173 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_New), SIGNAL(triggered()), 1174 1174 this, SLOT(sltCreateNewMachine())); 1175 connect(gpActionPool->action(UIActionIndexS elector_Simple_Group_Rename), SIGNAL(triggered()),1175 connect(gpActionPool->action(UIActionIndexST_M_Group_S_Rename), SIGNAL(triggered()), 1176 1176 this, SLOT(sltEditGroupName())); 1177 connect(gpActionPool->action(UIActionIndexS elector_Simple_Group_Remove), SIGNAL(triggered()),1177 connect(gpActionPool->action(UIActionIndexST_M_Group_S_Remove), SIGNAL(triggered()), 1178 1178 this, SLOT(sltUngroupSelectedGroup())); 1179 connect(gpActionPool->action(UIActionIndexS elector_Simple_Machine_Remove), SIGNAL(triggered()),1179 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Remove), SIGNAL(triggered()), 1180 1180 this, SLOT(sltRemoveSelectedMachine())); 1181 connect(gpActionPool->action(UIActionIndexS elector_Simple_Machine_AddGroup), SIGNAL(triggered()),1181 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_AddGroup), SIGNAL(triggered()), 1182 1182 this, SLOT(sltGroupSelectedMachines())); 1183 connect(gpActionPool->action(UIActionIndexS elector_Simple_Common_Refresh), SIGNAL(triggered()),1183 connect(gpActionPool->action(UIActionIndexST_M_Group_S_Refresh), SIGNAL(triggered()), 1184 1184 this, SLOT(sltPerformRefreshAction())); 1185 connect(gpActionPool->action(UIActionIndexSelector_Simple_Machine_SortParent), SIGNAL(triggered()), 1185 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_Refresh), SIGNAL(triggered()), 1186 this, SLOT(sltPerformRefreshAction())); 1187 connect(gpActionPool->action(UIActionIndexST_M_Machine_S_SortParent), SIGNAL(triggered()), 1186 1188 this, SLOT(sltSortParentGroup())); 1187 connect(gpActionPool->action(UIActionIndexS elector_Simple_Group_Sort), SIGNAL(triggered()),1189 connect(gpActionPool->action(UIActionIndexST_M_Group_S_Sort), SIGNAL(triggered()), 1188 1190 this, SLOT(sltSortGroup())); 1189 1191
Note:
See TracChangeset
for help on using the changeset viewer.