VirtualBox

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

FE/Qt: ​​​​​​​​​​bugref:6769: Rework/cleanup file-path selector widget (part 12): Cache tool-tip on retranslation for focused case as well, that fixes missing translation in certain case.

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

Legend:

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

    r60921 r60922  
    244244    }
    245245
     246    /* But if selector is focused => tool-tip depends on the mode only: */
     247    switch (m_enmMode)
     248    {
     249        case Mode_Folder:
     250            m_strNoneToolTipFocused = tr("Holds the folder path.");
     251            break;
     252        case Mode_File_Open:
     253        case Mode_File_Save:
     254            m_strNoneToolTipFocused = tr("Holds the file path.");
     255            break;
     256        default:
     257            AssertFailedBreak();
     258    }
     259
    246260    /* Finally, retranslate current item: */
    247261    refreshText();
     
    450464
    451465        /* Set the tool-tip: */
    452         setToolTip(m_enmMode == Mode_Folder ?
    453                    tr("Holds the folder path.") :
    454                    tr("Holds the file path."));
     466        setToolTip(m_strNoneToolTipFocused);
    455467        setItemData(PathId, toolTip(), Qt::ToolTipRole);
    456468
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.h

    r60918 r60922  
    179179    /** Holds the cached tool-tip for empty path. */
    180180    QString  m_strNoneToolTip;
     181    /** Holds the cached tool-tip for empty path in focused case. */
     182    QString  m_strNoneToolTipFocused;
    181183
    182184    /** Holds whether the path is editable. */
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