VirtualBox

Changeset 42855 in vbox


Ignore:
Timestamp:
Aug 16, 2012 6:42:47 PM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: 6234: Support for VM groups: A little bit user-friendly details-view groups info.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp

    r42827 r42855  
    117117                                       vboxGlobal().vmGuestOSTypeDescription(machine().GetOSTypeId()));
    118118
    119             /* Groups: */
     119            /* Get groups: */
    120120            QStringList groups = machine().GetGroups().toList();
    121             if (!groups.contains("/") || groups.size() > 1)
     121            /* Do not show groups for machine which is in root group only: */
     122            if (groups.size() == 1)
     123                groups.removeAll("/");
     124            /* If group list still not empty: */
     125            if (!groups.isEmpty())
     126            {
     127                /* For every group: */
     128                for (int i = 0; i < groups.size(); ++i)
     129                {
     130                    /* Trim first '/' symbol: */
     131                    QString &strGroup = groups[i];
     132                    if (strGroup.startsWith("/") && strGroup != "/")
     133                        strGroup.remove(0, 1);
     134                }
    122135                m_text << UITextTableLine(QApplication::translate("UIGDetails", "Groups", "details (general)"), groups.join(", "));
     136            }
    123137        }
    124138        else
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