VirtualBox

Changeset 38900 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 29, 2011 11:57:37 AM (13 years ago)
Author:
vboxsync
Message:

FE/Qt4: add close action hook

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

Legend:

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

    r38575 r38900  
    4848const char* VBoxDefs::GUI_LastCloseAction = "GUI/LastCloseAction";
    4949const char* VBoxDefs::GUI_RestrictedCloseActions = "GUI/RestrictedCloseActions";
     50const char* VBoxDefs::GUI_CloseActionHook = "GUI/CloseActionHook";
    5051const char* VBoxDefs::GUI_SuppressMessages = "GUI/SuppressMessages";
    5152const char* VBoxDefs::GUI_PermanentSharedFoldersAtRuntime = "GUI/PermanentSharedFoldersAtRuntime";
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h

    r38575 r38900  
    128128    static const char* GUI_LastCloseAction;
    129129    static const char* GUI_RestrictedCloseActions;
     130    static const char* GUI_CloseActionHook;
    130131    static const char* GUI_SuppressMessages;
    131132    static const char* GUI_PermanentSharedFoldersAtRuntime;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r38348 r38900  
    198198            CMachine machine = session().GetMachine();
    199199
     200            /* Check if there is a close hock script defined. */
     201            const QString& strScript = machine.GetExtraData(VBoxDefs::GUI_CloseActionHook);
     202            if (!strScript.isEmpty())
     203            {
     204                QProcess::startDetached(strScript, QStringList() << machine.GetId());
     205                return;
     206            }
    200207            /* Prepare close dialog: */
    201208            UIVMCloseDialog dlg(machineWindow());
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