Changeset 94651 in vbox
- Timestamp:
- Apr 20, 2022 12:27:23 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151014
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r94498 r94651 633 633 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Shutdown: strResult = "Shutdown"; break; 634 634 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff: strResult = "PowerOff"; break; 635 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_LogDialog: strResult = "LogDialog"; break; 635 636 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Nothing: strResult = "Nothing"; break; 636 637 case UIExtraDataMetaDefs::RuntimeMenuMachineActionType_All: strResult = "All"; break; … … 670 671 if (strRuntimeMenuMachineActionType.compare("PowerOff", Qt::CaseInsensitive) == 0) 671 672 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_PowerOff; 673 if (strRuntimeMenuMachineActionType.compare("LogDialog", Qt::CaseInsensitive) == 0) 674 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_LogDialog; 672 675 if (strRuntimeMenuMachineActionType.compare("Nothing", Qt::CaseInsensitive) == 0) 673 676 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_Nothing; … … 924 927 case UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_CommandLine: strResult = "CommandLine"; break; 925 928 case UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging: strResult = "Logging"; break; 926 case UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog: strResult = "LogDialog"; break;927 929 case UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_GuestControlConsole: strResult = "GuestControlConsole"; break; 928 930 case UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_All: strResult = "All"; break; … … 946 948 if (strRuntimeMenuDebuggerActionType.compare("Logging", Qt::CaseInsensitive) == 0) 947 949 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_Logging; 948 if (strRuntimeMenuDebuggerActionType.compare("LogDialog", Qt::CaseInsensitive) == 0)949 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog;950 950 if (strRuntimeMenuDebuggerActionType.compare("GuestControlConsole", Qt::CaseInsensitive) == 0) 951 951 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_GuestControlConsole; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r94498 r94651 576 576 RuntimeMenuMachineActionType_Shutdown = RT_BIT(9), 577 577 RuntimeMenuMachineActionType_PowerOff = RT_BIT(10), 578 RuntimeMenuMachineActionType_Nothing = RT_BIT(11), 578 RuntimeMenuMachineActionType_LogDialog = RT_BIT(11), 579 RuntimeMenuMachineActionType_Nothing = RT_BIT(12), 579 580 RuntimeMenuMachineActionType_All = 0xFFFF 580 581 }; … … 665 666 RuntimeMenuDebuggerActionType_CommandLine = RT_BIT(1), 666 667 RuntimeMenuDebuggerActionType_Logging = RT_BIT(2), 667 RuntimeMenuDebuggerActionType_LogDialog = RT_BIT(3), 668 RuntimeMenuDebuggerActionType_GuestControlConsole = RT_BIT(4), 668 RuntimeMenuDebuggerActionType_GuestControlConsole = RT_BIT(3), 669 669 RuntimeMenuDebuggerActionType_All = 0xFFFF 670 670 }; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r94014 r94651 566 566 }; 567 567 568 /** Simple action extension, used as 'Show Logs' action class. */ 569 class UIActionSimpleRuntimeShowLogs : public UIActionSimple 570 { 571 Q_OBJECT; 572 573 public: 574 575 /** Constructs action passing @a pParent to the base-class. */ 576 UIActionSimpleRuntimeShowLogs(UIActionPool *pParent) 577 : UIActionSimple(pParent, ":/vm_show_logs_16px.png", ":/vm_show_logs_disabled_16px.png", true) 578 {} 579 580 protected: 581 582 /** Returns action extra-data ID. */ 583 virtual int extraDataID() const RT_OVERRIDE 584 { 585 return UIExtraDataMetaDefs::RuntimeMenuMachineActionType_LogDialog; 586 } 587 /** Returns action extra-data key. */ 588 virtual QString extraDataKey() const RT_OVERRIDE 589 { 590 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_LogDialog); 591 } 592 /** Returns whether action is allowed. */ 593 virtual bool isAllowed() const RT_OVERRIDE 594 { 595 return actionPool()->toRuntime()->isAllowedInMenuMachine(UIExtraDataMetaDefs::RuntimeMenuMachineActionType_LogDialog); 596 } 597 598 /** Returns shortcut extra-data ID. */ 599 virtual QString shortcutExtraDataID() const RT_OVERRIDE 600 { 601 return QString("LogWindow"); 602 } 603 604 /** Handles translation event. */ 605 virtual void retranslateUi() RT_OVERRIDE 606 { 607 setName(QApplication::translate("UIActionPool", "Show &Log...")); 608 setStatusTip(QApplication::translate("UIActionPool", "Display the log viewer widget.")); 609 } 610 }; 568 611 569 612 /** Menu action extension, used as 'View' menu class. */ … … 2903 2946 { 2904 2947 setName(QApplication::translate("UIActionPool", "&Logging", "debug action")); 2905 }2906 };2907 2908 /** Simple action extension, used as 'Show Logs' action class. */2909 class UIActionSimpleRuntimeShowLogs : public UIActionSimple2910 {2911 Q_OBJECT;2912 2913 public:2914 2915 /** Constructs action passing @a pParent to the base-class. */2916 UIActionSimpleRuntimeShowLogs(UIActionPool *pParent)2917 : UIActionSimple(pParent, true)2918 {}2919 2920 protected:2921 2922 /** Returns action extra-data ID. */2923 virtual int extraDataID() const RT_OVERRIDE2924 {2925 return UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog;2926 }2927 /** Returns action extra-data key. */2928 virtual QString extraDataKey() const RT_OVERRIDE2929 {2930 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog);2931 }2932 /** Returns whether action is allowed. */2933 virtual bool isAllowed() const RT_OVERRIDE2934 {2935 return actionPool()->toRuntime()->isAllowedInMenuDebug(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType_LogDialog);2936 }2937 2938 /** Returns shortcut extra-data ID. */2939 virtual QString shortcutExtraDataID() const RT_OVERRIDE2940 {2941 return QString("LogWindow");2942 }2943 2944 /** Handles translation event. */2945 virtual void retranslateUi() RT_OVERRIDE2946 {2947 setName(QApplication::translate("UIActionPool", "Show &Log...", "debug action"));2948 2948 } 2949 2949 }; … … 3260 3260 m_pool[UIActionIndexRT_M_Machine_S_Shutdown] = new UIActionSimpleRuntimePerformShutdown(this); 3261 3261 m_pool[UIActionIndexRT_M_Machine_S_PowerOff] = new UIActionSimpleRuntimePerformPowerOff(this); 3262 m_pool[UIActionIndexRT_M_Machine_S_ShowLogDialog] = new UIActionSimpleRuntimeShowLogs(this); 3262 3263 3263 3264 /* 'View' actions: */ … … 3329 3330 m_pool[UIActionIndexRT_M_Debug_S_ShowCommandLine] = new UIActionSimpleRuntimeShowCommandLine(this); 3330 3331 m_pool[UIActionIndexRT_M_Debug_T_Logging] = new UIActionToggleRuntimeLogging(this); 3331 m_pool[UIActionIndexRT_M_Debug_S_ShowLogDialog] = new UIActionSimpleRuntimeShowLogs(this);3332 3332 m_pool[UIActionIndexRT_M_Debug_S_GuestControlConsole] = new UIActionSimpleRuntimeGuestControlConsole(this); 3333 3333 #endif /* VBOX_WITH_DEBUGGER_GUI */ … … 3682 3682 /* 'Information Dialog' action: */ 3683 3683 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowInformation)) || fSeparator; 3684 /* 'File Manager' action: */ 3684 3685 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowFileManager)) || fSeparator; 3686 /* 'Log Dialog' action: */ 3687 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_Machine_S_ShowLogDialog)) || fSeparator; 3685 3688 3686 3689 /* Separator: */ … … 4361 4364 /* 'Logging' action: */ 4362 4365 addAction(pMenu, action(UIActionIndexRT_M_Debug_T_Logging)); 4363 /* 'Log Dialog' action: */4364 addAction(pMenu, action(UIActionIndexRT_M_Debug_S_ShowLogDialog));4365 4366 /* 'Guest Control Terminal' action: */ 4366 4367 addAction(pMenu, action(UIActionIndexRT_M_Debug_S_GuestControlConsole)); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.h
r93990 r94651 51 51 UIActionIndexRT_M_Machine_S_Shutdown, 52 52 UIActionIndexRT_M_Machine_S_PowerOff, 53 UIActionIndexRT_M_Machine_S_ShowLogDialog, 53 54 54 55 /* 'View' menu actions: */ … … 120 121 UIActionIndexRT_M_Debug_S_ShowCommandLine, 121 122 UIActionIndexRT_M_Debug_T_Logging, 122 UIActionIndexRT_M_Debug_S_ShowLogDialog,123 123 UIActionIndexRT_M_Debug_S_GuestControlConsole, 124 124 #endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r94603 r94651 1057 1057 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_PowerOff), &UIAction::triggered, 1058 1058 this, &UIMachineLogic::sltPowerOff, Qt::QueuedConnection); 1059 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_ShowLogDialog), &UIAction::triggered, 1060 this, &UIMachineLogic::sltShowLogDialog); 1059 1061 1060 1062 /* 'View' actions connections: */ … … 1130 1132 connect(actionPool()->action(UIActionIndexRT_M_Debug_T_Logging), &UIAction::toggled, 1131 1133 this, &UIMachineLogic::sltLoggingToggled); 1132 connect(actionPool()->action(UIActionIndexRT_M_Debug_S_ShowLogDialog), &UIAction::triggered,1133 this, &UIMachineLogic::sltShowLogDialog);1134 1134 connect(actionPool()->action(UIActionIndexRT_M_Debug_S_GuestControlConsole), &UIAction::triggered, 1135 1135 this, &UIMachineLogic::sltShowGuestControlConsoleDialog); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBarEditorWindow.cpp
r94518 r94651 1279 1279 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Machine_S_Shutdown)); 1280 1280 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Machine_S_PowerOff)); 1281 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Machine_S_ShowLogDialog)); 1281 1282 } 1282 1283 } … … 1358 1359 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Debug_S_ShowCommandLine)); 1359 1360 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Debug_T_Logging)); 1360 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_Debug_S_ShowLogDialog));1361 1361 } 1362 1362 }
Note:
See TracChangeset
for help on using the changeset viewer.