diff options
author | Antony Ryakiotakis <kalast@gmail.com> | 2018-12-01 01:25:45 +0300 |
---|---|---|
committer | Antony Ryakiotakis <kalast@gmail.com> | 2018-12-01 01:29:32 +0300 |
commit | 0f5b53ba4dc03f89b43a633f73a59594e709ab11 (patch) | |
tree | dee081cd4d5c41839357db26494c58262dbae907 | |
parent | 597d425638d304e7d70bd4d1a2d73eaf880d9242 (diff) |
Revert "Win32: Use the nicer looking blender-drawn confirmation message box when"
This reverts commit 60d6eb0b5d578eb02c5f1f31cb51a6cbeea6ee6f.
There is already a full patch (D3118) by brecht for this, will leave it up to him.
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 6 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index ac58751c7d0..bcf7d4e587a 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1751,3 +1751,9 @@ int GHOST_SystemWin32::toggleConsole(int action) return m_consoleStatus; } + +int GHOST_SystemWin32::confirmQuit(GHOST_IWindow *window) const +{ + return (MessageBox(window ? ((GHOST_WindowWin32 *)window)->getHWND() : 0, "Some changes have not been saved.\nDo you really want to quit?", + "Exit Blender", MB_OKCANCEL | MB_ICONWARNING | MB_TOPMOST) == IDOK); +} diff --git a/intern/ghost/intern/GHOST_SystemWin32.h b/intern/ghost/intern/GHOST_SystemWin32.h index a966dbc3990..e1fd82ec239 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.h +++ b/intern/ghost/intern/GHOST_SystemWin32.h @@ -224,9 +224,10 @@ public: static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowWin32 *window, int mouseX, int mouseY, void *data); /** - * Informs if the system provides native dialogs (eg. confirm quit) + * Confirms quitting he program when there is just one window left open + * in the application */ - virtual bool supportsNativeDialogs(void) { return false; } + int confirmQuit(GHOST_IWindow *window) const; protected: /** |