VirtualBox

Changeset 93180 in vbox


Ignore:
Timestamp:
Jan 11, 2022 10:09:35 AM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9371. Sync. disabling host and guest file tables.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp

    r93115 r93180  
    479479    /* Mark the current guest table: */
    480480    UIFileManagerGuestTable *pCurrentGuestTable = currentGuestTable();
     481    if (!pCurrentGuestTable)
     482        return;
    481483    for (int i = 0; i < m_pGuestTablesContainer->count(); ++i)
    482484    {
     
    486488        pTable->setIsCurrent(pTable == pCurrentGuestTable);
    487489    }
     490    if (m_pHostFileTable)
     491        m_pHostFileTable->setEnabled(pCurrentGuestTable->isGuestSessionRunning());
     492}
     493
     494void UIFileManager::sltGuestFileTableStateChanged(bool fIsRunning)
     495{
     496    if (m_pHostFileTable)
     497        m_pHostFileTable->setEnabled(fIsRunning);
    488498}
    489499
     
    801811            connect(pGuestFileTable, &UIFileManagerGuestTable::sigDeleteConfirmationOptionChanged,
    802812                    this, &UIFileManager::sltHandleOptionsUpdated);
     813            connect(pGuestFileTable, &UIFileManagerGuestTable::sigStateChanged,
     814                    this, &UIFileManager::sltGuestFileTableStateChanged);
    803815        }
    804816    }
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h

    r93115 r93180  
    118118    void sltFileTableSelectionChanged(bool fHasSelection);
    119119    void sltCurrentTabChanged(int iIndex);
     120    void sltGuestFileTableStateChanged(bool fIsRunning);
    120121
    121122private:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp

    r93115 r93180  
    646646bool UIFileManagerGuestTable::isGuestSessionRunning() const
    647647{
    648     if (m_comGuestSession.isNull())
    649         return false;
    650     if (m_comGuestSession.GetStatus() == KGuestSessionStatus_Starting ||
    651         m_comGuestSession.GetStatus() == KGuestSessionStatus_Started)
    652         return true;
    653     return false;
     648    return m_enmState == State_SessionRunning;
    654649}
    655650
     
    13901385            break;
    13911386    }
     1387    emit sigStateChanged(m_enmState == State_SessionRunning);
    13921388}
    13931389
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.h

    r93115 r93180  
    5555
    5656    void sigNewFileOperation(const CProgress &comProgress, const QString &strTableName);
     57    void sigStateChanged(bool fSessionRunning);
    5758
    5859public:
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerTable.cpp

    r93115 r93180  
    818818        m_pMainLayout->addWidget(m_pWarningLabel, 2, 0, 5, 7);
    819819        QFont labelFont = m_pWarningLabel->font();
    820         float fSizeMultiplier = 1.5f;
     820        float fSizeMultiplier = 1.f;
    821821        if (labelFont.pointSize() != -1)
    822822            labelFont.setPointSize(fSizeMultiplier * labelFont.pointSize());
    823823        else
    824824            labelFont.setPixelSize(fSizeMultiplier * labelFont.pixelSize());
    825         labelFont.setBold(true);
     825        labelFont.setBold(false);
    826826        m_pWarningLabel->setFont(labelFont);
    827         m_pWarningLabel->setAlignment(Qt::AlignCenter | Qt::AlignVCenter);
     827        m_pWarningLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
    828828        m_pWarningLabel->setWordWrap(true);
    829829    }
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