VirtualBox

Ignore:
Timestamp:
Apr 11, 2014 3:56:09 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93273
Message:

FE/Qt: Runtime UI: Update Take Snapshot action according extra-data restrictions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r51021 r51051  
    786786        m_machineState = state;
    787787
    788         /* Update session settings: */
    789         updateSessionSettings();
    790 
    791788        /* Notify listeners about machine state changed: */
    792789        emit sigMachineStateChange();
     
    11501147
    11511148        /* Should we allow reconfiguration? */
    1152         m_fReconfigurable = VBoxGlobal::shouldWeAllowMachineReconfiguration(machine);
    1153         updateSessionSettings();
     1149        m_fReconfigurable =  VBoxGlobal::shouldWeAllowMachineReconfiguration(machine);
     1150        /* Should we allow snapshot operations? */
     1151        m_fSnapshotOperationsAllowed = vboxGlobal().shouldWeAllowSnapshotOperations(machine);
    11541152
    11551153        /* What is the default close action and the restricted are? */
     
    11621160                                     // && (m_restrictedCloseActions & MachineCloseAction_PowerOff_RestoringSnapshot);
    11631161
    1164         /* Should we allow snapshot operations? */
    1165         m_fSnapshotOperationsAllowed = vboxGlobal().shouldWeAllowSnapshotOperations(machine);
    1166 
    11671162#if 0 /* Disabled for now! */
    11681163# ifdef Q_WS_WIN
     
    11731168#endif
    11741169    }
     1170
     1171    /* Update session settings: */
     1172    updateSessionSettings();
    11751173}
    11761174
     
    12471245void UISession::updateSessionSettings()
    12481246{
    1249     bool fAllowReconfiguration = m_machineState != KMachineState_Stuck && m_fReconfigurable;
    1250     gActionPool->action(UIActionIndexRuntime_Simple_SettingsDialog)->setEnabled(fAllowReconfiguration);
    1251     gActionPool->action(UIActionIndexRuntime_Simple_StorageSettings)->setEnabled(fAllowReconfiguration);
    1252     gActionPool->action(UIActionIndexRuntime_Simple_SharedFoldersSettings)->setEnabled(fAllowReconfiguration);
    1253     gActionPool->action(UIActionIndexRuntime_Simple_VideoCaptureSettings)->setEnabled(fAllowReconfiguration);
    1254     gActionPool->action(UIActionIndexRuntime_Simple_NetworkSettings)->setEnabled(fAllowReconfiguration);
     1247    /* Particularly enable/disable reconfigurable action: */
     1248    gActionPool->action(UIActionIndexRuntime_Simple_SettingsDialog)->setEnabled(m_fReconfigurable);
     1249    gActionPool->action(UIActionIndexRuntime_Simple_StorageSettings)->setEnabled(m_fReconfigurable);
     1250    gActionPool->action(UIActionIndexRuntime_Simple_SharedFoldersSettings)->setEnabled(m_fReconfigurable);
     1251    gActionPool->action(UIActionIndexRuntime_Simple_VideoCaptureSettings)->setEnabled(m_fReconfigurable);
     1252    gActionPool->action(UIActionIndexRuntime_Simple_NetworkSettings)->setEnabled(m_fReconfigurable);
     1253    /* Particularly enable/disable snapshot related action: */
     1254    gActionPool->action(UIActionIndexRuntime_Simple_TakeSnapshot)->setEnabled(m_fSnapshotOperationsAllowed);
    12551255}
    12561256
Note: See TracChangeset for help on using the changeset viewer.

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