VirtualBox

Changeset 89222 in vbox for trunk


Ignore:
Timestamp:
May 21, 2021 12:50:09 PM (4 years ago)
Author:
vboxsync
Message:

FE/VBoxHeadless: Give the VM name in the shutdown block reason and
make the message more succint and less scary ("saving" instead of
technically correct but less informative "terminating"). bugref:8161.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r89221 r89222  
    7979static IConsole *gConsole = NULL;
    8080static NativeEventQueue *gEventQ = NULL;
     81
     82/* keep this handy for messages */
     83static com::Utf8Str g_strVMName;
     84static com::Utf8Str g_strVMUUID;
    8185
    8286/* flag whether frontend should terminate */
     
    888892
    889893            /* tell the user what we are doing */
    890             ::ShutdownBlockReasonCreate(hwnd, L"Waiting for VM to terminate");
     894            ::ShutdownBlockReasonCreate(hwnd,
     895                com::BstrFmt("%s saving state",
     896                             g_strVMName.c_str()).raw());
    891897
    892898            /* tell the VM to save state/power off */
     
    13771383        }
    13781384
    1379         Bstr id;
    1380         rc = m->COMGETTER(Id)(id.asOutParam());
     1385        Bstr bstrVMId;
     1386        rc = m->COMGETTER(Id)(bstrVMId.asOutParam());
    13811387        AssertComRC(rc);
    13821388        if (FAILED(rc))
    13831389            break;
     1390        g_strVMUUID = bstrVMId;
     1391
     1392        Bstr bstrVMName;
     1393        rc = m->COMGETTER(Name)(bstrVMName.asOutParam());
     1394        AssertComRC(rc);
     1395        if (FAILED(rc))
     1396            break;
     1397        g_strVMName = bstrVMName;
    13841398
    13851399        Log(("VBoxHeadless: Opening a session with machine (id={%s})...\n",
    1386               Utf8Str(id).c_str()));
     1400             g_strVMUUID.c_str()));
    13871401
    13881402        // set session name
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