Possibilità di eseguire contemporaneamente più menu in diverse cartelle
git-svn-id: svn://10.65.10.50/branches/R_10_00@22930 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
80f65c95ef
commit
a32fade891
@ -990,12 +990,9 @@ void TMenu_application::test_temp()
|
|||||||
|
|
||||||
if (count > 0 && yesno_box(TR("Cancellare tutti i file temporanei in %s?"), dir.path()))
|
if (count > 0 && yesno_box(TR("Cancellare tutti i file temporanei in %s?"), dir.path()))
|
||||||
{
|
{
|
||||||
TProgind bar(count, TR("Cancellazione file temporanei"), true, true);
|
TProgress_monitor bar(count, TR("Cancellazione file temporanei"));
|
||||||
for (int i = count-1; i >= 0; i--)
|
for (int i = count-1; i >= 0 && bar.add_status(); i--)
|
||||||
{
|
{
|
||||||
bar.addstatus(1);
|
|
||||||
if (bar.iscancelled())
|
|
||||||
break;
|
|
||||||
const char* e = files.row(i);
|
const char* e = files.row(i);
|
||||||
::remove(e);
|
::remove(e);
|
||||||
}
|
}
|
||||||
@ -1760,7 +1757,8 @@ bool TStudy_mask::is_valid_study(const char* path) const
|
|||||||
{
|
{
|
||||||
TFilename n = path;
|
TFilename n = path;
|
||||||
n.add("com/dir.gen");
|
n.add("com/dir.gen");
|
||||||
return n.find(' ') < 0 && n.exist();
|
//return n.find(' ') < 0 && n.exist();
|
||||||
|
return n.find(' ') < 0 && xvt_fsys_access(n, 0x2) == 0; // NO blanks and write permission
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStudy_mask::list_studies(TString_array& sht, bool firms_count) const
|
void TStudy_mask::list_studies(TString_array& sht, bool firms_count) const
|
||||||
|
@ -496,7 +496,8 @@ bool TSet_user_passwd::password_handler(TMask_field& f, KEY key)
|
|||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
const int minlen = ini_get_int(CONFIG_STUDIO, "Main", "MinPwdLen", 4);
|
int minlen = ini_get_int(CONFIG_STUDIO, "Main", "MinPwdLen", 4);
|
||||||
|
if (minlen > f.size()) minlen = f.size();
|
||||||
if (pwdlen < minlen)
|
if (pwdlen < minlen)
|
||||||
{
|
{
|
||||||
TString msg; msg.format(TR("La password deve essere lunga almeno %d caratteri."), minlen);
|
TString msg; msg.format(TR("La password deve essere lunga almeno %d caratteri."), minlen);
|
||||||
|
@ -250,7 +250,7 @@ void TInstall_ini::export_paragraph(const char* module, const char* summary, con
|
|||||||
TAssoc_array& ass = list_variables(module);
|
TAssoc_array& ass = list_variables(module);
|
||||||
TString newkey,tmps;
|
TString newkey,tmps;
|
||||||
TToken_string item_value;
|
TToken_string item_value;
|
||||||
TString ;
|
|
||||||
FOR_EACH_ASSOC_STRING(ass, obj, key, str)
|
FOR_EACH_ASSOC_STRING(ass, obj, key, str)
|
||||||
{
|
{
|
||||||
if (!remove_old && is_submodule && strncmp(key, "File", 4) == 0 )
|
if (!remove_old && is_submodule && strncmp(key, "File", 4) == 0 )
|
||||||
@ -258,23 +258,27 @@ void TInstall_ini::export_paragraph(const char* module, const char* summary, con
|
|||||||
// merging "File(X)" items...
|
// merging "File(X)" items...
|
||||||
item_value=str;
|
item_value=str;
|
||||||
tmps=item_value.get(0);
|
tmps=item_value.get(0);
|
||||||
int item_number=find_row(tmps, old_list);
|
const int item_number=find_row(tmps, old_list);
|
||||||
if (item_number>=0)
|
if (item_number>=0)
|
||||||
{
|
{
|
||||||
// file sostituito
|
// file sostituito
|
||||||
TString old_smodule(old_list.row(item_number).get(2));
|
const TString old_smodule = old_list.row(item_number).get(2);
|
||||||
TAssoc_array& oldvars = sum.list_variables(old_smodule);
|
TAssoc_array& oldvars = sum.list_variables(old_smodule);
|
||||||
THash_object* obj;
|
THash_object* obj = NULL;
|
||||||
TToken_string oldvalue;
|
TToken_string oldvalue;
|
||||||
oldvars.restart();
|
oldvars.restart();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
obj=oldvars.get_hashobj();
|
obj = oldvars.get_hashobj();
|
||||||
oldvalue=((TString &)obj->obj());
|
if (obj == NULL)
|
||||||
|
break;
|
||||||
|
oldvalue = ((const TString &)obj->obj());
|
||||||
if (tmps == oldvalue.get(0))
|
if (tmps == oldvalue.get(0))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
while (obj);
|
while (obj);
|
||||||
|
if (obj != NULL)
|
||||||
|
{
|
||||||
newkey = obj->key();
|
newkey = obj->key();
|
||||||
if (old_smodule!=module)
|
if (old_smodule!=module)
|
||||||
{
|
{
|
||||||
@ -284,6 +288,7 @@ void TInstall_ini::export_paragraph(const char* module, const char* summary, con
|
|||||||
sum.set_paragraph(module);
|
sum.set_paragraph(module);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// nuovo file
|
// nuovo file
|
||||||
|
@ -125,6 +125,7 @@
|
|||||||
#define DLG_REG 188
|
#define DLG_REG 188
|
||||||
#define F_ISCRCAF 189
|
#define F_ISCRCAF 189
|
||||||
#define FLD_GD1_RAGSOCH 190
|
#define FLD_GD1_RAGSOCH 190
|
||||||
|
#define FLD_GD1_MAIL 191
|
||||||
#define FLD_GD1_VALUTA 192
|
#define FLD_GD1_VALUTA 192
|
||||||
|
|
||||||
#define CHK_IN_PRESELEN 195
|
#define CHK_IN_PRESELEN 195
|
||||||
|
@ -35,7 +35,7 @@ BEGIN
|
|||||||
FIELD LF_NDITTE->CODDITTA
|
FIELD LF_NDITTE->CODDITTA
|
||||||
FLAGS "RG"
|
FLAGS "RG"
|
||||||
KEY 1
|
KEY 1
|
||||||
USE LF_NDITTE KEY 1
|
USE LF_NDITTE
|
||||||
INPUT CODDITTA FLD_GD1_CODDITTA
|
INPUT CODDITTA FLD_GD1_CODDITTA
|
||||||
DISPLAY "Codice" CODDITTA
|
DISPLAY "Codice" CODDITTA
|
||||||
DISPLAY "Ragione sociale@50" RAGSOC
|
DISPLAY "Ragione sociale@50" RAGSOC
|
||||||
@ -182,9 +182,9 @@ BEGIN
|
|||||||
WARNING "Attivita' assente"
|
WARNING "Attivita' assente"
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 76 4
|
GROUPBOX DLG_NULL 76 5
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 0 12 "@bTelefoni"
|
PROMPT 0 12 "@bRecapiti telefonici e telematici"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING FLD_GD1_PTEL 10
|
STRING FLD_GD1_PTEL 10
|
||||||
@ -215,6 +215,14 @@ BEGIN
|
|||||||
HELP "Numero telefonico del fax della ditta"
|
HELP "Numero telefonico del fax della ditta"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
STRING FLD_GD1_MAIL 50
|
||||||
|
BEGIN
|
||||||
|
PROMPT 1 15 "E-Mail : "
|
||||||
|
FIELD LF_NDITTE->MAIL
|
||||||
|
HELP "Indirizzo e-mail della ditta"
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
STRING FLD_GD1_VALUTA 3
|
STRING FLD_GD1_VALUTA 3
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 17 "Codice valuta di riferimento "
|
PROMPT 1 17 "Codice valuta di riferimento "
|
||||||
|
@ -511,11 +511,31 @@ bool TReport_mask::get_rep_path(TFilename& path) const
|
|||||||
xvt_fsys_mkdir(path);
|
xvt_fsys_mkdir(path);
|
||||||
path.add(name);
|
path.add(name);
|
||||||
path.ext("rep");
|
path.ext("rep");
|
||||||
if (!path.exist() && is_power_station())
|
bool found = path.exist();
|
||||||
|
if (!found)
|
||||||
|
{
|
||||||
|
TString80 fname = path.name_only(); fname.lower();
|
||||||
|
TFilename star = path.path(); star.add("*.rep");
|
||||||
|
TString_array reps;
|
||||||
|
list_files(star, reps);
|
||||||
|
double best = 0.8;
|
||||||
|
FOR_EACH_ARRAY_ROW(reps, r, row)
|
||||||
|
{
|
||||||
|
star = *row; star = star.name_only(); star.lower();
|
||||||
|
const double s = xvt_str_fuzzy_compare(star, fname);
|
||||||
|
if (s > best)
|
||||||
|
{
|
||||||
|
path = *row;
|
||||||
|
best = s;
|
||||||
|
found = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found && is_power_station())
|
||||||
{
|
{
|
||||||
path = name;
|
path = name;
|
||||||
path.ext("rep");
|
path.ext("rep");
|
||||||
path.custom_path();
|
found = path.custom_path();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
path.ext("rep");
|
path.ext("rep");
|
||||||
|
@ -155,22 +155,55 @@ void TKlarkKent_app::main_loop()
|
|||||||
{
|
{
|
||||||
TString_array arr; // Lista dei reports
|
TString_array arr; // Lista dei reports
|
||||||
TAssoc_array vars; // Variabili utente
|
TAssoc_array vars; // Variabili utente
|
||||||
|
bool trans = false;
|
||||||
|
|
||||||
|
TString80 name, val;
|
||||||
for (int i = 2; i < argc(); i++)
|
for (int i = 2; i < argc(); i++)
|
||||||
{
|
{
|
||||||
const TFixed_string arg(argv(i));
|
const TFixed_string arg(argv(i));
|
||||||
const int uguale = arg.find('=');
|
const int uguale = arg.find('=');
|
||||||
if (uguale > 0)
|
if (uguale > 0)
|
||||||
{
|
{
|
||||||
TString16 name = arg.left(uguale); name.trim();
|
name = arg.left(uguale); name.trim();
|
||||||
TString80 val = arg.mid(uguale+1); val.trim();
|
val = arg.mid(uguale+1); val.trim();
|
||||||
if (name.full() && val.full())
|
if (name.full())
|
||||||
{
|
{
|
||||||
TVariant* var = NULL;
|
TVariant* var = NULL;
|
||||||
|
if (val.full())
|
||||||
|
{
|
||||||
if (real::is_real(val))
|
if (real::is_real(val))
|
||||||
var = new TVariant(real(val));
|
var = new TVariant(real(val));
|
||||||
else
|
else
|
||||||
var = new TVariant(val);
|
var = new TVariant(val);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
var = new TVariant;
|
||||||
|
if (name[0] != '#')
|
||||||
|
name.insert("#");
|
||||||
|
vars.add(name, var);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (arg.starts_with("-i"))
|
||||||
|
{
|
||||||
|
trans = true;
|
||||||
|
TFilename ininame = arg.mid(2);
|
||||||
|
TConfig ini(ininame, "Vars");
|
||||||
|
TAssoc_array& inivars = ini.list_variables();
|
||||||
|
FOR_EACH_ASSOC_STRING(inivars, obj, key, str)
|
||||||
|
{
|
||||||
|
TVariant* var = NULL;
|
||||||
|
if (str && *str)
|
||||||
|
{
|
||||||
|
if (real::is_real(str))
|
||||||
|
var = new TVariant(real(str));
|
||||||
|
else
|
||||||
|
var = new TVariant(str);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
var = new TVariant;
|
||||||
|
name = key;
|
||||||
if (name[0] != '#')
|
if (name[0] != '#')
|
||||||
name.insert("#");
|
name.insert("#");
|
||||||
vars.add(name, var);
|
vars.add(name, var);
|
||||||
@ -184,6 +217,7 @@ void TKlarkKent_app::main_loop()
|
|||||||
arr.add(arg);
|
arr.add(arg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (arr.items() == 0)
|
if (arr.items() == 0)
|
||||||
arr.add(EMPTY_STRING);
|
arr.add(EMPTY_STRING);
|
||||||
@ -246,7 +280,7 @@ void TKlarkKent_app::main_loop()
|
|||||||
pset->set_var(name, *(TVariant*)var, true);
|
pset->set_var(name, *(TVariant*)var, true);
|
||||||
}
|
}
|
||||||
const bool ok = book.add(*report);
|
const bool ok = book.add(*report);
|
||||||
if (ok && arr.items() == 1) // Controlla se e' pensabile ripetere la stampa
|
if (ok && !trans && arr.items() == 1) // Controlla se e' pensabile ripetere la stampa
|
||||||
{
|
{
|
||||||
TFilename msk = report_name;
|
TFilename msk = report_name;
|
||||||
msk.ext("msk");
|
msk.ext("msk");
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
9
|
9
|
||||||
1
|
1
|
||||||
%nditte|0|0|571|0|Ditte|#6||
|
%nditte|0|0|621|0|Ditte|#6||
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
9
|
9
|
||||||
55
|
56
|
||||||
CODDITTA|3|5|0|
|
CODDITTA|3|5|0|
|
||||||
TIPOA|1|1|0|
|
TIPOA|1|1|0|
|
||||||
CODANAGR|3|5|0|
|
CODANAGR|3|5|0|
|
||||||
@ -9,6 +9,7 @@ PTEL|1|10|0|
|
|||||||
TEL|1|30|0|
|
TEL|1|30|0|
|
||||||
PFAX|1|10|0|
|
PFAX|1|10|0|
|
||||||
FAX|1|30|0|
|
FAX|1|30|0|
|
||||||
|
MAIL|1|50|0|
|
||||||
NULC|2|3|0|
|
NULC|2|3|0|
|
||||||
ARTIG|8|1|0|
|
ARTIG|8|1|0|
|
||||||
NISCRAA|1|10|0|
|
NISCRAA|1|10|0|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user