Corretto comportamento nel caso di cambio di configurazione della stampante

git-svn-id: svn://10.65.10.50/trunk@3968 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1996-12-06 10:17:32 +00:00
parent 9c2d0d0a78
commit 08733f7355

View File

@ -1713,6 +1713,19 @@ bool TPrinter::open()
}
else
#endif
{
TToken_string& pn2 = getprinternames(); // get printer names
TString80 pdev(pn2.get(_curprn)); // Nome stampante corrente
char szDevice[80];
GetProfileString ("devices", pdev, "", szDevice, sizeof (szDevice));
pdev << "," << szDevice;
// scrivi (e semmai lo si risistema poi)
WriteProfileString("windows", "device", pdev);
if (_printertype == screenvis)
{
CHECK(_vf == NULL, "Print preview already open");
@ -1733,6 +1746,7 @@ bool TPrinter::open()
if (isfax())
start_fax_server();
}
}
#if XVT_OS==XVT_OS_SCOUNIX
else
{
@ -1777,7 +1791,7 @@ bool TPrinter::set()
const bool can_save = _config == "Printer";
mask.enable(DLG_OK, can_save);
mask.enable(DLG_SAVEREC, can_save);
// mask.enable(DLG_SAVEREC, can_save);
#if XVT_OS == XVT_OS_WIN
@ -2050,7 +2064,8 @@ if (_finker)
delete _finker;
_finker = NULL;
}
_isopen = FALSE;
_isopen = FALSE;
WriteProfileString("windows", "device", defPrinter);
}
//