Cleanup: remove unused GHOST quit dialog code
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1958,8 +1958,3 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
|
||||
|
||||
[pool drain];
|
||||
}
|
||||
|
||||
bool GHOST_SystemCocoa::supportsNativeDialogs(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user