Cleanup: remove unused GHOST quit dialog code
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 18 May 2019 08:35:06 +0000 (10:35 +0200)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Sat, 18 May 2019 08:35:06 +0000 (10:35 +0200)
14 files changed:
intern/ghost/GHOST_C-api.h
intern/ghost/GHOST_ISystem.h
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_System.h
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemNULL.h
intern/ghost/intern/GHOST_SystemSDL.cpp
intern/ghost/intern/GHOST_SystemSDL.h
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemWin32.h
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h

index 6c490e51b0d2a5cabc6ba6e41fe384f9ed47a442..6f92adde0b2a5fd92403027c909f8af71c0bd43b 100644 (file)
@@ -905,17 +905,6 @@ extern void GHOST_putClipboard(GHOST_TInt8 *buffer, int selection);
  */
 extern int GHOST_toggleConsole(int action);
 
-/**
- * Confirms quitting he program when there is just one window left open
- * in the application
- */
-extern int GHOST_confirmQuit(GHOST_WindowHandle windowhandle);
-
-/**
- * Informs if the system provides native dialogs (eg. confirm quit)
- */
-extern int GHOST_SupportsNativeDialogs(void);
-
 /**
  * Use native pixel size (MacBook pro 'retina'), if supported.
  */
index 3c93d21f30f7b9f8dd915edd5b25a02d01754335..51fa2194f2c42065d8922b3706e93e20d2b74b71 100644 (file)
@@ -435,17 +435,6 @@ class GHOST_ISystem {
    */
   virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
 
-  /**
-   * Confirms quitting he program when there is just one window left open
-   * in the application
-   */
-  virtual int confirmQuit(GHOST_IWindow *window) const = 0;
-
-  /**
-   * Informs if the system provides native dialogs (eg. confirm quit)
-   */
-  virtual bool supportsNativeDialogs(void) = 0;
-
  protected:
   /**
    * Initialize the system.
index 3848c723e5bb184d7dfb6a4b0a32ab1010f4bf6c..c8ee2e44efee133ccdeabe29fe255d9dd9d44aa9 100644 (file)
@@ -788,18 +788,6 @@ int GHOST_toggleConsole(int action)
   return system->toggleConsole(action);
 }
 
-int GHOST_SupportsNativeDialogs(void)
-{
-  GHOST_ISystem *system = GHOST_ISystem::getSystem();
-  return system->supportsNativeDialogs();
-}
-
-int GHOST_confirmQuit(GHOST_WindowHandle windowhandle)
-{
-  GHOST_ISystem *system = GHOST_ISystem::getSystem();
-  return system->confirmQuit((GHOST_IWindow *)windowhandle);
-}
-
 int GHOST_UseNativePixels(void)
 {
   GHOST_ISystem *system = GHOST_ISystem::getSystem();
index a696afeae0278e0666aea4afca30b92d5a54730c..21935abed9c944f6f48cc213b4ab4448e38252f9 100644 (file)
@@ -378,16 +378,6 @@ GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window **window,
   return (*window == NULL) ? GHOST_kFailure : GHOST_kSuccess;
 }
 
-int GHOST_System::confirmQuit(GHOST_IWindow * /*window*/) const
-{
-  return 1;
-}
-
-bool GHOST_System::supportsNativeDialogs(void)
-{
-  return 1;
-}
-
 bool GHOST_System::useNativePixel(void)
 {
   m_nativePixel = true;
index a62641c5cf537f605296576ae0152eae98bf78dc..fbf8af01e59712241d94374d30dd962fbe0d6c3a 100644 (file)
@@ -317,17 +317,6 @@ class GHOST_System : public GHOST_ISystem {
    */
   virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
 
-  /**
-   * Confirms quitting he program when there is just one window left open
-   * in the application
-   */
-  virtual int confirmQuit(GHOST_IWindow *window) const;
-
-  /**
-   * Informs if the system provides native dialogs (eg. confirm quit)
-   */
-  virtual bool supportsNativeDialogs(void);
-
  protected:
   /**
    * Initialize the system.
index 1201b5c4a1415101e3be51699e3be5c5ccad9010..109dd6c180dc6b094bb9a4b3fcf478e08ea01160 100644 (file)
@@ -269,11 +269,6 @@ class GHOST_SystemCocoa : public GHOST_System {
    */
   GHOST_TSuccess handleKeyEvent(void *eventPtr);
 
-  /**
-   * Informs if the system provides native dialogs (eg. confirm quit)
-   */
-  virtual bool supportsNativeDialogs(void);
-
  protected:
   /**
    * Initializes the system.
index 9afc882955c4c33deac5a510df7c4d7b549a82f3..0424b96523b353130c19ef4a720ea14a42682b6f 100644 (file)
@@ -1958,8 +1958,3 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
 
   [pool drain];
 }
-
-bool GHOST_SystemCocoa::supportsNativeDialogs(void)
-{
-  return false;
-}
index 2a07633dc51a9b4d5178194ddb46bad54ad687c1..93aea87e9a621713b1147c6d3caa8a7f6ef95cce 100644 (file)
@@ -82,10 +82,6 @@ class GHOST_SystemNULL : public GHOST_System {
   void getAllDisplayDimensions(GHOST_TUns32 &width, GHOST_TUns32 &height) const
   { /* nop */
   }
-  bool supportsNativeDialogs(void)
-  {
-    return false;
-  }
   GHOST_IContext *createOffscreenContext()
   {
     return NULL;
index 18163882cecffdc16b2fbc898f02b8cb05118c07..8fc7046565d5adf42216cc01c165cc37e6b2acb6 100644 (file)
@@ -721,11 +721,6 @@ void GHOST_SystemSDL::addDirtyWindow(GHOST_WindowSDL *bad_wind)
   m_dirty_windows.push_back(bad_wind);
 }
 
-bool GHOST_SystemSDL::supportsNativeDialogs(void)
-{
-  return false;
-}
-
 GHOST_TSuccess GHOST_SystemSDL::getButtons(GHOST_Buttons &buttons) const
 {
   Uint8 state = SDL_GetMouseState(NULL, NULL);
index e51cc3d5b5d094ae94e67bbef30affa455535189..7dbdc3ccec8be2e0377fecc82110050f008e281d 100644 (file)
@@ -77,11 +77,6 @@ class GHOST_SystemSDL : public GHOST_System {
 
   GHOST_TSuccess disposeContext(GHOST_IContext *context);
 
-  /**
-   * Informs if the system provides native dialogs (eg. confirm quit)
-   */
-  virtual bool supportsNativeDialogs(void);
-
  private:
   GHOST_TSuccess init();
 
index 5d882fd6dcbe3ef9702f0e604d75e1119f225ae5..deb10377b7d03da8b14d7f4114d76e6b8bfb3e83 100644 (file)
@@ -1872,11 +1872,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 98b18d2c00b138c0039ddd0058e7e94a5392e06b..7ac6a3e3e20f795fa08fccc2d167cb3430fdaa8d 100644 (file)
@@ -221,12 +221,6 @@ class GHOST_SystemWin32 : public GHOST_System {
                                           int mouseY,
                                           void *data);
 
-  /**
-   * Confirms quitting he program when there is just one window left open
-   * in the application
-   */
-  int confirmQuit(GHOST_IWindow *window) const;
-
  protected:
   /**
    * Initializes the system.
index c688d7713b2dbdd5fde35732c48858c92d7db496..b95e5fe3846d617830cb358b446da0df84937afd 100644 (file)
@@ -376,11 +376,6 @@ GHOST_IWindow *GHOST_SystemX11::createWindow(const STR_String &title,
   return window;
 }
 
-bool GHOST_SystemX11::supportsNativeDialogs(void)
-{
-  return false;
-}
-
 /**
  * Create a new offscreen context.
  * Never explicitly delete the context, use disposeContext() instead.
index f7f33185f9b1d36913e8157ea9c112208aabd833..5c47414253480acb5c753bceb40c37f36e6052fc 100644 (file)
@@ -90,11 +90,6 @@ class GHOST_SystemX11 : public GHOST_System {
 
   GHOST_TSuccess init();
 
-  /**
-   * Informs if the system provides native dialogs (eg. confirm quit)
-   */
-  virtual bool supportsNativeDialogs(void);
-
   /**
    * \section Interface Inherited from GHOST_ISystem
    */