Changeset 105194 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jul 8, 2024 4:33:52 PM (7 months ago)
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r98103 r105194 319 319 fFlags = SHOW_PROGRESS_DETAILS; 320 320 321 const bool fDetailed = RT_BOOL(fFlags & SHOW_PROGRESS_DETAILS); 322 const bool fQuiet = !RT_BOOL(fFlags & (SHOW_PROGRESS | SHOW_PROGRESS_DETAILS)); 323 321 const bool fDetailed = RT_BOOL(fFlags & SHOW_PROGRESS_DETAILS); 322 const bool fOps = RT_BOOL(fFlags & SHOW_PROGRESS_OPS); 323 const bool fQuiet = !RT_BOOL(fFlags & (SHOW_PROGRESS | SHOW_PROGRESS_DETAILS | SHOW_PROGRESS_OPS)); 324 325 AssertReturn((!fDetailed && !fOps) || (fDetailed != fOps), E_INVALIDARG); /* Mutually exclusive. */ 324 326 325 327 BOOL fCompleted = FALSE; … … 369 371 } 370 372 371 if (!fQuiet && !fDetailed )373 if (!fQuiet && !fDetailed && !fOps) 372 374 { 373 375 RTStrmPrintf(g_pStdErr, "0%%..."); … … 395 397 progress->COMGETTER(Percent(&ulCurrentPercent)); 396 398 397 if (fDetailed) 399 if ( fDetailed 400 || fOps) 398 401 { 399 402 ULONG ulOperation = 1; … … 422 425 progress->COMGETTER(TimeRemaining)(&lSecsRem); 423 426 424 RTStrmPrintf(g_pStdErr, VBoxManage::tr("(%u/%u) %ls %02u%% => %02u%% (%d s remaining)\n"), ulOperation + 1, cOperations, 425 bstrOperationDescription.raw(), ulCurrentOperationPercent, ulCurrentPercent, lSecsRem); 427 if (fDetailed) 428 RTStrmPrintf(g_pStdErr, VBoxManage::tr("(%u/%u) %ls %02u%% => %02u%% (%d s remaining)\n"), ulOperation + 1, cOperations, 429 bstrOperationDescription.raw(), ulCurrentOperationPercent, ulCurrentPercent, lSecsRem); 430 else 431 RTStrmPrintf(g_pStdErr, VBoxManage::tr("%02u%%: %ls\n"), ulCurrentPercent, bstrOperationDescription.raw()); 432 426 433 ulLastPercent = ulCurrentPercent; 427 434 ulLastOperationPercent = ulCurrentOperationPercent; -
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.h
r99775 r105194 156 156 # define SHOW_PROGRESS_DESC RT_BIT_32(0) 157 157 # define SHOW_PROGRESS RT_BIT_32(1) 158 /** Shows detailed information of the progress. 159 * Mutually exclusive with SHOW_PROGRESS_OPS. */ 158 160 # define SHOW_PROGRESS_DETAILS RT_BIT_32(2) 161 /** Only shows the operation descriptions without other details. 162 * Mutually exclusive with SHOW_PROGRESS_DETAILS. */ 163 # define SHOW_PROGRESS_OPS RT_BIT_32(3) 159 164 HRESULT showProgress(ComPtr<IProgress> progress, uint32_t fFlags = SHOW_PROGRESS); 160 165
Note:
See TracChangeset
for help on using the changeset viewer.