Changeset 105266 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 11, 2024 7:49:37 AM (7 months ago)
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r101035 r105266 1797 1797 || !strcmp(a->argv[1], "videocap") /* legacy command */) 1798 1798 { 1799 if (!strcmp(a->argv[1], "videocap")) 1800 RTMsgWarning(ControlVM::tr("Sub command 'videocap' is deprecated -- please use 'recording' instead .")); 1801 1799 1802 if (a->argc < 3) 1800 1803 { … … 1815 1818 /* Note: For now all screens have the same configuration. */ 1816 1819 1817 /*1818 * Note: Commands starting with "vcp" are the deprecated versions and are1819 * kept to ensure backwards compatibility.1820 */1821 1820 bool fEnabled; 1822 1821 if (RT_SUCCESS(parseBool(a->argv[2], &fEnabled))) 1823 1822 { 1824 setCurrentSubcommand(HELP_SCOPE_CONTROLVM_RECORDING);1823 //setCurrentSubcommand(HELP_SCOPE_CONTROLVM_RECORDING); 1825 1824 CHECK_ERROR_RET(recordingSettings, COMSETTER(Enabled)(fEnabled), RTEXITCODE_FAILURE); 1825 1826 if (fEnabled) 1827 RTPrintf(ControlVM::tr("Recording enabled. Use 'start' to start recording.\n")); 1828 } 1829 else if (!strcmp(a->argv[2], "start")) 1830 { 1831 //setCurrentSubcommand(HELP_SCOPE_CONTROLVM_RECORDING_START); 1832 bool fWait = false; 1833 if (a->argc >= 4 && !strcmp(a->argv[3], "--wait")) 1834 fWait = true; 1835 1836 ComPtr<IProgress> progress; 1837 CHECK_ERROR_BREAK(recordingSettings, Start(progress.asOutParam())); 1838 1839 if (fWait) 1840 { 1841 hrc = showProgress(progress, SHOW_PROGRESS_OPS); 1842 CHECK_PROGRESS_ERROR(progress, (ControlVM::tr("Recording failed."))); 1843 } 1844 else 1845 RTPrintf(ControlVM::tr("Recording started (detacted).\n")); 1846 } 1847 else if (!strcmp(a->argv[2], "stop")) 1848 { 1849 //setCurrentSubcommand(HELP_SCOPE_CONTROLVM_RECORDING_STOP); 1850 ComPtr<IProgress> progress; 1851 CHECK_ERROR_BREAK(recordingSettings, COMGETTER(Progress)(progress.asOutParam())); 1852 CHECK_ERROR_BREAK(progress, Cancel()); 1853 } 1854 else if (!strcmp(a->argv[2], "attach")) 1855 { 1856 //setCurrentSubcommand(HELP_SCOPE_CONTROLVM_RECORDING_ATTACH); 1857 ComPtr<IProgress> progress; 1858 CHECK_ERROR_BREAK(recordingSettings, COMGETTER(Progress)(progress.asOutParam())); 1859 hrc = showProgress(progress, SHOW_PROGRESS_OPS); 1826 1860 } 1827 1861 else if (!strcmp(a->argv[2], "screens")) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r105087 r105266 2899 2899 CHECK_ERROR_RET(machine, COMGETTER(RecordingSettings)(recordingSettings.asOutParam()), hrc); 2900 2900 2901 BOOL fEnabled; 2901 BOOL fStarted = FALSE; 2902 ComPtr<IProgress> progress; 2903 hrc = recordingSettings->COMGETTER(Progress)(progress.asOutParam()); 2904 if (SUCCEEDED(hrc)) 2905 { 2906 hrc = progress->COMGETTER(Completed)(&fStarted); 2907 fStarted = !fStarted; 2908 } 2909 SHOW_BOOL_VALUE_EX("recording_started", Info::tr("Recording status:"), fStarted, Info::tr("started"), Info::tr("stopped")); 2910 2911 BOOL fEnabled; 2902 2912 CHECK_ERROR_RET(recordingSettings, COMGETTER(Enabled)(&fEnabled), hrc); 2903 2913 SHOW_BOOL_VALUE_EX("recording_enabled", Info::tr("Recording enabled:"), fEnabled, Info::tr("yes"), Info::tr("no")); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r105265 r105266 527 527 { 528 528 CRecordingSettings comRecordingSettings = comMachine.GetRecordingSettings(); 529 if (comRecordingSettings.GetEnabled()) 529 CProgress comProgress = comRecordingSettings.GetProgress(); /** @todo r=andy Revamp this. */ 530 /** @r=andy Check if recording is running: if not completed AND not canceled. */ 531 if (comProgress.isOk() && !comProgress.GetCompleted() && !comProgress.GetCanceled()) 530 532 { 531 533 /* For now all screens have the same config: */ … … 1462 1464 /* Get recording settings: */ 1463 1465 CRecordingSettings comRecordingSettings = comMachine.GetRecordingSettings(); 1464 fRecordingEnabled = comRecordingSettings.GetEnabled(); 1466 CProgress comProgress = comRecordingSettings.GetProgress(); /** r=andy Revamp this. */ 1467 /** @r=andy Check if recording is running: if not completed AND not canceled. */ 1468 fRecordingEnabled = comProgress.isOk() && !comProgress.GetCompleted() && !comProgress.GetCanceled(); 1465 1469 if (fRecordingEnabled) 1466 1470 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r103803 r105266 481 481 break; 482 482 } 483 case KVBoxEventType_OnRecording Changed:483 case KVBoxEventType_OnRecordingStateChanged: 484 484 { 485 485 emit sigRecordingChange(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp
r103803 r105266 217 217 << KVBoxEventType_OnVRDEServerChanged 218 218 << KVBoxEventType_OnVRDEServerInfoChanged 219 << KVBoxEventType_OnRecording Changed219 << KVBoxEventType_OnRecordingStateChanged 220 220 << KVBoxEventType_OnUSBControllerChanged 221 221 << KVBoxEventType_OnUSBDeviceStateChanged -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r105265 r105266 1939 1939 else 1940 1940 { 1941 const BOOL fSettingsEnabled = comSettings.GetEnabled(); 1942 fSuccess = comSettings.isOk(); 1943 if (!fSuccess) 1944 UINotificationMessage::cannotAcquireRecordingSettingsParameter(comSettings); 1945 else 1946 fEnabled = fSettingsEnabled == TRUE; 1941 /** @todo r=andy Revamp this. */ 1942 CProgress comProgress = comSettings.GetProgress(); 1943 fEnabled = comProgress.isOk() && !comProgress.GetCompleted() && !comProgress.GetCanceled(); 1947 1944 } 1948 1945 return fSuccess; … … 1958 1955 else 1959 1956 { 1960 comSettings.SetEnabled(fEnabled); 1961 fSuccess = comSettings.isOk(); 1962 if (!fSuccess) 1963 UINotificationMessage::cannotToggleRecording(comSettings, machineName(), fEnabled); 1957 /** @todo r=andy Revamp this function to better use the progress object. 1958 * Probably also needs a bit of refactoring of the overall handling within FE/Qt. */ 1959 CProgress comProgress; 1960 if (fEnabled) 1961 { 1962 comProgress = comSettings.Start(); 1963 fSuccess = comSettings.isOk(); 1964 if (!fSuccess) 1965 UINotificationMessage::cannotToggleRecording(comSettings, machineName(), fEnabled); 1966 } 1967 else 1968 { 1969 comProgress = comSettings.GetProgress(); 1970 if (comProgress.isOk()) 1971 comProgress.Cancel(); 1972 else 1973 UINotificationMessage::cannotToggleRecording(comSettings, machineName(), fEnabled); 1974 } 1975 1964 1976 } 1965 1977 return fSuccess; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r105120 r105266 53 53 #include "CExtPackManager.h" 54 54 #include "CGraphicsAdapter.h" 55 #include "CProgress.h" /* For starting recording. */ 55 56 #include "CRecordingScreenSettings.h" 56 57 #include "CRecordingSettings.h" … … 1329 1330 fSuccess = comRecordingScreenSettings.isOk(); 1330 1331 } 1331 1332 1332 if (!fSuccess) 1333 1333 { … … 1344 1344 recordingSettings.SetEnabled(newDisplayData.m_fRecordingEnabled); 1345 1345 fSuccess = recordingSettings.isOk(); 1346 if (fSuccess) 1347 { 1348 /* Start recording when recording got enabled. */ 1349 /** @todo r=andy Not sure if this is the right place for it. */ 1350 CProgress comProgress = recordingSettings.Start(); 1351 fSuccess = recordingSettings.isOk(); 1352 } 1346 1353 } 1347 1354 }
Note:
See TracChangeset
for help on using the changeset viewer.