VirtualBox

Changeset 54989 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 27, 2015 1:45:22 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7766: Use SaveState instead of Save for shortcut extra-data key.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp

    r52730 r54989  
    274274
    275275        /* Get shortcut ID/sequence: */
    276         const QString strShortcutExtraDataID = strKeyValuePair.left(iDelimiterPosition);
     276        QString strShortcutExtraDataID = strKeyValuePair.left(iDelimiterPosition);
    277277        const QString strShortcutSequence = strKeyValuePair.right(strKeyValuePair.length() - iDelimiterPosition - 1);
     278
     279        // Hack for handling "Save" as "SaveState":
     280        if (strShortcutExtraDataID == "Save")
     281            strShortcutExtraDataID = "SaveState";
    278282
    279283        /* Compose corresponding shortcut key: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionPoolRuntime.cpp

    r54509 r54989  
    243243};
    244244
    245 class UIActionSimplePerformSave : public UIActionSimple
    246 {
    247     Q_OBJECT;
    248 
    249 public:
    250 
    251     UIActionSimplePerformSave(UIActionPool *pParent)
     245class UIActionSimplePerformSaveState : public UIActionSimple
     246{
     247    Q_OBJECT;
     248
     249public:
     250
     251    UIActionSimplePerformSaveState(UIActionPool *pParent)
    252252        : UIActionSimple(pParent, ":/vm_save_state_16px.png", ":/vm_save_state_disabled_16px.png") {}
    253253
     
    263263    QString shortcutExtraDataID() const
    264264    {
    265         return QString("Save");
     265        return QString("SaveState");
    266266    }
    267267
     
    20612061    m_pool[UIActionIndexRT_M_Machine_T_Pause] = new UIActionTogglePause(this);
    20622062    m_pool[UIActionIndexRT_M_Machine_S_Reset] = new UIActionSimplePerformReset(this);
    2063     m_pool[UIActionIndexRT_M_Machine_S_Save] = new UIActionSimplePerformSave(this);
     2063    m_pool[UIActionIndexRT_M_Machine_S_Save] = new UIActionSimplePerformSaveState(this);
    20642064    m_pool[UIActionIndexRT_M_Machine_S_Shutdown] = new UIActionSimplePerformShutdown(this);
    20652065    m_pool[UIActionIndexRT_M_Machine_S_PowerOff] = new UIActionSimplePerformPowerOff(this);
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