VirtualBox

儲存庫 vbox 的更動 67582


忽略:
時間撮記:
2017-6-23 上午11:17:44 (7 年 以前)
作者:
vboxsync
訊息:

FE/Qt: bugref:8847 and bugref:8901: A bit of layout fixes, button-box layout fixes and NLS fixes.

位置:
trunk/src/VBox/Frontends/VirtualBox/src
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkDetailsDialog.cpp

    r67575 r67582  
    109109    if (m_pButtonBoxInterface)
    110110    {
    111         m_pButtonBoxInterface->button(QDialogButtonBox::Discard)->setText(tr("Reset"));
    112         m_pButtonBoxInterface->button(QDialogButtonBox::Apply)->setText(tr("Apply"));
    113         m_pButtonBoxInterface->button(QDialogButtonBox::Discard)->setShortcut(Qt::Key_Escape);
    114         m_pButtonBoxInterface->button(QDialogButtonBox::Apply)->setShortcut(QString("Ctrl+Return"));
    115         m_pButtonBoxInterface->button(QDialogButtonBox::Discard)->setStatusTip(tr("Reset changes in current interface details"));
    116         m_pButtonBoxInterface->button(QDialogButtonBox::Apply)->setStatusTip(tr("Apply changes in current interface details"));
    117         m_pButtonBoxInterface->button(QDialogButtonBox::Discard)->
    118             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Discard)->shortcut().toString()));
    119         m_pButtonBoxInterface->button(QDialogButtonBox::Apply)->
    120             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Apply)->shortcut().toString()));
     111        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
     112        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     113        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
     114        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
     115        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current interface details"));
     116        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current interface details"));
     117        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->
     118            setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     119        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->
     120            setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->shortcut().toString()));
    121121    }
    122122
     
    134134    if (m_pButtonBoxServer)
    135135    {
    136         m_pButtonBoxServer->button(QDialogButtonBox::Discard)->setText(tr("Reset"));
    137         m_pButtonBoxServer->button(QDialogButtonBox::Apply)->setText(tr("Apply"));
    138         m_pButtonBoxServer->button(QDialogButtonBox::Discard)->setShortcut(Qt::Key_Escape);
    139         m_pButtonBoxServer->button(QDialogButtonBox::Apply)->setShortcut(QString("Ctrl+Return"));
    140         m_pButtonBoxServer->button(QDialogButtonBox::Discard)->setStatusTip(tr("Reset changes in current DHCP server details"));
    141         m_pButtonBoxServer->button(QDialogButtonBox::Apply)->setStatusTip(tr("Apply changes in current DHCP server details"));
    142         m_pButtonBoxServer->button(QDialogButtonBox::Discard)->
    143             setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Discard)->shortcut().toString()));
    144         m_pButtonBoxServer->button(QDialogButtonBox::Apply)->
    145             setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Apply)->shortcut().toString()));
     136        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
     137        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
     138        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
     139        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
     140        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current DHCP server details"));
     141        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current DHCP server details"));
     142        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->
     143            setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     144        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->
     145            setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBoxServer->button(QDialogButtonBox::Ok)->shortcut().toString()));
    146146    }
    147147
     
    235235    if (m_pButtonBoxInterface)
    236236    {
    237         m_pButtonBoxInterface->button(QDialogButtonBox::Discard)->setEnabled(false);
    238         m_pButtonBoxInterface->button(QDialogButtonBox::Apply)->setEnabled(false);
     237        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setEnabled(false);
     238        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setEnabled(false);
    239239    }
    240240    if (m_pButtonBoxServer)
    241241    {
    242         m_pButtonBoxServer->button(QDialogButtonBox::Discard)->setEnabled(false);
    243         m_pButtonBoxServer->button(QDialogButtonBox::Apply)->setEnabled(false);
     242        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setEnabled(false);
     243        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setEnabled(false);
    244244    }
    245245
    246246    /* Compare with known buttons: */
    247247    if (   (   m_pButtonBoxInterface
    248             && pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Discard))
     248            && pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Cancel))
    249249        || (   m_pButtonBoxServer
    250             && pButton == m_pButtonBoxServer->button(QDialogButtonBox::Discard)))
     250            && pButton == m_pButtonBoxServer->button(QDialogButtonBox::Cancel)))
    251251        emit sigDataChangeRejected();
    252252
     
    254254
    255255    if (   (   m_pButtonBoxInterface
    256             && pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Apply))
     256            && pButton == m_pButtonBoxInterface->button(QDialogButtonBox::Ok))
    257257        || (   m_pButtonBoxServer
    258             && pButton == m_pButtonBoxServer->button(QDialogButtonBox::Apply)))
     258            && pButton == m_pButtonBoxServer->button(QDialogButtonBox::Ok)))
    259259        emit sigDataChangeAccepted();
    260260}
     
    312312#ifdef VBOX_WS_MAC
    313313            /* Configure layout: */
     314            pLayoutInterface->setSpacing(10);
    314315            pLayoutInterface->setContentsMargins(10, 10, 10, 10);
    315316#endif
     
    580581                AssertPtrReturnVoid(m_pButtonBoxInterface);
    581582                /* Configure button-box: */
    582                 m_pButtonBoxInterface->setStandardButtons(QDialogButtonBox::Discard | QDialogButtonBox::Apply);
     583                m_pButtonBoxInterface->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
    583584                connect(m_pButtonBoxInterface, &QIDialogButtonBox::clicked, this, &UIHostNetworkDetailsDialog::sltHandleButtonBoxClick);
    584585
     
    604605#ifdef VBOX_WS_MAC
    605606            /* Configure layout: */
     607            pLayoutDHCPServer->setSpacing(10);
    606608            pLayoutDHCPServer->setContentsMargins(10, 10, 10, 10);
    607609#endif
     
    815817                AssertPtrReturnVoid(m_pButtonBoxServer);
    816818                /* Configure button-box: */
    817                 m_pButtonBoxServer->setStandardButtons(QDialogButtonBox::Discard | QDialogButtonBox::Apply);
     819                m_pButtonBoxServer->setStandardButtons(QDialogButtonBox::Cancel | QDialogButtonBox::Ok);
    818820                connect(m_pButtonBoxServer, &QIDialogButtonBox::clicked, this, &UIHostNetworkDetailsDialog::sltHandleButtonBoxClick);
    819821
     
    10311033    if (m_pButtonBoxInterface)
    10321034    {
    1033         m_pButtonBoxInterface->button(QDialogButtonBox::Discard)->setEnabled(m_oldData != m_newData);
    1034         m_pButtonBoxInterface->button(QDialogButtonBox::Apply)->setEnabled(m_oldData != m_newData);
     1035        m_pButtonBoxInterface->button(QDialogButtonBox::Cancel)->setEnabled(m_oldData != m_newData);
     1036        m_pButtonBoxInterface->button(QDialogButtonBox::Ok)->setEnabled(m_oldData != m_newData);
    10351037    }
    10361038    if (m_pButtonBoxServer)
    10371039    {
    1038         m_pButtonBoxServer->button(QDialogButtonBox::Discard)->setEnabled(m_oldData != m_newData);
    1039         m_pButtonBoxServer->button(QDialogButtonBox::Apply)->setEnabled(m_oldData != m_newData);
     1040        m_pButtonBoxServer->button(QDialogButtonBox::Cancel)->setEnabled(m_oldData != m_newData);
     1041        m_pButtonBoxServer->button(QDialogButtonBox::Ok)->setEnabled(m_oldData != m_newData);
    10401042    }
    10411043
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotDetailsWidget.cpp

    r67517 r67582  
    571571    m_pBrowserDescription->setToolTip(tr("Holds the snapshot description."));
    572572    m_pButtonBox->button(QDialogButtonBox::Ok)->setText(tr("Apply"));
    573     m_pButtonBox->button(QDialogButtonBox::Cancel)->setText(tr("Discard"));
     573    m_pButtonBox->button(QDialogButtonBox::Cancel)->setText(tr("Reset"));
    574574    m_pButtonBox->button(QDialogButtonBox::Ok)->setShortcut(QString("Ctrl+Return"));
    575575    m_pButtonBox->button(QDialogButtonBox::Cancel)->setShortcut(Qt::Key_Escape);
    576576    m_pButtonBox->button(QDialogButtonBox::Ok)->setStatusTip(tr("Apply changes in current snapshot details"));
    577     m_pButtonBox->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Discard changes in current snapshot details"));
     577    m_pButtonBox->button(QDialogButtonBox::Cancel)->setStatusTip(tr("Reset changes in current snapshot details"));
    578578    m_pButtonBox->button(QDialogButtonBox::Ok)->
    579579        setToolTip(tr("Apply Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Ok)->shortcut().toString()));
    580580    m_pButtonBox->button(QDialogButtonBox::Cancel)->
    581         setToolTip(tr("Discard Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Cancel)->shortcut().toString()));
     581        setToolTip(tr("Reset Changes (%1)").arg(m_pButtonBox->button(QDialogButtonBox::Cancel)->shortcut().toString()));
    582582
    583583    /* And if snapshot is valid: */
     
    736736        AssertPtrReturnVoid(m_pLayoutOptions);
    737737        {
     738#ifdef VBOX_WS_MAC
     739            /* Configure layout: */
     740            m_pLayoutOptions->setSpacing(10);
     741            m_pLayoutOptions->setContentsMargins(10, 10, 10, 10);
     742#endif
     743
    738744            /* Get the required icon metric: */
    739745            const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize);
     
    874880                /* Configure layout: */
    875881                m_pLayoutDetails->setSpacing(5);
     882#ifdef VBOX_WS_MAC
     883                m_pLayoutDetails->setContentsMargins(10, 10, 10, 10);
     884#endif
    876885
    877886                /* Create layout 1: */
     
    10971106//               m_newData.m_strDescription.toUtf8().constData());
    10981107
    1099     /* Update 'Apply' / 'Discard' button states: */
     1108    /* Update 'Apply' / 'Reset' button states: */
    11001109    m_pButtonBox->button(QDialogButtonBox::Ok)->setEnabled(m_oldData != m_newData);
    11011110    m_pButtonBox->button(QDialogButtonBox::Cancel)->setEnabled(m_oldData != m_newData);
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette