VirtualBox

Ignore:
Timestamp:
May 10, 2016 10:35:32 AM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: ​​​​​​​​​​bugref:6769: Rework/cleanup file-path selector widget (part 10): Some code reordering to simplify next commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp

    r60918 r60920  
    193193void UIFilePathSelector::retranslateUi()
    194194{
    195     /* How do we interpret the "nothing selected" item? */
    196     if (isResetEnabled())
    197     {
    198         m_strNoneText = tr("<reset to default>");
    199         m_strNoneToolTip = tr("The actual default path value will be displayed after "
    200                               "accepting the changes and opening this window again.");
    201     }
    202     else
    203     {
    204         m_strNoneText = tr("<not selected>");
    205         m_strNoneToolTip = tr("Please use the <b>Other...</b> item from the drop-down "
    206                               "list to select a path.");
    207     }
    208 
    209     /* Retranslate 'path' item: */
    210     if (m_strPath.isNull())
    211     {
    212         setItemText(PathId, m_strNoneText);
    213         setItemData(PathId, m_strNoneToolTip, Qt::ToolTipRole);
    214         setToolTip(m_strNoneToolTip);
    215     }
     195    /* Retranslate copy action: */
     196    m_pCopyAction->setText(tr("&Copy"));
    216197
    217198    /* Retranslate 'select' item: */
     
    222203        setItemText(ResetId, tr("Reset"));
    223204
    224     /* Set tooltips of the above two items based on the mode: */
     205    /* Set tool-tips of the above two items based on the mode: */
    225206    switch (m_enmMode)
    226207    {
     
    246227    }
    247228
    248     /* Retranslate copy action: */
    249     m_pCopyAction->setText(tr("&Copy"));
     229    /* How do we interpret the "nothing selected" item? */
     230    if (isResetEnabled())
     231    {
     232        m_strNoneText = tr("<reset to default>");
     233        m_strNoneToolTip = tr("The actual default path value will be displayed after "
     234                              "accepting the changes and opening this window again.");
     235    }
     236    else
     237    {
     238        m_strNoneText = tr("<not selected>");
     239        m_strNoneToolTip = tr("Please use the <b>Other...</b> item from the drop-down "
     240                              "list to select a path.");
     241    }
     242
     243    /* Retranslate 'path' item: */
     244    if (m_strPath.isNull())
     245    {
     246        setItemText(PathId, m_strNoneText);
     247        setItemData(PathId, m_strNoneToolTip, Qt::ToolTipRole);
     248        setToolTip(m_strNoneToolTip);
     249    }
    250250}
    251251
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