Patch level : 12.00 1370

Files correlati     : xvaga.dll
Bug                 :

Commento:
La cartella dei file temporanei può essere personalizzata mettento nella variablie Temp di conf.ini %Study
This commit is contained in:
Alessandro Bonazzi 2025-02-07 23:34:15 +01:00
parent cada1f1fa9
commit 383a6f7d36

View File

@ -300,7 +300,7 @@ DRAW_CTOOLS* xvt_app_get_default_ctools(DRAW_CTOOLS *ct)
void xvt_app_process_pending_events(void) void xvt_app_process_pending_events(void)
{ {
wxApp* a = wxTheApp; // Memorizzo il risultato di wxGetInstance wxApp* a = wxTheApp; // Memorizzo il risultato di wxGetInstance
if (a != NULL) // Puo' succedere! if (a != nullptr) // Puo' succedere!
{ {
while (a->Pending()) while (a->Pending())
a->Dispatch(); a->Dispatch();
@ -1626,6 +1626,21 @@ BOOLEAN xvt_fsys_get_curr_dir(DIRECTORY *dirp)
void xvt_fsys_get_temp_dir(DIRECTORY *dirp) void xvt_fsys_get_temp_dir(DIRECTORY *dirp)
{ {
xvt_sys_get_profile_string(NULL, "Main", "Temp", "", dirp->path, sizeof(dirp->path)); xvt_sys_get_profile_string(NULL, "Main", "Temp", "", dirp->path, sizeof(dirp->path));
wxString work_dirp(dirp->path);
work_dirp.MakeUpper();
const int pos = work_dirp.Find("%STUDY");
if (pos >= 0)
{
char wrk[_MAX_PATH]; xvt_sys_get_profile_string(NULL, "Main", "Study", "", wrk, sizeof(wrk));
strcat_s(wrk, dirp->path + pos + 7);
dirp->path[pos] = '\0';
strcat_s(dirp->path, wrk);
}
if (!*dirp->path) if (!*dirp->path)
wxStrcpy(dirp->path, wxFileName::GetTempDir()); wxStrcpy(dirp->path, wxFileName::GetTempDir());
} }
@ -2030,6 +2045,7 @@ BOOLEAN xvt_fsys_fcopy(const char* orig, const char* dest)
http.SetPassword(strPwd); http.SetPassword(strPwd);
} }
http.SetHeader(_T("Content-type"), _T("application/x-www-form-urlencoded")); //remember to define “Content-type: application/x-www-form-urlencoded”, or remote server cant get your posted data. http.SetHeader(_T("Content-type"), _T("application/x-www-form-urlencoded")); //remember to define “Content-type: application/x-www-form-urlencoded”, or remote server cant get your posted data.
wxString PostData("postdata="); wxString PostData("postdata=");
PostData << fnPath.GetFullPath(); PostData << fnPath.GetFullPath();
@ -2047,17 +2063,18 @@ BOOLEAN xvt_fsys_fcopy(const char* orig, const char* dest)
output = new wxFileOutputStream(dest); output = new wxFileOutputStream(dest);
} }
BOOLEAN ok = FALSE; BOOLEAN ok = false;
if (input != NULL && output != NULL)
if (input != nullptr && output != nullptr)
{ {
input->Read(*output); input->Read(*output);
wxStreamError err = output->GetLastError(); wxStreamError err = output->GetLastError();
ok = (err == wxSTREAM_NO_ERROR); ok = (err == wxSTREAM_NO_ERROR);
output->Close(); output->Close();
} }
if (input != NULL) if (input != nullptr)
delete input; delete input;
if (output != NULL && scheme != "ftp") if (output != nullptr && scheme != "ftp")
delete output; delete output;
return ok; return ok;
} }
@ -4118,6 +4135,7 @@ static long xvt_vobj_get_metric(WINDOW win, wxSystemMetric data)
long xvt_vobj_get_attr(WINDOW win, long data) long xvt_vobj_get_attr(WINDOW win, long data)
{ {
long ret = 0L; long ret = 0L;
switch(data) switch(data)
{ {
case ATTR_APP_CTL_COLORS: case ATTR_APP_CTL_COLORS:
@ -4378,7 +4396,9 @@ void xvt_vobj_maximize(WINDOW win)
else else
{ {
CAST_WIN(win, w); CAST_WIN(win, w);
wxWindow* parent = w.GetParent(); wxWindow* parent = w.GetParent();
if (parent == NULL) if (parent == NULL)
parent = _task_win; parent = _task_win;
int width, height; int width, height;