VirtualBox

Changeset 84991 in vbox


Ignore:
Timestamp:
Jun 29, 2020 12:46:08 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9743: VirtualBox Manager: NLS fixes for Move to Group functionality.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp

    r84558 r84991  
    667667    virtual void retranslateUi() /* override */
    668668    {
    669         setName(QApplication::translate("UIActionPool", "[New]"));
     669        setName(QApplication::translate("UIActionPool", "[New]", "group"));
    670670        setStatusTip(QApplication::translate("UIActionPool", "Add new group based on selected virtual machines"));
    671671    }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r84971 r84991  
    832832    QAction *pAction = qobject_cast<QAction*>(sender());
    833833    AssertPtrReturnVoid(pAction);
    834     m_pWidget->moveMachineToGroup(pAction->text());
     834    m_pWidget->moveMachineToGroup(pAction->property("actual_group_name").toString());
    835835}
    836836
     
    19831983        pMenu->addSeparator();
    19841984    foreach (const QString &strGroupName, groups)
    1985         pMenu->addAction(strGroupName, this, &UIVirtualBoxManager::sltPerformMachineMoveToSpecificGroup);
     1985    {
     1986        QString strVisibleGroupName = strGroupName;
     1987        if (strVisibleGroupName.startsWith('/'))
     1988            strVisibleGroupName.remove(0, 1);
     1989        if (strVisibleGroupName.isEmpty())
     1990            strVisibleGroupName = QApplication::translate("UIActionPool", "[Root]", "group");
     1991        QAction *pAction = pMenu->addAction(strVisibleGroupName, this, &UIVirtualBoxManager::sltPerformMachineMoveToSpecificGroup);
     1992        pAction->setProperty("actual_group_name", strGroupName);
     1993    }
    19861994}
    19871995
     
    20052013        pMenu->addSeparator();
    20062014    foreach (const QString &strGroupName, groups)
    2007         pMenu->addAction(strGroupName, this, &UIVirtualBoxManager::sltPerformMachineMoveToSpecificGroup);
     2015    {
     2016        QString strVisibleGroupName = strGroupName;
     2017        if (strVisibleGroupName.startsWith('/'))
     2018            strVisibleGroupName.remove(0, 1);
     2019        if (strVisibleGroupName.isEmpty())
     2020            strVisibleGroupName = QApplication::translate("UIActionPool", "[Root]", "group");
     2021        QAction *pAction = pMenu->addAction(strVisibleGroupName, this, &UIVirtualBoxManager::sltPerformMachineMoveToSpecificGroup);
     2022        pAction->setProperty("actual_group_name", strGroupName);
     2023    }
    20082024}
    20092025
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