Revert "Win32: Use the nicer looking blender-drawn confirmation message box when"
authorAntony Ryakiotakis <kalast@gmail.com>
Fri, 30 Nov 2018 22:25:45 +0000 (23:25 +0100)
committerAntony Ryakiotakis <kalast@gmail.com>
Fri, 30 Nov 2018 22:29:32 +0000 (23:29 +0100)
This reverts commit 60d6eb0b5d578eb02c5f1f31cb51a6cbeea6ee6f.

There is already a full patch (D3118) by brecht for this, will leave it up to him.

intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemWin32.h

index ac58751c7d02bdc8ecccf5e68e58b698a91f1841..bcf7d4e587a5ecce2263de3c2a21d48c19789ab5 100644 (file)
@@ -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);
+}
index a966dbc3990e0f971471cacfb93e3a0de5d6f3a0..e1fd82ec23981f9fece810e5d1d579cfffb1c903 100644 (file)
@@ -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:
        /**