Patch level : 2.0 480

Files correlati     : ba1.exe
Ricompilazione Demo : [ ]
Commento            :

GF20021
Da ogni voce o punto di menù se vado su File - Impostazione Stampante mi
restituisce: Fatal Error - il campo 337 non esiste, se do OK mi dice
Runtime Error (eseguibile), abnormal program termination e mi butta fuori.
L'unica eccezione a questo è se vado sulle impostazioni stampanti dai
Documenti Interattivi.


git-svn-id: svn://10.65.10.50/trunk@11192 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-05-29 07:57:20 +00:00
parent 797b69a100
commit 414291abe3

View File

@ -103,7 +103,7 @@ protected:
int precheck_modules(bool only_newer=TRUE); int precheck_modules(bool only_newer=TRUE);
void update_version(); void update_version();
int needs_underscore(const TFilename& file) const; int needs_reboot(const TFilename& file) const;
bool move_file(const TFilename& file, const char* dir) const; bool move_file(const TFilename& file, const char* dir) const;
bool move_module(const TString& module, TInstall_ini& ini, bool update) const; bool move_module(const TString& module, TInstall_ini& ini, bool update) const;
@ -532,7 +532,7 @@ bool TInstaller_mask::can_install(const char* module, TInstall_ini& ini)
return ok; return ok;
} }
int TInstaller_mask::needs_underscore(const TFilename& file) const int TInstaller_mask::needs_reboot(const TFilename& file) const
{ {
char fname[_MAX_FNAME], ext[_MAX_EXT]; char fname[_MAX_FNAME], ext[_MAX_EXT];
xvt_fsys_parse_pathname(file, NULL, NULL, fname, ext, NULL); xvt_fsys_parse_pathname(file, NULL, NULL, fname, ext, NULL);
@ -544,12 +544,11 @@ int TInstaller_mask::needs_underscore(const TFilename& file) const
underscore = NEW_MENUPRG; else underscore = NEW_MENUPRG; else
if (xvt_str_compare_ignoring_case(fname, "ba1") == 0) if (xvt_str_compare_ignoring_case(fname, "ba1") == 0)
underscore = NEW_INSTALLER; underscore = NEW_INSTALLER;
} } else
else
{
if (xvt_str_compare_ignoring_case(ext, ".dll") == 0) if (xvt_str_compare_ignoring_case(ext, ".dll") == 0)
underscore = NEW_DLL; underscore = NEW_DLL; else
} if (xvt_str_compare_ignoring_case(ext, ".men") == 0)
underscore = NEW_MENU;
return underscore; return underscore;
} }
@ -563,8 +562,8 @@ bool TInstaller_mask::move_file(const TFilename& file, const char* todir) const
char fname[_MAX_FNAME], ext[_MAX_EXT]; char fname[_MAX_FNAME], ext[_MAX_EXT];
xvt_fsys_parse_pathname(file, NULL, NULL, fname, ext, NULL); xvt_fsys_parse_pathname(file, NULL, NULL, fname, ext, NULL);
const int underscore = needs_underscore(file); const int reboot = needs_reboot(file);
if (underscore) if (reboot > NEW_MENU)
ext[2] = '_'; ext[2] = '_';
TFilename dest(todir); TFilename dest(todir);
@ -621,10 +620,7 @@ bool TInstaller_mask::move_file(const TFilename& file, const char* todir) const
if (write_ok) if (write_ok)
{ {
int rp = underscore; (int&)_reboot_program |= reboot; // Skip const!
if (rp == NONE && xvt_str_compare_ignoring_case(ext, ".men")==0)
rp = NEW_MENU;
(int&)_reboot_program |= rp; // Skip const!
} }
return write_ok; return write_ok;
} }
@ -658,7 +654,7 @@ bool TInstaller_mask::move_module(const TString& module, TInstall_ini& ini, bool
KEY TInstaller_mask::askdisk(TString & path, TFilename & cmdline, int d, int dischi, const char * modulo) KEY TInstaller_mask::askdisk(TString & path, TFilename & cmdline, int d, int dischi, const char * modulo)
{ {
TMask retry_mask(TR("Inserimento dischi"),1,80,10); TMask retry_mask(TR("Inserimento disco"),1,80,10);
retry_mask.add_static((F_PATH==101 ? 102:101),0, retry_mask.add_static((F_PATH==101 ? 102:101),0,
format(FR("Inserire il disco %d di %d del modulo'%s' nell'unità"), d, dischi, modulo) format(FR("Inserire il disco %d di %d del modulo'%s' nell'unità"), d, dischi, modulo)
@ -934,16 +930,16 @@ bool TInstaller_mask::install(const TString& module, int patchlevel)
dst.lower(); dst.lower();
src = path; src = path;
src.add(dst); src.add(dst);
const int underscore = needs_underscore(dst); const int reboot = needs_reboot(dst);
if (underscore) if (reboot > NEW_MENU)
{ {
dst.rtrim(1); dst.rtrim(1);
dst << '_'; dst << '_';
} }
ok = fcopy(src, dst); ok = fcopy(src, dst);
if (ok && underscore != NONE) if (ok && reboot != NONE)
_reboot_program |= underscore; _reboot_program |= reboot;
cancelled = pi.iscancelled(); cancelled = pi.iscancelled();
} }