Corretta gestione parametri di studio

MOdificata gestione configurazioni di stampa multiple in modo da ignorare il
tipo stampa se si stampa a video


git-svn-id: svn://10.65.10.50/trunk@1537 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1995-07-03 08:11:45 +00:00
parent 2ab36d8cb6
commit a4626341ed
3 changed files with 53 additions and 46 deletions

View File

@ -460,7 +460,7 @@ TConfig::TConfig(int which_config, const char* paragraph)
switch (which_config) switch (which_config)
{ {
case CONFIG_STUDIO: case CONFIG_STUDIO:
_file.add("prassis.ini"); // TBC ferdinando 29/6/95; mancava estensione _file.add("prassis.ini");
if (!fexist(_file)) fcopy("prassis.ini", _file); if (!fexist(_file)) fcopy("prassis.ini", _file);
break; break;
case CONFIG_STAMPE: case CONFIG_STAMPE:

View File

@ -916,14 +916,16 @@ void TPrinter::read_configuration(const char* parag)
#endif #endif
_config = parag; _config = parag;
if (_config.empty()) if (_config.empty())
_config = "Printer"; _config = "Printer";
TConfig* iniptr = NULL; TConfig* iniptr = NULL;
if (_config != "Printer") if (_config != "Printer")
{ { // Usa configurazione speciale
iniptr = new TConfig(CONFIG_STAMPE, _config); iniptr = new TConfig(CONFIG_STAMPE, _config);
if (!iniptr->exist("Type")) const int what = iniptr->get_int("Type", NULL, -1, -1);
if (what < 0)
{ {
delete iniptr; iniptr = NULL; delete iniptr; iniptr = NULL;
} }
@ -966,6 +968,7 @@ void TPrinter::read_configuration(const char* parag)
#endif #endif
} }
if (_config == "Printer" || _printertype == winprinter)
switch (what) switch (what)
{ {
case 0: case 0:
@ -1412,7 +1415,7 @@ return _isopen = TRUE;
} }
void TPrinter::set() bool TPrinter::set()
{ {
main_app().disable_menu_item (M_FILE_PG_SETUP); main_app().disable_menu_item (M_FILE_PG_SETUP);
@ -1464,7 +1467,8 @@ void TPrinter::set()
KEY k = mask.run(); KEY k = mask.run();
if (k == K_ESC) return; if (k == K_ESC)
return FALSE;
// get user choices // get user choices
@ -1571,7 +1575,7 @@ void TPrinter::set()
_curprn = oldprn; _curprn = oldprn;
set_printrcd(); set_printrcd();
set_win_formlen(); set_win_formlen();
return; return FALSE;
} }
_curprn = atoi(mask.get(MSK_1_PRINTERS)); _curprn = atoi(mask.get(MSK_1_PRINTERS));
@ -1608,6 +1612,7 @@ void TPrinter::set()
save_configuration(); save_configuration();
main_app().enable_menu_item (M_FILE_PG_SETUP); main_app().enable_menu_item (M_FILE_PG_SETUP);
return TRUE;
} }
@ -1809,7 +1814,7 @@ TFile_printer::~TFile_printer ()
{ {
} }
void TFile_printer::set () bool TFile_printer::set ()
{ {
TMask m ("bagn004"); TMask m ("bagn004");
KEY tasto; KEY tasto;
@ -1833,9 +1838,9 @@ void TFile_printer::set ()
if (_label_fissata) if (_label_fissata)
m.disable (F_LABEL); m.disable (F_LABEL);
tasto = m.run (); const bool ok = m.run () == K_ENTER;
if (tasto == K_ENTER) if (ok)
{ {
f = atoi(m.get(F_FORMATO_DISCO)); f = atoi(m.get(F_FORMATO_DISCO));
_drive = m.get(F_DRIVE); _drive = m.get(F_DRIVE);
@ -1845,6 +1850,8 @@ void TFile_printer::set ()
_size = disk_sizes[f]; _size = disk_sizes[f];
_num_rec_volume = int ((_size / _len_rec) - _num_rec_testa_coda); _num_rec_volume = int ((_size / _len_rec) - _num_rec_testa_coda);
} }
return ok;
} }
// //

View File

@ -274,7 +274,7 @@ public:
bool skip (int linetoskip); bool skip (int linetoskip);
bool jump (int linestojump); bool jump (int linestojump);
void reset (); void reset ();
virtual void set (); virtual bool set ();
bool open (); bool open ();
void close (); void close ();
bool formfeed (); bool formfeed ();
@ -377,7 +377,7 @@ public:
// void scrivi(); // void scrivi();
bool genera_dischetti(); bool genera_dischetti();
virtual void set (); virtual bool set ();
// //
// tipo_disco: // tipo_disco: