Patch level : 10.0
Files correlati : ba1, ba2 Ricompilazione Demo : [ ] Commento : Aggiunte toolbar moderne ai programmi di installazione git-svn-id: svn://10.65.10.50/trunk@17359 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2dea5d3711
commit
ade0661ad8
@ -16,6 +16,8 @@ public:
|
|||||||
TProfiler_mask::TProfiler_mask() : TMask(TR("Test"), 1, 60, 9)
|
TProfiler_mask::TProfiler_mask() : TMask(TR("Test"), 1, 60, 9)
|
||||||
{
|
{
|
||||||
add_button_tool(DLG_OK, PR("Elabora"), TOOL_ELABORA);
|
add_button_tool(DLG_OK, PR("Elabora"), TOOL_ELABORA);
|
||||||
|
add_button_tool(DLG_INFO, PR("Info"), TOOL_INFO);
|
||||||
|
add_button_tool(DLG_HELP, PR("Help"), TOOL_HELP);
|
||||||
add_button_tool(DLG_QUIT, "", TOOL_QUIT);
|
add_button_tool(DLG_QUIT, "", TOOL_QUIT);
|
||||||
|
|
||||||
TToken_string codes, items;
|
TToken_string codes, items;
|
||||||
|
@ -34,18 +34,18 @@ class TCreazione_dischi : public TSkeleton_application
|
|||||||
protected:
|
protected:
|
||||||
TFascicolator_mask* _mask;
|
TFascicolator_mask* _mask;
|
||||||
|
|
||||||
virtual bool use_files() const { return FALSE; }
|
virtual bool use_files() const { return false; }
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
public:
|
public:
|
||||||
virtual bool modify_mode() { return FALSE; }
|
virtual bool modify_mode() { return false; }
|
||||||
TFascicolator_mask& mask() const { return *_mask; }
|
TFascicolator_mask& mask() const { return *_mask; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class TFascicolator : public TCreazione_dischi
|
class TFascicolator : public TCreazione_dischi
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
// virtual bool use_files() const { return TRUE; }
|
|
||||||
virtual void main_loop();
|
virtual void main_loop();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool modify_mode() { return TRUE;}
|
virtual bool modify_mode() { return TRUE;}
|
||||||
};
|
};
|
||||||
@ -233,8 +233,7 @@ void TInstall_ini::export_paragraph(const char* module, const char* summary,cons
|
|||||||
int last_file_num=0;
|
int last_file_num=0;
|
||||||
const bool is_submodule=(module[2]!='\0');
|
const bool is_submodule=(module[2]!='\0');
|
||||||
const int submodule=(module[2]-'0');
|
const int submodule=(module[2]-'0');
|
||||||
char main_module[3]={0,0,0};
|
TString4 main_module; main_module.strncpy(module,2);
|
||||||
strncpy(main_module, module,2);
|
|
||||||
|
|
||||||
if (remove_old || !is_submodule )
|
if (remove_old || !is_submodule )
|
||||||
{
|
{
|
||||||
@ -727,24 +726,21 @@ bool TMod_composition_msk::file_handler(TMask_field& f, KEY k)
|
|||||||
{
|
{
|
||||||
if (k == K_F9)
|
if (k == K_F9)
|
||||||
{
|
{
|
||||||
TFilename start;
|
|
||||||
DIRECTORY dir; xvt_fsys_get_dir(&dir);
|
DIRECTORY dir; xvt_fsys_get_dir(&dir);
|
||||||
xvt_fsys_convert_dir_to_str(&dir, start.get_buffer(), start.size());
|
|
||||||
|
|
||||||
FILE_SPEC fs;
|
FILE_SPEC fs;
|
||||||
xvt_fsys_get_dir(&fs.dir);
|
xvt_fsys_convert_str_to_fspec("*.*", &fs);
|
||||||
strcpy(fs.type, "");
|
fs.dir = dir;
|
||||||
strcpy(fs.name, "*.*");
|
|
||||||
strcpy(fs.creator, "SETUP");
|
|
||||||
|
|
||||||
FL_STATUS ok = xvt_dm_post_file_open(&fs, TR("Selezionare il file ..."));
|
FL_STATUS ok = xvt_dm_post_file_open(&fs, TR("Selezionare il file ..."));
|
||||||
xvt_fsys_set_dir(&dir);
|
xvt_fsys_set_dir(&dir);
|
||||||
|
|
||||||
if (ok == FL_OK)
|
if (ok == FL_OK)
|
||||||
{
|
{
|
||||||
TFilename file;
|
TFilename file, start;
|
||||||
xvt_fsys_convert_dir_to_str(&fs.dir, file.get_buffer(), file.size());
|
xvt_fsys_convert_dir_to_str(&fs.dir, file.get_buffer(), file.size());
|
||||||
|
xvt_fsys_convert_dir_to_str(&dir, start.get_buffer(), start.size());
|
||||||
|
|
||||||
const int maxlen = start.len();
|
const int maxlen = start.len();
|
||||||
if (file.compare(start, maxlen, TRUE) == 0)
|
if (file.compare(start, maxlen, TRUE) == 0)
|
||||||
{
|
{
|
||||||
@ -787,7 +783,7 @@ bool TMod_composition_msk::edit_handler(TMask_field& f, KEY k)
|
|||||||
if (k == K_SPACE)
|
if (k == K_SPACE)
|
||||||
{
|
{
|
||||||
TFilename file = f.mask().get(101);
|
TFilename file = f.mask().get(101);
|
||||||
if (stricmp(file.ext(), "exe") == 0)
|
if (xvt_str_compare_ignoring_case(file.ext(), "exe") == 0)
|
||||||
{
|
{
|
||||||
file << " -0";
|
file << " -0";
|
||||||
TExternal_app app(file);
|
TExternal_app app(file);
|
||||||
@ -927,9 +923,9 @@ static int file_compare(const TObject** o1, const TObject** o2)
|
|||||||
TToken_string* r1 = (TToken_string*)*o1;
|
TToken_string* r1 = (TToken_string*)*o1;
|
||||||
TToken_string* r2 = (TToken_string*)*o2;
|
TToken_string* r2 = (TToken_string*)*o2;
|
||||||
|
|
||||||
int cmp = stricmp(r1->get(-2), r2->get(-2));
|
int cmp = xvt_str_compare_ignoring_case(r1->get(-2), r2->get(-2));
|
||||||
if (cmp == 0)
|
if (cmp == 0)
|
||||||
cmp = stricmp(*r1, *r2);
|
cmp = xvt_str_compare_ignoring_case(*r1, *r2);
|
||||||
return cmp;
|
return cmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1623,13 +1619,9 @@ bool TCreadischi_mask::import_export_handler(TMask_field& f, KEY k)
|
|||||||
TFilename path = module;
|
TFilename path = module;
|
||||||
fm.build_export_path(path);
|
fm.build_export_path(path);
|
||||||
|
|
||||||
FILE_SPEC fs;
|
|
||||||
xvt_fsys_convert_str_to_dir(path, &fs.dir);
|
|
||||||
path.add(module); path << "inst.ini"; path.lower();
|
path.add(module); path << "inst.ini"; path.lower();
|
||||||
strcpy(fs.type, "ini");
|
FILE_SPEC fs; xvt_fsys_convert_str_to_fspec(path, &fs);
|
||||||
strcpy(fs.name, path.name());
|
|
||||||
strcpy(fs.creator, "INST");
|
|
||||||
|
|
||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
DIRECTORY dir;
|
DIRECTORY dir;
|
||||||
|
@ -1544,8 +1544,10 @@ TInstaller_mask::TInstaller_mask()
|
|||||||
HR("@1|Modulo@32|Cod.@3|Versione da\ninstallare@11|Liv.\nPatch@6|Data\nRilascio@10|Versione\nInstallata@10|Liv.\nPatch@6|Data\nInstallazione@13|Aggiornamento|Patch Base"),
|
HR("@1|Modulo@32|Cod.@3|Versione da\ninstallare@11|Liv.\nPatch@6|Data\nRilascio@10|Versione\nInstallata@10|Liv.\nPatch@6|Data\nInstallazione@13|Aggiornamento|Patch Base"),
|
||||||
0x18, 4)
|
0x18, 4)
|
||||||
{
|
{
|
||||||
add_button(F_UPDATE, BR("Rileggi", 9), '\0', TOOL_CONVERT);
|
add_button(F_INSTALL, TR("Installa"), '\0', TOOL_ELABORA); // NON mettere 'I'
|
||||||
add_button(F_INSTALL, BR("Installa", 9), '\0', TOOL_ELABORA); // NON mettere 'I'
|
add_button(F_UPDATE, TR("Rileggi"), '\0', TOOL_CONVERT);
|
||||||
|
add_button(DLG_INFO, TR("Informazioni"), K_F2, TOOL_INFO);
|
||||||
|
add_button(DLG_HELP, TR("Help"), K_F1, TOOL_HELP);
|
||||||
xvt_toolbar_set_last_tool(toolbar(), DLG_QUIT);
|
xvt_toolbar_set_last_tool(toolbar(), DLG_QUIT);
|
||||||
|
|
||||||
_station_type = test_station_type();
|
_station_type = test_station_type();
|
||||||
|
@ -66,8 +66,8 @@ HIDDEN int choose_isamfile(int selected)
|
|||||||
{
|
{
|
||||||
if (logic == selected)
|
if (logic == selected)
|
||||||
sel = sht.items();
|
sel = sht.items();
|
||||||
const char* desc = prefix().description(logic);
|
const TFixed_string desc = prefix().description(logic);
|
||||||
if (*desc && stricmp(desc, "File non presente") != 0)
|
if (desc.full() && desc.compare("File non presente", -1, true) != 0)
|
||||||
{
|
{
|
||||||
tt.format("%d", logic);
|
tt.format("%d", logic);
|
||||||
tt.add(desc);
|
tt.add(desc);
|
||||||
@ -219,8 +219,8 @@ void TColumnizer_win::update()
|
|||||||
{
|
{
|
||||||
if ((n & 0x1) == 0)
|
if ((n & 0x1) == 0)
|
||||||
{
|
{
|
||||||
int len = sprintf(str.get_buffer(), "%d", n);
|
str.format("%d", n);
|
||||||
points.overwrite(str, n - len);
|
points.overwrite(str, n - str.len());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
points.overwrite(":", n-1);
|
points.overwrite(":", n-1);
|
||||||
@ -249,7 +249,8 @@ void TColumnizer_win::update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
const int available = j-last_column;
|
const int available = j-last_column;
|
||||||
int len = sprintf(str.get_buffer(), "%d(%d)", i+1, available);
|
str.format("%d(%d)", i+1, available);
|
||||||
|
int len = str.len();
|
||||||
if (len > available)
|
if (len > available)
|
||||||
{
|
{
|
||||||
len = str.find('(');
|
len = str.find('(');
|
||||||
@ -654,7 +655,7 @@ void TWizard_mask::save_ini(const TFilename& ininame) const
|
|||||||
|
|
||||||
bool TWizard_mask::is_aga_file(const TFilename& name) const
|
bool TWizard_mask::is_aga_file(const TFilename& name) const
|
||||||
{
|
{
|
||||||
bool yes = stricmp(name.ext(), "txt") == 0;
|
bool yes = xvt_str_compare_ignoring_case(name.ext(), "txt") == 0;
|
||||||
if (yes)
|
if (yes)
|
||||||
{
|
{
|
||||||
TScanner aga(name);
|
TScanner aga(name);
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
|
|
||||||
#include <limits.h> //da eliminare nella 10.0!!!
|
|
||||||
|
|
||||||
struct TAFile_info : public TObject
|
struct TAFile_info : public TObject
|
||||||
{
|
{
|
||||||
TFilename _name;
|
TFilename _name;
|
||||||
|
@ -137,21 +137,21 @@ int TAutoform_mask::list_dirs(const char* filelist, TString_array& result) const
|
|||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
result.destroy();
|
result.destroy();
|
||||||
|
|
||||||
TFilename dir(filelist);
|
TFilename dirname(filelist);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = dir.len()-1; i >= 0; i--)
|
for (i = dirname.len()-1; i >= 0; i--)
|
||||||
if (dir[i] == '/' || dir[i] == '\\' || dir[i] == ':') break;
|
if (dirname[i] == '/' || dirname[i] == '\\' || dirname[i] == ':') break;
|
||||||
|
|
||||||
TFilename mask(dir.mid(i+1));
|
TFilename mask(dirname.mid(i+1));
|
||||||
dir.cut(i > 0 ? i+1 : 0);
|
dirname.cut(i > 0 ? i+1 : 0);
|
||||||
|
|
||||||
xvt_fsys_save_dir();
|
xvt_fsys_save_dir();
|
||||||
|
|
||||||
if (dir.not_empty())
|
if (dirname.full())
|
||||||
{
|
{
|
||||||
DIRECTORY directory; xvt_fsys_convert_str_to_dir(dir.get_buffer(), &directory);
|
DIRECTORY d; xvt_fsys_convert_str_to_dir(dirname, &d);
|
||||||
BOOLEAN ok = xvt_fsys_set_dir(&directory);
|
BOOLEAN ok = xvt_fsys_set_dir(&d);
|
||||||
if (!ok)
|
if (!ok)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -164,9 +164,9 @@ int TAutoform_mask::list_dirs(const char* filelist, TString_array& result) const
|
|||||||
char* f = xvt_slist_get(files, e, NULL);
|
char* f = xvt_slist_get(files, e, NULL);
|
||||||
if (*f != '.' && f[1] != ':')
|
if (*f != '.' && f[1] != ':')
|
||||||
{
|
{
|
||||||
if (dir.not_empty())
|
if (dirname.not_empty())
|
||||||
{
|
{
|
||||||
mask = dir;
|
mask = dirname;
|
||||||
mask.add(f);
|
mask.add(f);
|
||||||
result.add(mask);
|
result.add(mask);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user