VirtualBox

Changeset 85515 in vbox for trunk


Ignore:
Timestamp:
Jul 29, 2020 10:46:40 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9686, bugref:9510. Making sure that columns menu of the Resouces widget is retranslated

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.cpp

    r85508 r85515  
    12801280    m_columnTitles[VMResourceMonitorColumn_DiskIOWriteTotal] = UIResourceMonitorWidget::tr("Disk Write Total");
    12811281    m_columnTitles[VMResourceMonitorColumn_VMExits] = UIResourceMonitorWidget::tr("VM Exits");
     1282
     1283    updateColumnsMenu();
     1284
    12821285    if (m_pShowPerformanceMonitorAction)
    12831286        m_pShowPerformanceMonitorAction->setText(tr("Show Performance Monitor"));
    12841287    if (m_pModel)
    12851288        m_pModel->setColumnCaptions(m_columnTitles);
     1289
     1290
    12861291    computeMinimumColumnWidths();
    12871292}
     
    13621367}
    13631368
    1364 void UIResourceMonitorWidget::prepareActions()
    1365 {
    1366     if (!m_pActionPool->action(UIActionIndexST_M_VMResourceMonitor_M_Columns))
    1367         return;
     1369void UIResourceMonitorWidget::updateColumnsMenu()
     1370{
    13681371    UIMenu *pMenu = m_pActionPool->action(UIActionIndexST_M_VMResourceMonitor_M_Columns)->menu();
    13691372    if (!pMenu)
    13701373        return;
    1371 
     1374    pMenu->clear();
    13721375    for (int i = 0; i < VMResourceMonitorColumn_Max; ++i)
    13731376    {
     
    13801383        connect(pAction, &QAction::toggled, this, &UIResourceMonitorWidget::sltHandleColumnAction);
    13811384    }
     1385}
     1386
     1387void UIResourceMonitorWidget::prepareActions()
     1388{
     1389    updateColumnsMenu();
    13821390    m_pShowPerformanceMonitorAction = new QAction(this);
    1383      connect(m_pShowPerformanceMonitorAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowPerformanceMonitor);
     1391    connect(m_pShowPerformanceMonitorAction, &QAction::triggered, this, &UIResourceMonitorWidget::sltHandleShowPerformanceMonitor);
    13841392}
    13851393
  • trunk/src/VBox/Frontends/VirtualBox/src/monitor/resource/UIResourceMonitor.h

    r85508 r85515  
    9898        void prepareToolBar();
    9999        void prepareActions();
     100        void updateColumnsMenu();
    100101        void loadSettings();
    101102        void loadHiddenColumnList();
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