diff --git a/ba/ba2200.cpp b/ba/ba2200.cpp index bddb0c706..a614efdd7 100755 --- a/ba/ba2200.cpp +++ b/ba/ba2200.cpp @@ -189,7 +189,7 @@ bool TArchive::fbuild(const char* filename, char floppy) const TFilename name; // Nome del file su dischetto name << floppy << ":/" << work.name(); - TString256 msg("Rispristino da "); msg << name; + TString256 msg("Ripristino da "); msg << name; TProgind w(max, msg, TRUE, TRUE, 32); int disk = 0; diff --git a/ba/ba2200.uml b/ba/ba2200.uml index fb0a10166..25ed870c7 100755 --- a/ba/ba2200.uml +++ b/ba/ba2200.uml @@ -60,7 +60,7 @@ END BUTTON DLG_NULL 15 2 BEGIN - PROMPT -23 -1 "~Riprisitino" + PROMPT -23 -1 "~Ripristino" MESSAGE EXIT,K_INS END diff --git a/ba/ba3100.cpp b/ba/ba3100.cpp index 6a5e435b2..f31a5c7dc 100755 --- a/ba/ba3100.cpp +++ b/ba/ba3100.cpp @@ -1,9 +1,10 @@ +#include +#include #include #include -#include #include "batbreg.h" -#define F_TIPODEL 133 // attenzione estratto da batbdel.h . Tenerlo aggiornato !!!! +#define F_TIPODEL 133 // attenzione estratto da batbdel.h . Tenerlo aggiornato !!!! #define F_IMPORTO 140 // attenzione estratto da batbdel.h . Tenerlo aggiornato !!!! #define REG_JOURNAL 5 @@ -89,6 +90,28 @@ HIDDEN bool tiporeg_handler(TMask_field& f, KEY k) return TRUE; } +HIDDEN bool printer_handler(TMask_field& f, KEY k) +{ + if (k == K_SPACE) + { + TMask& m = f.mask(); + TString16 config; + config.format("REG%05ld", m.get_long(F_CODDITTA)); + config << m.get(F_CODICE); + + if (config.len() == 11) + { + TPrinter& p = printer(); + p.read_configuration(config); + p.set(); + p.read_configuration(); + } + else + return error_box("Nessun registro selezionato"); + } + return TRUE; +} + HIDDEN bool impdel_handler(TMask_field& f, KEY k) { const TMask & m = f.mask(); @@ -112,16 +135,20 @@ HIDDEN bool impdel_handler(TMask_field& f, KEY k) bool TGeneric_table_app::user_create() { Tab_application::user_create(); - if (get_tabname() == "REG") + const TString& name = get_tabname(); + TMask& mask = *get_mask(); + + if (name == "REG") { - get_mask()->set_handler(F_TIPO, tiporeg_handler); + mask.set_handler(F_TIPO, tiporeg_handler); + mask.set_handler(F_PRINTER, printer_handler); TConfig st(CONFIG_STUDIO, "cg"); - _stampa_intest = st.get_bool("StiReg"); } - if (get_tabname() == "DEL") - get_mask()->set_handler(F_IMPORTO, impdel_handler); + if (name == "DEL") + mask.set_handler(F_IMPORTO, impdel_handler); + return TRUE; } diff --git a/ba/batbreg.h b/ba/batbreg.h index 07e98d9bf..b8f855d2d 100755 --- a/ba/batbreg.h +++ b/ba/batbreg.h @@ -1,5 +1,3 @@ - - // campi maschera batbreg.msk #define F_CODICE 131 @@ -46,3 +44,5 @@ #define F_CODULC 163 #define F_CODLBU 164 #define F_RAGSOC 165 + +#define F_PRINTER 201 diff --git a/ba/batbreg.uml b/ba/batbreg.uml index 23c74c240..8a1d4a0d4 100755 --- a/ba/batbreg.uml +++ b/ba/batbreg.uml @@ -229,6 +229,11 @@ BEGIN CHECKTYPE NORMAL VALIDATE NOT_EMPTY_CHECK_FIELD END + +BUTTON F_PRINTER 32 2 +BEGIN + PROMPT -11 17 "Configurazione stampante" +END ENDPAGE