#include "frontend.h"\r
#include "dlg_process.h"\r
\r
-bool g_fCancel = false;\r
ProcessDialog * g_procDlg = NULL;\r
\r
//******************************************************************************\r
ProcessDialog::~ProcessDialog()\r
{\r
g_procDlg = NULL;\r
- g_fCancel = false;\r
+ this->fCancel = false;\r
}\r
\r
//******************************************************************************\r
this->ebSource = XRCCTRL(* this, "ebSource", wxTextCtrl);\r
this->ebTarget = XRCCTRL(* this, "ebTarget", wxTextCtrl);\r
this->gauge = XRCCTRL(* this, "gauge", wxGauge);\r
+ this->fCancel = false;\r
g_procDlg = this;\r
\r
::wxXmlResource::Get()->Unload(FE_DIR_S_XRC wxT("dlg_process.xrc"));\r
\r
void ProcessDialog::OnBtnCancel(wxCommandEvent &)\r
{\r
- g_fCancel = true;\r
+ this->fCancel = true;\r
this->Close(true);\r
}\r
\r
break;\r
}\r
\r
- return g_fCancel ? TPI_CALLBACK_CANCEL : TPI_CALLBACK_CONTINUE;\r
+ return g_procDlg->fCancel ? TPI_CALLBACK_CANCEL : TPI_CALLBACK_CONTINUE;\r
}\r
wxTextCtrl* ebSource;
wxTextCtrl* ebTarget;
wxGauge* gauge;
+ bool fCancel;\r
void OnInit( wxInitDialogEvent &);
void OnBtnCancel(wxCommandEvent &);
TPI_PROC g_prProc;\r
bool g_fCallback32bit;\r
bool g_fExistUnicodeMode;\r
-wxString g_szAppPath;\r
\r
//******************************************************************************\r
// Entry\r
//******************************************************************************\r
\r
#ifdef __LINUX__\r
-void __attribute__((constructor)) Attach(void)\r
-{\r
- wxStandardPaths p;\r
- g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
-}\r
-\r
void __attribute__((destructor)) Detach(void)\r
{\r
::FreeLibrary(g_LibInfo.hLib);\r
+ ::FreeLibrary(g_LibInfo.hLibAlt);\r
}\r
#else\r
BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *)\r
{\r
switch (fdwReason)\r
{\r
- case DLL_PROCESS_ATTACH:\r
- {\r
- wxStandardPaths p;\r
- g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
- break;\r
- }\r
case DLL_PROCESS_DETACH:\r
::FreeLibrary(g_LibInfo.hLib);\r
break;\r
void * _pPtr\r
)\r
{\r
- // \83p\83X\90Ý\92è\81BTODO : \8dí\8f\9c\81B\r
- wxStandardPaths p;\r
- g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
-\r
if (_pPtr == NULL)\r
{\r
return TPI_ERROR_D_PARAMETER;\r
case TPI_INFO_SUPPORTED_SUFFIX:\r
{\r
// xml\89ð\90Í\8aJ\8en\81B\r
- wxXmlDocument config(g_szAppPath + wxT("/lib/calLibrary.xml"));\r
+ wxStandardPaths p;\r
+ wxXmlDocument config(wxPathOnly(p.GetExecutablePath()) + wxT("/lib/calLibrary.xml"));\r
// \88ê\8bC\82É\90æ\93ª\82Ì\83\89\83C\83u\83\89\83\8a\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B\r
wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren();\r
\r
wxULongLong _llSubOption\r
)\r
{\r
- // \83p\83X\90Ý\92è\81B\r
- wxStandardPaths p;\r
- g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
-\r
// xml\89ð\90Í\8aJ\8en\81B\r
- wxXmlDocument config(g_szAppPath + wxT("/lib/calLibrary.xml"));\r
+ wxStandardPaths p;\r
+ wxXmlDocument config(wxPathOnly(p.GetExecutablePath()) + wxT("/lib/calLibrary.xml"));\r
if (! config.IsOk())\r
{\r
return TPI_ERROR_UNDEFINED;\r
} g_LibInfo;\r
\r
TPI_PROC g_prProc;\r
-wxString g_szAppPath;\r
wxArrayString g_asOutput;\r
\r
//******************************************************************************\r
// Entry\r
//******************************************************************************\r
\r
-#ifdef __LINUX__\r
-void __attribute__((constructor)) Attach(void)\r
-{\r
- wxStandardPaths p;\r
-// g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
-}\r
-\r
-void __attribute__((destructor)) Detach(void)\r
+BOOL __stdcall DllMain(HMODULE, DWORD, void *)\r
{\r
-}\r
-#else\r
-BOOL __stdcall DllMain(HMODULE, DWORD fdwReason, void *)\r
-{\r
- switch (fdwReason)\r
- {\r
- case DLL_PROCESS_ATTACH:\r
- {\r
- wxStandardPaths p;\r
- g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
- break;\r
- }\r
- case DLL_PROCESS_DETACH:\r
- break;\r
- }\r
return TRUE;\r
}\r
-#endif\r
\r
//******************************************************************************\r
// Inside Functions\r
void * _pPtr\r
)\r
{\r
- // \83p\83X\90Ý\92è\81BTODO : \8dí\8f\9c\81B\r
- wxStandardPaths p;\r
- g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
-\r
if (_pPtr == NULL)\r
{\r
return TPI_ERROR_D_PARAMETER;\r
case TPI_INFO_SUPPORTED_SUFFIX:\r
{\r
// xml\89ð\90Í\8aJ\8en\81B\r
- wxXmlDocument config(g_szAppPath + wxT("/lib/cuiWrapper.xml"));\r
+ wxStandardPaths p;\r
+ wxXmlDocument config(wxPathOnly(p.GetExecutablePath()) + wxT("/lib/cuiWrapper.xml"));\r
// \88ê\8bC\82É\90æ\93ª\82Ì\83\89\83C\83u\83\89\83\8a\82Ì\8fî\95ñ\82ð\8eæ\93¾\81B\r
wxXmlNode * xmlLibrary = config.GetRoot()->GetChildren();\r
\r
wxULongLong _llSubOption\r
)\r
{\r
- // \83p\83X\90Ý\92è\81B\r
- wxStandardPaths p;\r
- g_szAppPath = wxPathOnly(p.GetExecutablePath());\r
-\r
// xml\89ð\90Í\8aJ\8en\81B\r
- wxXmlDocument config(g_szAppPath + wxT("/lib/cuiWrapper.xml"));\r
+ wxStandardPaths p;\r
+ wxXmlDocument config(wxPathOnly(p.GetExecutablePath()) + wxT("/lib/cuiWrapper.xml"));\r
if (! config.IsOk())\r
{\r
return TPI_ERROR_UNDEFINED;\r