VirtualBox

Changeset 97802 in vbox


Ignore:
Timestamp:
Dec 14, 2022 2:58:10 PM (2 years ago)
Author:
vboxsync
Message:

DnD/Main: Made the progress object description a bit more flexible, to also know which operation currently is going on.

Location:
trunk/src/VBox/Main
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/include/GuestDnDPrivate.h

    r97801 r97802  
    855855    bool isProgressRunning(void) const;
    856856    int setProgress(unsigned uPercentage, uint32_t uState, int rcOp = VINF_SUCCESS, const Utf8Str &strMsg = "");
    857     HRESULT resetProgress(const ComObjPtr<Guest>& pParent);
     857    HRESULT resetProgress(const ComObjPtr<Guest>& pParent, const Utf8Str &strDesc);
    858858    HRESULT queryProgressTo(IProgress **ppProgress);
    859859    /** @} */
  • trunk/src/VBox/Main/src-client/GuestDnDPrivate.cpp

    r97801 r97802  
    418418 * @returns HRESULT
    419419 * @param   pParent             Parent to set for the progress object.
    420  */
    421 HRESULT GuestDnDState::resetProgress(const ComObjPtr<Guest>& pParent)
    422 {
     420 * @param   strDesc             Description of the progress.
     421 */
     422HRESULT GuestDnDState::resetProgress(const ComObjPtr<Guest>& pParent, const Utf8Str &strDesc)
     423{
     424    AssertReturn(strDesc.isNotEmpty(), E_INVALIDARG);
     425
    423426    m_pProgress.setNull();
    424427
     
    427430    {
    428431        hr = m_pProgress->init(static_cast<IGuest *>(pParent),
    429                                Bstr(tr("Dropping data")).raw(),
     432                               Bstr(strDesc).raw(),
    430433                               TRUE /* aCancelable */);
    431434    }
  • trunk/src/VBox/Main/src-client/GuestDnDSourceImpl.cpp

    r97788 r97802  
    393393    GuestDnDState *pState = GuestDnDInst()->getState();
    394394    AssertPtr(pState);
    395     HRESULT hr = pState->resetProgress(m_pGuest);
     395    HRESULT hr = pState->resetProgress(m_pGuest, tr("Dropping data to host"));
    396396    if (FAILED(hr))
    397397        return hr;
  • trunk/src/VBox/Main/src-client/GuestDnDTargetImpl.cpp

    r97788 r97802  
    719719    GuestDnDState *pState = GuestDnDInst()->getState();
    720720    AssertPtr(pState);
    721     HRESULT hr = pState->resetProgress(m_pGuest);
     721    HRESULT hr = pState->resetProgress(m_pGuest, tr("Dropping data to guest"));
    722722    if (FAILED(hr))
    723723        return hr;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette