remove for real this time
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
#ifndef ERROR_DIALOG_H
|
||||
#define ERROR_DIALOG_H
|
||||
|
||||
class ErrorDialog {
|
||||
public:
|
||||
/* This is used for showing errors from exceptions, so it might be used
|
||||
* before SDL has been initialized (or SDL may have failed to init); don't
|
||||
* use SDL. If the window has been opened, it'll be hidden or closed. */
|
||||
virtual void ShowError( const CString &error ) = 0;
|
||||
virtual ~ErrorDialog() { }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 by the person(s) listed below. All rights reserved.
|
||||
*
|
||||
* Glenn Maynard
|
||||
*/
|
||||
@@ -1,108 +0,0 @@
|
||||
#include "../../global.h"
|
||||
#include "../../RageUtil.h"
|
||||
#include "../../resource.h"
|
||||
|
||||
#include "../../archutils/Win32/GotoURL.h"
|
||||
#include "../../archutils/Win32/AppInstance.h"
|
||||
|
||||
#include "ErrorDialog_Win32.h"
|
||||
|
||||
static CString g_sErrorString;
|
||||
|
||||
BOOL CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch( msg )
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
CString sMessage = g_sErrorString;
|
||||
|
||||
sMessage.Replace( "\n", "\r\n" );
|
||||
|
||||
SendDlgItemMessage(
|
||||
hWnd,
|
||||
IDC_EDIT_ERROR,
|
||||
WM_SETTEXT,
|
||||
0,
|
||||
(LPARAM)(LPCTSTR)sMessage
|
||||
);
|
||||
}
|
||||
break;
|
||||
case WM_COMMAND:
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_BUTTON_VIEW_LOG:
|
||||
{
|
||||
PROCESS_INFORMATION pi;
|
||||
STARTUPINFO si;
|
||||
ZeroMemory( &si, sizeof(si) );
|
||||
|
||||
CreateProcess(
|
||||
NULL, // pointer to name of executable module
|
||||
"notepad.exe log.txt", // pointer to command line string
|
||||
NULL, // process security attributes
|
||||
NULL, // thread security attributes
|
||||
false, // handle inheritance flag
|
||||
0, // creation flags
|
||||
NULL, // pointer to new environment block
|
||||
NULL, // pointer to current directory name
|
||||
&si, // pointer to STARTUPINFO
|
||||
&pi // pointer to PROCESS_INFORMATION
|
||||
);
|
||||
}
|
||||
break;
|
||||
case IDC_BUTTON_REPORT:
|
||||
GotoURL( "http://sourceforge.net/tracker/?func=add&group_id=37892&atid=421366" );
|
||||
break;
|
||||
case IDC_BUTTON_RESTART:
|
||||
{
|
||||
/* Clear the startup mutex, since we're starting a new
|
||||
* instance before ending ourself. */
|
||||
TCHAR szFullAppPath[MAX_PATH];
|
||||
GetModuleFileName(NULL, szFullAppPath, MAX_PATH);
|
||||
|
||||
// Launch StepMania
|
||||
PROCESS_INFORMATION pi;
|
||||
STARTUPINFO si;
|
||||
ZeroMemory( &si, sizeof(si) );
|
||||
|
||||
CreateProcess(
|
||||
NULL, // pointer to name of executable module
|
||||
szFullAppPath, // pointer to command line string
|
||||
NULL, // process security attributes
|
||||
NULL, // thread security attributes
|
||||
false, // handle inheritance flag
|
||||
0, // creation flags
|
||||
NULL, // pointer to new environment block
|
||||
NULL, // pointer to current directory name
|
||||
&si, // pointer to STARTUPINFO
|
||||
&pi // pointer to PROCESS_INFORMATION
|
||||
);
|
||||
}
|
||||
EndDialog( hWnd, 0 );
|
||||
break;
|
||||
// fall through
|
||||
case IDOK:
|
||||
EndDialog( hWnd, 0 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
void ErrorDialog_Win32::ShowError( const CString &error )
|
||||
{
|
||||
g_sErrorString = error;
|
||||
// throw up a pretty error dialog
|
||||
AppInstance handle;
|
||||
DialogBox(handle.Get(), MAKEINTRESOURCE(IDD_ERROR_DIALOG),
|
||||
NULL, ErrorWndProc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 by the person(s) listed below. All rights reserved.
|
||||
*
|
||||
* Chris Danford
|
||||
* Glenn Maynard
|
||||
*/
|
||||
@@ -1,21 +0,0 @@
|
||||
#ifndef ERROR_DIALOG_WIN32_H
|
||||
#define ERROR_DIALOG_WIN32_H
|
||||
|
||||
#include "ErrorDialog.h"
|
||||
|
||||
class ErrorDialog_Win32: public ErrorDialog
|
||||
{
|
||||
public:
|
||||
void ShowError( const CString &error );
|
||||
};
|
||||
|
||||
#undef ARCH_ERROR_DIALOG
|
||||
#define ARCH_ERROR_DIALOG ErrorDialog_Win32
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 by the person(s) listed below. All rights reserved.
|
||||
*
|
||||
* Glenn Maynard
|
||||
*/
|
||||
@@ -1,21 +0,0 @@
|
||||
#ifndef ERROR_DIALOG_NULL_H
|
||||
#define ERROR_DIALOG_NULL_H
|
||||
|
||||
#include "ErrorDialog.h"
|
||||
|
||||
class ErrorDialog_null: public ErrorDialog
|
||||
{
|
||||
public:
|
||||
void ShowError( const CString &error ) { }
|
||||
};
|
||||
|
||||
#undef ARCH_ERROR_DIALOG
|
||||
#define ARCH_ERROR_DIALOG ErrorDialog_null
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 by the person(s) listed below. All rights reserved.
|
||||
*
|
||||
* Glenn Maynard
|
||||
*/
|
||||
@@ -1,14 +0,0 @@
|
||||
#include "../../global.h"
|
||||
#include "ErrorDialog_stdout.h"
|
||||
|
||||
void ErrorDialog_stdout::ShowError( const CString &error )
|
||||
{
|
||||
/* Simplest "dialog" ever. */
|
||||
printf("Error: %s\n", error.c_str());
|
||||
}
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 by the person(s) listed below. All rights reserved.
|
||||
*
|
||||
* Glenn Maynard
|
||||
*/
|
||||
@@ -1,21 +0,0 @@
|
||||
#ifndef ERROR_DIALOG_STDOUT_H
|
||||
#define ERROR_DIALOG_STDOUT_H
|
||||
|
||||
#include "ErrorDialog.h"
|
||||
|
||||
class ErrorDialog_stdout: public ErrorDialog
|
||||
{
|
||||
public:
|
||||
void ShowError( const CString &error );
|
||||
};
|
||||
|
||||
#undef ARCH_ERROR_DIALOG
|
||||
#define ARCH_ERROR_DIALOG ErrorDialog_stdout
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 by the person(s) listed below. All rights reserved.
|
||||
*
|
||||
* Glenn Maynard
|
||||
*/
|
||||
Reference in New Issue
Block a user