VirtualBox

Changeset 26429 in vbox for trunk/src/VBox/Frontends/VBoxSDL


Ignore:
Timestamp:
Feb 11, 2010 2:04:38 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
57557
Message:

VBoxSDL: fixed title bar according to public ticket #3331

File:
1 edited

Legend:

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

    r26322 r26429  
    42394239    strcpy(szPrevTitle, szTitle);
    42404240
    4241 
    4242     strcpy(szTitle, VBOX_PRODUCT " - ");
    4243 
    42444241    Bstr name;
    42454242    gMachine->COMGETTER(Name)(name.asOutParam());
    4246     if (name)
    4247         strcat(szTitle, Utf8Str(name).raw());
    4248     else
    4249         strcat(szTitle, "<noname>");
    4250 
     4243
     4244    RTStrPrintf(szTitle, sizeof(szTitle), "%s - " VBOX_PRODUCT,
     4245                name ? Utf8Str(name).raw() : "<noname>");
    42514246
    42524247    /* which mode are we in? */
     
    42584253            gMachine->COMGETTER(State)(&machineState);
    42594254            if (machineState == MachineState_Paused)
    4260                 strcat(szTitle, " - [Paused]");
     4255                RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), " - [Paused]");
    42614256
    42624257            if (gfGrabbed)
    4263                 strcat(szTitle, " - [Input captured]");
    4264 
     4258                RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle), " - [Input captured]");
     4259
     4260#if defined(DEBUG) || defined(VBOX_WITH_STATISTICS)
    42654261            // do we have a debugger interface
    42664262            if (gMachineDebugger)
    42674263            {
    4268 #if defined(DEBUG) || defined(VBOX_WITH_STATISTICS)
    42694264                // query the machine state
    42704265                BOOL recompileSupervisor = FALSE;
     
    42944289                else
    42954290                    RTStrPrintf(psz, &szTitle[sizeof(szTitle)] - psz, "]");
    4296 #else
    4297                 BOOL hwVirtEnabled = FALSE;
    4298                 gMachineDebugger->COMGETTER(HWVirtExEnabled)(&hwVirtEnabled);
    4299                 RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
    4300                             "%s", hwVirtEnabled ? " (HWVirtEx)" : "");
    4301 #endif /* DEBUG */
    4302             }
     4291            }
     4292#endif /* DEBUG || VBOX_WITH_STATISTICS */
    43034293            break;
    43044294        }
     
    43124302            gMachine->COMGETTER(State)(&machineState);
    43134303            if (machineState == MachineState_Starting)
    4314                 strcat(szTitle, " - Starting...");
     4304                RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) - strlen(szTitle),
     4305                            " - Starting...");
    43154306            else if (machineState == MachineState_Restoring)
    43164307            {
Note: See TracChangeset for help on using the changeset viewer.

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