Win32: Use the nicer looking blender-drawn confirmation message box when
authorAntony Ryakiotakis <kalast@gmail.com>
Fri, 30 Nov 2018 20:11:59 +0000 (21:11 +0100)
committerAntony Ryakiotakis <kalast@gmail.com>
Fri, 30 Nov 2018 20:11:59 +0000 (21:11 +0100)
quitting with unsaved changes, instead of an ugly messagebox

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

index bcf7d4e587a5ecce2263de3c2a21d48c19789ab5..ac58751c7d02bdc8ecccf5e68e58b698a91f1841 100644 (file)
@@ -1751,9 +1751,3 @@ 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 e1fd82ec23981f9fece810e5d1d579cfffb1c903..a966dbc3990e0f971471cacfb93e3a0de5d6f3a0 100644 (file)
@@ -224,10 +224,9 @@ public:
        static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowWin32 *window, int mouseX, int mouseY, void *data);
 
        /**
-        * Confirms quitting he program when there is just one window left open
-        * in the application
+        * Informs if the system provides native dialogs (eg. confirm quit)
         */
-       int confirmQuit(GHOST_IWindow *window) const;
+       virtual bool supportsNativeDialogs(void) { return false; }
 
 protected:
        /**