VirtualBox

Ignore:
Timestamp:
Apr 28, 2014 5:33:21 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93493
Message:

FE/Qt: Runtime UI: Integrating per-VP extra-data flag (GUI/MachineWindowNamePostfix) allowing to preconfigure machine-window product postfix.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r51149 r51158  
    442442    return extraDataStringList(GUI_MachineWindowIcons, strID);
    443443}
     444
     445QString UIExtraDataManager::machineWindowNamePostfix(const QString &strID) const
     446{
     447    return extraDataString(GUI_MachineWindowNamePostfix, strID);
     448}
    444449#endif /* !Q_WS_MAC */
    445450
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r51149 r51158  
    129129    /** Except Mac OS X: Returns redefined machine-window icon names. */
    130130    QStringList machineWindowIconNames(const QString &strID) const;
     131    /** Except Mac OS X: Returns redefined machine-window name postfix. */
     132    QString machineWindowNamePostfix(const QString &strID) const;
    131133#endif /* !Q_WS_MAC */
    132134
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp

    r51149 r51158  
    5353#ifndef Q_WS_MAC
    5454const char* UIDefs::GUI_MachineWindowIcons = "GUI/MachineWindowIcons";
     55const char* UIDefs::GUI_MachineWindowNamePostfix = "GUI/MachineWindowNamePostfix";
    5556#endif /* !Q_WS_MAC */
    5657const char* UIDefs::GUI_RestrictedRuntimeMenus = "GUI/RestrictedRuntimeMenus";
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h

    r51149 r51158  
    122122#ifndef Q_WS_MAC
    123123    extern const char* GUI_MachineWindowIcons;
     124    extern const char* GUI_MachineWindowNamePostfix;
    124125#endif /* !Q_WS_MAC */
    125126    extern const char* GUI_RestrictedRuntimeMenus;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r51004 r51158  
    468468        /* Unusual on the Mac. */
    469469#ifndef Q_WS_MAC
    470         strMachineName += " - " + defaultWindowTitle();
     470        const QString strUserProductName = uisession()->machineWindowNamePostfix();
     471        strMachineName += " - " + (strUserProductName.isEmpty() ? defaultWindowTitle() : strUserProductName);
    471472#endif /* !Q_WS_MAC */
    472473        if (m.GetMonitorCount() > 1)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r51149 r51158  
    11281128        if (!icon.isNull())
    11291129            m_pMachineWindowIcon = new QIcon(icon);
     1130
     1131        /* Load user's machine-window name postfix: */
     1132        m_strMachineWindowNamePostfix = gEDataManager->machineWindowNamePostfix(vboxGlobal().managedVMUuid());
    11301133#endif /* !Q_WS_MAC */
    11311134
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r51149 r51158  
    102102    /** Returns redefined machine-window icon. */
    103103    QIcon* machineWindowIcon() const { return m_pMachineWindowIcon; }
     104    /** Returns redefined machine-window name postfix. */
     105    QString machineWindowNamePostfix() const { return m_strMachineWindowNamePostfix; }
    104106    /** @} */
    105107#endif /* !Q_WS_MAC */
     
    354356    /** Holds redefined machine-window icon. */
    355357    QIcon *m_pMachineWindowIcon;
     358    /** Holds redefined machine-window name postfix. */
     359    QString m_strMachineWindowNamePostfix;
    356360    /** @} */
    357361#endif /* !Q_WS_MAC */
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